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

Unified Diff: src/hydrogen.cc

Issue 1361853005: [heap] Prepare code for smaller large object allocation limit than max allocatable memory. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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/heap/spaces-inl.h ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 211e4ba927cf8108fd9328c451277a07e9616d6b..fc3aa4cabd97c52aa3ace5100e2d06bbc43ee71d 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -1852,7 +1852,7 @@ HValue* HGraphBuilder::BuildRegExpConstructResult(HValue* length,
HValue* index,
HValue* input) {
NoObservableSideEffectsScope scope(this);
- HConstant* max_length = Add<HConstant>(JSObject::kInitialMaxFastElementArray);
+ HConstant* max_length = Add<HConstant>(JSArray::kInitialMaxFastElementArray);
Add<HBoundsCheck>(length, max_length);
// Generate size calculation code here in order to make it dominate
@@ -2658,7 +2658,7 @@ HValue* HGraphBuilder::BuildAllocateArrayFromLength(
HValue* constant_zero = graph()->GetConstant0();
HConstant* max_alloc_length =
- Add<HConstant>(JSObject::kInitialMaxFastElementArray);
+ Add<HConstant>(JSArray::kInitialMaxFastElementArray);
HInstruction* checked_length = Add<HBoundsCheck>(length_argument,
max_alloc_length);
IfBuilder if_builder(this);
@@ -3128,10 +3128,10 @@ HValue* HGraphBuilder::BuildCloneShallowArrayNonEmpty(HValue* boilerplate,
// This function implicitly relies on the fact that the
// FastCloneShallowArrayStub is called only for literals shorter than
- // JSObject::kInitialMaxFastElementArray.
+ // JSArray::kInitialMaxFastElementArray.
// Can't add HBoundsCheck here because otherwise the stub will eager a frame.
HConstant* size_upper_bound = EstablishElementsAllocationSize(
- kind, JSObject::kInitialMaxFastElementArray);
+ kind, JSArray::kInitialMaxFastElementArray);
elements->set_size_upper_bound(size_upper_bound);
Add<HStoreNamedField>(result, HObjectAccess::ForElementsPointer(), elements);
« no previous file with comments | « src/heap/spaces-inl.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698