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

Unified Diff: src/property.h

Issue 492433005: Get rid of the NONEXISTENT PropertyType (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix lookupresult Created 6 years, 4 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/objects-printer.cc ('k') | src/property.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/property.h
diff --git a/src/property.h b/src/property.h
index a1e8011b53aa138fb022440e457d030c44c98e9a..ab2dcef8081eb8441f118abd8d276c3b0ea282a4 100644
--- a/src/property.h
+++ b/src/property.h
@@ -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();
}
@@ -257,8 +252,7 @@ class LookupResult V8_FINAL BASE_EMBEDDED {
}
bool IsNormal() const {
- DCHECK(!(details_.type() == NORMAL && !IsFound()));
- return IsDescriptorOrDictionary() && type() == NORMAL;
+ return IsFound() && IsDescriptorOrDictionary() && type() == NORMAL;
}
bool IsConstant() const {
« no previous file with comments | « src/objects-printer.cc ('k') | src/property.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698