Commit 844b762f authored by Igor Sheludko's avatar Igor Sheludko Committed by Commit Bot

[ic][runtime] Don't use LookupIterator::ForTransitionHandler() constructor.

It looks like the normal ways of creating lookup iterators work better.

Bug: v8:5988, chromium:828282
Change-Id: Ifd623b2e93708ff8684d056d9292b7779f611a3c
Reviewed-on: https://chromium-review.googlesource.com/997474Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52392}
parent ae958346
...@@ -1390,16 +1390,7 @@ MaybeHandle<Object> StoreIC::Store(Handle<Object> object, Handle<Name> name, ...@@ -1390,16 +1390,7 @@ MaybeHandle<Object> StoreIC::Store(Handle<Object> object, Handle<Name> name,
if (state() != UNINITIALIZED) { if (state() != UNINITIALIZED) {
JSObject::MakePrototypesFast(object, kStartAtPrototype, isolate()); JSObject::MakePrototypesFast(object, kStartAtPrototype, isolate());
} }
MaybeHandle<Map> maybe_transition_map; LookupIterator it(object, name);
if (object->IsJSReceiver()) {
name = isolate()->factory()->InternalizeName(name);
maybe_transition_map =
TransitionsAccessor(receiver_map()).FindTransitionToDataProperty(name);
}
LookupIterator it = LookupIterator::ForTransitionHandler(
isolate(), object, name, value, maybe_transition_map);
bool use_ic = FLAG_use_ic; bool use_ic = FLAG_use_ic;
if (name->IsPrivate()) { if (name->IsPrivate()) {
......
...@@ -74,6 +74,7 @@ LookupIterator LookupIterator::PropertyOrElement(Isolate* isolate, ...@@ -74,6 +74,7 @@ LookupIterator LookupIterator::PropertyOrElement(Isolate* isolate,
return LookupIterator(receiver, name, configuration); return LookupIterator(receiver, name, configuration);
} }
// TODO(ishell): Consider removing this way of LookupIterator creation.
// static // static
LookupIterator LookupIterator::ForTransitionHandler( LookupIterator LookupIterator::ForTransitionHandler(
Isolate* isolate, Handle<Object> receiver, Handle<Name> name, Isolate* isolate, Handle<Object> receiver, Handle<Name> name,
......
...@@ -2126,14 +2126,7 @@ MUST_USE_RESULT Maybe<bool> FastAssign( ...@@ -2126,14 +2126,7 @@ MUST_USE_RESULT Maybe<bool> FastAssign(
} }
if (use_set) { if (use_set) {
Handle<Map> target_map(target->map(), isolate); LookupIterator it(target, next_key, target);
MaybeHandle<Map> maybe_transition_map =
TransitionsAccessor(target_map)
.FindTransitionToDataProperty(next_key);
LookupIterator it = LookupIterator::ForTransitionHandler(
isolate, target, next_key, prop_value, maybe_transition_map);
Maybe<bool> result = Maybe<bool> result =
Object::SetProperty(&it, prop_value, LanguageMode::kStrict, Object::SetProperty(&it, prop_value, LanguageMode::kStrict,
Object::CERTAINLY_NOT_STORE_FROM_KEYED); Object::CERTAINLY_NOT_STORE_FROM_KEYED);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment