Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: src/wasm/wasm-module.h

Issue 2077623002: [wasm] memory size is an uint32_t, not a size_t. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixes Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | test/cctest/wasm/test-run-wasm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | test/cctest/wasm/test-run-wasm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698