| Index: src/ic/ic.cc
|
| diff --git a/src/ic/ic.cc b/src/ic/ic.cc
|
| index 964f1d876d5ec9671e7f1e37a48e6f37f33e114a..7f87345901445b0dca0076f0f699cf8899277928 100644
|
| --- a/src/ic/ic.cc
|
| +++ b/src/ic/ic.cc
|
| @@ -117,13 +117,10 @@ void IC::TraceIC(const char* type, Handle<Object> name, State old_state,
|
| stdout, true);
|
| }
|
|
|
| - ExtraICState extra_state = new_target->extra_ic_state();
|
| const char* modifier = "";
|
| if (new_target->kind() == Code::KEYED_STORE_IC) {
|
| KeyedAccessStoreMode mode =
|
| - FLAG_vector_stores
|
| - ? casted_nexus<KeyedStoreICNexus>()->GetKeyedAccessStoreMode()
|
| - : KeyedStoreIC::GetKeyedAccessStoreMode(extra_state);
|
| + casted_nexus<KeyedStoreICNexus>()->GetKeyedAccessStoreMode();
|
| modifier = GetTransitionMarkModifier(mode);
|
| }
|
| PrintF(" (%c->%c%s) ", TransitionMarkFromState(old_state),
|
| @@ -470,13 +467,9 @@ void IC::Clear(Isolate* isolate, Address address, Address constant_pool) {
|
| switch (target->kind()) {
|
| case Code::LOAD_IC:
|
| case Code::KEYED_LOAD_IC:
|
| - return;
|
| case Code::STORE_IC:
|
| - if (FLAG_vector_stores) return;
|
| - return StoreIC::Clear(isolate, address, target, constant_pool);
|
| case Code::KEYED_STORE_IC:
|
| - if (FLAG_vector_stores) return;
|
| - return KeyedStoreIC::Clear(isolate, address, target, constant_pool);
|
| + return;
|
| case Code::COMPARE_IC:
|
| return CompareIC::Clear(isolate, address, target, constant_pool);
|
| case Code::COMPARE_NIL_IC:
|
| @@ -810,12 +803,7 @@ bool IC::UpdatePolymorphicIC(Handle<Name> name, Handle<Code> code) {
|
| if (number_of_valid_maps > 1 && target()->is_keyed_stub()) return false;
|
| Handle<Code> ic;
|
| if (number_of_valid_maps == 1) {
|
| - if (UseVector()) {
|
| - ConfigureVectorState(name, receiver_map(), code);
|
| - } else {
|
| - ic = PropertyICCompiler::ComputeMonomorphic(kind(), name, map, code,
|
| - extra_ic_state());
|
| - }
|
| + ConfigureVectorState(name, receiver_map(), code);
|
| } else {
|
| if (handler_to_overwrite >= 0) {
|
| handlers.Set(handler_to_overwrite, code);
|
| @@ -827,13 +815,7 @@ bool IC::UpdatePolymorphicIC(Handle<Name> name, Handle<Code> code) {
|
| handlers.Add(code);
|
| }
|
|
|
| - if (UseVector()) {
|
| - ConfigureVectorState(name, &maps, &handlers);
|
| - } else {
|
| - ic = PropertyICCompiler::ComputePolymorphic(kind(), &maps, &handlers,
|
| - number_of_valid_maps, name,
|
| - extra_ic_state());
|
| - }
|
| + ConfigureVectorState(name, &maps, &handlers);
|
| }
|
|
|
| if (!UseVector()) set_target(*ic);
|
| @@ -843,13 +825,7 @@ bool IC::UpdatePolymorphicIC(Handle<Name> name, Handle<Code> code) {
|
|
|
| void IC::UpdateMonomorphicIC(Handle<Code> handler, Handle<Name> name) {
|
| DCHECK(handler->is_handler());
|
| - if (UseVector()) {
|
| - ConfigureVectorState(name, receiver_map(), handler);
|
| - } else {
|
| - Handle<Code> ic = PropertyICCompiler::ComputeMonomorphic(
|
| - kind(), name, receiver_map(), handler, extra_ic_state());
|
| - set_target(*ic);
|
| - }
|
| + ConfigureVectorState(name, receiver_map(), handler);
|
| }
|
|
|
|
|
| @@ -973,7 +949,7 @@ static Handle<Code> KeyedStoreICInitializeStubHelper(
|
| Handle<Code> KeyedStoreIC::initialize_stub(Isolate* isolate,
|
| LanguageMode language_mode,
|
| State initialization_state) {
|
| - if (FLAG_vector_stores && initialization_state != MEGAMORPHIC) {
|
| + if (initialization_state != MEGAMORPHIC) {
|
| VectorKeyedStoreICTrampolineStub stub(isolate, StoreICState(language_mode));
|
| return stub.GetCode();
|
| }
|
| @@ -985,7 +961,7 @@ Handle<Code> KeyedStoreIC::initialize_stub(Isolate* isolate,
|
|
|
| Handle<Code> KeyedStoreIC::initialize_stub_in_optimized_code(
|
| Isolate* isolate, LanguageMode language_mode, State initialization_state) {
|
| - if (FLAG_vector_stores && initialization_state != MEGAMORPHIC) {
|
| + if (initialization_state != MEGAMORPHIC) {
|
| VectorKeyedStoreICStub stub(isolate, StoreICState(language_mode));
|
| return stub.GetCode();
|
| }
|
| @@ -1620,13 +1596,8 @@ Handle<Code> StoreIC::initialize_stub(Isolate* isolate,
|
| DCHECK(initialization_state == UNINITIALIZED ||
|
| initialization_state == PREMONOMORPHIC ||
|
| initialization_state == MEGAMORPHIC);
|
| - if (FLAG_vector_stores) {
|
| - VectorStoreICTrampolineStub stub(isolate, StoreICState(language_mode));
|
| - return stub.GetCode();
|
| - }
|
| -
|
| - return StoreICInitializeStubHelper(
|
| - isolate, ComputeExtraICState(language_mode), initialization_state);
|
| + VectorStoreICTrampolineStub stub(isolate, StoreICState(language_mode));
|
| + return stub.GetCode();
|
| }
|
|
|
|
|
| @@ -1635,7 +1606,7 @@ Handle<Code> StoreIC::initialize_stub_in_optimized_code(
|
| DCHECK(initialization_state == UNINITIALIZED ||
|
| initialization_state == PREMONOMORPHIC ||
|
| initialization_state == MEGAMORPHIC);
|
| - if (FLAG_vector_stores && initialization_state != MEGAMORPHIC) {
|
| + if (initialization_state != MEGAMORPHIC) {
|
| VectorStoreICStub stub(isolate, StoreICState(language_mode));
|
| return stub.GetCode();
|
| }
|
| @@ -1682,11 +1653,7 @@ void StoreIC::UpdateCaches(LookupIterator* lookup, Handle<Object> value,
|
| if (state() == UNINITIALIZED) {
|
| // This is the first time we execute this inline cache. Set the target to
|
| // the pre monomorphic stub to delay setting the monomorphic state.
|
| - if (FLAG_vector_stores) {
|
| - ConfigureVectorState(PREMONOMORPHIC);
|
| - } else {
|
| - set_target(*pre_monomorphic_stub());
|
| - }
|
| + ConfigureVectorState(PREMONOMORPHIC);
|
| TRACE_IC("StoreIC", lookup->name());
|
| return;
|
| }
|
| @@ -1882,25 +1849,18 @@ Handle<Code> KeyedStoreIC::StoreElementStub(Handle<Map> receiver_map,
|
| Handle<Map> monomorphic_map =
|
| ComputeTransitionedMap(receiver_map, store_mode);
|
| store_mode = GetNonTransitioningStoreMode(store_mode);
|
| - if (FLAG_vector_stores) {
|
| - Handle<Code> handler =
|
| - PropertyICCompiler::ComputeKeyedStoreMonomorphicHandler(
|
| - monomorphic_map, language_mode(), store_mode);
|
| - ConfigureVectorState(Handle<Name>::null(), monomorphic_map, handler);
|
| - return null_handle;
|
| - }
|
| - return PropertyICCompiler::ComputeKeyedStoreMonomorphic(
|
| - monomorphic_map, language_mode(), store_mode);
|
| + Handle<Code> handler =
|
| + PropertyICCompiler::ComputeKeyedStoreMonomorphicHandler(
|
| + monomorphic_map, language_mode(), store_mode);
|
| + ConfigureVectorState(Handle<Name>::null(), monomorphic_map, handler);
|
| + return null_handle;
|
| }
|
|
|
| // There are several special cases where an IC that is MONOMORPHIC can still
|
| // transition to a different GetNonTransitioningStoreMode IC that handles a
|
| // superset of the original IC. Handle those here if the receiver map hasn't
|
| // changed or it has transitioned to a more general kind.
|
| - KeyedAccessStoreMode old_store_mode =
|
| - FLAG_vector_stores
|
| - ? GetKeyedAccessStoreMode()
|
| - : KeyedStoreIC::GetKeyedAccessStoreMode(target()->extra_ic_state());
|
| + KeyedAccessStoreMode old_store_mode = GetKeyedAccessStoreMode();
|
| Handle<Map> previous_receiver_map = target_receiver_maps.at(0);
|
| if (state() == MONOMORPHIC) {
|
| Handle<Map> transitioned_receiver_map = receiver_map;
|
| @@ -1916,16 +1876,12 @@ Handle<Code> KeyedStoreIC::StoreElementStub(Handle<Map> receiver_map,
|
| // if they at least come from the same origin for a transitioning store,
|
| // stay MONOMORPHIC and use the map for the most generic ElementsKind.
|
| store_mode = GetNonTransitioningStoreMode(store_mode);
|
| - if (FLAG_vector_stores) {
|
| - Handle<Code> handler =
|
| - PropertyICCompiler::ComputeKeyedStoreMonomorphicHandler(
|
| - transitioned_receiver_map, language_mode(), store_mode);
|
| - ConfigureVectorState(Handle<Name>::null(), transitioned_receiver_map,
|
| - handler);
|
| - return null_handle;
|
| - }
|
| - return PropertyICCompiler::ComputeKeyedStoreMonomorphic(
|
| - transitioned_receiver_map, language_mode(), store_mode);
|
| + Handle<Code> handler =
|
| + PropertyICCompiler::ComputeKeyedStoreMonomorphicHandler(
|
| + transitioned_receiver_map, language_mode(), store_mode);
|
| + ConfigureVectorState(Handle<Name>::null(), transitioned_receiver_map,
|
| + handler);
|
| + return null_handle;
|
| } else if (receiver_map.is_identical_to(previous_receiver_map) &&
|
| old_store_mode == STANDARD_STORE &&
|
| (store_mode == STORE_AND_GROW_NO_TRANSITION ||
|
| @@ -1934,15 +1890,11 @@ Handle<Code> KeyedStoreIC::StoreElementStub(Handle<Map> receiver_map,
|
| // A "normal" IC that handles stores can switch to a version that can
|
| // grow at the end of the array, handle OOB accesses or copy COW arrays
|
| // and still stay MONOMORPHIC.
|
| - if (FLAG_vector_stores) {
|
| - Handle<Code> handler =
|
| - PropertyICCompiler::ComputeKeyedStoreMonomorphicHandler(
|
| - receiver_map, language_mode(), store_mode);
|
| - ConfigureVectorState(Handle<Name>::null(), receiver_map, handler);
|
| - return null_handle;
|
| - }
|
| - return PropertyICCompiler::ComputeKeyedStoreMonomorphic(
|
| - receiver_map, language_mode(), store_mode);
|
| + Handle<Code> handler =
|
| + PropertyICCompiler::ComputeKeyedStoreMonomorphicHandler(
|
| + receiver_map, language_mode(), store_mode);
|
| + ConfigureVectorState(Handle<Name>::null(), receiver_map, handler);
|
| + return null_handle;
|
| }
|
| }
|
|
|
| @@ -2001,18 +1953,13 @@ Handle<Code> KeyedStoreIC::StoreElementStub(Handle<Map> receiver_map,
|
| }
|
| }
|
|
|
| - if (FLAG_vector_stores) {
|
| - MapHandleList transitioned_maps(target_receiver_maps.length());
|
| - CodeHandleList handlers(target_receiver_maps.length());
|
| - PropertyICCompiler::ComputeKeyedStorePolymorphicHandlers(
|
| - &target_receiver_maps, &transitioned_maps, &handlers, store_mode,
|
| - language_mode());
|
| - ConfigureVectorState(&target_receiver_maps, &transitioned_maps, &handlers);
|
| - return null_handle;
|
| - }
|
| -
|
| - return PropertyICCompiler::ComputeKeyedStorePolymorphic(
|
| - &target_receiver_maps, store_mode, language_mode());
|
| + MapHandleList transitioned_maps(target_receiver_maps.length());
|
| + CodeHandleList handlers(target_receiver_maps.length());
|
| + PropertyICCompiler::ComputeKeyedStorePolymorphicHandlers(
|
| + &target_receiver_maps, &transitioned_maps, &handlers, store_mode,
|
| + language_mode());
|
| + ConfigureVectorState(&target_receiver_maps, &transitioned_maps, &handlers);
|
| + return null_handle;
|
| }
|
|
|
|
|
| @@ -2106,44 +2053,6 @@ static KeyedAccessStoreMode GetStoreMode(Handle<JSObject> receiver,
|
| }
|
|
|
|
|
| -void KeyedStoreIC::ValidateStoreMode(Handle<Code> stub) {
|
| -#ifdef DEBUG
|
| - DCHECK(!FLAG_vector_stores);
|
| - if (stub.is_null() || *stub == *megamorphic_stub() || *stub == *slow_stub()) {
|
| - return;
|
| - }
|
| -
|
| - // Query the keyed store mode.
|
| - ExtraICState state = stub->extra_ic_state();
|
| - KeyedAccessStoreMode stub_mode = GetKeyedAccessStoreMode(state);
|
| -
|
| - MapHandleList map_list;
|
| - stub->FindAllMaps(&map_list);
|
| - CodeHandleList list;
|
| - stub->FindHandlers(&list, map_list.length());
|
| - for (int i = 0; i < list.length(); i++) {
|
| - Handle<Code> handler = list.at(i);
|
| - CHECK(handler->is_handler());
|
| - CodeStub::Major major_key = CodeStub::MajorKeyFromKey(handler->stub_key());
|
| - uint32_t minor_key = CodeStub::MinorKeyFromKey(handler->stub_key());
|
| - // Ensure that we only see handlers we know have the store mode embedded.
|
| - CHECK(major_key == CodeStub::KeyedStoreSloppyArguments ||
|
| - major_key == CodeStub::StoreFastElement ||
|
| - major_key == CodeStub::StoreElement ||
|
| - major_key == CodeStub::ElementsTransitionAndStore ||
|
| - *handler == *isolate()->builtins()->KeyedStoreIC_Slow());
|
| - // Ensure that the store mode matches that of the IC.
|
| - CHECK(major_key == CodeStub::NoCache ||
|
| - stub_mode == CommonStoreModeBits::decode(minor_key));
|
| - // The one exception is the keyed store slow builtin, which doesn't include
|
| - // store mode.
|
| - CHECK(major_key != CodeStub::NoCache ||
|
| - *handler == *isolate()->builtins()->KeyedStoreIC_Slow());
|
| - }
|
| -#endif // DEBUG
|
| -}
|
| -
|
| -
|
| MaybeHandle<Object> KeyedStoreIC::Store(Handle<Object> object,
|
| Handle<Object> key,
|
| Handle<Object> value) {
|
| @@ -2174,20 +2083,11 @@ MaybeHandle<Object> KeyedStoreIC::Store(Handle<Object> object,
|
| StoreIC::Store(object, Handle<Name>::cast(key), value,
|
| JSReceiver::MAY_BE_STORE_FROM_KEYED),
|
| Object);
|
| - if (FLAG_vector_stores) {
|
| - if (!is_vector_set()) {
|
| - ConfigureVectorState(MEGAMORPHIC);
|
| - TRACE_GENERIC_IC(isolate(), "KeyedStoreIC",
|
| - "unhandled internalized string key");
|
| - TRACE_IC("StoreIC", key);
|
| - }
|
| - } else {
|
| - if (!is_target_set()) {
|
| - TRACE_GENERIC_IC(isolate(), "KeyedStoreIC",
|
| - "unhandled internalized string key");
|
| - TRACE_IC("StoreIC", key);
|
| - set_target(*stub);
|
| - }
|
| + if (!is_vector_set()) {
|
| + ConfigureVectorState(MEGAMORPHIC);
|
| + TRACE_GENERIC_IC(isolate(), "KeyedStoreIC",
|
| + "unhandled internalized string key");
|
| + TRACE_IC("StoreIC", key);
|
| }
|
| return store_handle;
|
| }
|
| @@ -2244,10 +2144,6 @@ MaybeHandle<Object> KeyedStoreIC::Store(Handle<Object> object,
|
| // from fast path keyed stores.
|
| if (!old_receiver_map->DictionaryElementsInPrototypeChainOnly()) {
|
| stub = StoreElementStub(old_receiver_map, store_mode);
|
| -
|
| - // Validate that the store_mode in the stub can also be derived
|
| - // from peeking in the code bits of the handlers.
|
| - if (!FLAG_vector_stores) ValidateStoreMode(stub);
|
| } else {
|
| TRACE_GENERIC_IC(isolate(), "KeyedStoreIC",
|
| "dictionary or proxy prototype");
|
| @@ -2260,27 +2156,12 @@ MaybeHandle<Object> KeyedStoreIC::Store(Handle<Object> object,
|
| }
|
| }
|
|
|
| - if (FLAG_vector_stores) {
|
| - if (!is_vector_set() || stub.is_null()) {
|
| - Code* megamorphic = *megamorphic_stub();
|
| - if (!stub.is_null() && (*stub == megamorphic || *stub == *slow_stub())) {
|
| - ConfigureVectorState(MEGAMORPHIC);
|
| - TRACE_GENERIC_IC(isolate(), "KeyedStoreIC",
|
| - *stub == megamorphic ? "set generic" : "slow stub");
|
| - }
|
| - }
|
| - } else {
|
| - DCHECK(!is_target_set());
|
| + if (!is_vector_set() || stub.is_null()) {
|
| Code* megamorphic = *megamorphic_stub();
|
| - if (*stub == megamorphic) {
|
| - TRACE_GENERIC_IC(isolate(), "KeyedStoreIC", "set generic");
|
| - } else if (*stub == *slow_stub()) {
|
| - TRACE_GENERIC_IC(isolate(), "KeyedStoreIC", "slow stub");
|
| - }
|
| -
|
| - DCHECK(!stub.is_null());
|
| - if (!AddressIsDeoptimizedCode()) {
|
| - set_target(*stub);
|
| + if (!stub.is_null() && (*stub == megamorphic || *stub == *slow_stub())) {
|
| + ConfigureVectorState(MEGAMORPHIC);
|
| + TRACE_GENERIC_IC(isolate(), "KeyedStoreIC",
|
| + *stub == megamorphic ? "set generic" : "slow stub");
|
| }
|
| }
|
| TRACE_IC("StoreIC", key);
|
| @@ -2436,29 +2317,21 @@ RUNTIME_FUNCTION(Runtime_StoreIC_Miss) {
|
| Handle<Object> value = args.at<Object>(2);
|
| Handle<Object> result;
|
|
|
| - if (FLAG_vector_stores) {
|
| - DCHECK(args.length() == 5 || args.length() == 6);
|
| - Handle<Smi> slot = args.at<Smi>(3);
|
| - Handle<TypeFeedbackVector> vector = args.at<TypeFeedbackVector>(4);
|
| - FeedbackVectorSlot vector_slot = vector->ToSlot(slot->value());
|
| - if (vector->GetKind(vector_slot) == FeedbackVectorSlotKind::STORE_IC) {
|
| - StoreICNexus nexus(vector, vector_slot);
|
| - StoreIC ic(IC::NO_EXTRA_FRAME, isolate, &nexus);
|
| - ic.UpdateState(receiver, key);
|
| - ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
|
| - ic.Store(receiver, key, value));
|
| - } else {
|
| - DCHECK_EQ(FeedbackVectorSlotKind::KEYED_STORE_IC,
|
| - vector->GetKind(vector_slot));
|
| - KeyedStoreICNexus nexus(vector, vector_slot);
|
| - KeyedStoreIC ic(IC::NO_EXTRA_FRAME, isolate, &nexus);
|
| - ic.UpdateState(receiver, key);
|
| - ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
|
| - ic.Store(receiver, key, value));
|
| - }
|
| + DCHECK(args.length() == 5 || args.length() == 6);
|
| + Handle<Smi> slot = args.at<Smi>(3);
|
| + Handle<TypeFeedbackVector> vector = args.at<TypeFeedbackVector>(4);
|
| + FeedbackVectorSlot vector_slot = vector->ToSlot(slot->value());
|
| + if (vector->GetKind(vector_slot) == FeedbackVectorSlotKind::STORE_IC) {
|
| + StoreICNexus nexus(vector, vector_slot);
|
| + StoreIC ic(IC::NO_EXTRA_FRAME, isolate, &nexus);
|
| + ic.UpdateState(receiver, key);
|
| + ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
|
| + ic.Store(receiver, key, value));
|
| } else {
|
| - DCHECK(args.length() == 3);
|
| - StoreIC ic(IC::NO_EXTRA_FRAME, isolate);
|
| + DCHECK_EQ(FeedbackVectorSlotKind::KEYED_STORE_IC,
|
| + vector->GetKind(vector_slot));
|
| + KeyedStoreICNexus nexus(vector, vector_slot);
|
| + KeyedStoreIC ic(IC::NO_EXTRA_FRAME, isolate, &nexus);
|
| ic.UpdateState(receiver, key);
|
| ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
|
| ic.Store(receiver, key, value));
|
| @@ -2475,49 +2348,41 @@ RUNTIME_FUNCTION(Runtime_StoreIC_MissFromStubFailure) {
|
| Handle<Object> value = args.at<Object>(2);
|
| Handle<Object> result;
|
|
|
| - if (FLAG_vector_stores) {
|
| - int length = args.length();
|
| - DCHECK(length == 5 || length == 6);
|
| - // We might have slot and vector, for a normal miss (slot(3), vector(4)).
|
| - // Or, map and vector for a transitioning store miss (map(3), vector(4)).
|
| - // In this case, we need to recover the slot from a virtual register.
|
| - // If length == 6, then a map is included (map(3), slot(4), vector(5)).
|
| - Handle<Smi> slot;
|
| - Handle<TypeFeedbackVector> vector;
|
| - if (length == 5) {
|
| - if (args.at<Object>(3)->IsMap()) {
|
| - vector = args.at<TypeFeedbackVector>(4);
|
| - slot = handle(
|
| - *reinterpret_cast<Smi**>(isolate->virtual_slot_register_address()),
|
| - isolate);
|
| - } else {
|
| - vector = args.at<TypeFeedbackVector>(4);
|
| - slot = args.at<Smi>(3);
|
| - }
|
| + int length = args.length();
|
| + DCHECK(length == 5 || length == 6);
|
| + // We might have slot and vector, for a normal miss (slot(3), vector(4)).
|
| + // Or, map and vector for a transitioning store miss (map(3), vector(4)).
|
| + // In this case, we need to recover the slot from a virtual register.
|
| + // If length == 6, then a map is included (map(3), slot(4), vector(5)).
|
| + Handle<Smi> slot;
|
| + Handle<TypeFeedbackVector> vector;
|
| + if (length == 5) {
|
| + if (args.at<Object>(3)->IsMap()) {
|
| + vector = args.at<TypeFeedbackVector>(4);
|
| + slot = handle(
|
| + *reinterpret_cast<Smi**>(isolate->virtual_slot_register_address()),
|
| + isolate);
|
| } else {
|
| - vector = args.at<TypeFeedbackVector>(5);
|
| - slot = args.at<Smi>(4);
|
| + vector = args.at<TypeFeedbackVector>(4);
|
| + slot = args.at<Smi>(3);
|
| }
|
| + } else {
|
| + vector = args.at<TypeFeedbackVector>(5);
|
| + slot = args.at<Smi>(4);
|
| + }
|
|
|
| - FeedbackVectorSlot vector_slot = vector->ToSlot(slot->value());
|
| - if (vector->GetKind(vector_slot) == FeedbackVectorSlotKind::STORE_IC) {
|
| - StoreICNexus nexus(vector, vector_slot);
|
| - StoreIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus);
|
| - ic.UpdateState(receiver, key);
|
| - ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
|
| - ic.Store(receiver, key, value));
|
| - } else {
|
| - DCHECK_EQ(FeedbackVectorSlotKind::KEYED_STORE_IC,
|
| - vector->GetKind(vector_slot));
|
| - KeyedStoreICNexus nexus(vector, vector_slot);
|
| - KeyedStoreIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus);
|
| - ic.UpdateState(receiver, key);
|
| - ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
|
| - ic.Store(receiver, key, value));
|
| - }
|
| + FeedbackVectorSlot vector_slot = vector->ToSlot(slot->value());
|
| + if (vector->GetKind(vector_slot) == FeedbackVectorSlotKind::STORE_IC) {
|
| + StoreICNexus nexus(vector, vector_slot);
|
| + StoreIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus);
|
| + ic.UpdateState(receiver, key);
|
| + ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
|
| + ic.Store(receiver, key, value));
|
| } else {
|
| - DCHECK(args.length() == 3 || args.length() == 4);
|
| - StoreIC ic(IC::EXTRA_CALL_FRAME, isolate);
|
| + DCHECK_EQ(FeedbackVectorSlotKind::KEYED_STORE_IC,
|
| + vector->GetKind(vector_slot));
|
| + KeyedStoreICNexus nexus(vector, vector_slot);
|
| + KeyedStoreIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus);
|
| ic.UpdateState(receiver, key);
|
| ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
|
| ic.Store(receiver, key, value));
|
| @@ -2535,23 +2400,15 @@ RUNTIME_FUNCTION(Runtime_KeyedStoreIC_Miss) {
|
| Handle<Object> value = args.at<Object>(2);
|
| Handle<Object> result;
|
|
|
| - if (FLAG_vector_stores) {
|
| - DCHECK(args.length() == 5);
|
| - Handle<Smi> slot = args.at<Smi>(3);
|
| - Handle<TypeFeedbackVector> vector = args.at<TypeFeedbackVector>(4);
|
| - FeedbackVectorSlot vector_slot = vector->ToSlot(slot->value());
|
| - KeyedStoreICNexus nexus(vector, vector_slot);
|
| - KeyedStoreIC ic(IC::NO_EXTRA_FRAME, isolate, &nexus);
|
| - ic.UpdateState(receiver, key);
|
| - ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
|
| - ic.Store(receiver, key, value));
|
| - } else {
|
| - DCHECK(args.length() == 3);
|
| - KeyedStoreIC ic(IC::NO_EXTRA_FRAME, isolate);
|
| - ic.UpdateState(receiver, key);
|
| - ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
|
| - ic.Store(receiver, key, value));
|
| - }
|
| + DCHECK(args.length() == 5);
|
| + Handle<Smi> slot = args.at<Smi>(3);
|
| + Handle<TypeFeedbackVector> vector = args.at<TypeFeedbackVector>(4);
|
| + FeedbackVectorSlot vector_slot = vector->ToSlot(slot->value());
|
| + KeyedStoreICNexus nexus(vector, vector_slot);
|
| + KeyedStoreIC ic(IC::NO_EXTRA_FRAME, isolate, &nexus);
|
| + ic.UpdateState(receiver, key);
|
| + ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
|
| + ic.Store(receiver, key, value));
|
| return *result;
|
| }
|
|
|
| @@ -2564,42 +2421,29 @@ RUNTIME_FUNCTION(Runtime_KeyedStoreIC_MissFromStubFailure) {
|
| Handle<Object> value = args.at<Object>(2);
|
| Handle<Object> result;
|
|
|
| - if (FLAG_vector_stores) {
|
| - DCHECK(args.length() == 5);
|
| - Handle<Smi> slot = args.at<Smi>(3);
|
| - Handle<TypeFeedbackVector> vector = args.at<TypeFeedbackVector>(4);
|
| - FeedbackVectorSlot vector_slot = vector->ToSlot(slot->value());
|
| - KeyedStoreICNexus nexus(vector, vector_slot);
|
| - KeyedStoreIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus);
|
| - ic.UpdateState(receiver, key);
|
| - ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
|
| - ic.Store(receiver, key, value));
|
| - } else {
|
| - DCHECK(args.length() == 3);
|
| - KeyedStoreIC ic(IC::EXTRA_CALL_FRAME, isolate);
|
| - ic.UpdateState(receiver, key);
|
| - ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
|
| - isolate, result, ic.Store(receiver, key, args.at<Object>(2)));
|
| - }
|
| + DCHECK(args.length() == 5);
|
| + Handle<Smi> slot = args.at<Smi>(3);
|
| + Handle<TypeFeedbackVector> vector = args.at<TypeFeedbackVector>(4);
|
| + FeedbackVectorSlot vector_slot = vector->ToSlot(slot->value());
|
| + KeyedStoreICNexus nexus(vector, vector_slot);
|
| + KeyedStoreIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus);
|
| + ic.UpdateState(receiver, key);
|
| + ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
|
| + ic.Store(receiver, key, value));
|
| return *result;
|
| }
|
|
|
|
|
| RUNTIME_FUNCTION(Runtime_StoreIC_Slow) {
|
| HandleScope scope(isolate);
|
| - DCHECK(args.length() == (FLAG_vector_stores ? 5 : 3));
|
| + DCHECK(args.length() == 5);
|
| Handle<Object> object = args.at<Object>(0);
|
| Handle<Object> key = args.at<Object>(1);
|
| Handle<Object> value = args.at<Object>(2);
|
| LanguageMode language_mode;
|
| - if (FLAG_vector_stores) {
|
| - StoreICNexus nexus(isolate);
|
| - StoreIC ic(IC::NO_EXTRA_FRAME, isolate, &nexus);
|
| - language_mode = ic.language_mode();
|
| - } else {
|
| - StoreIC ic(IC::NO_EXTRA_FRAME, isolate);
|
| - language_mode = ic.language_mode();
|
| - }
|
| + StoreICNexus nexus(isolate);
|
| + StoreIC ic(IC::NO_EXTRA_FRAME, isolate, &nexus);
|
| + language_mode = ic.language_mode();
|
| Handle<Object> result;
|
| ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
|
| isolate, result,
|
| @@ -2610,19 +2454,14 @@ RUNTIME_FUNCTION(Runtime_StoreIC_Slow) {
|
|
|
| RUNTIME_FUNCTION(Runtime_KeyedStoreIC_Slow) {
|
| HandleScope scope(isolate);
|
| - DCHECK(args.length() == (FLAG_vector_stores ? 5 : 3));
|
| + DCHECK(args.length() == 5);
|
| Handle<Object> object = args.at<Object>(0);
|
| Handle<Object> key = args.at<Object>(1);
|
| Handle<Object> value = args.at<Object>(2);
|
| LanguageMode language_mode;
|
| - if (FLAG_vector_stores) {
|
| - KeyedStoreICNexus nexus(isolate);
|
| - KeyedStoreIC ic(IC::NO_EXTRA_FRAME, isolate, &nexus);
|
| - language_mode = ic.language_mode();
|
| - } else {
|
| - KeyedStoreIC ic(IC::NO_EXTRA_FRAME, isolate);
|
| - language_mode = ic.language_mode();
|
| - }
|
| + KeyedStoreICNexus nexus(isolate);
|
| + KeyedStoreIC ic(IC::NO_EXTRA_FRAME, isolate, &nexus);
|
| + language_mode = ic.language_mode();
|
| Handle<Object> result;
|
| ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
|
| isolate, result,
|
| @@ -2634,23 +2473,17 @@ RUNTIME_FUNCTION(Runtime_KeyedStoreIC_Slow) {
|
| RUNTIME_FUNCTION(Runtime_ElementsTransitionAndStoreIC_Miss) {
|
| TimerEventScope<TimerEventIcMiss> timer(isolate);
|
| HandleScope scope(isolate);
|
| - // Without vector stores, length == 4.
|
| - // With vector stores, length == 5 or 6, depending on whether the vector slot
|
| + // Length == 5 or 6, depending on whether the vector slot
|
| // is passed in a virtual register or not.
|
| - DCHECK(!FLAG_vector_stores || args.length() == 5 || args.length() == 6);
|
| + DCHECK(args.length() == 5 || args.length() == 6);
|
| Handle<Object> object = args.at<Object>(0);
|
| Handle<Object> key = args.at<Object>(1);
|
| Handle<Object> value = args.at<Object>(2);
|
| Handle<Map> map = args.at<Map>(3);
|
| LanguageMode language_mode;
|
| - if (FLAG_vector_stores) {
|
| - KeyedStoreICNexus nexus(isolate);
|
| - KeyedStoreIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus);
|
| - language_mode = ic.language_mode();
|
| - } else {
|
| - KeyedStoreIC ic(IC::EXTRA_CALL_FRAME, isolate);
|
| - language_mode = ic.language_mode();
|
| - }
|
| + KeyedStoreICNexus nexus(isolate);
|
| + KeyedStoreIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus);
|
| + language_mode = ic.language_mode();
|
| if (object->IsJSObject()) {
|
| JSObject::TransitionElementsKind(Handle<JSObject>::cast(object),
|
| map->elements_kind());
|
|
|