Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: src/crankshaft/hydrogen-instructions.cc

Issue 2311203002: Move kMaxRegularHeapObjectSize into globals (Closed)
Patch Set: Saving the file helps... Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/crankshaft/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/crankshaft/hydrogen-instructions.h" 5 #include "src/crankshaft/hydrogen-instructions.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/ieee754.h" 8 #include "src/base/ieee754.h"
9 #include "src/base/safe_math.h" 9 #include "src/base/safe_math.h"
10 #include "src/crankshaft/hydrogen-infer-representation.h" 10 #include "src/crankshaft/hydrogen-infer-representation.h"
(...skipping 3202 matching lines...) Expand 10 before | Expand all | Expand 10 after
3213 if (MustAllocateDoubleAligned()) { 3213 if (MustAllocateDoubleAligned()) {
3214 if ((dominator_size_constant & kDoubleAlignmentMask) != 0) { 3214 if ((dominator_size_constant & kDoubleAlignmentMask) != 0) {
3215 dominator_size_constant += kDoubleSize / 2; 3215 dominator_size_constant += kDoubleSize / 2;
3216 } 3216 }
3217 } 3217 }
3218 3218
3219 int32_t current_size_max_value = size()->GetInteger32Constant(); 3219 int32_t current_size_max_value = size()->GetInteger32Constant();
3220 int32_t new_dominator_size = dominator_size_constant + current_size_max_value; 3220 int32_t new_dominator_size = dominator_size_constant + current_size_max_value;
3221 3221
3222 // Since we clear the first word after folded memory, we cannot use the 3222 // Since we clear the first word after folded memory, we cannot use the
3223 // whole Page::kMaxRegularHeapObjectSize memory. 3223 // whole kMaxRegularHeapObjectSize memory.
3224 if (new_dominator_size > Page::kMaxRegularHeapObjectSize - kPointerSize) { 3224 if (new_dominator_size > kMaxRegularHeapObjectSize - kPointerSize) {
3225 if (FLAG_trace_allocation_folding) { 3225 if (FLAG_trace_allocation_folding) {
3226 PrintF("#%d (%s) cannot fold into #%d (%s) due to size: %d\n", 3226 PrintF("#%d (%s) cannot fold into #%d (%s) due to size: %d\n",
3227 id(), Mnemonic(), dominator_allocate->id(), 3227 id(), Mnemonic(), dominator_allocate->id(),
3228 dominator_allocate->Mnemonic(), new_dominator_size); 3228 dominator_allocate->Mnemonic(), new_dominator_size);
3229 } 3229 }
3230 return false; 3230 return false;
3231 } 3231 }
3232 3232
3233 HInstruction* new_dominator_size_value = HConstant::CreateAndInsertBefore( 3233 HInstruction* new_dominator_size_value = HConstant::CreateAndInsertBefore(
3234 isolate, zone, context(), new_dominator_size, Representation::None(), 3234 isolate, zone, context(), new_dominator_size, Representation::None(),
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after
4055 case HObjectAccess::kExternalMemory: 4055 case HObjectAccess::kExternalMemory:
4056 os << "[external-memory]"; 4056 os << "[external-memory]";
4057 break; 4057 break;
4058 } 4058 }
4059 4059
4060 return os << "@" << access.offset(); 4060 return os << "@" << access.offset();
4061 } 4061 }
4062 4062
4063 } // namespace internal 4063 } // namespace internal
4064 } // namespace v8 4064 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/crankshaft/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698