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

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

Issue 2055783002: [wasm] Add functionality to decode a function offset table (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@print-ast-to-ostream
Patch Set: fix nit 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/wasm/module-decoder.cc ('k') | src/wasm/wasm-result.h » ('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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 WasmFunctionName(const WasmFunction* function, const ModuleEnv* menv) 300 WasmFunctionName(const WasmFunction* function, const ModuleEnv* menv)
301 : function_(function), module_(menv ? menv->module : nullptr) {} 301 : function_(function), module_(menv ? menv->module : nullptr) {}
302 }; 302 };
303 303
304 std::ostream& operator<<(std::ostream& os, const WasmModule& module); 304 std::ostream& operator<<(std::ostream& os, const WasmModule& module);
305 std::ostream& operator<<(std::ostream& os, const WasmFunction& function); 305 std::ostream& operator<<(std::ostream& os, const WasmFunction& function);
306 std::ostream& operator<<(std::ostream& os, const WasmFunctionName& name); 306 std::ostream& operator<<(std::ostream& os, const WasmFunctionName& name);
307 307
308 typedef Result<const WasmModule*> ModuleResult; 308 typedef Result<const WasmModule*> ModuleResult;
309 typedef Result<WasmFunction*> FunctionResult; 309 typedef Result<WasmFunction*> FunctionResult;
310 typedef std::vector<std::pair<int, int>> FunctionOffsets;
311 typedef Result<FunctionOffsets> FunctionOffsetsResult;
310 312
311 // For testing. Decode, verify, and run the last exported function in the 313 // For testing. Decode, verify, and run the last exported function in the
312 // given encoded module. 314 // given encoded module.
313 int32_t CompileAndRunWasmModule(Isolate* isolate, const byte* module_start, 315 int32_t CompileAndRunWasmModule(Isolate* isolate, const byte* module_start,
314 const byte* module_end, bool asm_js = false); 316 const byte* module_end, bool asm_js = false);
315 317
316 // For testing. Decode, verify, and run the last exported function in the 318 // For testing. Decode, verify, and run the last exported function in the
317 // given decoded module. 319 // given decoded module.
318 int32_t CompileAndRunWasmModule(Isolate* isolate, const WasmModule* module); 320 int32_t CompileAndRunWasmModule(Isolate* isolate, const WasmModule* module);
319 321
(...skipping 14 matching lines...) Expand all
334 // 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
335 // special marker as internal field, which will definitely never occur anywhere 337 // special marker as internal field, which will definitely never occur anywhere
336 // else. 338 // else.
337 bool IsWasmObject(Handle<JSObject> object); 339 bool IsWasmObject(Handle<JSObject> object);
338 340
339 } // namespace wasm 341 } // namespace wasm
340 } // namespace internal 342 } // namespace internal
341 } // namespace v8 343 } // namespace v8
342 344
343 #endif // V8_WASM_MODULE_H_ 345 #endif // V8_WASM_MODULE_H_
OLDNEW
« no previous file with comments | « src/wasm/module-decoder.cc ('k') | src/wasm/wasm-result.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698