Index: src/compiler/js-operator.cc |
diff --git a/src/compiler/js-operator.cc b/src/compiler/js-operator.cc |
index 1455f0a9a98c2a191edcf871a661d70dbc7db394..78552154bde80ade83985e1c93d508ab2c18ebf6 100644 |
--- a/src/compiler/js-operator.cc |
+++ b/src/compiler/js-operator.cc |
@@ -746,10 +746,22 @@ const Operator* JSOperatorBuilder::CallFunction( |
} |
+const Operator* JSOperatorBuilder::CallRuntime(Runtime::FunctionId id) { |
+ const Runtime::Function* f = Runtime::FunctionForId(id); |
+ return CallRuntime(f, f->nargs); |
+} |
+ |
+ |
const Operator* JSOperatorBuilder::CallRuntime(Runtime::FunctionId id, |
size_t arity) { |
- CallRuntimeParameters parameters(id, arity); |
- const Runtime::Function* f = Runtime::FunctionForId(parameters.id()); |
+ const Runtime::Function* f = Runtime::FunctionForId(id); |
+ return CallRuntime(f, arity); |
+} |
+ |
+ |
+const Operator* JSOperatorBuilder::CallRuntime(const Runtime::Function* f, |
+ size_t arity) { |
+ CallRuntimeParameters parameters(f->function_id, arity); |
DCHECK(f->nargs == -1 || f->nargs == static_cast<int>(parameters.arity())); |
return new (zone()) Operator1<CallRuntimeParameters>( // -- |
IrOpcode::kJSCallRuntime, Operator::kNoProperties, // opcode |