| Index: src/code-stubs.h
|
| diff --git a/src/code-stubs.h b/src/code-stubs.h
|
| index 5ed4f6c65ced636d44f36e932ffc9b87728fbd85..82a72e625f7917970cc936d3738854e9ef2d62dd 100644
|
| --- a/src/code-stubs.h
|
| +++ b/src/code-stubs.h
|
| @@ -291,7 +291,6 @@ class CodeStub BASE_EMBEDDED {
|
| // BinaryOpStub needs to override this.
|
| virtual Code::Kind GetCodeKind() const;
|
|
|
| - virtual InlineCacheState GetICState() const { return UNINITIALIZED; }
|
| virtual ExtraICState GetExtraICState() const { return kNoExtraICState; }
|
|
|
| Code::Flags GetCodeFlags() const;
|
| @@ -693,7 +692,6 @@ class StringLengthStub : public TurboFanCodeStub {
|
| explicit StringLengthStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
|
|
|
| Code::Kind GetCodeKind() const override { return Code::HANDLER; }
|
| - InlineCacheState GetICState() const override { return MONOMORPHIC; }
|
| ExtraICState GetExtraICState() const override { return Code::LOAD_IC; }
|
|
|
| DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector);
|
| @@ -962,7 +960,6 @@ class StoreInterceptorStub : public TurboFanCodeStub {
|
|
|
| Code::Kind GetCodeKind() const override { return Code::HANDLER; }
|
| ExtraICState GetExtraICState() const override { return Code::STORE_IC; }
|
| - InlineCacheState GetICState() const override { return MONOMORPHIC; }
|
|
|
| DEFINE_CALL_INTERFACE_DESCRIPTOR(Store);
|
| DEFINE_CODE_STUB(StoreInterceptor, TurboFanCodeStub);
|
| @@ -975,7 +972,6 @@ class LoadIndexedInterceptorStub : public TurboFanCodeStub {
|
|
|
| Code::Kind GetCodeKind() const override { return Code::HANDLER; }
|
| ExtraICState GetExtraICState() const override { return Code::KEYED_LOAD_IC; }
|
| - InlineCacheState GetICState() const override { return MONOMORPHIC; }
|
|
|
| DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector);
|
| DEFINE_TURBOFAN_CODE_STUB(LoadIndexedInterceptor, TurboFanCodeStub);
|
| @@ -1363,8 +1359,6 @@ class CallICStub: public PlatformCodeStub {
|
|
|
| Code::Kind GetCodeKind() const override { return Code::CALL_IC; }
|
|
|
| - InlineCacheState GetICState() const override { return GENERIC; }
|
| -
|
| ExtraICState GetExtraICState() const final {
|
| return static_cast<ExtraICState>(minor_key_);
|
| }
|
| @@ -1374,9 +1368,7 @@ class CallICStub: public PlatformCodeStub {
|
| ConvertReceiverMode convert_mode() const { return state().convert_mode(); }
|
| TailCallMode tail_call_mode() const { return state().tail_call_mode(); }
|
|
|
| - CallICState state() const {
|
| - return CallICState(static_cast<ExtraICState>(minor_key_));
|
| - }
|
| + CallICState state() const { return CallICState(GetExtraICState()); }
|
|
|
| // Code generation helpers.
|
| void GenerateMiss(MacroAssembler* masm);
|
| @@ -1425,7 +1417,6 @@ class HandlerStub : public HydrogenCodeStub {
|
| public:
|
| Code::Kind GetCodeKind() const override { return Code::HANDLER; }
|
| ExtraICState GetExtraICState() const override { return kind(); }
|
| - InlineCacheState GetICState() const override { return MONOMORPHIC; }
|
|
|
| void InitializeDescriptor(CodeStubDescriptor* descriptor) override;
|
|
|
| @@ -1526,7 +1517,6 @@ class LoadApiGetterStub : public TurboFanCodeStub {
|
|
|
| Code::Kind GetCodeKind() const override { return Code::HANDLER; }
|
| ExtraICState GetExtraICState() const override { return Code::LOAD_IC; }
|
| - InlineCacheState GetICState() const override { return MONOMORPHIC; }
|
|
|
| int index() const { return IndexBits::decode(minor_key_); }
|
| bool receiver_is_holder() const {
|
| @@ -1866,8 +1856,6 @@ class BinaryOpICStub : public HydrogenCodeStub {
|
|
|
| Code::Kind GetCodeKind() const override { return Code::BINARY_OP_IC; }
|
|
|
| - InlineCacheState GetICState() const final { return state().GetICState(); }
|
| -
|
| ExtraICState GetExtraICState() const final {
|
| return static_cast<ExtraICState>(sub_minor_key());
|
| }
|
| @@ -1911,8 +1899,6 @@ class BinaryOpICWithAllocationSiteStub final : public PlatformCodeStub {
|
|
|
| Code::Kind GetCodeKind() const override { return Code::BINARY_OP_IC; }
|
|
|
| - InlineCacheState GetICState() const override { return state().GetICState(); }
|
| -
|
| ExtraICState GetExtraICState() const override {
|
| return static_cast<ExtraICState>(minor_key_);
|
| }
|
| @@ -1921,7 +1907,7 @@ class BinaryOpICWithAllocationSiteStub final : public PlatformCodeStub {
|
|
|
| private:
|
| BinaryOpICState state() const {
|
| - return BinaryOpICState(isolate(), static_cast<ExtraICState>(minor_key_));
|
| + return BinaryOpICState(isolate(), GetExtraICState());
|
| }
|
|
|
| static void GenerateAheadOfTime(Isolate* isolate,
|
| @@ -1990,14 +1976,19 @@ class CompareICStub : public PlatformCodeStub {
|
| CompareICState::State right, CompareICState::State state)
|
| : PlatformCodeStub(isolate) {
|
| DCHECK(Token::IsCompareOp(op));
|
| + DCHECK(OpBits::is_valid(op - Token::EQ));
|
| minor_key_ = OpBits::encode(op - Token::EQ) |
|
| LeftStateBits::encode(left) | RightStateBits::encode(right) |
|
| StateBits::encode(state);
|
| }
|
| + CompareICStub(Isolate* isolate, ExtraICState extra_ic_state)
|
| + : PlatformCodeStub(isolate) {
|
| + minor_key_ = extra_ic_state;
|
| + }
|
|
|
| void set_known_map(Handle<Map> map) { known_map_ = map; }
|
|
|
| - InlineCacheState GetICState() const override;
|
| + InlineCacheState GetICState() const;
|
|
|
| Token::Value op() const {
|
| return static_cast<Token::Value>(Token::EQ + OpBits::decode(minor_key_));
|
| @@ -2337,7 +2328,6 @@ class KeyedLoadGenericStub : public HydrogenCodeStub {
|
| }
|
|
|
| Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; }
|
| - InlineCacheState GetICState() const override { return GENERIC; }
|
|
|
| DEFINE_CALL_INTERFACE_DESCRIPTOR(Load);
|
|
|
| @@ -2354,8 +2344,6 @@ class LoadICTrampolineStub : public PlatformCodeStub {
|
|
|
| Code::Kind GetCodeKind() const override { return Code::LOAD_IC; }
|
|
|
| - InlineCacheState GetICState() const final { return GENERIC; }
|
| -
|
| ExtraICState GetExtraICState() const final {
|
| return static_cast<ExtraICState>(minor_key_);
|
| }
|
| @@ -2380,8 +2368,6 @@ class LoadICTrampolineTFStub : public TurboFanCodeStub {
|
|
|
| Code::Kind GetCodeKind() const override { return Code::LOAD_IC; }
|
|
|
| - InlineCacheState GetICState() const final { return GENERIC; }
|
| -
|
| ExtraICState GetExtraICState() const final {
|
| return static_cast<ExtraICState>(minor_key_);
|
| }
|
| @@ -2415,8 +2401,6 @@ class VectorStoreICTrampolineStub : public PlatformCodeStub {
|
|
|
| Code::Kind GetCodeKind() const override { return Code::STORE_IC; }
|
|
|
| - InlineCacheState GetICState() const final { return GENERIC; }
|
| -
|
| ExtraICState GetExtraICState() const final {
|
| return static_cast<ExtraICState>(minor_key_);
|
| }
|
| @@ -2453,8 +2437,6 @@ class CallICTrampolineStub : public PlatformCodeStub {
|
|
|
| Code::Kind GetCodeKind() const override { return Code::CALL_IC; }
|
|
|
| - InlineCacheState GetICState() const final { return GENERIC; }
|
| -
|
| ExtraICState GetExtraICState() const final {
|
| return static_cast<ExtraICState>(minor_key_);
|
| }
|
| @@ -2479,7 +2461,7 @@ class LoadICStub : public PlatformCodeStub {
|
| void GenerateForTrampoline(MacroAssembler* masm);
|
|
|
| Code::Kind GetCodeKind() const override { return Code::LOAD_IC; }
|
| - InlineCacheState GetICState() const final { return GENERIC; }
|
| +
|
| ExtraICState GetExtraICState() const final {
|
| return static_cast<ExtraICState>(minor_key_);
|
| }
|
| @@ -2501,7 +2483,7 @@ class LoadICTFStub : public TurboFanCodeStub {
|
| void GenerateAssembly(CodeStubAssembler* assembler) const override;
|
|
|
| Code::Kind GetCodeKind() const override { return Code::LOAD_IC; }
|
| - InlineCacheState GetICState() const final { return GENERIC; }
|
| +
|
| ExtraICState GetExtraICState() const final {
|
| return static_cast<ExtraICState>(minor_key_);
|
| }
|
| @@ -2520,7 +2502,7 @@ class KeyedLoadICStub : public PlatformCodeStub {
|
| void GenerateForTrampoline(MacroAssembler* masm);
|
|
|
| Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; }
|
| - InlineCacheState GetICState() const final { return GENERIC; }
|
| +
|
| ExtraICState GetExtraICState() const final {
|
| return static_cast<ExtraICState>(minor_key_);
|
| }
|
| @@ -2543,7 +2525,7 @@ class VectorStoreICStub : public PlatformCodeStub {
|
| void GenerateForTrampoline(MacroAssembler* masm);
|
|
|
| Code::Kind GetCodeKind() const final { return Code::STORE_IC; }
|
| - InlineCacheState GetICState() const final { return GENERIC; }
|
| +
|
| ExtraICState GetExtraICState() const final {
|
| return static_cast<ExtraICState>(minor_key_);
|
| }
|
| @@ -2566,7 +2548,7 @@ class VectorKeyedStoreICStub : public PlatformCodeStub {
|
| void GenerateForTrampoline(MacroAssembler* masm);
|
|
|
| Code::Kind GetCodeKind() const final { return Code::KEYED_STORE_IC; }
|
| - InlineCacheState GetICState() const final { return GENERIC; }
|
| +
|
| ExtraICState GetExtraICState() const final {
|
| return static_cast<ExtraICState>(minor_key_);
|
| }
|
| @@ -3094,7 +3076,7 @@ class ToBooleanICStub : public HydrogenCodeStub {
|
|
|
| ExtraICState GetExtraICState() const override { return types().ToIntegral(); }
|
|
|
| - InlineCacheState GetICState() const override {
|
| + InlineCacheState GetICState() const {
|
| if (types().IsEmpty()) {
|
| return ::v8::internal::UNINITIALIZED;
|
| } else {
|
|
|