Commit 6557c85f authored by verwaest@chromium.org's avatar verwaest@chromium.org

Use SimpleLoadField for JSObjectFieldAccessors, rather than compiling a new stub.

R=dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17922 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent adb39abd
......@@ -1237,15 +1237,12 @@ Handle<Code> LoadIC::CompileHandler(LookupResult* lookup,
return isolate()->builtins()->LoadIC_Normal();
case CALLBACKS: {
// Use simple field loads for some well-known callback properties.
int object_offset;
if (object->IsJSObject()) {
Handle<JSObject> receiver = Handle<JSObject>::cast(object);
Handle<Map> map(receiver->map());
int object_offset;
if (Accessors::IsJSObjectFieldAccessor(map, name, &object_offset)) {
PropertyIndex index =
PropertyIndex::NewHeaderIndex(object_offset / kPointerSize);
return compiler.CompileLoadField(
receiver, receiver, name, index, Representation::Tagged());
return SimpleFieldLoad(object_offset / kPointerSize);
}
}
......
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