Commit 30a1def7 authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[turbofan] Avoid using LookupIterator to read constant field

Use JSObject::FastPropertyAt instead. Also, to avoid adding an
immutable-flag to PropertyAccessInfo, use DataConstant (instead of
DataField) for properties that are immutable according to their
attributes.

This is in preparation for serializing the property value for
concurrent inlining.

Bug: v8:7790
Change-Id: Ib40059bde2e5eb14b26400bcab72d6ea6bb57666
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624790Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61747}
parent 2ce5da9a
...@@ -79,7 +79,7 @@ PropertyAccessInfo PropertyAccessInfo::NotFound(Zone* zone, ...@@ -79,7 +79,7 @@ PropertyAccessInfo PropertyAccessInfo::NotFound(Zone* zone,
PropertyAccessInfo PropertyAccessInfo::DataField( PropertyAccessInfo PropertyAccessInfo::DataField(
Zone* zone, Handle<Map> receiver_map, Zone* zone, Handle<Map> receiver_map,
ZoneVector<CompilationDependencies::Dependency const*>&& dependencies, ZoneVector<CompilationDependencies::Dependency const*>&& dependencies,
FieldIndex field_index, MachineRepresentation field_representation, FieldIndex field_index, Representation field_representation,
Type field_type, MaybeHandle<Map> field_map, MaybeHandle<JSObject> holder, Type field_type, MaybeHandle<Map> field_map, MaybeHandle<JSObject> holder,
MaybeHandle<Map> transition_map) { MaybeHandle<Map> transition_map) {
return PropertyAccessInfo(kDataField, holder, transition_map, field_index, return PropertyAccessInfo(kDataField, holder, transition_map, field_index,
...@@ -91,7 +91,7 @@ PropertyAccessInfo PropertyAccessInfo::DataField( ...@@ -91,7 +91,7 @@ PropertyAccessInfo PropertyAccessInfo::DataField(
PropertyAccessInfo PropertyAccessInfo::DataConstant( PropertyAccessInfo PropertyAccessInfo::DataConstant(
Zone* zone, Handle<Map> receiver_map, Zone* zone, Handle<Map> receiver_map,
ZoneVector<CompilationDependencies::Dependency const*>&& dependencies, ZoneVector<CompilationDependencies::Dependency const*>&& dependencies,
FieldIndex field_index, MachineRepresentation field_representation, FieldIndex field_index, Representation field_representation,
Type field_type, MaybeHandle<Map> field_map, MaybeHandle<JSObject> holder) { Type field_type, MaybeHandle<Map> field_map, MaybeHandle<JSObject> holder) {
return PropertyAccessInfo(kDataConstant, holder, MaybeHandle<Map>(), return PropertyAccessInfo(kDataConstant, holder, MaybeHandle<Map>(),
field_index, field_representation, field_type, field_index, field_representation, field_type,
...@@ -126,7 +126,7 @@ PropertyAccessInfo::PropertyAccessInfo(Zone* zone) ...@@ -126,7 +126,7 @@ PropertyAccessInfo::PropertyAccessInfo(Zone* zone)
: kind_(kInvalid), : kind_(kInvalid),
receiver_maps_(zone), receiver_maps_(zone),
unrecorded_dependencies_(zone), unrecorded_dependencies_(zone),
field_representation_(MachineRepresentation::kNone), field_representation_(Representation::None()),
field_type_(Type::None()) {} field_type_(Type::None()) {}
PropertyAccessInfo::PropertyAccessInfo(Zone* zone, Kind kind, PropertyAccessInfo::PropertyAccessInfo(Zone* zone, Kind kind,
...@@ -136,7 +136,7 @@ PropertyAccessInfo::PropertyAccessInfo(Zone* zone, Kind kind, ...@@ -136,7 +136,7 @@ PropertyAccessInfo::PropertyAccessInfo(Zone* zone, Kind kind,
receiver_maps_(receiver_maps), receiver_maps_(receiver_maps),
unrecorded_dependencies_(zone), unrecorded_dependencies_(zone),
holder_(holder), holder_(holder),
field_representation_(MachineRepresentation::kNone), field_representation_(Representation::None()),
field_type_(Type::None()) {} field_type_(Type::None()) {}
PropertyAccessInfo::PropertyAccessInfo(Zone* zone, Kind kind, PropertyAccessInfo::PropertyAccessInfo(Zone* zone, Kind kind,
...@@ -148,12 +148,12 @@ PropertyAccessInfo::PropertyAccessInfo(Zone* zone, Kind kind, ...@@ -148,12 +148,12 @@ PropertyAccessInfo::PropertyAccessInfo(Zone* zone, Kind kind,
unrecorded_dependencies_(zone), unrecorded_dependencies_(zone),
constant_(constant), constant_(constant),
holder_(holder), holder_(holder),
field_representation_(MachineRepresentation::kNone), field_representation_(Representation::None()),
field_type_(Type::Any()) {} field_type_(Type::Any()) {}
PropertyAccessInfo::PropertyAccessInfo( PropertyAccessInfo::PropertyAccessInfo(
Kind kind, MaybeHandle<JSObject> holder, MaybeHandle<Map> transition_map, Kind kind, MaybeHandle<JSObject> holder, MaybeHandle<Map> transition_map,
FieldIndex field_index, MachineRepresentation field_representation, FieldIndex field_index, Representation field_representation,
Type field_type, MaybeHandle<Map> field_map, Type field_type, MaybeHandle<Map> field_map,
ZoneVector<Handle<Map>>&& receiver_maps, ZoneVector<Handle<Map>>&& receiver_maps,
ZoneVector<CompilationDependencies::Dependency const*>&& ZoneVector<CompilationDependencies::Dependency const*>&&
...@@ -188,12 +188,13 @@ bool PropertyAccessInfo::Merge(PropertyAccessInfo const* that, ...@@ -188,12 +188,13 @@ bool PropertyAccessInfo::Merge(PropertyAccessInfo const* that,
switch (access_mode) { switch (access_mode) {
case AccessMode::kHas: case AccessMode::kHas:
case AccessMode::kLoad: { case AccessMode::kLoad: {
if (this->field_representation_ != that->field_representation_) { if (!this->field_representation_.Equals(
if (!IsAnyCompressedTagged(this->field_representation_) || that->field_representation_)) {
!IsAnyCompressedTagged(that->field_representation_)) { if (this->field_representation_.IsDouble() ||
that->field_representation_.IsDouble()) {
return false; return false;
} }
this->field_representation_ = MachineType::RepCompressedTagged(); this->field_representation_ = Representation::Tagged();
} }
if (this->field_map_.address() != that->field_map_.address()) { if (this->field_map_.address() != that->field_map_.address()) {
this->field_map_ = MaybeHandle<Map>(); this->field_map_ = MaybeHandle<Map>();
...@@ -207,7 +208,8 @@ bool PropertyAccessInfo::Merge(PropertyAccessInfo const* that, ...@@ -207,7 +208,8 @@ bool PropertyAccessInfo::Merge(PropertyAccessInfo const* that,
// also need to make sure that in case of transitioning stores, // also need to make sure that in case of transitioning stores,
// the transition targets match. // the transition targets match.
if (this->field_map_.address() != that->field_map_.address() || if (this->field_map_.address() != that->field_map_.address() ||
this->field_representation_ != that->field_representation_ || !this->field_representation_.Equals(
that->field_representation_) ||
this->transition_map_.address() != this->transition_map_.address() !=
that->transition_map_.address()) { that->transition_map_.address()) {
return false; return false;
...@@ -332,26 +334,21 @@ PropertyAccessInfo AccessInfoFactory::ComputeDataFieldAccessInfo( ...@@ -332,26 +334,21 @@ PropertyAccessInfo AccessInfoFactory::ComputeDataFieldAccessInfo(
FieldIndex field_index = FieldIndex field_index =
FieldIndex::ForPropertyIndex(*map, index, details_representation); FieldIndex::ForPropertyIndex(*map, index, details_representation);
Type field_type = Type::NonInternal(); Type field_type = Type::NonInternal();
MachineRepresentation field_representation =
MachineType::RepCompressedTagged();
MaybeHandle<Map> field_map; MaybeHandle<Map> field_map;
MapRef map_ref(broker(), map); MapRef map_ref(broker(), map);
ZoneVector<CompilationDependencies::Dependency const*> ZoneVector<CompilationDependencies::Dependency const*>
unrecorded_dependencies(zone()); unrecorded_dependencies(zone());
if (details_representation.IsSmi()) { if (details_representation.IsSmi()) {
field_type = Type::SignedSmall(); field_type = Type::SignedSmall();
field_representation = MachineType::RepCompressedTaggedSigned();
map_ref.SerializeOwnDescriptor(descriptor); map_ref.SerializeOwnDescriptor(descriptor);
unrecorded_dependencies.push_back( unrecorded_dependencies.push_back(
dependencies()->FieldRepresentationDependencyOffTheRecord(map_ref, dependencies()->FieldRepresentationDependencyOffTheRecord(map_ref,
descriptor)); descriptor));
} else if (details_representation.IsDouble()) { } else if (details_representation.IsDouble()) {
field_type = type_cache_->kFloat64; field_type = type_cache_->kFloat64;
field_representation = MachineRepresentation::kFloat64;
} else if (details_representation.IsHeapObject()) { } else if (details_representation.IsHeapObject()) {
// Extract the field type from the property details (make sure its // Extract the field type from the property details (make sure its
// representation is TaggedPointer to reflect the heap object case). // representation is TaggedPointer to reflect the heap object case).
field_representation = MachineType::RepCompressedTaggedPointer();
Handle<FieldType> descriptors_field_type( Handle<FieldType> descriptors_field_type(
descriptors->GetFieldType(descriptor), isolate()); descriptors->GetFieldType(descriptor), isolate());
if (descriptors_field_type->IsNone()) { if (descriptors_field_type->IsNone()) {
...@@ -376,18 +373,22 @@ PropertyAccessInfo AccessInfoFactory::ComputeDataFieldAccessInfo( ...@@ -376,18 +373,22 @@ PropertyAccessInfo AccessInfoFactory::ComputeDataFieldAccessInfo(
field_map = MaybeHandle<Map>(map); field_map = MaybeHandle<Map>(map);
} }
} }
map_ref.SerializeOwnDescriptor(descriptor); PropertyConstness constness;
PropertyConstness constness = if (details.IsReadOnly() && !details.IsConfigurable()) {
dependencies()->DependOnFieldConstness(map_ref, descriptor); constness = PropertyConstness::kConst;
} else {
map_ref.SerializeOwnDescriptor(descriptor);
constness = dependencies()->DependOnFieldConstness(map_ref, descriptor);
}
switch (constness) { switch (constness) {
case PropertyConstness::kMutable: case PropertyConstness::kMutable:
return PropertyAccessInfo::DataField( return PropertyAccessInfo::DataField(
zone(), receiver_map, std::move(unrecorded_dependencies), field_index, zone(), receiver_map, std::move(unrecorded_dependencies), field_index,
field_representation, field_type, field_map, holder); details_representation, field_type, field_map, holder);
case PropertyConstness::kConst: case PropertyConstness::kConst:
return PropertyAccessInfo::DataConstant( return PropertyAccessInfo::DataConstant(
zone(), receiver_map, std::move(unrecorded_dependencies), field_index, zone(), receiver_map, std::move(unrecorded_dependencies), field_index,
field_representation, field_type, field_map, holder); details_representation, field_type, field_map, holder);
} }
UNREACHABLE(); UNREACHABLE();
} }
...@@ -705,8 +706,7 @@ PropertyAccessInfo AccessInfoFactory::LookupSpecialFieldAccessor( ...@@ -705,8 +706,7 @@ PropertyAccessInfo AccessInfoFactory::LookupSpecialFieldAccessor(
FieldIndex field_index; FieldIndex field_index;
if (Accessors::IsJSObjectFieldAccessor(isolate(), map, name, &field_index)) { if (Accessors::IsJSObjectFieldAccessor(isolate(), map, name, &field_index)) {
Type field_type = Type::NonInternal(); Type field_type = Type::NonInternal();
MachineRepresentation field_representation = Representation field_representation = Representation::Tagged();
MachineType::RepCompressedTagged();
if (map->IsJSArrayMap()) { if (map->IsJSArrayMap()) {
DCHECK( DCHECK(
Name::Equals(isolate(), isolate()->factory()->length_string(), name)); Name::Equals(isolate(), isolate()->factory()->length_string(), name));
...@@ -717,10 +717,10 @@ PropertyAccessInfo AccessInfoFactory::LookupSpecialFieldAccessor( ...@@ -717,10 +717,10 @@ PropertyAccessInfo AccessInfoFactory::LookupSpecialFieldAccessor(
// case of other arrays. // case of other arrays.
if (IsDoubleElementsKind(map->elements_kind())) { if (IsDoubleElementsKind(map->elements_kind())) {
field_type = type_cache_->kFixedDoubleArrayLengthType; field_type = type_cache_->kFixedDoubleArrayLengthType;
field_representation = MachineType::RepCompressedTaggedSigned(); field_representation = Representation::Smi();
} else if (IsFastElementsKind(map->elements_kind())) { } else if (IsFastElementsKind(map->elements_kind())) {
field_type = type_cache_->kFixedArrayLengthType; field_type = type_cache_->kFixedArrayLengthType;
field_representation = MachineType::RepCompressedTaggedSigned(); field_representation = Representation::Smi();
} else { } else {
field_type = type_cache_->kJSArrayLengthType; field_type = type_cache_->kJSArrayLengthType;
} }
...@@ -759,25 +759,20 @@ PropertyAccessInfo AccessInfoFactory::LookupTransition( ...@@ -759,25 +759,20 @@ PropertyAccessInfo AccessInfoFactory::LookupTransition(
details_representation); details_representation);
Type field_type = Type::NonInternal(); Type field_type = Type::NonInternal();
MaybeHandle<Map> field_map; MaybeHandle<Map> field_map;
MachineRepresentation field_representation =
MachineType::RepCompressedTagged();
MapRef transition_map_ref(broker(), transition_map); MapRef transition_map_ref(broker(), transition_map);
ZoneVector<CompilationDependencies::Dependency const*> ZoneVector<CompilationDependencies::Dependency const*>
unrecorded_dependencies(zone()); unrecorded_dependencies(zone());
if (details_representation.IsSmi()) { if (details_representation.IsSmi()) {
field_type = Type::SignedSmall(); field_type = Type::SignedSmall();
field_representation = MachineType::RepCompressedTaggedSigned();
transition_map_ref.SerializeOwnDescriptor(number); transition_map_ref.SerializeOwnDescriptor(number);
unrecorded_dependencies.push_back( unrecorded_dependencies.push_back(
dependencies()->FieldRepresentationDependencyOffTheRecord( dependencies()->FieldRepresentationDependencyOffTheRecord(
transition_map_ref, number)); transition_map_ref, number));
} else if (details_representation.IsDouble()) { } else if (details_representation.IsDouble()) {
field_type = type_cache_->kFloat64; field_type = type_cache_->kFloat64;
field_representation = MachineRepresentation::kFloat64;
} else if (details_representation.IsHeapObject()) { } else if (details_representation.IsHeapObject()) {
// Extract the field type from the property details (make sure its // Extract the field type from the property details (make sure its
// representation is TaggedPointer to reflect the heap object case). // representation is TaggedPointer to reflect the heap object case).
field_representation = MachineType::RepCompressedTaggedPointer();
Handle<FieldType> descriptors_field_type( Handle<FieldType> descriptors_field_type(
transition_map->instance_descriptors()->GetFieldType(number), transition_map->instance_descriptors()->GetFieldType(number),
isolate()); isolate());
...@@ -805,7 +800,7 @@ PropertyAccessInfo AccessInfoFactory::LookupTransition( ...@@ -805,7 +800,7 @@ PropertyAccessInfo AccessInfoFactory::LookupTransition(
// Transitioning stores are never stores to constant fields. // Transitioning stores are never stores to constant fields.
return PropertyAccessInfo::DataField( return PropertyAccessInfo::DataField(
zone(), map, std::move(unrecorded_dependencies), field_index, zone(), map, std::move(unrecorded_dependencies), field_index,
field_representation, field_type, field_map, holder, transition_map); details_representation, field_type, field_map, holder, transition_map);
} }
} // namespace compiler } // namespace compiler
......
...@@ -76,7 +76,7 @@ class PropertyAccessInfo final { ...@@ -76,7 +76,7 @@ class PropertyAccessInfo final {
Zone* zone, Handle<Map> receiver_map, Zone* zone, Handle<Map> receiver_map,
ZoneVector<CompilationDependencies::Dependency const*>&& ZoneVector<CompilationDependencies::Dependency const*>&&
unrecorded_dependencies, unrecorded_dependencies,
FieldIndex field_index, MachineRepresentation field_representation, FieldIndex field_index, Representation field_representation,
Type field_type, MaybeHandle<Map> field_map = MaybeHandle<Map>(), Type field_type, MaybeHandle<Map> field_map = MaybeHandle<Map>(),
MaybeHandle<JSObject> holder = MaybeHandle<JSObject>(), MaybeHandle<JSObject> holder = MaybeHandle<JSObject>(),
MaybeHandle<Map> transition_map = MaybeHandle<Map>()); MaybeHandle<Map> transition_map = MaybeHandle<Map>());
...@@ -84,7 +84,7 @@ class PropertyAccessInfo final { ...@@ -84,7 +84,7 @@ class PropertyAccessInfo final {
Zone* zone, Handle<Map> receiver_map, Zone* zone, Handle<Map> receiver_map,
ZoneVector<CompilationDependencies::Dependency const*>&& ZoneVector<CompilationDependencies::Dependency const*>&&
unrecorded_dependencies, unrecorded_dependencies,
FieldIndex field_index, MachineRepresentation field_representation, FieldIndex field_index, Representation field_representation,
Type field_type, MaybeHandle<Map> field_map, Type field_type, MaybeHandle<Map> field_map,
MaybeHandle<JSObject> holder); MaybeHandle<JSObject> holder);
static PropertyAccessInfo AccessorConstant(Zone* zone, static PropertyAccessInfo AccessorConstant(Zone* zone,
...@@ -122,9 +122,7 @@ class PropertyAccessInfo final { ...@@ -122,9 +122,7 @@ class PropertyAccessInfo final {
Handle<Object> constant() const { return constant_; } Handle<Object> constant() const { return constant_; }
FieldIndex field_index() const { return field_index_; } FieldIndex field_index() const { return field_index_; }
Type field_type() const { return field_type_; } Type field_type() const { return field_type_; }
MachineRepresentation field_representation() const { Representation field_representation() const { return field_representation_; }
return field_representation_;
}
MaybeHandle<Map> field_map() const { return field_map_; } MaybeHandle<Map> field_map() const { return field_map_; }
ZoneVector<Handle<Map>> const& receiver_maps() const { ZoneVector<Handle<Map>> const& receiver_maps() const {
return receiver_maps_; return receiver_maps_;
...@@ -140,7 +138,7 @@ class PropertyAccessInfo final { ...@@ -140,7 +138,7 @@ class PropertyAccessInfo final {
ZoneVector<Handle<Map>>&& receiver_maps); ZoneVector<Handle<Map>>&& receiver_maps);
PropertyAccessInfo( PropertyAccessInfo(
Kind kind, MaybeHandle<JSObject> holder, MaybeHandle<Map> transition_map, Kind kind, MaybeHandle<JSObject> holder, MaybeHandle<Map> transition_map,
FieldIndex field_index, MachineRepresentation field_representation, FieldIndex field_index, Representation field_representation,
Type field_type, MaybeHandle<Map> field_map, Type field_type, MaybeHandle<Map> field_map,
ZoneVector<Handle<Map>>&& receiver_maps, ZoneVector<Handle<Map>>&& receiver_maps,
ZoneVector<CompilationDependencies::Dependency const*>&& dependencies); ZoneVector<CompilationDependencies::Dependency const*>&& dependencies);
...@@ -153,7 +151,7 @@ class PropertyAccessInfo final { ...@@ -153,7 +151,7 @@ class PropertyAccessInfo final {
MaybeHandle<Map> transition_map_; MaybeHandle<Map> transition_map_;
MaybeHandle<JSObject> holder_; MaybeHandle<JSObject> holder_;
FieldIndex field_index_; FieldIndex field_index_;
MachineRepresentation field_representation_; Representation field_representation_;
Type field_type_; Type field_type_;
MaybeHandle<Map> field_map_; MaybeHandle<Map> field_map_;
}; };
......
...@@ -2229,7 +2229,8 @@ JSNativeContextSpecialization::BuildPropertyStore( ...@@ -2229,7 +2229,8 @@ JSNativeContextSpecialization::BuildPropertyStore(
FieldIndex const field_index = access_info.field_index(); FieldIndex const field_index = access_info.field_index();
Type const field_type = access_info.field_type(); Type const field_type = access_info.field_type();
MachineRepresentation const field_representation = MachineRepresentation const field_representation =
access_info.field_representation(); PropertyAccessBuilder::ConvertRepresentation(
access_info.field_representation());
Node* storage = receiver; Node* storage = receiver;
if (!field_index.is_inobject()) { if (!field_index.is_inobject()) {
storage = effect = graph()->NewNode( storage = effect = graph()->NewNode(
......
...@@ -132,11 +132,26 @@ Node* PropertyAccessBuilder::ResolveHolder( ...@@ -132,11 +132,26 @@ Node* PropertyAccessBuilder::ResolveHolder(
return receiver; return receiver;
} }
MachineRepresentation PropertyAccessBuilder::ConvertRepresentation(
Representation representation) {
switch (representation.kind()) {
case Representation::kSmi:
return MachineType::RepCompressedTaggedSigned();
case Representation::kDouble:
return MachineRepresentation::kFloat64;
case Representation::kHeapObject:
return MachineType::RepCompressedTaggedPointer();
case Representation::kTagged:
return MachineType::RepCompressedTagged();
default:
UNREACHABLE();
}
}
Node* PropertyAccessBuilder::TryBuildLoadConstantDataField( Node* PropertyAccessBuilder::TryBuildLoadConstantDataField(
NameRef const& name, PropertyAccessInfo const& access_info, NameRef const& name, PropertyAccessInfo const& access_info,
Node* receiver) { Node* receiver) {
// Optimize immutable property loads. if (!access_info.IsDataConstant()) return nullptr;
// First, determine if we have a constant holder to load from. // First, determine if we have a constant holder to load from.
Handle<JSObject> holder; Handle<JSObject> holder;
// If {access_info} has a holder, just use it. // If {access_info} has a holder, just use it.
...@@ -158,27 +173,9 @@ Node* PropertyAccessBuilder::TryBuildLoadConstantDataField( ...@@ -158,27 +173,9 @@ Node* PropertyAccessBuilder::TryBuildLoadConstantDataField(
holder = Handle<JSObject>::cast(m.Value()); holder = Handle<JSObject>::cast(m.Value());
} }
// TODO(ishell): Use something simpler like Handle<Object> value = JSObject::FastPropertyAt(
// holder, access_info.field_representation(), access_info.field_index());
// Handle<Object> value = return jsgraph()->Constant(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.
LookupIterator it(isolate(), holder, name.object(),
LookupIterator::OWN_SKIP_INTERCEPTOR);
if (it.state() == LookupIterator::DATA) {
if (it.IsReadOnly() && !it.IsConfigurable()) {
return jsgraph()->Constant(JSReceiver::GetDataProperty(&it));
} else if (access_info.IsDataConstant()) {
DCHECK(!it.is_dictionary_holder());
return jsgraph()->Constant(JSReceiver::GetDataProperty(&it));
}
}
return nullptr;
} }
Node* PropertyAccessBuilder::BuildLoadDataField( Node* PropertyAccessBuilder::BuildLoadDataField(
...@@ -193,7 +190,7 @@ Node* PropertyAccessBuilder::BuildLoadDataField( ...@@ -193,7 +190,7 @@ Node* PropertyAccessBuilder::BuildLoadDataField(
FieldIndex const field_index = access_info.field_index(); FieldIndex const field_index = access_info.field_index();
Type const field_type = access_info.field_type(); Type const field_type = access_info.field_type();
MachineRepresentation const field_representation = MachineRepresentation const field_representation =
access_info.field_representation(); ConvertRepresentation(access_info.field_representation());
Node* storage = ResolveHolder(access_info, receiver); Node* storage = ResolveHolder(access_info, receiver);
if (!field_index.is_inobject()) { if (!field_index.is_inobject()) {
storage = *effect = graph()->NewNode( storage = *effect = graph()->NewNode(
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <vector> #include <vector>
#include "src/codegen/machine-type.h"
#include "src/compiler/js-heap-broker.h" #include "src/compiler/js-heap-broker.h"
#include "src/handles.h" #include "src/handles.h"
#include "src/objects/map.h" #include "src/objects/map.h"
...@@ -52,6 +53,9 @@ class PropertyAccessBuilder { ...@@ -52,6 +53,9 @@ class PropertyAccessBuilder {
PropertyAccessInfo const& access_info, PropertyAccessInfo const& access_info,
Node* receiver, Node** effect, Node** control); Node* receiver, Node** effect, Node** control);
static MachineRepresentation ConvertRepresentation(
Representation representation);
private: private:
JSGraph* jsgraph() const { return jsgraph_; } JSGraph* jsgraph() const { return jsgraph_; }
JSHeapBroker* broker() const { return broker_; } JSHeapBroker* broker() const { return broker_; }
......
...@@ -3936,6 +3936,7 @@ Handle<Object> JSObject::FastPropertyAt(Handle<JSObject> object, ...@@ -3936,6 +3936,7 @@ Handle<Object> JSObject::FastPropertyAt(Handle<JSObject> object,
FieldIndex index) { FieldIndex index) {
Isolate* isolate = object->GetIsolate(); Isolate* isolate = object->GetIsolate();
if (object->IsUnboxedDoubleField(index)) { if (object->IsUnboxedDoubleField(index)) {
DCHECK(representation.IsDouble());
double value = object->RawFastDoublePropertyAt(index); double value = object->RawFastDoublePropertyAt(index);
return isolate->factory()->NewHeapNumber(value); return isolate->factory()->NewHeapNumber(value);
} }
......
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