Index: src/mips/full-codegen-mips.cc |
diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc |
index d745badc4135ebf245990cf6e85577f239a5b91f..48cb3917de5c6dda327161eef10dcd33665c8697 100644 |
--- a/src/mips/full-codegen-mips.cc |
+++ b/src/mips/full-codegen-mips.cc |
@@ -4623,18 +4623,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. |
Register receiver = LoadDescriptor::ReceiverRegister(); |
__ lw(receiver, GlobalObjectOperand()); |
@@ -4657,7 +4650,6 @@ void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) { |
__ sw(v0, MemOperand(sp, kPointerSize)); |
// Push the arguments ("left-to-right"). |
- int arg_count = args->length(); |
for (int i = 0; i < arg_count; i++) { |
VisitForStackValue(args->at(i)); |
} |
@@ -4672,15 +4664,29 @@ void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) { |
__ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
context()->DropAndPlug(1, v0); |
+ |
} 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(v0); |
+ // Call the C runtime function. |
+ __ CallRuntime(expr->function(), arg_count); |
+ context()->Plug(v0); |
+ } |
+ } |
} |
} |