Commit 1e55c821 authored by antonm@chromium.org's avatar antonm@chromium.org

Revert r2110 as it introduces performance regressions.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2111 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent b2f0dc35
...@@ -849,20 +849,6 @@ void KeyedLoadIC::UpdateCaches(LookupResult* lookup, State state, ...@@ -849,20 +849,6 @@ void KeyedLoadIC::UpdateCaches(LookupResult* lookup, State state,
} }
static bool StoreICableLookup(LookupResult* lookup) {
// Bail out if we didn't find a result.
if (!lookup->IsValid() || !lookup->IsCacheable()) return false;
// If the property is read-only, we leave the IC in its current
// state.
if (lookup->IsReadOnly()) return false;
if (!lookup->IsLoaded()) return false;
return true;
}
Object* StoreIC::Store(State state, Object* StoreIC::Store(State state,
Handle<Object> object, Handle<Object> object,
Handle<String> name, Handle<String> name,
...@@ -887,12 +873,12 @@ Object* StoreIC::Store(State state, ...@@ -887,12 +873,12 @@ Object* StoreIC::Store(State state,
} }
// Lookup the property locally in the receiver. // Lookup the property locally in the receiver.
if (FLAG_use_ic && !receiver->IsJSGlobalProxy()) { LookupResult lookup;
LookupResult lookup; receiver->LocalLookup(*name, &lookup);
receiver->LocalLookup(*name, &lookup);
if (StoreICableLookup(&lookup)) { // Update inline cache and stub cache.
UpdateCaches(&lookup, state, receiver, name, value); if (FLAG_use_ic && lookup.IsLoaded()) {
} UpdateCaches(&lookup, state, receiver, name, value);
} }
// Set the property. // Set the property.
...@@ -907,9 +893,14 @@ void StoreIC::UpdateCaches(LookupResult* lookup, ...@@ -907,9 +893,14 @@ void StoreIC::UpdateCaches(LookupResult* lookup,
Handle<Object> value) { Handle<Object> value) {
ASSERT(lookup->IsLoaded()); ASSERT(lookup->IsLoaded());
// Skip JSGlobalProxy. // Skip JSGlobalProxy.
ASSERT(!receiver->IsJSGlobalProxy()); if (receiver->IsJSGlobalProxy()) return;
ASSERT(StoreICableLookup(lookup)); // Bail out if we didn't find a result.
if (!lookup->IsValid() || !lookup->IsCacheable()) return;
// If the property is read-only, we leave the IC in its current
// state.
if (lookup->IsReadOnly()) return;
// If the property has a non-field type allowing map transitions // If the property has a non-field type allowing map transitions
// where there is extra room in the object, we leave the IC in its // where there is extra room in the object, we leave the IC in its
......
...@@ -4974,22 +4974,6 @@ THREADED_TEST(InterceptorStoreIC) { ...@@ -4974,22 +4974,6 @@ THREADED_TEST(InterceptorStoreIC) {
} }
THREADED_TEST(InterceptorStoreICWithNoSetter) {
v8::HandleScope scope;
v8::Handle<v8::ObjectTemplate> templ = ObjectTemplate::New();
templ->SetNamedPropertyHandler(InterceptorLoadXICGetter);
LocalContext context;
context->Global()->Set(v8_str("o"), templ->NewInstance());
v8::Handle<Value> value = CompileRun(
"for (var i = 0; i < 1000; i++) {"
" o.y = 239;"
"}"
"42 + o.y");
CHECK_EQ(239 + 42, value->Int32Value());
}
v8::Handle<Value> call_ic_function; v8::Handle<Value> call_ic_function;
v8::Handle<Value> call_ic_function2; v8::Handle<Value> call_ic_function2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment