| Index: src/interpreter/interpreter.cc
|
| diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
|
| index a8d2e1ef772929cb7175c71041ae00b0cf5d2a13..d6c2227b01c49e013549e57b166c28ad7c8731cf 100644
|
| --- a/src/interpreter/interpreter.cc
|
| +++ b/src/interpreter/interpreter.cc
|
| @@ -1300,13 +1300,20 @@ void Interpreter::DoUnaryOpWithFeedback(InterpreterAssembler* assembler) {
|
| __ Dispatch();
|
| }
|
|
|
| +template <class Generator>
|
| +void Interpreter::DoConversionOp(InterpreterAssembler* assembler) {
|
| + Node* value = __ GetAccumulator();
|
| + Node* context = __ GetContext();
|
| + Node* result = Generator::Generate(assembler, value, context);
|
| + __ StoreRegister(result, __ BytecodeOperandReg(0));
|
| + __ Dispatch();
|
| +}
|
| +
|
| // ToName
|
| //
|
| // Cast the object referenced by the accumulator to a name.
|
| void Interpreter::DoToName(InterpreterAssembler* assembler) {
|
| - Node* result = BuildUnaryOp(CodeFactory::ToName(isolate_), assembler);
|
| - __ StoreRegister(result, __ BytecodeOperandReg(0));
|
| - __ Dispatch();
|
| + DoConversionOp<ToNameStub>(assembler);
|
| }
|
|
|
| // ToNumber
|
|
|