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_COMPILER_WASM_COMPILER_H_ | 5 #ifndef V8_COMPILER_WASM_COMPILER_H_ |
6 #define V8_COMPILER_WASM_COMPILER_H_ | 6 #define V8_COMPILER_WASM_COMPILER_H_ |
7 | 7 |
8 // Clients of this interface shouldn't depend on lots of compiler internals. | 8 // Clients of this interface shouldn't depend on lots of compiler internals. |
9 // Do not include anything from src/compiler here! | 9 // Do not include anything from src/compiler here! |
10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 //----------------------------------------------------------------------- | 111 //----------------------------------------------------------------------- |
112 Node* Error(); | 112 Node* Error(); |
113 Node* Start(unsigned params); | 113 Node* Start(unsigned params); |
114 Node* Param(unsigned index, wasm::LocalType type); | 114 Node* Param(unsigned index, wasm::LocalType type); |
115 Node* Loop(Node* entry); | 115 Node* Loop(Node* entry); |
116 Node* Terminate(Node* effect, Node* control); | 116 Node* Terminate(Node* effect, Node* control); |
117 Node* Merge(unsigned count, Node** controls); | 117 Node* Merge(unsigned count, Node** controls); |
118 Node* Phi(wasm::LocalType type, unsigned count, Node** vals, Node* control); | 118 Node* Phi(wasm::LocalType type, unsigned count, Node** vals, Node* control); |
119 Node* EffectPhi(unsigned count, Node** effects, Node* control); | 119 Node* EffectPhi(unsigned count, Node** effects, Node* control); |
120 Node* NumberConstant(int32_t value); | 120 Node* NumberConstant(int32_t value); |
| 121 Node* Uint32Constant(uint32_t value); |
121 Node* Int32Constant(int32_t value); | 122 Node* Int32Constant(int32_t value); |
122 Node* Int64Constant(int64_t value); | 123 Node* Int64Constant(int64_t value); |
123 Node* Float32Constant(float value); | 124 Node* Float32Constant(float value); |
124 Node* Float64Constant(double value); | 125 Node* Float64Constant(double value); |
125 Node* HeapConstant(Handle<HeapObject> value); | 126 Node* HeapConstant(Handle<HeapObject> value); |
126 Node* Binop(wasm::WasmOpcode opcode, Node* left, Node* right, | 127 Node* Binop(wasm::WasmOpcode opcode, Node* left, Node* right, |
127 wasm::WasmCodePosition position = wasm::kNoCodePosition); | 128 wasm::WasmCodePosition position = wasm::kNoCodePosition); |
128 Node* Unop(wasm::WasmOpcode opcode, Node* input, | 129 Node* Unop(wasm::WasmOpcode opcode, Node* input, |
129 wasm::WasmCodePosition position = wasm::kNoCodePosition); | 130 wasm::WasmCodePosition position = wasm::kNoCodePosition); |
130 unsigned InputCount(Node* node); | 131 unsigned InputCount(Node* node); |
(...skipping 11 matching lines...) Expand all Loading... |
142 Node* Return(unsigned count, Node** vals); | 143 Node* Return(unsigned count, Node** vals); |
143 Node* ReturnVoid(); | 144 Node* ReturnVoid(); |
144 Node* Unreachable(wasm::WasmCodePosition position); | 145 Node* Unreachable(wasm::WasmCodePosition position); |
145 | 146 |
146 Node* CallDirect(uint32_t index, Node** args, | 147 Node* CallDirect(uint32_t index, Node** args, |
147 wasm::WasmCodePosition position); | 148 wasm::WasmCodePosition position); |
148 Node* CallImport(uint32_t index, Node** args, | 149 Node* CallImport(uint32_t index, Node** args, |
149 wasm::WasmCodePosition position); | 150 wasm::WasmCodePosition position); |
150 Node* CallIndirect(uint32_t index, Node** args, | 151 Node* CallIndirect(uint32_t index, Node** args, |
151 wasm::WasmCodePosition position); | 152 wasm::WasmCodePosition position); |
| 153 Node* JITSingleFunction(Node* base, Node* length, Node* index, |
| 154 uint32_t sig_index, wasm::FunctionSig* sig, |
| 155 wasm::WasmCodePosition position); |
152 void BuildJSToWasmWrapper(Handle<Code> wasm_code, wasm::FunctionSig* sig); | 156 void BuildJSToWasmWrapper(Handle<Code> wasm_code, wasm::FunctionSig* sig); |
153 void BuildWasmToJSWrapper(Handle<JSFunction> function, | 157 void BuildWasmToJSWrapper(Handle<JSFunction> function, |
154 wasm::FunctionSig* sig); | 158 wasm::FunctionSig* sig); |
155 | 159 |
156 Node* ToJS(Node* node, Node* context, wasm::LocalType type); | 160 Node* ToJS(Node* node, Node* context, wasm::LocalType type); |
157 Node* FromJS(Node* node, Node* context, wasm::LocalType type); | 161 Node* FromJS(Node* node, Node* context, wasm::LocalType type); |
158 Node* Invert(Node* node); | 162 Node* Invert(Node* node); |
159 Node* FunctionTable(); | 163 Node* FunctionTable(); |
160 | 164 |
161 //----------------------------------------------------------------------- | 165 //----------------------------------------------------------------------- |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 Node** buf = Buffer(new_count); | 347 Node** buf = Buffer(new_count); |
344 if (buf != buffer) memcpy(buf, buffer, old_count * sizeof(Node*)); | 348 if (buf != buffer) memcpy(buf, buffer, old_count * sizeof(Node*)); |
345 return buf; | 349 return buf; |
346 } | 350 } |
347 }; | 351 }; |
348 } // namespace compiler | 352 } // namespace compiler |
349 } // namespace internal | 353 } // namespace internal |
350 } // namespace v8 | 354 } // namespace v8 |
351 | 355 |
352 #endif // V8_COMPILER_WASM_COMPILER_H_ | 356 #endif // V8_COMPILER_WASM_COMPILER_H_ |
OLD | NEW |