Index: src/arm64/full-codegen-arm64.cc |
diff --git a/src/arm64/full-codegen-arm64.cc b/src/arm64/full-codegen-arm64.cc |
index a8f5ed554293af985db1328de7ee5f3e87b7d21f..c50c83a03adc72a7a2e8b05e9bb2e398ec2e3ba8 100644 |
--- a/src/arm64/full-codegen-arm64.cc |
+++ b/src/arm64/full-codegen-arm64.cc |
@@ -4305,18 +4305,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 the receiver. |
__ Ldr(x10, GlobalObjectMemOperand()); |
__ Ldr(LoadDescriptor::ReceiverRegister(), |
@@ -4338,7 +4331,6 @@ void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) { |
__ Pop(x10); |
__ Push(x0, x10); |
- int arg_count = args->length(); |
for (int i = 0; i < arg_count; i++) { |
VisitForStackValue(args->at(i)); |
} |
@@ -4353,15 +4345,29 @@ void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) { |
__ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
context()->DropAndPlug(1, x0); |
+ |
} 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 function. |
- __ CallRuntime(expr->function(), arg_count); |
- context()->Plug(x0); |
+ // Call the C runtime function. |
+ __ CallRuntime(expr->function(), arg_count); |
+ context()->Plug(x0); |
+ } |
+ } |
} |
} |