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

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

Issue 1427913003: [turbofan] Add support for loading missing properties. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/js-native-context-specialization.cc ('k') | src/compiler/property-access-info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/property-access-info.h
diff --git a/src/compiler/property-access-info.h b/src/compiler/property-access-info.h
index 427a6b0ce22a18eac56076c6b16a2c2decef3a5d..54ea1abda2ded1d95cc6543526e536c5a8c0b311 100644
--- a/src/compiler/property-access-info.h
+++ b/src/compiler/property-access-info.h
@@ -32,26 +32,26 @@ std::ostream& operator<<(std::ostream&, PropertyAccessMode);
// object property, either on the object itself or on the prototype chain.
class PropertyAccessInfo final {
public:
- enum Kind { kInvalid, kDataConstant, kDataField };
+ enum Kind { kInvalid, kNotFound, kDataConstant, kDataField };
+ static PropertyAccessInfo NotFound(Type* receiver_type,
+ MaybeHandle<JSObject> holder);
static PropertyAccessInfo DataConstant(Type* receiver_type,
Handle<Object> constant,
- MaybeHandle<JSObject> holder) {
- return PropertyAccessInfo(holder, constant, receiver_type);
- }
+ MaybeHandle<JSObject> holder);
static PropertyAccessInfo DataField(
Type* receiver_type, FieldIndex field_index, Type* field_type,
MaybeHandle<JSObject> holder = MaybeHandle<JSObject>(),
- MaybeHandle<Map> transition_map = MaybeHandle<Map>()) {
- return PropertyAccessInfo(holder, transition_map, field_index, field_type,
- receiver_type);
- }
+ MaybeHandle<Map> transition_map = MaybeHandle<Map>());
PropertyAccessInfo();
+ bool IsNotFound() const { return kind() == kNotFound; }
bool IsDataConstant() const { return kind() == kDataConstant; }
bool IsDataField() const { return kind() == kDataField; }
+ bool HasTransitionMap() const { return !transition_map().is_null(); }
+
Kind kind() const { return kind_; }
MaybeHandle<JSObject> holder() const { return holder_; }
MaybeHandle<Map> transition_map() const { return transition_map_; }
@@ -60,9 +60,8 @@ class PropertyAccessInfo final {
Type* field_type() const { return field_type_; }
Type* receiver_type() const { return receiver_type_; }
- bool HasTransitionMap() const { return !transition_map().is_null(); }
-
private:
+ PropertyAccessInfo(MaybeHandle<JSObject> holder, Type* receiver_type);
PropertyAccessInfo(MaybeHandle<JSObject> holder, Handle<Object> constant,
Type* receiver_type);
PropertyAccessInfo(MaybeHandle<JSObject> holder,
« no previous file with comments | « src/compiler/js-native-context-specialization.cc ('k') | src/compiler/property-access-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698