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

Unified Diff: src/runtime.cc

Issue 389353002: Remove hole handling since holes cannot occur in JSObjects anymore. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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/objects.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index d980d327aa89640d2b44cbef8e08b58be0eb3257..82520da5aca78394d758e00cb9a859475a32acd9 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -4805,11 +4805,8 @@ RUNTIME_FUNCTION(Runtime_KeyedGetProperty) {
int index = keyed_lookup_cache->Lookup(receiver_map, key);
if (index != -1) {
// Doubles are not cached, so raw read the value.
- Object* value = receiver->RawFastPropertyAt(
+ return receiver->RawFastPropertyAt(
FieldIndex::ForKeyedLookupCacheIndex(*receiver_map, index));
- return value->IsTheHole()
- ? isolate->heap()->undefined_value()
- : value;
}
// Lookup cache miss. Perform lookup and update the cache if
// appropriate.
@@ -4837,7 +4834,7 @@ RUNTIME_FUNCTION(Runtime_KeyedGetProperty) {
if (!receiver->IsGlobalObject()) return value;
value = PropertyCell::cast(value)->value();
if (!value->IsTheHole()) return value;
- // If value is the hole do the general lookup.
+ // If value is the hole (meaning, absent) do the general lookup.
}
}
} else if (FLAG_smi_only_arrays && key_obj->IsSmi()) {
@@ -10641,14 +10638,12 @@ static Handle<Object> DebugLookupResultValue(Isolate* isolate,
if (!result->IsFound()) return value;
switch (result->type()) {
case NORMAL:
- value = JSObject::GetNormalizedProperty(
- handle(result->holder(), isolate), result);
- break;
+ return JSObject::GetNormalizedProperty(handle(result->holder(), isolate),
+ result);
case FIELD:
- value = JSObject::FastPropertyAt(handle(result->holder(), isolate),
- result->representation(),
- result->GetFieldIndex());
- break;
+ return JSObject::FastPropertyAt(handle(result->holder(), isolate),
+ result->representation(),
+ result->GetFieldIndex());
case CONSTANT:
return handle(result->GetConstant(), isolate);
case CALLBACKS: {
@@ -10673,9 +10668,7 @@ static Handle<Object> DebugLookupResultValue(Isolate* isolate,
UNREACHABLE();
break;
}
- ASSERT(!value->IsTheHole() || result->IsReadOnly());
- return value->IsTheHole()
- ? Handle<Object>::cast(isolate->factory()->undefined_value()) : value;
+ return value;
}
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698