 Chromium Code Reviews
 Chromium Code Reviews Issue 2664493002:
  [wasm][asm.js] Make asm.js->wasm return a regular object.  (Closed)
    
  
    Issue 2664493002:
  [wasm][asm.js] Make asm.js->wasm return a regular object.  (Closed) 
  | 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_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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 213 WasmModule() : WasmModule(nullptr) {} | 213 WasmModule() : WasmModule(nullptr) {} | 
| 214 WasmModule(Zone* owned_zone); | 214 WasmModule(Zone* owned_zone); | 
| 215 ~WasmModule() { | 215 ~WasmModule() { | 
| 216 if (owned_zone) delete owned_zone; | 216 if (owned_zone) delete owned_zone; | 
| 217 } | 217 } | 
| 218 | 218 | 
| 219 // Creates a new instantiation of the module in the given isolate. | 219 // Creates a new instantiation of the module in the given isolate. | 
| 220 static MaybeHandle<WasmInstanceObject> Instantiate( | 220 static MaybeHandle<WasmInstanceObject> Instantiate( | 
| 221 Isolate* isolate, ErrorThrower* thrower, | 221 Isolate* isolate, ErrorThrower* thrower, | 
| 222 Handle<WasmModuleObject> wasm_module, Handle<JSReceiver> ffi, | 222 Handle<WasmModuleObject> wasm_module, Handle<JSReceiver> ffi, | 
| 223 Handle<JSArrayBuffer> memory = Handle<JSArrayBuffer>::null()); | 223 Handle<JSArrayBuffer> memory = Handle<JSArrayBuffer>::null(), | 
| 224 Handle<JSObject> export_to = Handle<JSObject>::null()); | |
| 
titzer
2017/01/27 09:11:47
It's not really clear to me why the object to whic
 
bradnelson
2017/01/28 22:08:13
Thought about doing it that way, but figured this
 | |
| 224 | 225 | 
| 225 MaybeHandle<WasmCompiledModule> CompileFunctions( | 226 MaybeHandle<WasmCompiledModule> CompileFunctions( | 
| 226 Isolate* isolate, Handle<Managed<WasmModule>> module_wrapper, | 227 Isolate* isolate, Handle<Managed<WasmModule>> module_wrapper, | 
| 227 ErrorThrower* thrower, const ModuleWireBytes& wire_bytes, | 228 ErrorThrower* thrower, const ModuleWireBytes& wire_bytes, | 
| 228 Handle<Script> asm_js_script, | 229 Handle<Script> asm_js_script, | 
| 229 Vector<const byte> asm_js_offset_table_bytes) const; | 230 Vector<const byte> asm_js_offset_table_bytes) const; | 
| 230 }; | 231 }; | 
| 231 | 232 | 
| 232 typedef Managed<WasmModule> WasmModuleWrapper; | 233 typedef Managed<WasmModule> WasmModuleWrapper; | 
| 233 | 234 | 
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 470 void ValidateModuleState(Isolate* isolate, Handle<WasmModuleObject> module_obj); | 471 void ValidateModuleState(Isolate* isolate, Handle<WasmModuleObject> module_obj); | 
| 471 void ValidateOrphanedInstance(Isolate* isolate, | 472 void ValidateOrphanedInstance(Isolate* isolate, | 
| 472 Handle<WasmInstanceObject> instance); | 473 Handle<WasmInstanceObject> instance); | 
| 473 | 474 | 
| 474 } // namespace testing | 475 } // namespace testing | 
| 475 } // namespace wasm | 476 } // namespace wasm | 
| 476 } // namespace internal | 477 } // namespace internal | 
| 477 } // namespace v8 | 478 } // namespace v8 | 
| 478 | 479 | 
| 479 #endif // V8_WASM_MODULE_H_ | 480 #endif // V8_WASM_MODULE_H_ | 
| OLD | NEW |