| Index: src/ic.cc
|
| diff --git a/src/ic.cc b/src/ic.cc
|
| index 807bde0577278db92c7589ca4ab099bff0bb4d36..2f760cb2419e8f57802323528462f94c41bdf07a 100644
|
| --- a/src/ic.cc
|
| +++ b/src/ic.cc
|
| @@ -626,7 +626,7 @@ MaybeObject* CallICBase::LoadFunction(Handle<Object> object,
|
| if (!lookup.IsFound()) {
|
| // If the object does not have the requested property, check which
|
| // exception we need to throw.
|
| - return IsUndeclaredGlobal(object)
|
| + return object->IsGlobalObject()
|
| ? ReferenceError("not_defined", name)
|
| : TypeError("undefined_method", object, name);
|
| }
|
| @@ -643,7 +643,7 @@ MaybeObject* CallICBase::LoadFunction(Handle<Object> object,
|
| if (lookup.IsInterceptor() && attr == ABSENT) {
|
| // If the object does not have the requested property, check which
|
| // exception we need to throw.
|
| - return IsUndeclaredGlobal(object)
|
| + return object->IsGlobalObject()
|
| ? ReferenceError("not_defined", name)
|
| : TypeError("undefined_method", object, name);
|
| }
|
| @@ -1102,7 +1102,7 @@ void IC::PatchCache(Handle<Type> type,
|
|
|
| Handle<Code> LoadIC::initialize_stub(Isolate* isolate, ContextualMode mode) {
|
| Handle<Code> ic = isolate->stub_cache()->ComputeLoad(
|
| - UNINITIALIZED, IC::ComputeExtraICState(mode));
|
| + UNINITIALIZED, ComputeExtraICState(mode));
|
| return ic;
|
| }
|
|
|
| @@ -1110,7 +1110,7 @@ Handle<Code> LoadIC::initialize_stub(Isolate* isolate, ContextualMode mode) {
|
| Handle<Code> LoadIC::pre_monomorphic_stub(Isolate* isolate,
|
| ContextualMode mode) {
|
| return isolate->stub_cache()->ComputeLoad(
|
| - PREMONOMORPHIC, IC::ComputeExtraICState(mode));
|
| + PREMONOMORPHIC, ComputeExtraICState(mode));
|
| }
|
|
|
|
|
| @@ -1570,7 +1570,7 @@ MaybeObject* StoreIC::Store(Handle<Object> object,
|
| if (!can_store &&
|
| strict_mode() == kStrictMode &&
|
| !(lookup.IsProperty() && lookup.IsReadOnly()) &&
|
| - IsUndeclaredGlobal(object)) {
|
| + object->IsGlobalObject()) {
|
| // Strict mode doesn't allow setting non-existent global property.
|
| return ReferenceError("not_defined", name);
|
| }
|
| @@ -1598,9 +1598,8 @@ MaybeObject* StoreIC::Store(Handle<Object> object,
|
|
|
|
|
| Handle<Code> StoreIC::initialize_stub(Isolate* isolate,
|
| - StrictModeFlag strict_mode,
|
| - ContextualMode mode) {
|
| - ExtraICState extra_state = ComputeExtraICState(strict_mode, mode);
|
| + StrictModeFlag strict_mode) {
|
| + ExtraICState extra_state = ComputeExtraICState(strict_mode);
|
| Handle<Code> ic = isolate->stub_cache()->ComputeStore(
|
| UNINITIALIZED, extra_state);
|
| return ic;
|
| @@ -1618,10 +1617,8 @@ Handle<Code> StoreIC::generic_stub() const {
|
|
|
|
|
| Handle<Code> StoreIC::pre_monomorphic_stub(Isolate* isolate,
|
| - StrictModeFlag strict_mode,
|
| - ContextualMode contextual_mode) {
|
| - ExtraICState state = StoreIC::ComputeExtraICState(strict_mode,
|
| - contextual_mode);
|
| + StrictModeFlag strict_mode) {
|
| + ExtraICState state = ComputeExtraICState(strict_mode);
|
| return isolate->stub_cache()->ComputeStore(PREMONOMORPHIC, state);
|
| }
|
|
|
|
|