| 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 #ifndef V8_INTERPRETER_INTERPRETER_H_ | 5 #ifndef V8_INTERPRETER_INTERPRETER_H_ |
| 6 #define V8_INTERPRETER_INTERPRETER_H_ | 6 #define V8_INTERPRETER_INTERPRETER_H_ |
| 7 | 7 |
| 8 // Clients of this interface shouldn't depend on lots of interpreter internals. | 8 // Clients of this interface shouldn't depend on lots of interpreter internals. |
| 9 // Do not include anything from src/interpreter other than | 9 // Do not include anything from src/interpreter other than |
| 10 // src/interpreter/bytecodes.h here! | 10 // src/interpreter/bytecodes.h here! |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 void DoUnaryOp(Callable callable, InterpreterAssembler* assembler); | 81 void DoUnaryOp(Callable callable, InterpreterAssembler* assembler); |
| 82 | 82 |
| 83 // Generates code to perform the unary operation via |Generator|. | 83 // Generates code to perform the unary operation via |Generator|. |
| 84 template <class Generator> | 84 template <class Generator> |
| 85 void DoUnaryOp(InterpreterAssembler* assembler); | 85 void DoUnaryOp(InterpreterAssembler* assembler); |
| 86 | 86 |
| 87 // Generates code to perform the comparison operation associated with | 87 // Generates code to perform the comparison operation associated with |
| 88 // |compare_op|. | 88 // |compare_op|. |
| 89 void DoCompareOp(Token::Value compare_op, InterpreterAssembler* assembler); | 89 void DoCompareOp(Token::Value compare_op, InterpreterAssembler* assembler); |
| 90 | 90 |
| 91 // Generates code to load a constant from the constant pool. | 91 // Generates code to perform a global store via |ic|. |
| 92 void DoLoadConstant(InterpreterAssembler* assembler); | 92 void DoStaGlobal(Callable ic, InterpreterAssembler* assembler); |
| 93 | 93 |
| 94 // Generates code to perform a global load via |ic|. | 94 // Generates code to perform a named property store via |ic|. |
| 95 void DoLoadGlobal(Callable ic, InterpreterAssembler* assembler); | |
| 96 | |
| 97 // Generates code to perform a global store via |ic|. | |
| 98 void DoStoreGlobal(Callable ic, InterpreterAssembler* assembler); | |
| 99 | |
| 100 // Generates code to perform a named property load via |ic|. | |
| 101 void DoLoadIC(Callable ic, InterpreterAssembler* assembler); | |
| 102 | |
| 103 // Generates code to perform a keyed property load via |ic|. | |
| 104 void DoKeyedLoadIC(Callable ic, InterpreterAssembler* assembler); | |
| 105 | |
| 106 // Generates code to perform a namedproperty store via |ic|. | |
| 107 void DoStoreIC(Callable ic, InterpreterAssembler* assembler); | 95 void DoStoreIC(Callable ic, InterpreterAssembler* assembler); |
| 108 | 96 |
| 109 // Generates code to perform a keyed property store via |ic|. | 97 // Generates code to perform a keyed property store via |ic|. |
| 110 void DoKeyedStoreIC(Callable ic, InterpreterAssembler* assembler); | 98 void DoKeyedStoreIC(Callable ic, InterpreterAssembler* assembler); |
| 111 | 99 |
| 112 // Generates code to perform a JS call. | 100 // Generates code to perform a JS call. |
| 113 void DoJSCall(InterpreterAssembler* assembler, TailCallMode tail_call_mode); | 101 void DoJSCall(InterpreterAssembler* assembler, TailCallMode tail_call_mode); |
| 114 | 102 |
| 115 // Generates code to perform a runtime call. | 103 // Generates code to perform a runtime call. |
| 116 void DoCallRuntimeCommon(InterpreterAssembler* assembler); | 104 void DoCallRuntimeCommon(InterpreterAssembler* assembler); |
| 117 | 105 |
| 118 // Generates code to perform a runtime call returning a pair. | 106 // Generates code to perform a runtime call returning a pair. |
| 119 void DoCallRuntimeForPairCommon(InterpreterAssembler* assembler); | 107 void DoCallRuntimeForPairCommon(InterpreterAssembler* assembler); |
| 120 | 108 |
| 121 // Generates code to perform a JS runtime call. | 109 // Generates code to perform a JS runtime call. |
| 122 void DoCallJSRuntimeCommon(InterpreterAssembler* assembler); | 110 void DoCallJSRuntimeCommon(InterpreterAssembler* assembler); |
| 123 | 111 |
| 124 // Generates code to perform a constructor call. | 112 // Generates code to perform a constructor call. |
| 125 void DoCallConstruct(InterpreterAssembler* assembler); | 113 void DoCallConstruct(InterpreterAssembler* assembler); |
| 126 | 114 |
| 127 // Generates code to perform delete via function_id. | 115 // Generates code to perform delete via function_id. |
| 128 void DoDelete(Runtime::FunctionId function_id, | 116 void DoDelete(Runtime::FunctionId function_id, |
| 129 InterpreterAssembler* assembler); | 117 InterpreterAssembler* assembler); |
| 130 | 118 |
| 131 // Generates code to perform a lookup slot load via |function_id|. | 119 // Generates code to perform a lookup slot load via |function_id|. |
| 132 void DoLoadLookupSlot(Runtime::FunctionId function_id, | 120 void DoLdaLookupSlot(Runtime::FunctionId function_id, |
| 133 InterpreterAssembler* assembler); | 121 InterpreterAssembler* assembler); |
| 134 | 122 |
| 135 // Generates code to perform a lookup slot store depending on |language_mode|. | 123 // Generates code to perform a lookup slot store depending on |language_mode|. |
| 136 void DoStoreLookupSlot(LanguageMode language_mode, | 124 void DoStaLookupSlot(LanguageMode language_mode, |
| 137 InterpreterAssembler* assembler); | 125 InterpreterAssembler* assembler); |
| 126 |
| 127 // Generates a node with the undefined constant. |
| 128 compiler::Node* BuildLoadUndefined(InterpreterAssembler* assembler); |
| 129 |
| 130 // Generates code to load a context slot. |
| 131 compiler::Node* BuildLoadContextSlot(InterpreterAssembler* assembler); |
| 132 |
| 133 // Generates code to load a global. |
| 134 compiler::Node* BuildLoadGlobal(Callable ic, InterpreterAssembler* assembler); |
| 135 |
| 136 // Generates code to load a named property. |
| 137 compiler::Node* BuildLoadNamedProperty(Callable ic, |
| 138 InterpreterAssembler* assembler); |
| 139 |
| 140 // Generates code to load a keyed property. |
| 141 compiler::Node* BuildLoadKeyedProperty(Callable ic, |
| 142 InterpreterAssembler* assembler); |
| 138 | 143 |
| 139 // Generates code to perform logical-not on boolean |value| and returns the | 144 // Generates code to perform logical-not on boolean |value| and returns the |
| 140 // result. | 145 // result. |
| 141 compiler::Node* BuildLogicalNot(compiler::Node* value, | 146 compiler::Node* BuildLogicalNot(compiler::Node* value, |
| 142 InterpreterAssembler* assembler); | 147 InterpreterAssembler* assembler); |
| 143 | 148 |
| 144 // Generates code to convert |value| to a boolean and returns the | 149 // Generates code to convert |value| to a boolean and returns the |
| 145 // result. | 150 // result. |
| 146 compiler::Node* BuildToBoolean(compiler::Node* value, | 151 compiler::Node* BuildToBoolean(compiler::Node* value, |
| 147 InterpreterAssembler* assembler); | 152 InterpreterAssembler* assembler); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 163 v8::base::SmartArrayPointer<uintptr_t> bytecode_dispatch_counters_table_; | 168 v8::base::SmartArrayPointer<uintptr_t> bytecode_dispatch_counters_table_; |
| 164 | 169 |
| 165 DISALLOW_COPY_AND_ASSIGN(Interpreter); | 170 DISALLOW_COPY_AND_ASSIGN(Interpreter); |
| 166 }; | 171 }; |
| 167 | 172 |
| 168 } // namespace interpreter | 173 } // namespace interpreter |
| 169 } // namespace internal | 174 } // namespace internal |
| 170 } // namespace v8 | 175 } // namespace v8 |
| 171 | 176 |
| 172 #endif // V8_INTERPRETER_INTERPRETER_H_ | 177 #endif // V8_INTERPRETER_INTERPRETER_H_ |
| OLD | NEW |