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

Unified Diff: src/builtins/builtins-internal.cc

Issue 2324863002: [stubs] Factor CSA::GrowElementsCapacity() out of existing code. (Closed)
Patch Set: Addressing comments 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 | « no previous file | src/code-stub-assembler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/builtins-internal.cc
diff --git a/src/builtins/builtins-internal.cc b/src/builtins/builtins-internal.cc
index b5858c64927e9849809cad4ff77fe0b3407d7ca7..bec6ff36450223c02fc312f1f51fd7c75bafae7a 100644
--- a/src/builtins/builtins-internal.cc
+++ b/src/builtins/builtins-internal.cc
@@ -108,9 +108,8 @@ void Builtins::Generate_GrowFastDoubleElements(CodeStubAssembler* assembler) {
Label runtime(assembler, CodeStubAssembler::Label::kDeferred);
Node* elements = assembler->LoadElements(object);
- elements = assembler->CheckAndGrowElementsCapacity(
- context, elements, FAST_DOUBLE_ELEMENTS, key, &runtime);
- assembler->StoreObjectField(object, JSObject::kElementsOffset, elements);
+ elements = assembler->TryGrowElementsCapacity(
+ object, elements, FAST_DOUBLE_ELEMENTS, key, &runtime);
assembler->Return(elements);
assembler->Bind(&runtime);
@@ -129,9 +128,8 @@ void Builtins::Generate_GrowFastSmiOrObjectElements(
Label runtime(assembler, CodeStubAssembler::Label::kDeferred);
Node* elements = assembler->LoadElements(object);
- elements = assembler->CheckAndGrowElementsCapacity(
- context, elements, FAST_ELEMENTS, key, &runtime);
- assembler->StoreObjectField(object, JSObject::kElementsOffset, elements);
+ elements = assembler->TryGrowElementsCapacity(object, elements, FAST_ELEMENTS,
+ key, &runtime);
assembler->Return(elements);
assembler->Bind(&runtime);
« no previous file with comments | « no previous file | src/code-stub-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698