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

Unified Diff: src/ic/ic.cc

Issue 1227893005: TypeofMode replaces TypeofState and ContextualMode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebasing Created 5 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
« src/ic/ic.h ('K') | « src/ic/ic.h ('k') | src/ic/ic-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/ic.cc
diff --git a/src/ic/ic.cc b/src/ic/ic.cc
index 4006f296a10b5503e708c0151866aba8d8756a7b..c1eb803775e2aa0a499bb774a428df137a093cbf 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -2984,19 +2984,18 @@ RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly) {
}
-static Object* ThrowReferenceError(Isolate* isolate, Name* name) {
- // If the load is non-contextual, just return the undefined result.
+static Object* ThrowReferenceError(Isolate* isolate, LookupIterator* it) {
+ // If it's not load of an undeclared global, just return the undefined result.
// Note that both keyed and non-keyed loads may end up here.
HandleScope scope(isolate);
LoadIC ic(IC::NO_EXTRA_FRAME, isolate, true);
- if (ic.contextual_mode() != CONTEXTUAL) {
+ if (!ic.IsUndeclaredGlobal(it->GetReceiver())) {
return isolate->heap()->undefined_value();
}
// Throw a reference error.
- Handle<Name> name_handle(name);
THROW_NEW_ERROR_RETURN_FAILURE(
- isolate, NewReferenceError(MessageTemplate::kNotDefined, name_handle));
+ isolate, NewReferenceError(MessageTemplate::kNotDefined, it->name()));
}
@@ -3022,7 +3021,7 @@ RUNTIME_FUNCTION(LoadPropertyWithInterceptor) {
if (it.IsFound()) return *result;
- return ThrowReferenceError(isolate, Name::cast(args[0]));
+ return ThrowReferenceError(isolate, &it);
Toon Verwaest 2015/07/13 12:56:03 Just inline the helper method here, if it's the on
Igor Sheludko 2015/07/13 13:08:02 Done.
}
« src/ic/ic.h ('K') | « src/ic/ic.h ('k') | src/ic/ic-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698