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

Unified Diff: src/runtime.cc

Issue 489063002: Get rid of last non-JSReceiver::Lookup usage of LookupOwn (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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.h ('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 4aeef9d4558b7a59c3dcb06aa3d2d8052d022b92..79c9d49a894b836b47997a5b1374e5a9ca003af6 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -4870,18 +4870,18 @@ RUNTIME_FUNCTION(Runtime_KeyedGetProperty) {
}
// Lookup cache miss. Perform lookup and update the cache if
// appropriate.
- LookupResult result(isolate);
- receiver->LookupOwn(key, &result);
- if (result.IsField()) {
- FieldIndex field_index = result.GetFieldIndex();
+ LookupIterator it(receiver, key, LookupIterator::CHECK_OWN);
+ if (it.IsFound() && it.state() == LookupIterator::PROPERTY &&
+ it.HasProperty() && it.property_details().type() == FIELD) {
+ FieldIndex field_index = it.GetFieldIndex();
// Do not track double fields in the keyed lookup cache. Reading
// double values requires boxing.
- if (!result.representation().IsDouble()) {
+ if (!it.representation().IsDouble()) {
keyed_lookup_cache->Update(receiver_map, key,
field_index.GetKeyedLookupCacheIndex());
}
AllowHeapAllocation allow_allocation;
- return *JSObject::FastPropertyAt(receiver, result.representation(),
+ return *JSObject::FastPropertyAt(receiver, it.representation(),
field_index);
}
} else {
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698