| 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 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1296 Node* result = Generator::Generate(assembler, value, context, | 1296 Node* result = Generator::Generate(assembler, value, context, |
| 1297 type_feedback_vector, slot_index); | 1297 type_feedback_vector, slot_index); |
| 1298 __ SetAccumulator(result); | 1298 __ SetAccumulator(result); |
| 1299 __ Dispatch(); | 1299 __ Dispatch(); |
| 1300 } | 1300 } |
| 1301 | 1301 |
| 1302 // ToName | 1302 // ToName |
| 1303 // | 1303 // |
| 1304 // Convert the object referenced by the accumulator to a name. | 1304 // Convert the object referenced by the accumulator to a name. |
| 1305 void Interpreter::DoToName(InterpreterAssembler* assembler) { | 1305 void Interpreter::DoToName(InterpreterAssembler* assembler) { |
| 1306 Node* result = BuildUnaryOp(CodeFactory::ToName(isolate_), assembler); | 1306 Node* accumulator = __ GetAccumulator(); |
| 1307 Node* context = __ GetContext(); |
| 1308 Node* result = assembler->ToName(context, accumulator); |
| 1307 __ StoreRegister(result, __ BytecodeOperandReg(0)); | 1309 __ StoreRegister(result, __ BytecodeOperandReg(0)); |
| 1308 __ Dispatch(); | 1310 __ Dispatch(); |
| 1309 } | 1311 } |
| 1310 | 1312 |
| 1311 // ToNumber | 1313 // ToNumber |
| 1312 // | 1314 // |
| 1313 // Convert the object referenced by the accumulator to a number. | 1315 // Convert the object referenced by the accumulator to a number. |
| 1314 void Interpreter::DoToNumber(InterpreterAssembler* assembler) { | 1316 void Interpreter::DoToNumber(InterpreterAssembler* assembler) { |
| 1315 Node* result = BuildUnaryOp(CodeFactory::ToNumber(isolate_), assembler); | 1317 Node* result = BuildUnaryOp(CodeFactory::ToNumber(isolate_), assembler); |
| 1316 __ StoreRegister(result, __ BytecodeOperandReg(0)); | 1318 __ StoreRegister(result, __ BytecodeOperandReg(0)); |
| (...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2465 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 2467 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
| 2466 __ SmiTag(new_state)); | 2468 __ SmiTag(new_state)); |
| 2467 __ SetAccumulator(old_state); | 2469 __ SetAccumulator(old_state); |
| 2468 | 2470 |
| 2469 __ Dispatch(); | 2471 __ Dispatch(); |
| 2470 } | 2472 } |
| 2471 | 2473 |
| 2472 } // namespace interpreter | 2474 } // namespace interpreter |
| 2473 } // namespace internal | 2475 } // namespace internal |
| 2474 } // namespace v8 | 2476 } // namespace v8 |
| OLD | NEW |