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

Unified Diff: src/ic/ic.h

Issue 1227893005: TypeofMode replaces TypeofState and ContextualMode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments 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/ia32/lithium-ia32.h ('k') | src/ic/ic.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/ic.h
diff --git a/src/ic/ic.h b/src/ic/ic.h
index dec8318ae5c7cfd2b6c40fb253365cb055a630a6..49672b2d2be629fed2f144ef87a0430a359355ba 100644
--- a/src/ic/ic.h
+++ b/src/ic/ic.h
@@ -354,13 +354,13 @@ class CallIC : public IC {
class LoadIC : public IC {
public:
- static ExtraICState ComputeExtraICState(ContextualMode contextual_mode,
+ static ExtraICState ComputeExtraICState(TypeofMode typeof_mode,
LanguageMode language_mode) {
- return LoadICState(contextual_mode, language_mode).GetExtraICState();
+ return LoadICState(typeof_mode, language_mode).GetExtraICState();
}
- ContextualMode contextual_mode() const {
- return LoadICState::GetContextualMode(extra_ic_state());
+ TypeofMode typeof_mode() const {
+ return LoadICState::GetTypeofMode(extra_ic_state());
}
LanguageMode language_mode() const {
@@ -382,15 +382,8 @@ class LoadIC : public IC {
DCHECK(IsLoadStub());
}
- // Returns if this IC is for contextual (no explicit receiver)
- // access to properties.
- bool IsUndeclaredGlobal(Handle<Object> receiver) {
- if (receiver->IsGlobalObject()) {
- return contextual_mode() == CONTEXTUAL;
- } else {
- DCHECK(contextual_mode() != CONTEXTUAL);
- return false;
- }
+ bool ShouldThrowReferenceError(Handle<Object> receiver) {
+ return receiver->IsGlobalObject() && typeof_mode() == NOT_INSIDE_TYPEOF;
}
// Code generator routines.
@@ -452,10 +445,10 @@ class KeyedLoadIC : public LoadIC {
class IcCheckTypeField
: public BitField<IcCheckType, LoadICState::kNextBitFieldOffset, 1> {};
- static ExtraICState ComputeExtraICState(ContextualMode contextual_mode,
+ static ExtraICState ComputeExtraICState(TypeofMode typeof_mode,
LanguageMode language_mode,
IcCheckType key_type) {
- return LoadICState(contextual_mode, language_mode).GetExtraICState() |
+ return LoadICState(typeof_mode, language_mode).GetExtraICState() |
IcCheckTypeField::encode(key_type);
}
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698