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/wasm/wasm-opcodes.h" | 10 #include "src/wasm/wasm-opcodes.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 namespace compiler { | 34 namespace compiler { |
35 // Compiles a single function, producing a code object. | 35 // Compiles a single function, producing a code object. |
36 Handle<Code> CompileWasmFunction(wasm::ErrorThrower& thrower, Isolate* isolate, | 36 Handle<Code> CompileWasmFunction(wasm::ErrorThrower& thrower, Isolate* isolate, |
37 wasm::ModuleEnv* module_env, | 37 wasm::ModuleEnv* module_env, |
38 const wasm::WasmFunction& function); | 38 const wasm::WasmFunction& function); |
39 | 39 |
40 // Wraps a JS function, producing a code object that can be called from WASM. | 40 // Wraps a JS function, producing a code object that can be called from WASM. |
41 Handle<Code> CompileWasmToJSWrapper(Isolate* isolate, wasm::ModuleEnv* module, | 41 Handle<Code> CompileWasmToJSWrapper(Isolate* isolate, wasm::ModuleEnv* module, |
42 Handle<JSFunction> function, | 42 Handle<JSFunction> function, |
43 wasm::FunctionSig* sig, | 43 wasm::FunctionSig* sig, |
44 const char* module_name, | 44 wasm::WasmName module_name, |
45 const char* function_name); | 45 wasm::WasmName function_name); |
46 | 46 |
47 // Wraps a given wasm code object, producing a JSFunction that can be called | 47 // Wraps a given wasm code object, producing a JSFunction that can be called |
48 // from JavaScript. | 48 // from JavaScript. |
49 Handle<JSFunction> CompileJSToWasmWrapper( | 49 Handle<JSFunction> CompileJSToWasmWrapper( |
50 Isolate* isolate, wasm::ModuleEnv* module, Handle<String> name, | 50 Isolate* isolate, wasm::ModuleEnv* module, Handle<String> name, |
51 Handle<Code> wasm_code, Handle<JSObject> module_object, uint32_t index); | 51 Handle<Code> wasm_code, Handle<JSObject> module_object, uint32_t index); |
52 | 52 |
53 // Abstracts details of building TurboFan graph nodes for WASM to separate | 53 // Abstracts details of building TurboFan graph nodes for WASM to separate |
54 // the WASM decoder from the internal details of TurboFan. | 54 // the WASM decoder from the internal details of TurboFan. |
55 class WasmTrapHelper; | 55 class WasmTrapHelper; |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 Node** buf = Buffer(count); | 220 Node** buf = Buffer(count); |
221 if (buf != buffer) memcpy(buf, buffer, count * sizeof(Node*)); | 221 if (buf != buffer) memcpy(buf, buffer, count * sizeof(Node*)); |
222 return buf; | 222 return buf; |
223 } | 223 } |
224 }; | 224 }; |
225 } // namespace compiler | 225 } // namespace compiler |
226 } // namespace internal | 226 } // namespace internal |
227 } // namespace v8 | 227 } // namespace v8 |
228 | 228 |
229 #endif // V8_COMPILER_WASM_COMPILER_H_ | 229 #endif // V8_COMPILER_WASM_COMPILER_H_ |
OLD | NEW |