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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 wasm::FunctionSig* sig, | 82 wasm::FunctionSig* sig, |
83 wasm::WasmName module_name, | 83 wasm::WasmName module_name, |
84 wasm::WasmName function_name); | 84 wasm::WasmName function_name); |
85 | 85 |
86 // Wraps a given wasm code object, producing a JSFunction that can be called | 86 // Wraps a given wasm code object, producing a JSFunction that can be called |
87 // from JavaScript. | 87 // from JavaScript. |
88 Handle<JSFunction> CompileJSToWasmWrapper( | 88 Handle<JSFunction> CompileJSToWasmWrapper( |
89 Isolate* isolate, wasm::ModuleEnv* module, Handle<String> name, | 89 Isolate* isolate, wasm::ModuleEnv* module, Handle<String> name, |
90 Handle<Code> wasm_code, Handle<JSObject> module_object, uint32_t index); | 90 Handle<Code> wasm_code, Handle<JSObject> module_object, uint32_t index); |
91 | 91 |
| 92 // Link functions |
| 93 void Link(Isolate* isolate, std::vector<Handle<Code>>& functions); |
| 94 |
92 // Abstracts details of building TurboFan graph nodes for WASM to separate | 95 // Abstracts details of building TurboFan graph nodes for WASM to separate |
93 // the WASM decoder from the internal details of TurboFan. | 96 // the WASM decoder from the internal details of TurboFan. |
94 class WasmTrapHelper; | 97 class WasmTrapHelper; |
95 class WasmGraphBuilder { | 98 class WasmGraphBuilder { |
96 public: | 99 public: |
97 WasmGraphBuilder( | 100 WasmGraphBuilder( |
98 Zone* z, JSGraph* g, wasm::FunctionSig* function_signature, | 101 Zone* z, JSGraph* g, wasm::FunctionSig* function_signature, |
99 compiler::SourcePositionTable* source_position_table = nullptr); | 102 compiler::SourcePositionTable* source_position_table = nullptr); |
100 | 103 |
101 Node** Buffer(size_t count) { | 104 Node** Buffer(size_t count) { |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 Node** buf = Buffer(new_count); | 351 Node** buf = Buffer(new_count); |
349 if (buf != buffer) memcpy(buf, buffer, old_count * sizeof(Node*)); | 352 if (buf != buffer) memcpy(buf, buffer, old_count * sizeof(Node*)); |
350 return buf; | 353 return buf; |
351 } | 354 } |
352 }; | 355 }; |
353 } // namespace compiler | 356 } // namespace compiler |
354 } // namespace internal | 357 } // namespace internal |
355 } // namespace v8 | 358 } // namespace v8 |
356 | 359 |
357 #endif // V8_COMPILER_WASM_COMPILER_H_ | 360 #endif // V8_COMPILER_WASM_COMPILER_H_ |
OLD | NEW |