summaryrefslogtreecommitdiff
path: root/deps/v8/src/ic.cc
diff options
context:
space:
mode:
authorRyan <ry@tinyclouds.org>2009-06-29 10:55:05 +0200
committerRyan <ry@tinyclouds.org>2009-06-29 10:55:05 +0200
commite763efdadf4bbd9c0155a4c7f782d271a2fd5814 (patch)
tree094824e55548cdeb2ce9b796cbf29aaa591bb69f /deps/v8/src/ic.cc
parente876d6629e8682f5d818141bc0710f6d82311373 (diff)
downloadnode-new-e763efdadf4bbd9c0155a4c7f782d271a2fd5814.tar.gz
Upgrade v8 to 1.2.10 and libev to 3.6
Diffstat (limited to 'deps/v8/src/ic.cc')
-rw-r--r--deps/v8/src/ic.cc22
1 files changed, 20 insertions, 2 deletions
diff --git a/deps/v8/src/ic.cc b/deps/v8/src/ic.cc
index 16235db210..35c40366ec 100644
--- a/deps/v8/src/ic.cc
+++ b/deps/v8/src/ic.cc
@@ -863,6 +863,25 @@ static bool StoreICableLookup(LookupResult* lookup) {
}
+static bool LookupForStoreIC(JSObject* object,
+ String* name,
+ LookupResult* lookup) {
+ object->LocalLookup(name, lookup);
+ if (!StoreICableLookup(lookup)) {
+ return false;
+ }
+
+ if (lookup->type() == INTERCEPTOR) {
+ if (object->GetNamedInterceptor()->setter()->IsUndefined()) {
+ object->LocalLookupRealNamedProperty(name, lookup);
+ return StoreICableLookup(lookup);
+ }
+ }
+
+ return true;
+}
+
+
Object* StoreIC::Store(State state,
Handle<Object> object,
Handle<String> name,
@@ -889,8 +908,7 @@ Object* StoreIC::Store(State state,
// Lookup the property locally in the receiver.
if (FLAG_use_ic && !receiver->IsJSGlobalProxy()) {
LookupResult lookup;
- receiver->LocalLookup(*name, &lookup);
- if (StoreICableLookup(&lookup)) {
+ if (LookupForStoreIC(*receiver, *name, &lookup)) {
UpdateCaches(&lookup, state, receiver, name, value);
}
}