| Index: src/interpreter/interpreter.cc
|
| diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
|
| index 323e9bec6b810652f79bf9d88d2e2d6234f86363..bbb90a874db85709579cd1375b713f5ea7939a93 100644
|
| --- a/src/interpreter/interpreter.cc
|
| +++ b/src/interpreter/interpreter.cc
|
| @@ -836,33 +836,29 @@ void Interpreter::DoShiftRightLogical(InterpreterAssembler* assembler) {
|
| DoBinaryOp<ShiftRightLogicalStub>(assembler);
|
| }
|
|
|
| -void Interpreter::DoCountOp(Callable callable,
|
| - InterpreterAssembler* assembler) {
|
| - Node* target = __ HeapConstant(callable.code());
|
| +template <class Generator>
|
| +void Interpreter::DoCountOp(InterpreterAssembler* assembler) {
|
| Node* value = __ GetAccumulator();
|
| Node* context = __ GetContext();
|
| - Node* result = __ CallStub(callable.descriptor(), target, context, value);
|
| + Node* result = Generator::Generate(assembler, value, context);
|
| __ SetAccumulator(result);
|
| __ Dispatch();
|
| }
|
|
|
| -
|
| // Inc
|
| //
|
| // Increments value in the accumulator by one.
|
| void Interpreter::DoInc(InterpreterAssembler* assembler) {
|
| - DoCountOp(CodeFactory::Inc(isolate_), assembler);
|
| + DoCountOp<IncStub>(assembler);
|
| }
|
|
|
| -
|
| // Dec
|
| //
|
| // Decrements value in the accumulator by one.
|
| void Interpreter::DoDec(InterpreterAssembler* assembler) {
|
| - DoCountOp(CodeFactory::Dec(isolate_), assembler);
|
| + DoCountOp<DecStub>(assembler);
|
| }
|
|
|
| -
|
| // LogicalNot
|
| //
|
| // Perform logical-not on the accumulator, first casting the
|
|
|