OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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_OBJECTS_H_ | 5 #ifndef V8_WASM_OBJECTS_H_ |
6 #define V8_WASM_OBJECTS_H_ | 6 #define V8_WASM_OBJECTS_H_ |
7 | 7 |
8 #include "src/debug/interface-types.h" | 8 #include "src/debug/interface-types.h" |
9 #include "src/objects-inl.h" | 9 #include "src/objects-inl.h" |
10 #include "src/trap-handler/trap-handler.h" | 10 #include "src/trap-handler/trap-handler.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 | 36 |
37 // Representation of a WebAssembly.Module JavaScript-level object. | 37 // Representation of a WebAssembly.Module JavaScript-level object. |
38 class WasmModuleObject : public JSObject { | 38 class WasmModuleObject : public JSObject { |
39 public: | 39 public: |
40 // TODO(titzer): add the brand as an internal field instead of a property. | 40 // TODO(titzer): add the brand as an internal field instead of a property. |
41 enum Fields { kCompiledModule, kFieldCount }; | 41 enum Fields { kCompiledModule, kFieldCount }; |
42 | 42 |
43 DECLARE_CASTS(WasmModuleObject); | 43 DECLARE_CASTS(WasmModuleObject); |
44 | 44 |
45 WasmCompiledModule* get_compiled_module(); | 45 WasmCompiledModule* get_compiled_module(); |
46 wasm::WasmModule* module(); | |
47 int num_functions(); | |
48 bool is_asm_js(); | |
49 int GetAsmWasmSourcePosition(int func_index, int byte_offset); | |
50 WasmDebugInfo* debug_info(); | |
51 void set_debug_info(WasmDebugInfo* debug_info); | |
52 MaybeHandle<String> GetFunctionName(Isolate* isolate, int func_index); | |
53 | 46 |
54 static Handle<WasmModuleObject> New( | 47 static Handle<WasmModuleObject> New( |
55 Isolate* isolate, Handle<WasmCompiledModule> compiled_module); | 48 Isolate* isolate, Handle<WasmCompiledModule> compiled_module); |
56 }; | 49 }; |
57 | 50 |
58 // Representation of a WebAssembly.Table JavaScript-level object. | 51 // Representation of a WebAssembly.Table JavaScript-level object. |
59 class WasmTableObject : public JSObject { | 52 class WasmTableObject : public JSObject { |
60 public: | 53 public: |
61 // TODO(titzer): add the brand as an internal field instead of a property. | 54 // TODO(titzer): add the brand as an internal field instead of a property. |
62 enum Fields { kFunctions, kMaximum, kDispatchTables, kFieldCount }; | 55 enum Fields { kFunctions, kMaximum, kDispatchTables, kFieldCount }; |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 }; | 373 }; |
381 }; | 374 }; |
382 | 375 |
383 #undef DECLARE_ACCESSORS | 376 #undef DECLARE_ACCESSORS |
384 #undef DECLARE_OPTIONAL_ACCESSORS | 377 #undef DECLARE_OPTIONAL_ACCESSORS |
385 | 378 |
386 } // namespace internal | 379 } // namespace internal |
387 } // namespace v8 | 380 } // namespace v8 |
388 | 381 |
389 #endif // V8_WASM_OBJECTS_H_ | 382 #endif // V8_WASM_OBJECTS_H_ |
OLD | NEW |