Commit 1534781f authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[turbofan] Refactor ComputePropertyAccessInfo for readability

...mainly by moving two big chunks into separate methods.

Change-Id: I048a8d27c28bc171559190a915616efbebdfe6cc
Reviewed-on: https://chromium-review.googlesource.com/c/1462957Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59550}
parent 6f66dcef
This diff is collapsed.
......@@ -145,31 +145,40 @@ class PropertyAccessInfo final {
class AccessInfoFactory final {
public:
AccessInfoFactory(JSHeapBroker* broker, CompilationDependencies* dependencies,
Handle<Context> native_context, Zone* zone);
bool ComputeElementAccessInfo(Handle<Map> map, AccessMode access_mode,
ElementAccessInfo* access_info);
bool ComputeElementAccessInfos(MapHandles const& maps, AccessMode access_mode,
ZoneVector<ElementAccessInfo>* access_infos);
ElementAccessInfo* access_info) const;
bool ComputeElementAccessInfos(
MapHandles const& maps, AccessMode access_mode,
ZoneVector<ElementAccessInfo>* access_infos) const;
bool ComputePropertyAccessInfo(Handle<Map> map, Handle<Name> name,
AccessMode access_mode,
PropertyAccessInfo* access_info);
PropertyAccessInfo* access_info) const;
bool ComputePropertyAccessInfo(MapHandles const& maps, Handle<Name> name,
AccessMode access_mode,
PropertyAccessInfo* access_info);
bool ComputePropertyAccessInfos(MapHandles const& maps, Handle<Name> name,
AccessMode access_mode,
ZoneVector<PropertyAccessInfo>* access_infos);
PropertyAccessInfo* access_info) const;
bool ComputePropertyAccessInfos(
MapHandles const& maps, Handle<Name> name, AccessMode access_mode,
ZoneVector<PropertyAccessInfo>* access_infos) const;
private:
bool ConsolidateElementLoad(MapHandles const& maps,
ElementAccessInfo* access_info);
ElementAccessInfo* access_info) const;
bool LookupSpecialFieldAccessor(Handle<Map> map, Handle<Name> name,
PropertyAccessInfo* access_info);
PropertyAccessInfo* access_info) const;
bool LookupTransition(Handle<Map> map, Handle<Name> name,
MaybeHandle<JSObject> holder,
PropertyAccessInfo* access_info);
PropertyAccessInfo* access_info) const;
bool ComputeDataFieldAccessInfo(Handle<Map> receiver_map, Handle<Map> map,
MaybeHandle<JSObject> holder, int number,
AccessMode access_mode,
PropertyAccessInfo* access_info) const;
bool ComputeAccessorDescriptorAccessInfo(
Handle<Map> receiver_map, Handle<Name> name, Handle<Map> map,
MaybeHandle<JSObject> holder, int number, AccessMode access_mode,
PropertyAccessInfo* access_info) const;
CompilationDependencies* dependencies() const { return dependencies_; }
JSHeapBroker* broker() const { return broker_; }
......@@ -182,7 +191,7 @@ class AccessInfoFactory final {
CompilationDependencies* const dependencies_;
Handle<Context> const native_context_;
Isolate* const isolate_;
TypeCache const* type_cache_;
TypeCache const* const type_cache_;
Zone* const zone_;
DISALLOW_COPY_AND_ASSIGN(AccessInfoFactory);
......
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