| Index: src/ic/ic.cc
|
| diff --git a/src/ic/ic.cc b/src/ic/ic.cc
|
| index f8ffc5e2a1e52dd27285cdd2e533b82ef0bd890d..8a7bdc25968964bfc5034210f88efc10a74ee7e7 100644
|
| --- a/src/ic/ic.cc
|
| +++ b/src/ic/ic.cc
|
| @@ -794,25 +794,11 @@ void IC::PatchCache(Handle<Name> name, Handle<Code> code) {
|
| }
|
| }
|
|
|
| -
|
| -Handle<Code> LoadIC::initialize_stub(Isolate* isolate,
|
| - ExtraICState extra_state) {
|
| - return LoadICTrampolineStub(isolate, LoadICState(extra_state)).GetCode();
|
| -}
|
| -
|
| -
|
| Handle<Code> LoadIC::initialize_stub_in_optimized_code(
|
| Isolate* isolate, ExtraICState extra_state, State initialization_state) {
|
| return LoadICStub(isolate, LoadICState(extra_state)).GetCode();
|
| }
|
|
|
| -
|
| -Handle<Code> KeyedLoadIC::initialize_stub(Isolate* isolate,
|
| - ExtraICState extra_state) {
|
| - return KeyedLoadICTrampolineStub(isolate, LoadICState(extra_state)).GetCode();
|
| -}
|
| -
|
| -
|
| Handle<Code> KeyedLoadIC::initialize_stub_in_optimized_code(
|
| Isolate* isolate, State initialization_state, ExtraICState extra_state) {
|
| if (initialization_state != MEGAMORPHIC) {
|
| @@ -822,50 +808,22 @@ Handle<Code> KeyedLoadIC::initialize_stub_in_optimized_code(
|
| }
|
|
|
|
|
| -static Handle<Code> KeyedStoreICInitializeStubHelper(
|
| - Isolate* isolate, LanguageMode language_mode,
|
| - InlineCacheState initialization_state) {
|
| - switch (initialization_state) {
|
| - case MEGAMORPHIC:
|
| - return is_strict(language_mode)
|
| - ? isolate->builtins()->KeyedStoreIC_Megamorphic_Strict()
|
| - : isolate->builtins()->KeyedStoreIC_Megamorphic();
|
| - default:
|
| - UNREACHABLE();
|
| - }
|
| - return Handle<Code>();
|
| -}
|
| -
|
| -
|
| -Handle<Code> KeyedStoreIC::initialize_stub(Isolate* isolate,
|
| - LanguageMode language_mode,
|
| - State initialization_state) {
|
| - if (initialization_state != MEGAMORPHIC) {
|
| - VectorKeyedStoreICTrampolineStub stub(isolate, StoreICState(language_mode));
|
| - return stub.GetCode();
|
| - }
|
| -
|
| - return KeyedStoreICInitializeStubHelper(isolate, language_mode,
|
| - initialization_state);
|
| -}
|
| -
|
| -
|
| Handle<Code> KeyedStoreIC::initialize_stub_in_optimized_code(
|
| Isolate* isolate, LanguageMode language_mode, State initialization_state) {
|
| + StoreICState state = StoreICState(language_mode);
|
| if (initialization_state != MEGAMORPHIC) {
|
| - VectorKeyedStoreICStub stub(isolate, StoreICState(language_mode));
|
| - return stub.GetCode();
|
| + return VectorKeyedStoreICStub(isolate, state).GetCode();
|
| }
|
| -
|
| - return KeyedStoreICInitializeStubHelper(isolate, language_mode,
|
| - initialization_state);
|
| + return ChooseMegamorphicStub(isolate, state.GetExtraICState());
|
| }
|
|
|
|
|
| Handle<Code> KeyedStoreIC::ChooseMegamorphicStub(Isolate* isolate,
|
| ExtraICState extra_state) {
|
| LanguageMode mode = StoreICState::GetLanguageMode(extra_state);
|
| - return KeyedStoreICInitializeStubHelper(isolate, mode, MEGAMORPHIC);
|
| + return is_strict(mode)
|
| + ? isolate->builtins()->KeyedStoreIC_Megamorphic_Strict()
|
| + : isolate->builtins()->KeyedStoreIC_Megamorphic();
|
| }
|
|
|
|
|
| @@ -1463,14 +1421,6 @@ MaybeHandle<Object> StoreIC::Store(Handle<Object> object, Handle<Name> name,
|
| return value;
|
| }
|
|
|
| -Handle<Code> CallIC::initialize_stub(Isolate* isolate, int argc,
|
| - ConvertReceiverMode mode,
|
| - TailCallMode tail_call_mode) {
|
| - CallICTrampolineStub stub(isolate, CallICState(argc, mode, tail_call_mode));
|
| - Handle<Code> code = stub.GetCode();
|
| - return code;
|
| -}
|
| -
|
| Handle<Code> CallIC::initialize_stub_in_optimized_code(
|
| Isolate* isolate, int argc, ConvertReceiverMode mode,
|
| TailCallMode tail_call_mode) {
|
| @@ -1480,17 +1430,6 @@ Handle<Code> CallIC::initialize_stub_in_optimized_code(
|
| }
|
|
|
|
|
| -Handle<Code> StoreIC::initialize_stub(Isolate* isolate,
|
| - LanguageMode language_mode,
|
| - State initialization_state) {
|
| - DCHECK(initialization_state == UNINITIALIZED ||
|
| - initialization_state == PREMONOMORPHIC ||
|
| - initialization_state == MEGAMORPHIC);
|
| - VectorStoreICTrampolineStub stub(isolate, StoreICState(language_mode));
|
| - return stub.GetCode();
|
| -}
|
| -
|
| -
|
| Handle<Code> StoreIC::initialize_stub_in_optimized_code(
|
| Isolate* isolate, LanguageMode language_mode, State initialization_state) {
|
| DCHECK(initialization_state == UNINITIALIZED ||
|
|
|