[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/997474
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52392}
This commit is contained in:
Igor Sheludko 2018-04-05 10:59:38 +02:00 committed by Commit Bot
parent ae958346a0
commit 844b762f53
3 changed files with 3 additions and 18 deletions

View File

@ -1390,16 +1390,7 @@ MaybeHandle<Object> StoreIC::Store(Handle<Object> object, Handle<Name> name,
if (state() != UNINITIALIZED) {
JSObject::MakePrototypesFast(object, kStartAtPrototype, isolate());
}
MaybeHandle<Map> maybe_transition_map;
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);
LookupIterator it(object, name);
bool use_ic = FLAG_use_ic;
if (name->IsPrivate()) {

View File

@ -74,6 +74,7 @@ LookupIterator LookupIterator::PropertyOrElement(Isolate* isolate,
return LookupIterator(receiver, name, configuration);
}
// TODO(ishell): Consider removing this way of LookupIterator creation.
// static
LookupIterator LookupIterator::ForTransitionHandler(
Isolate* isolate, Handle<Object> receiver, Handle<Name> name,

View File

@ -2126,14 +2126,7 @@ MUST_USE_RESULT Maybe<bool> FastAssign(
}
if (use_set) {
Handle<Map> target_map(target->map(), isolate);
MaybeHandle<Map> maybe_transition_map =
TransitionsAccessor(target_map)
.FindTransitionToDataProperty(next_key);
LookupIterator it = LookupIterator::ForTransitionHandler(
isolate, target, next_key, prop_value, maybe_transition_map);
LookupIterator it(target, next_key, target);
Maybe<bool> result =
Object::SetProperty(&it, prop_value, LanguageMode::kStrict,
Object::CERTAINLY_NOT_STORE_FROM_KEYED);