Revision: 21718
Author:   [email protected]
Date:     Fri Jun  6 13:33:27 2014 UTC
Log:      Simplify prototype chain walk in hydrogen

Since we know that we're only encountering JSObjects, we can use the
faster GetPrototype() method to walk up the chain

BUG=none
[email protected]
LOG=n

Review URL: https://codereview.chromium.org/321543002
http://code.google.com/p/v8/source/detail?r=21718

Modified:
 /branches/bleeding_edge/src/hydrogen.cc

=======================================
--- /branches/bleeding_edge/src/hydrogen.cc     Thu Jun  5 07:33:01 2014 UTC
+++ /branches/bleeding_edge/src/hydrogen.cc     Fri Jun  6 13:33:27 2014 UTC
@@ -6558,11 +6558,10 @@
     // 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)));

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to