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

Unified Diff: src/crankshaft/hydrogen.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/crankshaft/arm64/lithium-codegen-arm64.cc ('k') | src/crankshaft/hydrogen-instructions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/hydrogen.cc
diff --git a/src/crankshaft/hydrogen.cc b/src/crankshaft/hydrogen.cc
index b297aba484242392c437f14a62b9108dbe962a16..a2eb0ef7eee214339e3d06639d1148ef21bd25ff 100644
--- a/src/crankshaft/hydrogen.cc
+++ b/src/crankshaft/hydrogen.cc
@@ -2651,7 +2651,7 @@ HValue* HGraphBuilder::BuildUncheckedStringAdd(
IfBuilder if_size(this);
if_size.If<HCompareNumericAndBranch>(
- size, Add<HConstant>(Page::kMaxRegularHeapObjectSize), Token::LT);
+ size, Add<HConstant>(kMaxRegularHeapObjectSize), Token::LT);
if_size.Then();
{
// Allocate the string object. HAllocate does not care whether we pass
@@ -3074,9 +3074,10 @@ HValue* HGraphBuilder::BuildGrowElementsCapacity(HValue* object,
ElementsKind new_kind,
HValue* length,
HValue* new_capacity) {
- Add<HBoundsCheck>(new_capacity, Add<HConstant>(
- (Page::kMaxRegularHeapObjectSize - FixedArray::kHeaderSize) >>
- ElementsKindToShiftSize(new_kind)));
+ Add<HBoundsCheck>(
+ new_capacity,
+ Add<HConstant>((kMaxRegularHeapObjectSize - FixedArray::kHeaderSize) >>
+ ElementsKindToShiftSize(new_kind)));
HValue* new_elements =
BuildAllocateAndInitializeArray(new_kind, new_capacity);
@@ -9941,7 +9942,7 @@ bool HOptimizedGraphBuilder::TryInlineArrayCall(Expression* expression,
HValue* elements_size = BuildCalculateElementsSize(kind, capacity);
// Bail out for large objects.
- HValue* max_size = Add<HConstant>(Page::kMaxRegularHeapObjectSize);
+ HValue* max_size = Add<HConstant>(kMaxRegularHeapObjectSize);
Add<HBoundsCheck>(elements_size, max_size);
// Allocate (dealing with failure appropriately).
@@ -11841,7 +11842,7 @@ HInstruction* HOptimizedGraphBuilder::BuildFastLiteral(
Add<HAllocate>(object_size_constant, type, pretenure_flag, instance_type,
graph()->GetConstant0(), top_site);
- // If allocation folding reaches Page::kMaxRegularHeapObjectSize the
+ // If allocation folding reaches kMaxRegularHeapObjectSize the
// elements array may not get folded into the object. Hence, we set the
// elements pointer to empty fixed array and let store elimination remove
// this store in the folding case.
« no previous file with comments | « src/crankshaft/arm64/lithium-codegen-arm64.cc ('k') | src/crankshaft/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698