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
This commit is contained in:
verwaest@chromium.org 2013-11-20 13:25:40 +00:00
parent adb39abd6d
commit 6557c85ff4

View File

@ -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);
}
}