Index: src/code-stub-assembler.h |
diff --git a/src/code-stub-assembler.h b/src/code-stub-assembler.h |
index e19b34dd6198d0db9a30d5d1208e6aadd8a7743a..38bf7b1c6f33a2376515db7e79735905afbde4ea 100644 |
--- a/src/code-stub-assembler.h |
+++ b/src/code-stub-assembler.h |
@@ -359,12 +359,13 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler { |
compiler::Node* object, int index, compiler::Node* value, |
WriteBarrierMode barrier_mode = UPDATE_WRITE_BARRIER, |
ParameterMode parameter_mode = INTEGER_PARAMETERS) { |
- return StoreFixedArrayElement(object, Int32Constant(index), value, |
+ return StoreFixedArrayElement(object, Int32Constant(index), value, 0, |
Igor Sheludko
2016/11/22 12:05:08
While you are here: IntPtrOrSmiConstant(index, mod
Jakob Kummerow
2016/11/22 13:47:57
Done, kind of. |parameter_mode| is pretty meaningl
Igor Sheludko
2016/11/22 14:07:31
Indeed :)
|
barrier_mode, parameter_mode); |
} |
compiler::Node* StoreFixedArrayElement( |
compiler::Node* object, compiler::Node* index, compiler::Node* value, |
+ int additional_offset = 0, |
Jakob Kummerow
2016/11/21 17:02:58
This mirrors LoadFixedArrayElement().
Igor Sheludko
2016/11/22 12:05:08
Since WriteBarrierMode is defined as an enum but n
Jakob Kummerow
2016/11/22 13:47:57
Yes -> followup.
|
WriteBarrierMode barrier_mode = UPDATE_WRITE_BARRIER, |
ParameterMode parameter_mode = INTEGER_PARAMETERS); |
@@ -762,16 +763,35 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler { |
// Calculate a valid size for the a hash table. |
compiler::Node* HashTableComputeCapacity(compiler::Node* at_least_space_for); |
+ template <class Dictionary> |
+ compiler::Node* GetNumberOfElements(compiler::Node* dictionary); |
+ |
+ template <class Dictionary> |
+ void SetNumberOfElements(compiler::Node* dictionary, |
+ compiler::Node* num_elements_smi); |
+ |
+ template <class Dictionary> |
+ compiler::Node* GetCapacity(compiler::Node* dictionary); |
+ |
+ template <class Dictionary> |
+ compiler::Node* GetNextEnumerationIndex(compiler::Node* dictionary); |
+ |
+ template <class Dictionary> |
+ void SetNextEnumerationIndex(compiler::Node* dictionary, |
+ compiler::Node* next_enum_index_smi); |
+ |
// Looks up an entry in a NameDictionaryBase successor. If the entry is found |
// control goes to {if_found} and {var_name_index} contains an index of the |
// key field of the entry found. If the key is not found control goes to |
// {if_not_found}. |
static const int kInlinedDictionaryProbes = 4; |
+ enum LookupMode { kFindExisting, kFindInsertionIndex }; |
template <typename Dictionary> |
void NameDictionaryLookup(compiler::Node* dictionary, |
compiler::Node* unique_name, Label* if_found, |
Variable* var_name_index, Label* if_not_found, |
- int inlined_probes = kInlinedDictionaryProbes); |
+ int inlined_probes = kInlinedDictionaryProbes, |
+ LookupMode mode = kFindExisting); |
compiler::Node* ComputeIntegerHash(compiler::Node* key, compiler::Node* seed); |
@@ -780,6 +800,14 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler { |
compiler::Node* intptr_index, Label* if_found, |
Variable* var_entry, Label* if_not_found); |
+ template <class Dictionary> |
+ void FindInsertionEntry(compiler::Node* dictionary, compiler::Node* key, |
+ Variable* var_key_index); |
+ |
+ template <class Dictionary> |
+ void Add(compiler::Node* dictionary, compiler::Node* key, |
+ compiler::Node* value, Label* bailout); |
+ |
// Tries to check if {object} has own {unique_name} property. |
void TryHasOwnProperty(compiler::Node* object, compiler::Node* map, |
compiler::Node* instance_type, |