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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 wasm::WasmName function_name); | 48 wasm::WasmName function_name); |
49 | 49 |
50 // Wraps a given wasm code object, producing a JSFunction that can be called | 50 // Wraps a given wasm code object, producing a JSFunction that can be called |
51 // from JavaScript. | 51 // from JavaScript. |
52 Handle<JSFunction> CompileJSToWasmWrapper( | 52 Handle<JSFunction> CompileJSToWasmWrapper( |
53 Isolate* isolate, wasm::ModuleEnv* module, Handle<String> name, | 53 Isolate* isolate, wasm::ModuleEnv* module, Handle<String> name, |
54 Handle<Code> wasm_code, Handle<JSObject> module_object, uint32_t index); | 54 Handle<Code> wasm_code, Handle<JSObject> module_object, uint32_t index); |
55 | 55 |
56 WasmCompilationUnit* CreateWasmCompilationUnit( | 56 WasmCompilationUnit* CreateWasmCompilationUnit( |
57 wasm::ErrorThrower* thrower, Isolate* isolate, wasm::ModuleEnv* module_env, | 57 wasm::ErrorThrower* thrower, Isolate* isolate, wasm::ModuleEnv* module_env, |
58 const wasm::WasmFunction* function); | 58 const wasm::WasmFunction* function, uint32_t index); |
59 | 59 |
60 void ExecuteCompilation(WasmCompilationUnit* unit); | 60 void ExecuteCompilation(WasmCompilationUnit* unit); |
61 | 61 |
62 int GetIndexOfWasmCompilationUnit(WasmCompilationUnit* unit); | 62 Handle<Code> FinishCompilation(WasmCompilationUnit* unit); |
63 | 63 |
64 Handle<Code> FinishCompilation(WasmCompilationUnit* unit); | 64 uint32_t GetIndexOfWasmCompilationUnit(WasmCompilationUnit* unit); |
65 | 65 |
66 // Abstracts details of building TurboFan graph nodes for WASM to separate | 66 // Abstracts details of building TurboFan graph nodes for WASM to separate |
67 // the WASM decoder from the internal details of TurboFan. | 67 // the WASM decoder from the internal details of TurboFan. |
68 class WasmTrapHelper; | 68 class WasmTrapHelper; |
69 class WasmGraphBuilder { | 69 class WasmGraphBuilder { |
70 public: | 70 public: |
71 WasmGraphBuilder( | 71 WasmGraphBuilder( |
72 Zone* z, JSGraph* g, wasm::FunctionSig* function_signature, | 72 Zone* z, JSGraph* g, wasm::FunctionSig* function_signature, |
73 compiler::SourcePositionTable* source_position_table = nullptr); | 73 compiler::SourcePositionTable* source_position_table = nullptr); |
74 | 74 |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 Node** buf = Buffer(new_count); | 295 Node** buf = Buffer(new_count); |
296 if (buf != buffer) memcpy(buf, buffer, old_count * sizeof(Node*)); | 296 if (buf != buffer) memcpy(buf, buffer, old_count * sizeof(Node*)); |
297 return buf; | 297 return buf; |
298 } | 298 } |
299 }; | 299 }; |
300 } // namespace compiler | 300 } // namespace compiler |
301 } // namespace internal | 301 } // namespace internal |
302 } // namespace v8 | 302 } // namespace v8 |
303 | 303 |
304 #endif // V8_COMPILER_WASM_COMPILER_H_ | 304 #endif // V8_COMPILER_WASM_COMPILER_H_ |
OLD | NEW |