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:
parent
adb39abd6d
commit
6557c85ff4
@ -1237,15 +1237,12 @@ Handle<Code> LoadIC::CompileHandler(LookupResult* lookup,
|
|||||||
return isolate()->builtins()->LoadIC_Normal();
|
return isolate()->builtins()->LoadIC_Normal();
|
||||||
case CALLBACKS: {
|
case CALLBACKS: {
|
||||||
// Use simple field loads for some well-known callback properties.
|
// Use simple field loads for some well-known callback properties.
|
||||||
int object_offset;
|
|
||||||
if (object->IsJSObject()) {
|
if (object->IsJSObject()) {
|
||||||
Handle<JSObject> receiver = Handle<JSObject>::cast(object);
|
Handle<JSObject> receiver = Handle<JSObject>::cast(object);
|
||||||
Handle<Map> map(receiver->map());
|
Handle<Map> map(receiver->map());
|
||||||
|
int object_offset;
|
||||||
if (Accessors::IsJSObjectFieldAccessor(map, name, &object_offset)) {
|
if (Accessors::IsJSObjectFieldAccessor(map, name, &object_offset)) {
|
||||||
PropertyIndex index =
|
return SimpleFieldLoad(object_offset / kPointerSize);
|
||||||
PropertyIndex::NewHeaderIndex(object_offset / kPointerSize);
|
|
||||||
return compiler.CompileLoadField(
|
|
||||||
receiver, receiver, name, index, Representation::Tagged());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user