Revision: 18173
Author: [email protected]
Date: Mon Dec 2 09:51:37 2013 UTC
Log: Remove special "store global proxy" IC, use as slow_stub().
[email protected]
Review URL: https://chromiumcodereview.appspot.com/95503003
http://code.google.com/p/v8/source/detail?r=18173
Modified:
/branches/bleeding_edge/src/builtins.cc
/branches/bleeding_edge/src/builtins.h
/branches/bleeding_edge/src/ic.cc
/branches/bleeding_edge/src/ic.h
/branches/bleeding_edge/src/type-info.cc
=======================================
--- /branches/bleeding_edge/src/builtins.cc Fri Nov 29 15:22:16 2013 UTC
+++ /branches/bleeding_edge/src/builtins.cc Mon Dec 2 09:51:37 2013 UTC
@@ -1419,16 +1419,6 @@
static void Generate_StoreIC_Megamorphic_Strict(MacroAssembler* masm) {
StoreIC::GenerateMegamorphic(masm, kStrictMode);
}
-
-
-static void Generate_StoreIC_GlobalProxy(MacroAssembler* masm) {
- StoreIC::GenerateRuntimeSetProperty(masm, kNonStrictMode);
-}
-
-
-static void Generate_StoreIC_GlobalProxy_Strict(MacroAssembler* masm) {
- StoreIC::GenerateRuntimeSetProperty(masm, kStrictMode);
-}
static void Generate_StoreIC_Setter_ForDeopt(MacroAssembler* masm) {
=======================================
--- /branches/bleeding_edge/src/builtins.h Thu Nov 28 15:32:55 2013 UTC
+++ /branches/bleeding_edge/src/builtins.h Mon Dec 2 09:51:37 2013 UTC
@@ -157,16 +157,12 @@
kNoExtraICState) \
V(StoreIC_Generic_Strict, STORE_IC, GENERIC, \
StoreIC::kStrictModeState) \
- V(StoreIC_GlobalProxy, STORE_IC, GENERIC, \
- kNoExtraICState) \
V(StoreIC_Initialize_Strict, STORE_IC, UNINITIALIZED, \
StoreIC::kStrictModeState) \
V(StoreIC_PreMonomorphic_Strict, STORE_IC, PREMONOMORPHIC, \
StoreIC::kStrictModeState) \
V(StoreIC_Megamorphic_Strict, STORE_IC, MEGAMORPHIC, \
StoreIC::kStrictModeState) \
- V(StoreIC_GlobalProxy_Strict, STORE_IC, GENERIC, \
- StoreIC::kStrictModeState) \
V(StoreIC_Setter_ForDeopt, STORE_IC, MONOMORPHIC, \
StoreIC::kStrictModeState) \
\
=======================================
--- /branches/bleeding_edge/src/ic.cc Thu Nov 28 18:13:30 2013 UTC
+++ /branches/bleeding_edge/src/ic.cc Mon Dec 2 09:51:37 2013 UTC
@@ -1454,7 +1454,8 @@
}
if (lookup->IsPropertyCallbacks()) return true;
-
+ // JSGlobalProxy always goes via the runtime, so it's safe to cache.
+ if (receiver->IsJSGlobalProxy()) return true;
// Currently normal holders in the prototype chain are not supported.
They
// would require a runtime positive lookup and verification that the
details
// have not changed.
@@ -1560,20 +1561,6 @@
RETURN_IF_EMPTY_HANDLE(isolate(), result);
return *result;
}
-
- if (receiver->IsJSGlobalProxy()) {
- if (FLAG_use_ic && kind() != Code::KEYED_STORE_IC) {
- // Generate a generic stub that goes to the runtime when we see a
global
- // proxy as receiver.
- Handle<Code> stub = global_proxy_stub();
- set_target(*stub);
- TRACE_IC("StoreIC", name);
- }
- Handle<Object> result = JSReceiver::SetProperty(
- receiver, name, value, NONE, strict_mode(), store_mode);
- RETURN_IF_EMPTY_HANDLE(isolate(), result);
- return *result;
- }
LookupResult lookup(isolate());
bool can_store = LookupForWrite(receiver, name, value, &lookup, this);
@@ -1611,7 +1598,6 @@
Handle<JSObject> receiver,
Handle<String> name,
Handle<Object> value) {
- ASSERT(!receiver->IsJSGlobalProxy());
ASSERT(lookup->IsFound());
// These are not cacheable, so we never see such LookupResults here.
@@ -1629,6 +1615,7 @@
Handle<String> name,
Handle<Object> value,
InlineCacheHolderFlag cache_holder) {
+ if (object->IsJSGlobalProxy()) return slow_stub();
ASSERT(cache_holder == OWN_MAP);
// This is currently guaranteed by checks in StoreIC::Store.
Handle<JSObject> receiver = Handle<JSObject>::cast(object);
=======================================
--- /branches/bleeding_edge/src/ic.h Thu Nov 28 15:32:55 2013 UTC
+++ /branches/bleeding_edge/src/ic.h Mon Dec 2 09:51:37 2013 UTC
@@ -641,14 +641,6 @@
return isolate->builtins()->StoreIC_PreMonomorphic();
}
}
-
- virtual Handle<Code> global_proxy_stub() {
- if (strict_mode() == kStrictMode) {
- return isolate()->builtins()->StoreIC_GlobalProxy_Strict();
- } else {
- return isolate()->builtins()->StoreIC_GlobalProxy();
- }
- }
// Update the inline cache and the global stub cache based on the
// lookup result.
=======================================
--- /branches/bleeding_edge/src/type-info.cc Thu Nov 28 15:32:55 2013 UTC
+++ /branches/bleeding_edge/src/type-info.cc Mon Dec 2 09:51:37 2013 UTC
@@ -522,11 +522,7 @@
Handle<Object> object = GetInfo(ast_id);
if (object->IsUndefined() || object->IsSmi()) return;
- if (object.is_identical_to(isolate_->builtins()->StoreIC_GlobalProxy()))
{
- // TODO(fschneider): We could collect the maps and signal that
- // we need a generic store (or load) here.
- ASSERT(Handle<Code>::cast(object)->ic_state() == GENERIC);
- } else if (object->IsMap()) {
+ if (object->IsMap()) {
types->AddMapIfMissing(Handle<Map>::cast(object), zone());
} else if (Handle<Code>::cast(object)->ic_state() == POLYMORPHIC ||
Handle<Code>::cast(object)->ic_state() == MONOMORPHIC) {
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.