diff options
author | Michaƫl Zasso <targos@protonmail.com> | 2018-05-31 11:11:57 +0200 |
---|---|---|
committer | Myles Borins <mylesborins@google.com> | 2018-06-01 09:58:27 +0200 |
commit | 352a525eb984b8fa2d6f0f6fd68395e6a080bba4 (patch) | |
tree | a105ae93f8fd8f533cce19a429f1b6e95d6e11ca /deps/v8/src/ic/accessor-assembler.h | |
parent | faf449ca0490f5371dc6cbbc94a87eb697b00fcc (diff) | |
download | android-node-v8-352a525eb984b8fa2d6f0f6fd68395e6a080bba4.tar.gz android-node-v8-352a525eb984b8fa2d6f0f6fd68395e6a080bba4.tar.bz2 android-node-v8-352a525eb984b8fa2d6f0f6fd68395e6a080bba4.zip |
deps: update V8 to 6.7.288.43
PR-URL: https://github.com/nodejs/node/pull/19989
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Diffstat (limited to 'deps/v8/src/ic/accessor-assembler.h')
-rw-r--r-- | deps/v8/src/ic/accessor-assembler.h | 79 |
1 files changed, 52 insertions, 27 deletions
diff --git a/deps/v8/src/ic/accessor-assembler.h b/deps/v8/src/ic/accessor-assembler.h index 3e4f551c14..7428eeec4d 100644 --- a/deps/v8/src/ic/accessor-assembler.h +++ b/deps/v8/src/ic/accessor-assembler.h @@ -18,7 +18,11 @@ class ExitPoint; class AccessorAssembler : public CodeStubAssembler { public: - typedef compiler::Node Node; + using Node = compiler::Node; + template <class T> + using TNode = compiler::TNode<T>; + template <class T> + using SloppyTNode = compiler::SloppyTNode<T>; explicit AccessorAssembler(compiler::CodeAssemblerState* state) : CodeStubAssembler(state) {} @@ -43,6 +47,8 @@ class AccessorAssembler : public CodeStubAssembler { void GenerateKeyedStoreIC(); void GenerateKeyedStoreICTrampoline(); + void GenerateStoreInArrayLiteralIC(); + void TryProbeStubCache(StubCache* stub_cache, Node* receiver, Node* name, Label* if_handler, Variable* var_handler, Label* if_miss); @@ -83,7 +89,8 @@ class AccessorAssembler : public CodeStubAssembler { void LoadIC_BytecodeHandler(const LoadICParameters* p, ExitPoint* exit_point); // Loads dataX field from the DataHandler object. - Node* LoadHandlerDataField(Node* handler, int data_index); + TNode<Object> LoadHandlerDataField(SloppyTNode<DataHandler> handler, + int data_index); protected: struct StoreICParameters : public LoadICParameters { @@ -99,12 +106,26 @@ class AccessorAssembler : public CodeStubAssembler { void HandleStoreICHandlerCase( const StoreICParameters* p, Node* handler, Label* miss, ICMode ic_mode, ElementSupport support_elements = kOnlyProperties); + void HandleStoreICTransitionMapHandlerCase(const StoreICParameters* p, + Node* transition_map, Label* miss, + bool validate_transition_handler); + void JumpIfDataProperty(Node* details, Label* writable, Label* readonly); void BranchIfStrictMode(Node* vector, Node* slot, Label* if_strict); void InvalidateValidityCellIfPrototype(Node* map, Node* bitfield2 = nullptr); + void OverwriteExistingFastDataProperty(Node* object, Node* object_map, + Node* descriptors, + Node* descriptor_name_index, + Node* details, Node* value, + Label* slow, + bool do_transitioning_store); + + void CheckFieldType(Node* descriptors, Node* name_index, Node* representation, + Node* value, Label* bailout); + private: // Stub generation entry points. @@ -127,6 +148,7 @@ class AccessorAssembler : public CodeStubAssembler { void StoreGlobalIC_PropertyCellCase(Node* property_cell, Node* value, ExitPoint* exit_point, Label* miss); void KeyedStoreIC(const StoreICParameters* p); + void StoreInArrayLiteralIC(const StoreICParameters* p); // IC dispatcher behavior. @@ -184,16 +206,13 @@ class AccessorAssembler : public CodeStubAssembler { void HandleStoreICProtoHandler(const StoreICParameters* p, Node* handler, Label* miss, ICMode ic_mode, ElementSupport support_elements); - // If |transition| is nullptr then the normal field store is generated or - // transitioning store otherwise. void HandleStoreICSmiHandlerCase(Node* handler_word, Node* holder, - Node* value, Node* transition, Label* miss); - // If |transition| is nullptr then the normal field store is generated or - // transitioning store otherwise. + Node* value, Label* miss); void HandleStoreFieldAndReturn(Node* handler_word, Node* holder, Representation representation, Node* value, - Node* transition, Label* miss); + Label* miss); + void CheckPrototypeValidityCell(Node* maybe_validity_cell, Label* miss); void HandleStoreICNativeDataProperty(const StoreICParameters* p, Node* holder, Node* handler_word); @@ -229,15 +248,16 @@ class AccessorAssembler : public CodeStubAssembler { Node* GetLanguageMode(Node* vector, Node* slot); Node* PrepareValueForStore(Node* handler_word, Node* holder, - Representation representation, Node* transition, - Node* value, Label* bailout); + Representation representation, Node* value, + Label* bailout); - // Extends properties backing store by JSObject::kFieldsAdded elements. - void ExtendPropertiesBackingStore(Node* object, Node* handler_word); + // Extends properties backing store by JSObject::kFieldsAdded elements, + // returns updated properties backing store. + Node* ExtendPropertiesBackingStore(Node* object, Node* index); void StoreNamedField(Node* handler_word, Node* object, bool is_inobject, Representation representation, Node* value, - bool transition_to_field, Label* bailout); + Label* bailout); void EmitFastElementsBoundsCheck(Node* object, Node* elements, Node* intptr_index, @@ -274,11 +294,21 @@ class ExitPoint { typedef compiler::CodeAssemblerVariable CodeAssemblerVariable; public: + typedef std::function<void(Node* result)> IndirectReturnHandler; + explicit ExitPoint(CodeStubAssembler* assembler) - : ExitPoint(assembler, nullptr, nullptr) {} + : ExitPoint(assembler, nullptr) {} + + ExitPoint(CodeStubAssembler* assembler, + const IndirectReturnHandler& indirect_return_handler) + : asm_(assembler), indirect_return_handler_(indirect_return_handler) {} + ExitPoint(CodeStubAssembler* assembler, CodeAssemblerLabel* out, CodeAssemblerVariable* var_result) - : out_(out), var_result_(var_result), asm_(assembler) { + : ExitPoint(assembler, [=](Node* result) { + var_result->Bind(result); + assembler->Goto(out); + }) { DCHECK_EQ(out != nullptr, var_result != nullptr); } @@ -288,7 +318,7 @@ class ExitPoint { if (IsDirect()) { asm_->TailCallRuntime(function, context, args...); } else { - IndirectReturn(asm_->CallRuntime(function, context, args...)); + indirect_return_handler_(asm_->CallRuntime(function, context, args...)); } } @@ -297,7 +327,7 @@ class ExitPoint { if (IsDirect()) { asm_->TailCallStub(callable, context, args...); } else { - IndirectReturn(asm_->CallStub(callable, context, args...)); + indirect_return_handler_(asm_->CallStub(callable, context, args...)); } } @@ -307,7 +337,8 @@ class ExitPoint { if (IsDirect()) { asm_->TailCallStub(descriptor, target, context, args...); } else { - IndirectReturn(asm_->CallStub(descriptor, target, context, args...)); + indirect_return_handler_( + asm_->CallStub(descriptor, target, context, args...)); } } @@ -315,21 +346,15 @@ class ExitPoint { if (IsDirect()) { asm_->Return(result); } else { - IndirectReturn(result); + indirect_return_handler_(result); } } - bool IsDirect() const { return out_ == nullptr; } + bool IsDirect() const { return !indirect_return_handler_; } private: - void IndirectReturn(Node* const result) { - var_result_->Bind(result); - asm_->Goto(out_); - } - - CodeAssemblerLabel* const out_; - CodeAssemblerVariable* const var_result_; CodeStubAssembler* const asm_; + IndirectReturnHandler indirect_return_handler_; }; } // namespace internal |