Index: src/interpreter/interpreter.cc |
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc |
index 6bbb2a949ed0bf34b10af136e2a84c71709a9877..d5b7edb4289a958eb5ff329fe34a06a0d12ddea3 100644 |
--- a/src/interpreter/interpreter.cc |
+++ b/src/interpreter/interpreter.cc |
@@ -1062,7 +1062,9 @@ void Interpreter::DoToNumber(InterpreterAssembler* assembler) { |
// |
// Cast the object referenced by the accumulator to a JSObject. |
void Interpreter::DoToObject(InterpreterAssembler* assembler) { |
- DoUnaryOp(CodeFactory::ToObject(isolate_), assembler); |
+ Node* result = BuildUnaryOp(CodeFactory::ToObject(isolate_), assembler); |
+ __ StoreRegister(result, __ BytecodeOperandReg(0)); |
+ __ Dispatch(); |
} |
// Inc |
@@ -1912,7 +1914,8 @@ void Interpreter::BuildForInPrepareResult(Node* output_register, |
// |cache_info_triple + 2|, with the registers holding cache_type, cache_array, |
// and cache_length respectively. |
void Interpreter::DoForInPrepare(InterpreterAssembler* assembler) { |
- Node* object = __ GetAccumulator(); |
+ Node* object_reg = __ BytecodeOperandReg(0); |
+ Node* object = __ LoadRegister(object_reg); |
Node* context = __ GetContext(); |
Node* const zero_smi = __ SmiConstant(Smi::FromInt(0)); |
@@ -1973,7 +1976,7 @@ void Interpreter::DoForInPrepare(InterpreterAssembler* assembler) { |
__ LoadObjectField(descriptors, DescriptorArray::kEnumCacheOffset); |
Node* cache_array = __ LoadObjectField( |
cache_offset, DescriptorArray::kEnumCacheBridgeCacheOffset); |
- Node* output_register = __ BytecodeOperandReg(0); |
+ Node* output_register = __ BytecodeOperandReg(1); |
BuildForInPrepareResult(output_register, cache_type, cache_array, |
cache_length, assembler); |
__ Dispatch(); |
@@ -1986,7 +1989,7 @@ void Interpreter::DoForInPrepare(InterpreterAssembler* assembler) { |
Node* cache_type = __ Projection(0, result_triple); |
Node* cache_array = __ Projection(1, result_triple); |
Node* cache_length = __ Projection(2, result_triple); |
- Node* output_register = __ BytecodeOperandReg(0); |
+ Node* output_register = __ BytecodeOperandReg(1); |
BuildForInPrepareResult(output_register, cache_type, cache_array, |
cache_length, assembler); |
__ Dispatch(); |
@@ -1995,7 +1998,7 @@ void Interpreter::DoForInPrepare(InterpreterAssembler* assembler) { |
__ Bind(¬hing_to_iterate); |
{ |
// Receiver is null or undefined or descriptors are zero length. |
- Node* output_register = __ BytecodeOperandReg(0); |
+ Node* output_register = __ BytecodeOperandReg(1); |
BuildForInPrepareResult(output_register, zero_smi, zero_smi, zero_smi, |
assembler); |
__ Dispatch(); |