| 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 "src/ast/prettyprinter.h" | 7 #include "src/ast/prettyprinter.h" |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
| 10 #include "src/factory.h" | 10 #include "src/factory.h" |
| (...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 890 __ SetAccumulator(result); | 890 __ SetAccumulator(result); |
| 891 __ Dispatch(); | 891 __ Dispatch(); |
| 892 } | 892 } |
| 893 | 893 |
| 894 | 894 |
| 895 // TypeOf | 895 // TypeOf |
| 896 // | 896 // |
| 897 // Load the accumulator with the string representating type of the | 897 // Load the accumulator with the string representating type of the |
| 898 // object in the accumulator. | 898 // object in the accumulator. |
| 899 void Interpreter::DoTypeOf(InterpreterAssembler* assembler) { | 899 void Interpreter::DoTypeOf(InterpreterAssembler* assembler) { |
| 900 Callable callable = CodeFactory::Typeof(isolate_); |
| 901 Node* target = __ HeapConstant(callable.code()); |
| 900 Node* accumulator = __ GetAccumulator(); | 902 Node* accumulator = __ GetAccumulator(); |
| 901 Node* context = __ GetContext(); | 903 Node* context = __ GetContext(); |
| 902 Node* result = | 904 Node* result = |
| 903 __ CallRuntime(Runtime::kInterpreterTypeOf, context, accumulator); | 905 __ CallStub(callable.descriptor(), target, context, accumulator); |
| 904 __ SetAccumulator(result); | 906 __ SetAccumulator(result); |
| 905 __ Dispatch(); | 907 __ Dispatch(); |
| 906 } | 908 } |
| 907 | 909 |
| 908 void Interpreter::DoDelete(Runtime::FunctionId function_id, | 910 void Interpreter::DoDelete(Runtime::FunctionId function_id, |
| 909 InterpreterAssembler* assembler) { | 911 InterpreterAssembler* assembler) { |
| 910 Node* reg_index = __ BytecodeOperandReg(0); | 912 Node* reg_index = __ BytecodeOperandReg(0); |
| 911 Node* object = __ LoadRegister(reg_index); | 913 Node* object = __ LoadRegister(reg_index); |
| 912 Node* key = __ GetAccumulator(); | 914 Node* key = __ GetAccumulator(); |
| 913 Node* context = __ GetContext(); | 915 Node* context = __ GetContext(); |
| (...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1835 Node* index = __ LoadRegister(index_reg); | 1837 Node* index = __ LoadRegister(index_reg); |
| 1836 Node* context = __ GetContext(); | 1838 Node* context = __ GetContext(); |
| 1837 Node* result = __ CallRuntime(Runtime::kForInStep, context, index); | 1839 Node* result = __ CallRuntime(Runtime::kForInStep, context, index); |
| 1838 __ SetAccumulator(result); | 1840 __ SetAccumulator(result); |
| 1839 __ Dispatch(); | 1841 __ Dispatch(); |
| 1840 } | 1842 } |
| 1841 | 1843 |
| 1842 } // namespace interpreter | 1844 } // namespace interpreter |
| 1843 } // namespace internal | 1845 } // namespace internal |
| 1844 } // namespace v8 | 1846 } // namespace v8 |
| OLD | NEW |