Commit b056a8d6 authored by jochen@chromium.org's avatar jochen@chromium.org

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
R=verwaest@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/321543002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21718 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 2714fd23
......@@ -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)));
......
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