| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 enum Fields { | 66 enum Fields { |
| 67 kWrapperTracerHeader, | 67 kWrapperTracerHeader, |
| 68 kFunctions, | 68 kFunctions, |
| 69 kMaximum, | 69 kMaximum, |
| 70 kDispatchTables, | 70 kDispatchTables, |
| 71 kFieldCount | 71 kFieldCount |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 DECLARE_CASTS(WasmTableObject); | 74 DECLARE_CASTS(WasmTableObject); |
| 75 DECLARE_ACCESSORS(functions, FixedArray); | 75 DECLARE_ACCESSORS(functions, FixedArray); |
| 76 DECLARE_GETTER(dispatch_tables, FixedArray); |
| 76 | 77 |
| 77 FixedArray* dispatch_tables(); | |
| 78 uint32_t current_length(); | 78 uint32_t current_length(); |
| 79 bool has_maximum_length(); | 79 bool has_maximum_length(); |
| 80 int64_t maximum_length(); // Returns < 0 if no maximum. | 80 int64_t maximum_length(); // Returns < 0 if no maximum. |
| 81 void grow(Isolate* isolate, uint32_t count); |
| 81 | 82 |
| 82 static Handle<WasmTableObject> New(Isolate* isolate, uint32_t initial, | 83 static Handle<WasmTableObject> New(Isolate* isolate, uint32_t initial, |
| 83 int64_t maximum, | 84 int64_t maximum, |
| 84 Handle<FixedArray>* js_functions); | 85 Handle<FixedArray>* js_functions); |
| 85 static void Grow(Isolate* isolate, Handle<WasmTableObject> table, | |
| 86 uint32_t count); | |
| 87 static Handle<FixedArray> AddDispatchTable( | 86 static Handle<FixedArray> AddDispatchTable( |
| 88 Isolate* isolate, Handle<WasmTableObject> table, | 87 Isolate* isolate, Handle<WasmTableObject> table, |
| 89 Handle<WasmInstanceObject> instance, int table_index, | 88 Handle<WasmInstanceObject> instance, int table_index, |
| 90 Handle<FixedArray> function_table, Handle<FixedArray> signature_table); | 89 Handle<FixedArray> function_table, Handle<FixedArray> signature_table); |
| 91 }; | 90 }; |
| 92 | 91 |
| 93 // Representation of a WebAssembly.Memory JavaScript-level object. | 92 // Representation of a WebAssembly.Memory JavaScript-level object. |
| 94 class WasmMemoryObject : public JSObject { | 93 class WasmMemoryObject : public JSObject { |
| 95 public: | 94 public: |
| 96 // The 0-th field is used by the Blink Wrapper Tracer. | 95 // The 0-th field is used by the Blink Wrapper Tracer. |
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 672 #undef DECLARE_CASTS | 671 #undef DECLARE_CASTS |
| 673 #undef DECLARE_GETTER | 672 #undef DECLARE_GETTER |
| 674 #undef DECLARE_ACCESSORS | 673 #undef DECLARE_ACCESSORS |
| 675 #undef DECLARE_OPTIONAL_ACCESSORS | 674 #undef DECLARE_OPTIONAL_ACCESSORS |
| 676 #undef DECLARE_OPTIONAL_GETTER | 675 #undef DECLARE_OPTIONAL_GETTER |
| 677 | 676 |
| 678 } // namespace internal | 677 } // namespace internal |
| 679 } // namespace v8 | 678 } // namespace v8 |
| 680 | 679 |
| 681 #endif // V8_WASM_OBJECTS_H_ | 680 #endif // V8_WASM_OBJECTS_H_ |
| OLD | NEW |