| Index: src/compiler/js-native-context-specialization.cc
|
| diff --git a/src/compiler/js-native-context-specialization.cc b/src/compiler/js-native-context-specialization.cc
|
| index b84896bba85ee23655640ba2268c1e6fe41322b4..b1b27def6a9278f53a31811ed8ca6e5b2ce672f3 100644
|
| --- a/src/compiler/js-native-context-specialization.cc
|
| +++ b/src/compiler/js-native-context-specialization.cc
|
| @@ -1117,12 +1117,21 @@ JSNativeContextSpecialization::BuildPropertyAccess(
|
| // Optimize immutable property loads.
|
| HeapObjectMatcher m(receiver);
|
| if (m.HasValue() && m.Value()->IsJSObject()) {
|
| + // TODO(ishell): Use something simpler like
|
| + //
|
| + // Handle<Object> value =
|
| + // JSObject::FastPropertyAt(Handle<JSObject>::cast(m.Value()),
|
| + // Representation::Tagged(), field_index);
|
| + //
|
| + // here, once we have the immutable bit in the access_info.
|
| +
|
| // TODO(turbofan): Given that we already have the field_index here, we
|
| // might be smarter in the future and not rely on the LookupIterator,
|
| // but for now let's just do what Crankshaft does.
|
| LookupIterator it(m.Value(), name,
|
| LookupIterator::OWN_SKIP_INTERCEPTOR);
|
| - if (it.IsFound() && it.IsReadOnly() && !it.IsConfigurable()) {
|
| + if (it.state() == LookupIterator::DATA && it.IsReadOnly() &&
|
| + !it.IsConfigurable()) {
|
| Node* value = jsgraph()->Constant(JSReceiver::GetDataProperty(&it));
|
| return ValueEffectControl(value, effect, control);
|
| }
|
|
|