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%.

Review URL: https://chromiumcodereview.appspot.com/10695197

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12079 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent ec042177
......@@ -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());
......
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