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 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1150 void Interpreter::DoTestIn(InterpreterAssembler* assembler) { | 1150 void Interpreter::DoTestIn(InterpreterAssembler* assembler) { |
1151 DoBinaryOp(CodeFactory::HasProperty(isolate_), assembler); | 1151 DoBinaryOp(CodeFactory::HasProperty(isolate_), assembler); |
1152 } | 1152 } |
1153 | 1153 |
1154 | 1154 |
1155 // TestInstanceOf <src> | 1155 // TestInstanceOf <src> |
1156 // | 1156 // |
1157 // Test if the object referenced by the <src> register is an an instance of type | 1157 // Test if the object referenced by the <src> register is an an instance of type |
1158 // referenced by the accumulator. | 1158 // referenced by the accumulator. |
1159 void Interpreter::DoTestInstanceOf(InterpreterAssembler* assembler) { | 1159 void Interpreter::DoTestInstanceOf(InterpreterAssembler* assembler) { |
1160 DoBinaryOp(Runtime::kInstanceOf, assembler); | 1160 DoBinaryOp(CodeFactory::InstanceOf(isolate_), assembler); |
1161 } | 1161 } |
1162 | 1162 |
1163 void Interpreter::DoTypeConversionOp(Callable callable, | 1163 void Interpreter::DoTypeConversionOp(Callable callable, |
1164 InterpreterAssembler* assembler) { | 1164 InterpreterAssembler* assembler) { |
1165 Node* target = __ HeapConstant(callable.code()); | 1165 Node* target = __ HeapConstant(callable.code()); |
1166 Node* accumulator = __ GetAccumulator(); | 1166 Node* accumulator = __ GetAccumulator(); |
1167 Node* context = __ GetContext(); | 1167 Node* context = __ GetContext(); |
1168 Node* result = | 1168 Node* result = |
1169 __ CallStub(callable.descriptor(), target, context, accumulator); | 1169 __ CallStub(callable.descriptor(), target, context, accumulator); |
1170 __ SetAccumulator(result); | 1170 __ SetAccumulator(result); |
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1829 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 1829 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
1830 __ SmiTag(new_state)); | 1830 __ SmiTag(new_state)); |
1831 __ SetAccumulator(old_state); | 1831 __ SetAccumulator(old_state); |
1832 | 1832 |
1833 __ Dispatch(); | 1833 __ Dispatch(); |
1834 } | 1834 } |
1835 | 1835 |
1836 } // namespace interpreter | 1836 } // namespace interpreter |
1837 } // namespace internal | 1837 } // namespace internal |
1838 } // namespace v8 | 1838 } // namespace v8 |
OLD | NEW |