Get rid of the NONEXISTENT PropertyType
BUG= Review URL: https://codereview.chromium.org/492433005 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23260 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
4f8e5f0719
commit
e4c3c439af
@ -2464,7 +2464,6 @@ void Genesis::TransferNamedProperties(Handle<JSObject> from,
|
||||
// Do not occur since the from object has fast properties.
|
||||
case HANDLER:
|
||||
case INTERCEPTOR:
|
||||
case NONEXISTENT:
|
||||
// No element in instance descriptors have proxy or interceptor type.
|
||||
UNREACHABLE();
|
||||
break;
|
||||
|
@ -1700,9 +1700,6 @@ void V8HeapExplorer::ExtractPropertyReferences(JSObject* js_obj, int entry) {
|
||||
case HANDLER: // only in lookup results, not in descriptors
|
||||
case INTERCEPTOR: // only in lookup results, not in descriptors
|
||||
break;
|
||||
case NONEXISTENT:
|
||||
UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -1597,7 +1597,6 @@ Handle<Code> StoreIC::CompileStoreHandler(LookupResult* lookup,
|
||||
}
|
||||
case CONSTANT:
|
||||
break;
|
||||
case NONEXISTENT:
|
||||
case HANDLER:
|
||||
UNREACHABLE();
|
||||
break;
|
||||
|
@ -100,7 +100,6 @@ bool LookupIterator::HasProperty() {
|
||||
property_kind_ = ACCESSOR;
|
||||
break;
|
||||
case v8::internal::HANDLER:
|
||||
case v8::internal::NONEXISTENT:
|
||||
case v8::internal::INTERCEPTOR:
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ class LookupIterator V8_FINAL BASE_EMBEDDED {
|
||||
state_(NOT_FOUND),
|
||||
property_kind_(DATA),
|
||||
property_encoding_(DESCRIPTOR),
|
||||
property_details_(NONE, NONEXISTENT, Representation::None()),
|
||||
property_details_(NONE, NORMAL, Representation::None()),
|
||||
isolate_(name->GetIsolate()),
|
||||
name_(name),
|
||||
maybe_receiver_(receiver),
|
||||
@ -88,7 +88,7 @@ class LookupIterator V8_FINAL BASE_EMBEDDED {
|
||||
state_(NOT_FOUND),
|
||||
property_kind_(DATA),
|
||||
property_encoding_(DESCRIPTOR),
|
||||
property_details_(NONE, NONEXISTENT, Representation::None()),
|
||||
property_details_(NONE, NORMAL, Representation::None()),
|
||||
isolate_(name->GetIsolate()),
|
||||
name_(name),
|
||||
holder_map_(holder->map()),
|
||||
|
@ -179,7 +179,6 @@ PropertyType.Constant = 2;
|
||||
PropertyType.Callbacks = 3;
|
||||
PropertyType.Handler = 4;
|
||||
PropertyType.Interceptor = 5;
|
||||
PropertyType.Nonexistent = 6;
|
||||
|
||||
|
||||
// Different attributes for a property.
|
||||
|
@ -242,8 +242,6 @@ void JSObject::PrintProperties(OStream& os) { // NOLINT
|
||||
case NORMAL: // only in slow mode
|
||||
case HANDLER: // only in lookup results, not in descriptors
|
||||
case INTERCEPTOR: // only in lookup results, not in descriptors
|
||||
// There are no transitions in the descriptor array.
|
||||
case NONEXISTENT:
|
||||
UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
@ -377,7 +375,6 @@ void JSObject::PrintTransitions(OStream& os) { // NOLINT
|
||||
case NORMAL:
|
||||
case HANDLER:
|
||||
case INTERCEPTOR:
|
||||
case NONEXISTENT:
|
||||
UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
@ -1107,7 +1104,6 @@ void TransitionArray::PrintTransitions(OStream& os) { // NOLINT
|
||||
case NORMAL:
|
||||
case HANDLER:
|
||||
case INTERCEPTOR:
|
||||
case NONEXISTENT:
|
||||
UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
|
@ -2774,7 +2774,6 @@ MaybeHandle<Map> Map::TryUpdateInternal(Handle<Map> old_map) {
|
||||
case NORMAL:
|
||||
case HANDLER:
|
||||
case INTERCEPTOR:
|
||||
case NONEXISTENT:
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
@ -4264,7 +4263,6 @@ void JSObject::MigrateFastToSlow(Handle<JSObject> object,
|
||||
break;
|
||||
case HANDLER:
|
||||
case NORMAL:
|
||||
case NONEXISTENT:
|
||||
UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
@ -6823,7 +6821,6 @@ bool DescriptorArray::CanHoldValue(int descriptor, Object* value) {
|
||||
case NORMAL:
|
||||
case INTERCEPTOR:
|
||||
case HANDLER:
|
||||
case NONEXISTENT:
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -46,16 +46,14 @@ class TypeInfo;
|
||||
// A copy of this is in mirror-debugger.js.
|
||||
enum PropertyType {
|
||||
// Only in slow mode.
|
||||
NORMAL = 0,
|
||||
NORMAL = 0,
|
||||
// Only in fast mode.
|
||||
FIELD = 1,
|
||||
CONSTANT = 2,
|
||||
CALLBACKS = 3,
|
||||
FIELD = 1,
|
||||
CONSTANT = 2,
|
||||
CALLBACKS = 3,
|
||||
// Only in lookup results, not in descriptors.
|
||||
HANDLER = 4,
|
||||
INTERCEPTOR = 5,
|
||||
// Only used as a marker in LookupResult.
|
||||
NONEXISTENT = 6
|
||||
HANDLER = 4,
|
||||
INTERCEPTOR = 5
|
||||
};
|
||||
|
||||
|
||||
|
@ -47,9 +47,6 @@ OStream& operator<<(OStream& os, const LookupResult& r) {
|
||||
return os << " -type = lookup proxy\n";
|
||||
case INTERCEPTOR:
|
||||
return os << " -type = lookup interceptor\n";
|
||||
case NONEXISTENT:
|
||||
UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
return os;
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ class LookupResult V8_FINAL BASE_EMBEDDED {
|
||||
holder_(NULL),
|
||||
transition_(NULL),
|
||||
cacheable_(true),
|
||||
details_(NONE, NONEXISTENT, Representation::None()) {
|
||||
details_(NONE, NORMAL, Representation::None()) {
|
||||
isolate->set_top_lookup_result(this);
|
||||
}
|
||||
|
||||
@ -158,8 +158,6 @@ class LookupResult V8_FINAL BASE_EMBEDDED {
|
||||
case HANDLER:
|
||||
case INTERCEPTOR:
|
||||
return true;
|
||||
case NONEXISTENT:
|
||||
UNREACHABLE();
|
||||
}
|
||||
UNREACHABLE();
|
||||
return true;
|
||||
@ -198,7 +196,7 @@ class LookupResult V8_FINAL BASE_EMBEDDED {
|
||||
|
||||
void NotFound() {
|
||||
lookup_type_ = NOT_FOUND;
|
||||
details_ = PropertyDetails(NONE, NONEXISTENT, Representation::None());
|
||||
details_ = PropertyDetails(NONE, NORMAL, Representation::None());
|
||||
holder_ = NULL;
|
||||
transition_ = NULL;
|
||||
}
|
||||
@ -220,13 +218,11 @@ class LookupResult V8_FINAL BASE_EMBEDDED {
|
||||
|
||||
Representation representation() const {
|
||||
DCHECK(IsFound());
|
||||
DCHECK(details_.type() != NONEXISTENT);
|
||||
return details_.representation();
|
||||
}
|
||||
|
||||
PropertyAttributes GetAttributes() const {
|
||||
DCHECK(IsFound());
|
||||
DCHECK(details_.type() != NONEXISTENT);
|
||||
return details_.attributes();
|
||||
}
|
||||
|
||||
@ -247,7 +243,6 @@ class LookupResult V8_FINAL BASE_EMBEDDED {
|
||||
|
||||
bool IsReadOnly() const {
|
||||
DCHECK(IsFound());
|
||||
DCHECK(details_.type() != NONEXISTENT);
|
||||
return details_.IsReadOnly();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user