| 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 21 matching lines...) Expand all Loading... |
| 32 DECLARE_GETTER(name, type) | 32 DECLARE_GETTER(name, type) |
| 33 | 33 |
| 34 #define DECLARE_OPTIONAL_ACCESSORS(name, type) \ | 34 #define DECLARE_OPTIONAL_ACCESSORS(name, type) \ |
| 35 bool has_##name(); \ | 35 bool has_##name(); \ |
| 36 DECLARE_ACCESSORS(name, type) | 36 DECLARE_ACCESSORS(name, type) |
| 37 | 37 |
| 38 // Representation of a WebAssembly.Module JavaScript-level object. | 38 // Representation of a WebAssembly.Module JavaScript-level object. |
| 39 class WasmModuleObject : public JSObject { | 39 class WasmModuleObject : public JSObject { |
| 40 public: | 40 public: |
| 41 // TODO(titzer): add the brand as an internal field instead of a property. | 41 // TODO(titzer): add the brand as an internal field instead of a property. |
| 42 enum Fields { kCompiledModule, kFieldCount }; | 42 enum Fields { kCompiledModule, kAsmForeignInit, kFieldCount }; |
| 43 | 43 |
| 44 DECLARE_CASTS(WasmModuleObject); | 44 DECLARE_CASTS(WasmModuleObject); |
| 45 | 45 |
| 46 WasmCompiledModule* compiled_module(); | 46 WasmCompiledModule* compiled_module(); |
| 47 | 47 |
| 48 static Handle<WasmModuleObject> New( | 48 static Handle<WasmModuleObject> New( |
| 49 Isolate* isolate, Handle<WasmCompiledModule> compiled_module); | 49 Isolate* isolate, Handle<WasmCompiledModule> compiled_module); |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 // Representation of a WebAssembly.Table JavaScript-level object. | 52 // Representation of a WebAssembly.Table JavaScript-level object. |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 }; | 454 }; |
| 455 }; | 455 }; |
| 456 | 456 |
| 457 #undef DECLARE_ACCESSORS | 457 #undef DECLARE_ACCESSORS |
| 458 #undef DECLARE_OPTIONAL_ACCESSORS | 458 #undef DECLARE_OPTIONAL_ACCESSORS |
| 459 | 459 |
| 460 } // namespace internal | 460 } // namespace internal |
| 461 } // namespace v8 | 461 } // namespace v8 |
| 462 | 462 |
| 463 #endif // V8_WASM_OBJECTS_H_ | 463 #endif // V8_WASM_OBJECTS_H_ |
| OLD | NEW |