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

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

Issue 2008043006: [wasm] separate snapshot-able stages (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@refactoring
Patch Set: 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
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/wasm/wasm-opcodes.h" 8 #include "src/wasm/wasm-opcodes.h"
9 #include "src/wasm/wasm-result.h" 9 #include "src/wasm/wasm-result.h"
10 10
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 Handle<FixedArray> function_table; // indirect function table. 224 Handle<FixedArray> function_table; // indirect function table.
225 std::vector<Handle<Code>> function_code; // code objects for each function. 225 std::vector<Handle<Code>> function_code; // code objects for each function.
226 std::vector<Handle<Code>> import_code; // code objects for each import. 226 std::vector<Handle<Code>> import_code; // code objects for each import.
227 // -- raw memory ------------------------------------------------------------ 227 // -- raw memory ------------------------------------------------------------
228 byte* mem_start; // start of linear memory. 228 byte* mem_start; // start of linear memory.
229 size_t mem_size; // size of the linear memory. 229 size_t mem_size; // size of the linear memory.
230 // -- raw globals ----------------------------------------------------------- 230 // -- raw globals -----------------------------------------------------------
231 byte* globals_start; // start of the globals area. 231 byte* globals_start; // start of the globals area.
232 232
233 explicit WasmModuleInstance(const WasmModule* m) 233 explicit WasmModuleInstance(const WasmModule* m)
234 : module(m), mem_start(nullptr), mem_size(0), globals_start(nullptr) {} 234 : module(m),
235 function_code(m->functions.size()),
236 mem_start(nullptr),
237 mem_size(0),
238 globals_start(nullptr) {}
235 }; 239 };
236 240
237 // forward declaration. 241 // forward declaration.
238 class WasmLinker; 242 class WasmLinker;
239 243
240 // Interface provided to the decoder/graph builder which contains only 244 // Interface provided to the decoder/graph builder which contains only
241 // minimal information about the globals, functions, and function tables. 245 // minimal information about the globals, functions, and function tables.
242 struct ModuleEnv { 246 struct ModuleEnv {
243 const WasmModule* module; 247 const WasmModule* module;
244 WasmModuleInstance* instance; 248 WasmModuleInstance* instance;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 // Returns a null handle if the function is unnamed or the name is not a valid 322 // Returns a null handle if the function is unnamed or the name is not a valid
319 // UTF-8 string. 323 // UTF-8 string.
320 MaybeHandle<String> GetWasmFunctionName(Handle<JSObject> wasm, 324 MaybeHandle<String> GetWasmFunctionName(Handle<JSObject> wasm,
321 uint32_t func_index); 325 uint32_t func_index);
322 326
323 } // namespace wasm 327 } // namespace wasm
324 } // namespace internal 328 } // namespace internal
325 } // namespace v8 329 } // namespace v8
326 330
327 #endif // V8_WASM_MODULE_H_ 331 #endif // V8_WASM_MODULE_H_
OLDNEW
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | src/wasm/wasm-module.cc » ('j') | src/wasm/wasm-module.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698