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 "src/api.h" | 8 #include "src/api.h" |
9 #include "src/handles.h" | 9 #include "src/handles.h" |
10 #include "src/wasm/wasm-opcodes.h" | 10 #include "src/wasm/wasm-opcodes.h" |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 // -- Heap allocated -------------------------------------------------------- | 218 // -- Heap allocated -------------------------------------------------------- |
219 Handle<JSObject> js_object; // JavaScript module object. | 219 Handle<JSObject> js_object; // JavaScript module object. |
220 Handle<Context> context; // JavaScript native context. | 220 Handle<Context> context; // JavaScript native context. |
221 Handle<JSArrayBuffer> mem_buffer; // Handle to array buffer of memory. | 221 Handle<JSArrayBuffer> mem_buffer; // Handle to array buffer of memory. |
222 Handle<JSArrayBuffer> globals_buffer; // Handle to array buffer of globals. | 222 Handle<JSArrayBuffer> globals_buffer; // Handle to array buffer of globals. |
223 Handle<FixedArray> function_table; // indirect function table. | 223 Handle<FixedArray> function_table; // indirect function table. |
224 std::vector<Handle<Code>> function_code; // code objects for each function. | 224 std::vector<Handle<Code>> function_code; // code objects for each function. |
225 std::vector<Handle<Code>> import_code; // code objects for each import. | 225 std::vector<Handle<Code>> import_code; // code objects for each import. |
226 // -- raw memory ------------------------------------------------------------ | 226 // -- raw memory ------------------------------------------------------------ |
227 byte* mem_start; // start of linear memory. | 227 byte* mem_start; // start of linear memory. |
228 size_t mem_size; // size of the linear memory. | 228 uint32_t mem_size; // size of the linear memory. |
229 // -- raw globals ----------------------------------------------------------- | 229 // -- raw globals ----------------------------------------------------------- |
230 byte* globals_start; // start of the globals area. | 230 byte* globals_start; // start of the globals area. |
231 | 231 |
232 explicit WasmModuleInstance(const WasmModule* m) | 232 explicit WasmModuleInstance(const WasmModule* m) |
233 : module(m), | 233 : module(m), |
234 function_code(m->functions.size()), | 234 function_code(m->functions.size()), |
235 mem_start(nullptr), | 235 mem_start(nullptr), |
236 mem_size(0), | 236 mem_size(0), |
237 globals_start(nullptr) {} | 237 globals_start(nullptr) {} |
238 }; | 238 }; |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 // secure. If it turns out that we need more complete checks, we could add a | 336 // secure. If it turns out that we need more complete checks, we could add a |
337 // special marker as internal field, which will definitely never occur anywhere | 337 // special marker as internal field, which will definitely never occur anywhere |
338 // else. | 338 // else. |
339 bool IsWasmObject(Handle<JSObject> object); | 339 bool IsWasmObject(Handle<JSObject> object); |
340 | 340 |
341 } // namespace wasm | 341 } // namespace wasm |
342 } // namespace internal | 342 } // namespace internal |
343 } // namespace v8 | 343 } // namespace v8 |
344 | 344 |
345 #endif // V8_WASM_MODULE_H_ | 345 #endif // V8_WASM_MODULE_H_ |
OLD | NEW |