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

Unified Diff: src/hydrogen.cc

Issue 18876004: Use BuildGrowElementsCapacity for the TransitionElementsKind stub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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/hydrogen.h ('k') | no next file » | 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 074ca17fe101efbf5ceb08f4dcfceb16cdaadf11..ea86d6f61b1cee9b9580861241bcf979e2389020 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -1159,7 +1159,7 @@ HValue* HGraphBuilder::BuildCheckForCapacityGrow(HValue* object,
BuildNewElementsCapacity(context, current_capacity);
HValue* new_elements = BuildGrowElementsCapacity(object, elements,
- kind, length,
+ kind, kind, length,
new_capacity);
environment()->Push(new_elements);
@@ -1203,7 +1203,7 @@ HValue* HGraphBuilder::BuildCopyElementsOnWrite(HValue* object,
HValue* capacity = AddLoadFixedArrayLength(elements);
- HValue* new_elements = BuildGrowElementsCapacity(object, elements,
+ HValue* new_elements = BuildGrowElementsCapacity(object, elements, kind,
kind, length, capacity);
environment()->Push(new_elements);
@@ -1475,17 +1475,18 @@ void HGraphBuilder::BuildNewSpaceArrayCheck(HValue* length, ElementsKind kind) {
HValue* HGraphBuilder::BuildGrowElementsCapacity(HValue* object,
HValue* elements,
ElementsKind kind,
+ ElementsKind new_kind,
HValue* length,
HValue* new_capacity) {
HValue* context = environment()->LookupContext();
- BuildNewSpaceArrayCheck(new_capacity, kind);
+ BuildNewSpaceArrayCheck(new_capacity, new_kind);
HValue* new_elements = BuildAllocateElementsAndInitializeElementsHeader(
- context, kind, new_capacity);
+ context, new_kind, new_capacity);
BuildCopyElements(context, elements, kind,
- new_elements, kind,
+ new_elements, new_kind,
length, new_capacity);
AddStore(object, HObjectAccess::ForElementsPointer(), new_elements);
« no previous file with comments | « src/hydrogen.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698