| 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 | 8 |
| 9 #include "src/ast/prettyprinter.h" | 9 #include "src/ast/prettyprinter.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1018 Node* context = __ GetContext(); | 1018 Node* context = __ GetContext(); |
| 1019 Node* result = Generator::Generate(assembler, value, context); | 1019 Node* result = Generator::Generate(assembler, value, context); |
| 1020 __ SetAccumulator(result); | 1020 __ SetAccumulator(result); |
| 1021 __ Dispatch(); | 1021 __ Dispatch(); |
| 1022 } | 1022 } |
| 1023 | 1023 |
| 1024 // ToName | 1024 // ToName |
| 1025 // | 1025 // |
| 1026 // Cast the object referenced by the accumulator to a name. | 1026 // Cast the object referenced by the accumulator to a name. |
| 1027 void Interpreter::DoToName(InterpreterAssembler* assembler) { | 1027 void Interpreter::DoToName(InterpreterAssembler* assembler) { |
| 1028 DoUnaryOp(CodeFactory::ToName(isolate_), assembler); | 1028 Node* result = BuildUnaryOp(CodeFactory::ToName(isolate_), assembler); |
| 1029 __ StoreRegister(result, __ BytecodeOperandReg(0)); |
| 1030 __ Dispatch(); |
| 1029 } | 1031 } |
| 1030 | 1032 |
| 1031 // ToNumber | 1033 // ToNumber |
| 1032 // | 1034 // |
| 1033 // Cast the object referenced by the accumulator to a number. | 1035 // Cast the object referenced by the accumulator to a number. |
| 1034 void Interpreter::DoToNumber(InterpreterAssembler* assembler) { | 1036 void Interpreter::DoToNumber(InterpreterAssembler* assembler) { |
| 1035 Node* result = BuildUnaryOp(CodeFactory::ToNumber(isolate_), assembler); | 1037 Node* result = BuildUnaryOp(CodeFactory::ToNumber(isolate_), assembler); |
| 1036 __ StoreRegister(result, __ BytecodeOperandReg(0)); | 1038 __ StoreRegister(result, __ BytecodeOperandReg(0)); |
| 1037 __ Dispatch(); | 1039 __ Dispatch(); |
| 1038 } | 1040 } |
| (...skipping 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2127 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 2129 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
| 2128 __ SmiTag(new_state)); | 2130 __ SmiTag(new_state)); |
| 2129 __ SetAccumulator(old_state); | 2131 __ SetAccumulator(old_state); |
| 2130 | 2132 |
| 2131 __ Dispatch(); | 2133 __ Dispatch(); |
| 2132 } | 2134 } |
| 2133 | 2135 |
| 2134 } // namespace interpreter | 2136 } // namespace interpreter |
| 2135 } // namespace internal | 2137 } // namespace internal |
| 2136 } // namespace v8 | 2138 } // namespace v8 |
| OLD | NEW |