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

Unified Diff: src/hydrogen.h

Issue 61463005: Supported folding of constant size allocation followed by dynamic size allocation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Some refactoring and code cleanup. Created 7 years, 1 month 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 | « no previous file | src/hydrogen.cc » ('j') | src/hydrogen-instructions.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.h
diff --git a/src/hydrogen.h b/src/hydrogen.h
index bd42896c7e062503d23d9ca0e15ab0675b923c8c..a7382edcba60bfb877d2985e1dc409efef2ef250 100644
--- a/src/hydrogen.h
+++ b/src/hydrogen.h
@@ -1648,25 +1648,25 @@ class HGraphBuilder {
}
HValue* EmitInternalMapCode();
- HValue* EstablishEmptyArrayAllocationSize();
- HValue* EstablishAllocationSize(HValue* length_node);
- HValue* AllocateArray(HValue* size_in_bytes, HValue* capacity,
- HValue* length_field,
- FillMode fill_mode = FILL_WITH_HOLE);
HGraphBuilder* builder_;
ElementsKind kind_;
AllocationSiteMode mode_;
HValue* allocation_site_payload_;
HValue* constructor_function_;
- HInnerAllocatedObject* elements_location_;
+ HAllocate* elements_location_;
};
HValue* BuildAllocateArrayFromLength(JSArrayBuilder* array_builder,
HValue* length_argument);
+ HValue* BuildCalculateElementsSize(ElementsKind kind,
+ HValue* capacity);
+ HConstant* EstablishHeaderAllocationSize(AllocationSiteMode mode);
+ HConstant* EstablishElementsAllocationSize(ElementsKind kind, int capacity);
- HValue* BuildAllocateElements(ElementsKind kind,
- HValue* capacity);
+ HAllocate* BuildAllocateElements(ElementsKind kind,
+ HValue* size_in_bytes,
+ PretenureFlag pretenure);
void BuildInitializeElementsHeader(HValue* elements,
ElementsKind kind,
@@ -1675,16 +1675,15 @@ class HGraphBuilder {
HValue* BuildAllocateElementsAndInitializeElementsHeader(ElementsKind kind,
HValue* capacity);
- // array must have been allocated with enough room for
- // 1) the JSArray, 2) a AllocationMemento if mode requires it,
- // 3) a FixedArray or FixedDoubleArray.
- // A pointer to the Fixed(Double)Array is returned.
- HInnerAllocatedObject* BuildJSArrayHeader(HValue* array,
- HValue* array_map,
- AllocationSiteMode mode,
- ElementsKind elements_kind,
- HValue* allocation_site_payload,
- HValue* length_field);
+ // Array must have been allocated with enough room for
+ // 1) the JSArray and 2) an AllocationMemento if mode requires it.
+ // Initially the array elements storage is initialized with empty array.
+ void BuildJSArrayHeader(HValue* array,
+ HValue* array_map,
+ AllocationSiteMode mode,
+ ElementsKind elements_kind,
+ HValue* allocation_site_payload,
+ HValue* length_field);
HValue* BuildGrowElementsCapacity(HValue* object,
HValue* elements,
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | src/hydrogen-instructions.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698