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

Unified Diff: src/code-stub-assembler.h

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 | « src/builtins/builtins-internal.cc ('k') | src/code-stub-assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stub-assembler.h
diff --git a/src/code-stub-assembler.h b/src/code-stub-assembler.h
index 3ce4f8b7f0c8e7b099a83fb99dbb9b5564420e40..3a8a4d81d3aee74476a429d7cd3fabbb160dfc0e 100644
--- a/src/code-stub-assembler.h
+++ b/src/code-stub-assembler.h
@@ -366,11 +366,28 @@ class CodeStubAssembler : public compiler::CodeAssembler {
compiler::Node* CalculateNewElementsCapacity(
compiler::Node* old_capacity, ParameterMode mode = INTEGER_PARAMETERS);
- compiler::Node* CheckAndGrowElementsCapacity(compiler::Node* context,
- compiler::Node* elements,
- ElementsKind kind,
- compiler::Node* key,
- Label* fail);
+ // Tries to grow the |elements| array of given |object| to store the |key|
+ // or bails out if the growing gap is too big. Returns new elements.
+ compiler::Node* TryGrowElementsCapacity(compiler::Node* object,
+ compiler::Node* elements,
+ ElementsKind kind,
+ compiler::Node* key, Label* bailout);
+
+ // Tries to grow the |capacity|-length |elements| array of given |object|
+ // to store the |key| or bails out if the growing gap is too big. Returns
+ // new elements.
+ compiler::Node* TryGrowElementsCapacity(compiler::Node* object,
+ compiler::Node* elements,
+ ElementsKind kind,
+ compiler::Node* key,
+ compiler::Node* capacity,
+ ParameterMode mode, Label* bailout);
+
+ // Grows elements capacity of given object. Returns new elements.
+ compiler::Node* GrowElementsCapacity(
+ compiler::Node* object, compiler::Node* elements, ElementsKind from_kind,
+ ElementsKind to_kind, compiler::Node* capacity,
+ compiler::Node* new_capacity, ParameterMode mode, Label* bailout);
// Allocation site manipulation
void InitializeAllocationMemento(compiler::Node* base_allocation,
« no previous file with comments | « src/builtins/builtins-internal.cc ('k') | src/code-stub-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698