Index: src/interpreter/interpreter.cc |
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc |
index 20b0e14624bac2264e91e8c03af7740d2a2d3ba2..709c1c9b3ea4d49bc5844a20d8c7262cf3cc2d3b 100644 |
--- a/src/interpreter/interpreter.cc |
+++ b/src/interpreter/interpreter.cc |
@@ -804,12 +804,12 @@ void Interpreter::DoShiftRightLogical(InterpreterAssembler* assembler) { |
DoBinaryOp(CodeFactory::ShiftRightLogical(isolate_), assembler); |
} |
-void Interpreter::DoCountOp(Runtime::FunctionId function_id, |
+void Interpreter::DoCountOp(Callable callable, |
InterpreterAssembler* assembler) { |
+ Node* target = __ HeapConstant(callable.code()); |
Node* value = __ GetAccumulator(); |
- Node* one = __ NumberConstant(1); |
Node* context = __ GetContext(); |
- Node* result = __ CallRuntime(function_id, context, value, one); |
+ Node* result = __ CallStub(callable.descriptor(), target, context, value); |
__ SetAccumulator(result); |
__ Dispatch(); |
} |
@@ -819,7 +819,7 @@ void Interpreter::DoCountOp(Runtime::FunctionId function_id, |
// |
// Increments value in the accumulator by one. |
void Interpreter::DoInc(InterpreterAssembler* assembler) { |
- DoCountOp(Runtime::kAdd, assembler); |
+ DoCountOp(CodeFactory::Inc(isolate_), assembler); |
} |
@@ -827,7 +827,7 @@ void Interpreter::DoInc(InterpreterAssembler* assembler) { |
// |
// Decrements value in the accumulator by one. |
void Interpreter::DoDec(InterpreterAssembler* assembler) { |
- DoCountOp(Runtime::kSubtract, assembler); |
+ DoCountOp(CodeFactory::Dec(isolate_), assembler); |
} |