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

Unified Diff: src/ic/ic.cc

Issue 527963002: Implement loads and calls from 'super' (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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/ic.cc
diff --git a/src/ic/ic.cc b/src/ic/ic.cc
index 59db5bfc999735ddf6057de8269120db60529691..16377f897279a703fd0dc97eb30f7b01d2002fb1 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -209,38 +209,6 @@ Code* IC::GetOriginalCode() const {
}
-static void LookupForRead(LookupIterator* it) {
- for (; it->IsFound(); it->Next()) {
- switch (it->state()) {
- case LookupIterator::NOT_FOUND:
- case LookupIterator::TRANSITION:
- UNREACHABLE();
- case LookupIterator::JSPROXY:
- return;
- case LookupIterator::INTERCEPTOR: {
- // If there is a getter, return; otherwise loop to perform the lookup.
- Handle<JSObject> holder = it->GetHolder<JSObject>();
- if (!holder->GetNamedInterceptor()->getter()->IsUndefined()) {
- return;
- }
- break;
- }
- case LookupIterator::ACCESS_CHECK:
- // PropertyHandlerCompiler::CheckPrototypes() knows how to emit
- // access checks for global proxies.
- if (it->GetHolder<JSObject>()->IsJSGlobalProxy() &&
- it->HasAccess(v8::ACCESS_GET)) {
- break;
- }
- return;
- case LookupIterator::PROPERTY:
- if (it->HasProperty()) return; // Yay!
- break;
- }
- }
-}
-
-
bool IC::TryRemoveInvalidPrototypeDependentStub(Handle<Object> receiver,
Handle<String> name) {
if (!IsNameCompatibleWithPrototypeFailure(name)) return false;
@@ -604,7 +572,7 @@ MaybeHandle<Object> LoadIC::Load(Handle<Object> object, Handle<Name> name) {
// Named lookup in the object.
LookupIterator it(object, name);
- LookupForRead(&it);
+ it.LookupForRead();
if (it.IsFound() || !IsUndeclaredGlobal(object)) {
// Update inline cache and stub cache.
@@ -970,7 +938,7 @@ Handle<Code> LoadIC::CompileHandler(LookupIterator* lookup,
// the original iterator will be used to fetch the value.
LookupIterator it = *lookup;
it.Next();
- LookupForRead(&it);
+ it.LookupForRead();
return compiler.CompileLoadInterceptor(&it);
}

Powered by Google App Engine
This is Rietveld 408576698