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

Unified Diff: src/ic.cc

Issue 140943002: Fix logic error in assert in IsUndeclaredGlobal() (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Ports and addressed comments. Created 6 years, 11 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.h ('k') | src/mips/ic-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « src/ic.h ('k') | src/mips/ic-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698