| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 JSGraph* jsgraph_; | 70 JSGraph* jsgraph_; |
| 71 Zone compilation_zone_; | 71 Zone compilation_zone_; |
| 72 CompilationInfo info_; | 72 CompilationInfo info_; |
| 73 base::SmartPointer<CompilationJob> job_; | 73 base::SmartPointer<CompilationJob> job_; |
| 74 uint32_t index_; | 74 uint32_t index_; |
| 75 wasm::Result<wasm::Tree*> graph_construction_result_; | 75 wasm::Result<wasm::Tree*> graph_construction_result_; |
| 76 bool ok_; | 76 bool ok_; |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 // Wraps a JS function, producing a code object that can be called from WASM. | 79 // Wraps a JS function, producing a code object that can be called from WASM. |
| 80 Handle<Code> CompileWasmToJSWrapper(Isolate* isolate, wasm::ModuleEnv* module, | 80 Handle<Code> CompileWasmToJSWrapper(Isolate* isolate, |
| 81 Handle<JSFunction> function, | 81 Handle<JSFunction> function, |
| 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); |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 Node** buf = Buffer(new_count); | 341 Node** buf = Buffer(new_count); |
| 342 if (buf != buffer) memcpy(buf, buffer, old_count * sizeof(Node*)); | 342 if (buf != buffer) memcpy(buf, buffer, old_count * sizeof(Node*)); |
| 343 return buf; | 343 return buf; |
| 344 } | 344 } |
| 345 }; | 345 }; |
| 346 } // namespace compiler | 346 } // namespace compiler |
| 347 } // namespace internal | 347 } // namespace internal |
| 348 } // namespace v8 | 348 } // namespace v8 |
| 349 | 349 |
| 350 #endif // V8_COMPILER_WASM_COMPILER_H_ | 350 #endif // V8_COMPILER_WASM_COMPILER_H_ |
| OLD | NEW |