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

Unified Diff: src/property.h

Issue 856503002: Massive renaming of PropertyType values and other implied stuff. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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
Index: src/property.h
diff --git a/src/property.h b/src/property.h
index a9d8b09354a6a89a86350fed6cba4905e5e7afa7..827df8a71eb44be80fdf765ef8f91b77d18e1771 100644
--- a/src/property.h
+++ b/src/property.h
@@ -73,40 +73,36 @@ class Descriptor BASE_EMBEDDED {
std::ostream& operator<<(std::ostream& os, const Descriptor& d);
-class FieldDescriptor FINAL : public Descriptor {
+class DataFieldDescriptor FINAL : public Descriptor {
public:
- FieldDescriptor(Handle<Name> key,
- int field_index,
- PropertyAttributes attributes,
- Representation representation)
+ DataFieldDescriptor(Handle<Name> key, int field_index,
+ PropertyAttributes attributes,
+ Representation representation)
: Descriptor(key, HeapType::Any(key->GetIsolate()), attributes,
- FIELD, representation, field_index) {}
- FieldDescriptor(Handle<Name> key,
- int field_index,
- Handle<HeapType> field_type,
- PropertyAttributes attributes,
- Representation representation)
- : Descriptor(key, field_type, attributes, FIELD,
- representation, field_index) { }
+ DATA_FIELD, representation, field_index) {}
+ DataFieldDescriptor(Handle<Name> key, int field_index,
+ Handle<HeapType> field_type,
+ PropertyAttributes attributes,
+ Representation representation)
+ : Descriptor(key, field_type, attributes, DATA_FIELD, representation,
+ field_index) {}
};
-class ConstantDescriptor FINAL : public Descriptor {
+class DataConstantDescriptor FINAL : public Descriptor {
public:
- ConstantDescriptor(Handle<Name> key,
- Handle<Object> value,
- PropertyAttributes attributes)
- : Descriptor(key, value, attributes, CONSTANT,
+ DataConstantDescriptor(Handle<Name> key, Handle<Object> value,
+ PropertyAttributes attributes)
+ : Descriptor(key, value, attributes, DATA_CONSTANT,
value->OptimalRepresentation()) {}
};
-class CallbacksDescriptor FINAL : public Descriptor {
+class AccessorConstantDescriptor FINAL : public Descriptor {
public:
- CallbacksDescriptor(Handle<Name> key,
- Handle<Object> foreign,
- PropertyAttributes attributes)
- : Descriptor(key, foreign, attributes, CALLBACKS,
+ AccessorConstantDescriptor(Handle<Name> key, Handle<Object> foreign,
+ PropertyAttributes attributes)
+ : Descriptor(key, foreign, attributes, ACCESSOR_CONSTANT,
Representation::Tagged()) {}
};
@@ -119,7 +115,7 @@ class LookupResult FINAL BASE_EMBEDDED {
lookup_type_(NOT_FOUND),
holder_(NULL),
transition_(NULL),
- details_(NONE, FIELD, Representation::None()) {
+ details_(NONE, DATA_FIELD, Representation::None()) {
isolate->set_top_lookup_result(this);
}
@@ -148,7 +144,7 @@ class LookupResult FINAL BASE_EMBEDDED {
void NotFound() {
lookup_type_ = NOT_FOUND;
- details_ = PropertyDetails(NONE, FIELD, 0);
+ details_ = PropertyDetails(NONE, DATA_FIELD, 0);
holder_ = NULL;
transition_ = NULL;
}
@@ -159,8 +155,8 @@ class LookupResult FINAL BASE_EMBEDDED {
}
// Property callbacks does not include transitions to callbacks.
- bool IsPropertyCallbacks() const {
- return !IsTransition() && details_.type() == CALLBACKS;
+ bool IsAccessorConstant() const {
+ return !IsTransition() && details_.type() == ACCESSOR_CONSTANT;
}
bool IsReadOnly() const {
@@ -168,12 +164,12 @@ class LookupResult FINAL BASE_EMBEDDED {
return details_.IsReadOnly();
}
- bool IsField() const {
- return lookup_type_ == DESCRIPTOR_TYPE && details_.type() == FIELD;
+ bool IsDataField() const {
+ return lookup_type_ == DESCRIPTOR_TYPE && details_.type() == DATA_FIELD;
}
- bool IsConstant() const {
- return lookup_type_ == DESCRIPTOR_TYPE && details_.type() == CONSTANT;
+ bool IsDataConstant() const {
+ return lookup_type_ == DESCRIPTOR_TYPE && details_.type() == DATA_CONSTANT;
}
bool IsConfigurable() const { return details_.IsConfigurable(); }
@@ -190,8 +186,8 @@ class LookupResult FINAL BASE_EMBEDDED {
return transition_;
}
- bool IsTransitionToField() const {
- return IsTransition() && details_.type() == FIELD;
+ bool IsTransitionToDataField() const {
+ return IsTransition() && details_.type() == DATA_FIELD;
}
int GetLocalFieldIndexFromMap(Map* map) const {
@@ -199,7 +195,7 @@ class LookupResult FINAL BASE_EMBEDDED {
}
Object* GetConstantFromMap(Map* map) const {
- DCHECK(details_.type() == CONSTANT);
+ DCHECK(details_.type() == DATA_CONSTANT);
return GetValueFromMap(map);
}
« src/mirror-debugger.js ('K') | « src/objects-printer.cc ('k') | src/property.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698