| Index: src/x87/full-codegen-x87.cc
|
| diff --git a/src/x87/full-codegen-x87.cc b/src/x87/full-codegen-x87.cc
|
| index 155c0f2a0ce6e2d367e1828d3793817e26ca7d28..7596e9079d7ea83a6958ab64490625edb3f94c37 100644
|
| --- a/src/x87/full-codegen-x87.cc
|
| +++ b/src/x87/full-codegen-x87.cc
|
| @@ -4495,17 +4495,11 @@ void FullCodeGenerator::EmitDebugIsActive(CallRuntime* expr) {
|
|
|
|
|
| void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) {
|
| - InlineFunctionGenerator generator = FindInlineFunctionGenerator(expr);
|
| - if (generator != nullptr) {
|
| - Comment cmnt(masm_, "[ InlineRuntimeCall");
|
| - EmitInlineRuntimeCall(expr, generator);
|
| - return;
|
| - }
|
| -
|
| - Comment cmnt(masm_, "[ CallRuntime");
|
| ZoneList<Expression*>* args = expr->arguments();
|
| + int arg_count = args->length();
|
|
|
| if (expr->is_jsruntime()) {
|
| + Comment cmnt(masm_, "[ CallRuntime");
|
| // Push the builtins object as receiver.
|
| __ mov(eax, GlobalObjectOperand());
|
| __ push(FieldOperand(eax, GlobalObject::kBuiltinsOffset));
|
| @@ -4525,9 +4519,7 @@ void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) {
|
| __ push(Operand(esp, 0));
|
| __ mov(Operand(esp, kPointerSize), eax);
|
|
|
| - // Code common for calls using the IC.
|
| - ZoneList<Expression*>* args = expr->arguments();
|
| - int arg_count = args->length();
|
| + // Push the arguments ("left-to-right").
|
| for (int i = 0; i < arg_count; i++) {
|
| VisitForStackValue(args->at(i));
|
| }
|
| @@ -4542,16 +4534,27 @@ void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) {
|
| context()->DropAndPlug(1, eax);
|
|
|
| } else {
|
| - // Push the arguments ("left-to-right").
|
| - int arg_count = args->length();
|
| - for (int i = 0; i < arg_count; i++) {
|
| - VisitForStackValue(args->at(i));
|
| - }
|
| -
|
| - // Call the C runtime function.
|
| - __ CallRuntime(expr->function(), arg_count);
|
| + const Runtime::Function* function = expr->function();
|
| + switch (function->function_id) {
|
| +#define CALL_INTRINSIC_GENERATOR(Name) \
|
| + case Runtime::kInline##Name: { \
|
| + Comment cmnt(masm_, "[ Inline" #Name); \
|
| + return Emit##Name(expr); \
|
| + }
|
| + FOR_EACH_FULL_CODE_INTRINSIC(CALL_INTRINSIC_GENERATOR)
|
| +#undef CALL_INTRINSIC_GENERATOR
|
| + default: {
|
| + Comment cmnt(masm_, "[ CallRuntime for unhandled intrinsic");
|
| + // Push the arguments ("left-to-right").
|
| + for (int i = 0; i < arg_count; i++) {
|
| + VisitForStackValue(args->at(i));
|
| + }
|
|
|
| - context()->Plug(eax);
|
| + // Call the C runtime function.
|
| + __ CallRuntime(expr->function(), arg_count);
|
| + context()->Plug(eax);
|
| + }
|
| + }
|
| }
|
| }
|
|
|
|
|