| 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/debug.h" | 8 #include "src/debug/debug.h" |
| 9 #include "src/debug/interface-types.h" | 9 #include "src/debug/interface-types.h" |
| 10 #include "src/objects.h" | 10 #include "src/objects.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 // TODO(titzer): add the brand as an embedder field instead of a property. | 95 // TODO(titzer): add the brand as an embedder field instead of a property. |
| 96 enum Fields : uint8_t { | 96 enum Fields : uint8_t { |
| 97 kWrapperTracerHeader, | 97 kWrapperTracerHeader, |
| 98 kArrayBuffer, | 98 kArrayBuffer, |
| 99 kMaximum, | 99 kMaximum, |
| 100 kInstancesLink, | 100 kInstancesLink, |
| 101 kFieldCount | 101 kFieldCount |
| 102 }; | 102 }; |
| 103 | 103 |
| 104 DECLARE_CASTS(WasmMemoryObject); | 104 DECLARE_CASTS(WasmMemoryObject); |
| 105 DECLARE_ACCESSORS(buffer, JSArrayBuffer); | 105 DECLARE_OPTIONAL_ACCESSORS(buffer, JSArrayBuffer); |
| 106 DECLARE_OPTIONAL_ACCESSORS(instances_link, WasmInstanceWrapper); | 106 DECLARE_OPTIONAL_ACCESSORS(instances_link, WasmInstanceWrapper); |
| 107 | 107 |
| 108 void AddInstance(Isolate* isolate, Handle<WasmInstanceObject> object); | 108 void AddInstance(Isolate* isolate, Handle<WasmInstanceObject> object); |
| 109 void ResetInstancesLink(Isolate* isolate); | 109 void ResetInstancesLink(Isolate* isolate); |
| 110 uint32_t current_pages(); | 110 uint32_t current_pages(); |
| 111 bool has_maximum_pages(); | 111 bool has_maximum_pages(); |
| 112 int32_t maximum_pages(); // Returns < 0 if there is no maximum. | 112 int32_t maximum_pages(); // Returns < 0 if there is no maximum. |
| 113 | 113 |
| 114 static Handle<WasmMemoryObject> New(Isolate* isolate, | 114 static Handle<WasmMemoryObject> New(Isolate* isolate, |
| 115 Handle<JSArrayBuffer> buffer, | 115 Handle<JSArrayBuffer> buffer, |
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 660 }; | 660 }; |
| 661 }; | 661 }; |
| 662 | 662 |
| 663 #undef DECLARE_ACCESSORS | 663 #undef DECLARE_ACCESSORS |
| 664 #undef DECLARE_OPTIONAL_ACCESSORS | 664 #undef DECLARE_OPTIONAL_ACCESSORS |
| 665 | 665 |
| 666 } // namespace internal | 666 } // namespace internal |
| 667 } // namespace v8 | 667 } // namespace v8 |
| 668 | 668 |
| 669 #endif // V8_WASM_OBJECTS_H_ | 669 #endif // V8_WASM_OBJECTS_H_ |
| OLD | NEW |