Chromium Code Reviews| Index: src/ic/ic.h |
| diff --git a/src/ic/ic.h b/src/ic/ic.h |
| index dec8318ae5c7cfd2b6c40fb253365cb055a630a6..90ff6b8a21b50e0dd07fa9c837f94d37b82bc64a 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,9 @@ class LoadIC : public IC { |
| DCHECK(IsLoadStub()); |
| } |
| - // Returns if this IC is for contextual (no explicit receiver) |
| - // access to properties. |
| + // Returns if this IC is for access to undeclared global property. |
| bool IsUndeclaredGlobal(Handle<Object> receiver) { |
|
Toon Verwaest
2015/07/13 12:56:03
IsUndeclaredGlobal -> ShouldThrowReferenceError
Igor Sheludko
2015/07/13 13:08:02
Done.
|
| - if (receiver->IsGlobalObject()) { |
| - return contextual_mode() == CONTEXTUAL; |
| - } else { |
| - DCHECK(contextual_mode() != CONTEXTUAL); |
| - return false; |
| - } |
| + return receiver->IsGlobalObject() && typeof_mode() == NOT_INSIDE_TYPEOF; |
| } |
| // Code generator routines. |
| @@ -452,10 +446,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); |
| } |