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

Unified Diff: src/ic.cc

Issue 466283003: Use LookupIterator for CompileLoadInterceptor and delete Object::Lookup (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add ports 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
Index: src/ic.cc
diff --git a/src/ic.cc b/src/ic.cc
index db82bf52388f689c0ce1d12c854a42316c955a16..f3fe1f1e7c0f6b22eebed2ac9e2a1e5f3a69673f 100644
--- a/src/ic.cc
+++ b/src/ic.cc
@@ -1034,7 +1034,12 @@ Handle<Code> LoadIC::CompileHandler(LookupIterator* lookup,
DCHECK(!holder->GetNamedInterceptor()->getter()->IsUndefined());
NamedLoadHandlerCompiler compiler(isolate(), receiver_type(), holder,
cache_holder);
- return compiler.CompileLoadInterceptor(name);
+ // Perform a lookup behind the interceptor. Copy the LookupIterator since
+ // the original iterator will be used to fetch the value.
+ LookupIterator it(lookup);
+ it.Next();
+ LookupForRead(&it);
+ return compiler.CompileLoadInterceptor(&it, name);
}
DCHECK(lookup->state() == LookupIterator::PROPERTY);
« src/ia32/stub-cache-ia32.cc ('K') | « src/ia32/stub-cache-ia32.cc ('k') | src/lookup.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698