Index: src/arm/codegen-arm.cc |
diff --git a/src/arm/codegen-arm.cc b/src/arm/codegen-arm.cc |
index 60bc84820ca0bfa0dbe5e43dc979a6481724f0e4..cda846d1c848f27752eca729e8b3bc653cbfac26 100644 |
--- a/src/arm/codegen-arm.cc |
+++ b/src/arm/codegen-arm.cc |
@@ -3709,6 +3709,22 @@ void CodeGenerator::GenerateNumberToString(ZoneList<Expression*>* args) { |
} |
+void CodeGenerator::GenerateCallFunction(ZoneList<Expression*>* args) { |
+ Comment cmnt(masm_, "[ GenerateCallFunction"); |
+ |
+ ASSERT(args->length() >= 2); |
+ |
+ int n_args = args->length() - 2; // for receiver and function. |
+ Load(args->at(0)); // receiver |
+ for (int i = 0; i < n_args; i++) { |
+ Load(args->at(i + 1)); |
+ } |
+ Load(args->at(n_args + 1)); // function |
+ frame_->CallJSFunction(n_args); |
+ frame_->EmitPush(r0); |
+} |
+ |
+ |
void CodeGenerator::GenerateMathSin(ZoneList<Expression*>* args) { |
ASSERT_EQ(args->length(), 1); |
// Load the argument on the stack and jump to the runtime. |