Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Unified Diff: src/accessors.cc

Issue 50011: Revert change 1509 that flush ICs when adding setters on an object or... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/accessors.cc
===================================================================
--- src/accessors.cc (revision 1547)
+++ src/accessors.cc (working copy)
@@ -509,17 +509,13 @@
// SpiderMonkey behaves this way.
if (!value->IsJSObject() && !value->IsNull()) return value;
- bool clear_ics = false;
for (Object* pt = value; pt != Heap::null_value(); pt = pt->GetPrototype()) {
- JSObject *obj = JSObject::cast(pt);
- if (obj == receiver) {
+ if (JSObject::cast(pt) == receiver) {
// Cycle detected.
HandleScope scope;
return Top::Throw(*Factory::NewError("cyclic_proto",
HandleVector<Object>(NULL, 0)));
}
- if (obj->HasLocalPropertyWithType(CALLBACKS))
- clear_ics = true;
}
// Find the first object in the chain whose prototype object is not
@@ -538,10 +534,6 @@
Map::cast(new_map)->set_prototype(value);
current->set_map(Map::cast(new_map));
- // Finally, if the prototype contains a setter we may have broken
- // the assumptions made when creating ics so we have to clear them.
- if (clear_ics) Heap::ClearStoreICs();
-
// To be consistent with other Set functions, return the value.
return value;
}
« no previous file with comments | « no previous file | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698