| Index: src/x64/full-codegen-x64.cc
|
| diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc
|
| index d4f062f2d06569828ae99583445f96e1451aa6bb..2d2ae50c36fe5f7fa8c390fd13671b9f12dada8d 100644
|
| --- a/src/x64/full-codegen-x64.cc
|
| +++ b/src/x64/full-codegen-x64.cc
|
| @@ -4564,18 +4564,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.
|
| __ movp(rax, GlobalObjectOperand());
|
| __ Push(FieldOperand(rax, GlobalObject::kBuiltinsOffset));
|
| @@ -4611,14 +4604,27 @@ void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) {
|
| context()->DropAndPlug(1, rax);
|
|
|
| } else {
|
| - // Push the arguments ("left-to-right").
|
| - for (int i = 0; i < arg_count; i++) {
|
| - VisitForStackValue(args->at(i));
|
| - }
|
| + 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));
|
| + }
|
|
|
| - // Call the C runtime.
|
| - __ CallRuntime(expr->function(), arg_count);
|
| - context()->Plug(rax);
|
| + // Call the C runtime.
|
| + __ CallRuntime(function, arg_count);
|
| + context()->Plug(rax);
|
| + }
|
| + }
|
| }
|
| }
|
|
|
|
|