Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Unified Diff: src/compiler/access-info.h

Issue 2198473002: [turbofan] Add support for accessor inlining. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@TurboFan_CheckMaps
Patch Set: Fixes Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler.h ('k') | src/compiler/access-info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/access-info.h
diff --git a/src/compiler/access-info.h b/src/compiler/access-info.h
index bca7d5d83757432296d7f0b6562a7dd180fae125..b6d68c740e8efefef39d2d109217944a8ece57fc 100644
--- a/src/compiler/access-info.h
+++ b/src/compiler/access-info.h
@@ -55,7 +55,13 @@ class ElementAccessInfo final {
// object property, either on the object itself or on the prototype chain.
class PropertyAccessInfo final {
public:
- enum Kind { kInvalid, kNotFound, kDataConstant, kDataField };
+ enum Kind {
+ kInvalid,
+ kNotFound,
+ kDataConstant,
+ kDataField,
+ kAccessorConstant
+ };
static PropertyAccessInfo NotFound(MapList const& receiver_maps,
MaybeHandle<JSObject> holder);
@@ -66,6 +72,9 @@ class PropertyAccessInfo final {
MapList const& receiver_maps, FieldIndex field_index, Type* field_type,
MaybeHandle<JSObject> holder = MaybeHandle<JSObject>(),
MaybeHandle<Map> transition_map = MaybeHandle<Map>());
+ static PropertyAccessInfo AccessorConstant(MapList const& receiver_maps,
+ Handle<Object> constant,
+ MaybeHandle<JSObject> holder);
PropertyAccessInfo();
@@ -74,6 +83,7 @@ class PropertyAccessInfo final {
bool IsNotFound() const { return kind() == kNotFound; }
bool IsDataConstant() const { return kind() == kDataConstant; }
bool IsDataField() const { return kind() == kDataField; }
+ bool IsAccessorConstant() const { return kind() == kAccessorConstant; }
bool HasTransitionMap() const { return !transition_map().is_null(); }
@@ -88,8 +98,8 @@ class PropertyAccessInfo final {
private:
PropertyAccessInfo(MaybeHandle<JSObject> holder,
MapList const& receiver_maps);
- PropertyAccessInfo(MaybeHandle<JSObject> holder, Handle<Object> constant,
- MapList const& receiver_maps);
+ PropertyAccessInfo(Kind kind, MaybeHandle<JSObject> holder,
+ Handle<Object> constant, MapList const& receiver_maps);
PropertyAccessInfo(MaybeHandle<JSObject> holder,
MaybeHandle<Map> transition_map, FieldIndex field_index,
Type* field_type, MapList const& receiver_maps);
« no previous file with comments | « src/compiler.h ('k') | src/compiler/access-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698