Add ability to bail out from custom call generators to x64 and ARM platforms.

http://code.google.com/p/v8/source/detail?r=4503 added this functionality to ia32.

Review URL: http://codereview.chromium.org/1694018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4549 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
antonm@chromium.org 2010-04-29 13:58:39 +00:00
parent a788b8ce56
commit 6cff35044d
2 changed files with 30 additions and 2 deletions

View File

@ -1087,6 +1087,11 @@ Object* CallStubCompiler::CompileArrayPushCall(Object* object,
// -- lr : return address
// -----------------------------------
// If object is not an array, bail out to regular call.
if (!object->IsJSArray()) {
return Heap::undefined_value();
}
// TODO(639): faster implementation.
ASSERT(check == RECEIVER_MAP_CHECK);
@ -1136,6 +1141,11 @@ Object* CallStubCompiler::CompileArrayPopCall(Object* object,
// -- lr : return address
// -----------------------------------
// If object is not an array, bail out to regular call.
if (!object->IsJSArray()) {
return Heap::undefined_value();
}
// TODO(642): faster implementation.
ASSERT(check == RECEIVER_MAP_CHECK);
@ -1188,7 +1198,11 @@ Object* CallStubCompiler::CompileCallConstant(Object* object,
if (function_info->HasCustomCallGenerator()) {
CustomCallGenerator generator =
ToCData<CustomCallGenerator>(function_info->function_data());
return generator(this, object, holder, function, name, check);
Object* result = generator(this, object, holder, function, name, check);
// undefined means bail out to regular compiler.
if (!result->IsUndefined()) {
return result;
}
}
Label miss_in_smi_check;

View File

@ -869,6 +869,11 @@ Object* CallStubCompiler::CompileArrayPushCall(Object* object,
// rsp[(argc + 1) * 8] : argument 0 = receiver
// -----------------------------------
// If object is not an array, bail out to regular call.
if (!object->IsJSArray()) {
return Heap::undefined_value();
}
// TODO(639): faster implementation.
ASSERT(check == RECEIVER_MAP_CHECK);
@ -925,6 +930,11 @@ Object* CallStubCompiler::CompileArrayPopCall(Object* object,
// rsp[(argc + 1) * 8] : argument 0 = receiver
// -----------------------------------
// If object is not an array, bail out to regular call.
if (!object->IsJSArray()) {
return Heap::undefined_value();
}
// TODO(642): faster implementation.
ASSERT(check == RECEIVER_MAP_CHECK);
@ -985,7 +995,11 @@ Object* CallStubCompiler::CompileCallConstant(Object* object,
if (function_info->HasCustomCallGenerator()) {
CustomCallGenerator generator =
ToCData<CustomCallGenerator>(function_info->function_data());
return generator(this, object, holder, function, name, check);
Object* result = generator(this, object, holder, function, name, check);
// undefined means bail out to regular compiler.
if (!result->IsUndefined()) {
return result;
}
}
Label miss_in_smi_check;