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

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: minor fix 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
« no previous file with comments | « 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 8977232bd74760eff3421fdebf73b950fd372e22..536da6a9f6c0dbe2c0a90f5cb6bc9122945db655 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -735,7 +735,7 @@ MaybeHandle<Object> LoadIC::Load(Handle<Object> object, Handle<Name> name) {
LookupIterator it(object, name);
LookupForRead(&it);
- if (it.IsFound() || !IsUndeclaredGlobal(object)) {
+ if (it.IsFound() || typeof_mode() == INSIDE_TYPEOF) {
Toon Verwaest 2015/07/10 15:41:31 typeof_mode() == INSIDE_TYPEOF is not the same as
Igor Sheludko 2015/07/13 12:17:09 Done.
// Update inline cache and stub cache.
if (use_ic) UpdateCaches(&it);
@@ -746,7 +746,7 @@ MaybeHandle<Object> LoadIC::Load(Handle<Object> object, Handle<Name> name) {
isolate(), result, Object::GetProperty(&it, language_mode()), Object);
if (it.IsFound()) {
return result;
- } else if (!IsUndeclaredGlobal(object)) {
+ } else if (typeof_mode() == INSIDE_TYPEOF) {
Toon Verwaest 2015/07/10 15:41:31 Same here.
Igor Sheludko 2015/07/13 12:17:09 Done.
LOG(isolate(), SuspectReadEvent(*name, *object));
return result;
}
@@ -2989,7 +2989,7 @@ static Object* ThrowReferenceError(Isolate* isolate, Name* name) {
// 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.typeof_mode() == INSIDE_TYPEOF) {
return isolate->heap()->undefined_value();
}
« no previous file with comments | « 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