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

Unified Diff: src/hydrogen.cc

Issue 321543002: Simplify prototype chain walk in hydrogen (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index a3f4b0b2a53d80ca7d2742590712a014cb141c8e..1e623afc81fa7eba25ecef8081b850efd70f672f 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -6558,11 +6558,10 @@ HInstruction* HOptimizedGraphBuilder::BuildMonomorphicElementAccess(
// changes could allow callbacks on elements in the chain that
// aren't compatible with monomorphic keyed stores.
Handle<JSObject> prototype(JSObject::cast(map->prototype()));
- Object* holder = map->prototype();
- while (holder->GetPrototype(isolate())->IsJSObject()) {
- holder = holder->GetPrototype(isolate());
+ JSObject* holder = JSObject::cast(map->prototype());
+ while (!holder->GetPrototype()->IsNull()) {
+ holder = JSObject::cast(holder->GetPrototype());
}
- ASSERT(holder->GetPrototype(isolate())->IsNull());
BuildCheckPrototypeMaps(prototype,
Handle<JSObject>(JSObject::cast(holder)));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698