Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(761)

Side by Side Diff: src/wasm/wasm-module.h

Issue 2629523007: [wasm] JS-API: enable WebAssembly.instantiate tests; fix LinkError (Closed)
Patch Set: initialize module_ upfront Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_WASM_MODULE_H_ 5 #ifndef V8_WASM_MODULE_H_
6 #define V8_WASM_MODULE_H_ 6 #define V8_WASM_MODULE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "src/api.h" 10 #include "src/api.h"
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 std::unique_ptr<base::Semaphore> pending_tasks; 209 std::unique_ptr<base::Semaphore> pending_tasks;
210 210
211 WasmModule() : WasmModule(nullptr) {} 211 WasmModule() : WasmModule(nullptr) {}
212 WasmModule(Zone* owned_zone); 212 WasmModule(Zone* owned_zone);
213 ~WasmModule() { 213 ~WasmModule() {
214 if (owned_zone) delete owned_zone; 214 if (owned_zone) delete owned_zone;
215 } 215 }
216 216
217 // Creates a new instantiation of the module in the given isolate. 217 // Creates a new instantiation of the module in the given isolate.
218 static MaybeHandle<WasmInstanceObject> Instantiate( 218 static MaybeHandle<WasmInstanceObject> Instantiate(
219 Isolate* isolate, ErrorThrower* thrower, Handle<JSObject> wasm_module, 219 Isolate* isolate, ErrorThrower* thrower,
220 Handle<JSReceiver> ffi, Handle<JSArrayBuffer> memory); 220 Handle<WasmModuleObject> wasm_module, Handle<JSReceiver> ffi,
221 Handle<JSArrayBuffer> memory);
221 222
222 MaybeHandle<WasmCompiledModule> CompileFunctions( 223 MaybeHandle<WasmCompiledModule> CompileFunctions(
223 Isolate* isolate, Handle<Managed<WasmModule>> module_wrapper, 224 Isolate* isolate, Handle<Managed<WasmModule>> module_wrapper,
224 ErrorThrower* thrower, const ModuleWireBytes& wire_bytes, 225 ErrorThrower* thrower, const ModuleWireBytes& wire_bytes,
225 Handle<Script> asm_js_script, 226 Handle<Script> asm_js_script,
226 Vector<const byte> asm_js_offset_table_bytes) const; 227 Vector<const byte> asm_js_offset_table_bytes) const;
227 }; 228 };
228 229
229 typedef Managed<WasmModule> WasmModuleWrapper; 230 typedef Managed<WasmModule> WasmModuleWrapper;
230 231
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 void ValidateModuleState(Isolate* isolate, Handle<WasmModuleObject> module_obj); 448 void ValidateModuleState(Isolate* isolate, Handle<WasmModuleObject> module_obj);
448 void ValidateOrphanedInstance(Isolate* isolate, 449 void ValidateOrphanedInstance(Isolate* isolate,
449 Handle<WasmInstanceObject> instance); 450 Handle<WasmInstanceObject> instance);
450 451
451 } // namespace testing 452 } // namespace testing
452 } // namespace wasm 453 } // namespace wasm
453 } // namespace internal 454 } // namespace internal
454 } // namespace v8 455 } // namespace v8
455 456
456 #endif // V8_WASM_MODULE_H_ 457 #endif // V8_WASM_MODULE_H_
OLDNEW
« no previous file with comments | « src/wasm/wasm-js.cc ('k') | src/wasm/wasm-module.cc » ('j') | test/mjsunit/wasm/js-api.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698