Index: src/code-stub-assembler.h |
diff --git a/src/code-stub-assembler.h b/src/code-stub-assembler.h |
index 77ec08d650f34f5e83f3d3cc448052fd3a471a06..124a0aa7ad221be24690910a4bf038803766559a 100644 |
--- a/src/code-stub-assembler.h |
+++ b/src/code-stub-assembler.h |
@@ -498,9 +498,21 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler { |
Node* object, Node* index, Node* value, |
ParameterMode parameter_mode = INTPTR_PARAMETERS); |
- Node* BuildAppendJSArray(ElementsKind kind, Node* context, Node* array, |
+ // EnsureArrayPushable verifies that receiver is: |
+ // 1. Is not a prototype. |
+ // 2. Is not a dictionary. |
+ // 3. Has a writeable length property. |
+ // It returns ElementsKind as a node for further division into cases. |
+ Node* EnsureArrayPushable(Node* receiver, Label* bailout); |
+ |
+ void TryStoreArrayElement(ElementsKind kind, ParameterMode mode, |
+ Label* bailout, Node* elements, Node* index, |
+ Node* value); |
+ Node* BuildAppendJSArray(ElementsKind kind, Node* array, |
CodeStubArguments& args, Variable& arg_index, |
Label* bailout); |
+ Node* BuildAppendJSArray(ElementsKind kind, Node* array, Node* value, |
+ Label* bailout); |
void StoreFieldsNoWriteBarrier(Node* start_address, Node* end_address, |
Node* value); |
@@ -660,6 +672,14 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler { |
Node* capacity, Node* new_capacity, |
ParameterMode mode, Label* bailout); |
+ // Given a need to grow by |growth|, allocate an appropriate new capacity |
+ // and return a new elements FixedArray object. Label |bailout| is |
+ // followed for allocation failure. Label |fits| is followed if current |
+ // capacity is sufficient. |
+ Node* PossiblyGrowElementsCapacity(ParameterMode mode, ElementsKind kind, |
+ Node* array, Node* length, Node* elements, |
+ Node* growth, Label* fits, Label* bailout); |
+ |
// Allocation site manipulation |
void InitializeAllocationMemento(Node* base_allocation, |
int base_allocation_size, |
@@ -738,6 +758,8 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler { |
// ElementsKind helpers: |
Node* IsFastElementsKind(Node* elements_kind); |
Node* IsHoleyFastElementsKind(Node* elements_kind); |
+ Node* IsElementsKindGreaterThan(Node* target_kind, |
+ ElementsKind reference_kind); |
// String helpers. |
// Load a character from a String (might flatten a ConsString). |