Reviewers: rossberg,

Description:
Handle setters on the prototype chain efficiently by default.

Note that changes on the prototype chain should already be handled by
StubCompiler::CheckPrototypes, if not, it is a bug there and not in
LookupForWrite. Furthermore, neither test262 nor WebKit layout tests hint at a
compability issue, so it should be safe to remove a redundant check.

The good point about this CL: It improves Box2D's performance by 22%.


Please review this at http://codereview.chromium.org/10695197/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/ic.cc


Index: src/ic.cc
diff --git a/src/ic.cc b/src/ic.cc
index d75b3e9799abae97e9fad7e6fc99c66bf99b209d..a6b7a1df8c7a3a98535cb835ebf91cda33c5e912 100644
--- a/src/ic.cc
+++ b/src/ic.cc
@@ -1316,11 +1316,9 @@ static bool LookupForWrite(Handle<JSObject> receiver,
                            LookupResult* lookup) {
   receiver->LocalLookup(*name, lookup);
   if (!StoreICableLookup(lookup)) {
- // 2nd chance: There can be accessors somewhere in the prototype chain, but - // for compatibility reasons we have to hide this behind a flag. Note that - // we explicitly exclude native accessors for now, because the stubs are not
-    // yet prepared for this scenario.
-    if (!FLAG_es5_readonly) return false;
+ // 2nd chance: There can be accessors somewhere in the prototype chain. Note + // that we explicitly exclude native accessors for now, because the stubs
+    // are not yet prepared for this scenario.
     receiver->Lookup(*name, lookup);
     if (!lookup->IsCallbacks()) return false;
     Handle<Object> callback(lookup->GetCallbackObject());


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to