| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/interpreter/interpreter.h" | 5 #include "src/interpreter/interpreter.h" |
| 6 | 6 |
| 7 #include <fstream> | 7 #include <fstream> |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "src/ast/prettyprinter.h" | 10 #include "src/ast/prettyprinter.h" |
| (...skipping 1296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1307 Node* context = __ GetContext(); | 1307 Node* context = __ GetContext(); |
| 1308 Node* result = __ ToName(context, object); | 1308 Node* result = __ ToName(context, object); |
| 1309 __ StoreRegister(result, __ BytecodeOperandReg(0)); | 1309 __ StoreRegister(result, __ BytecodeOperandReg(0)); |
| 1310 __ Dispatch(); | 1310 __ Dispatch(); |
| 1311 } | 1311 } |
| 1312 | 1312 |
| 1313 // ToNumber | 1313 // ToNumber |
| 1314 // | 1314 // |
| 1315 // Convert the object referenced by the accumulator to a number. | 1315 // Convert the object referenced by the accumulator to a number. |
| 1316 void Interpreter::DoToNumber(InterpreterAssembler* assembler) { | 1316 void Interpreter::DoToNumber(InterpreterAssembler* assembler) { |
| 1317 Node* result = BuildUnaryOp(CodeFactory::ToNumber(isolate_), assembler); | 1317 Node* object = __ GetAccumulator(); |
| 1318 Node* context = __ GetContext(); |
| 1319 Node* result = __ ToNumber(context, object); |
| 1318 __ StoreRegister(result, __ BytecodeOperandReg(0)); | 1320 __ StoreRegister(result, __ BytecodeOperandReg(0)); |
| 1319 __ Dispatch(); | 1321 __ Dispatch(); |
| 1320 } | 1322 } |
| 1321 | 1323 |
| 1322 // ToObject | 1324 // ToObject |
| 1323 // | 1325 // |
| 1324 // Convert the object referenced by the accumulator to a JSReceiver. | 1326 // Convert the object referenced by the accumulator to a JSReceiver. |
| 1325 void Interpreter::DoToObject(InterpreterAssembler* assembler) { | 1327 void Interpreter::DoToObject(InterpreterAssembler* assembler) { |
| 1326 Node* result = BuildUnaryOp(CodeFactory::ToObject(isolate_), assembler); | 1328 Node* result = BuildUnaryOp(CodeFactory::ToObject(isolate_), assembler); |
| 1327 __ StoreRegister(result, __ BytecodeOperandReg(0)); | 1329 __ StoreRegister(result, __ BytecodeOperandReg(0)); |
| (...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2454 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 2456 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
| 2455 __ SmiTag(new_state)); | 2457 __ SmiTag(new_state)); |
| 2456 __ SetAccumulator(old_state); | 2458 __ SetAccumulator(old_state); |
| 2457 | 2459 |
| 2458 __ Dispatch(); | 2460 __ Dispatch(); |
| 2459 } | 2461 } |
| 2460 | 2462 |
| 2461 } // namespace interpreter | 2463 } // namespace interpreter |
| 2462 } // namespace internal | 2464 } // namespace internal |
| 2463 } // namespace v8 | 2465 } // namespace v8 |
| OLD | NEW |