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

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

Issue 2324863002: [stubs] Factor CSA::GrowElementsCapacity() out of existing code. (Closed)
Patch Set: 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..8fb0b07d1e90a5af9c3da80b672775004a0973b8 100644
--- a/src/code-stub-assembler.h
+++ b/src/code-stub-assembler.h
@@ -366,11 +366,27 @@ 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.
Jakob Kummerow 2016/09/09 10:49:35 nit: add "Returns the new elements." here and belo
+ 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.
+ 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