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

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

Issue 2493773003: [inspector] Introduce translation of wasm frames (Closed)
Patch Set: Address comments Created 4 years, 1 month 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 <memory> 8 #include <memory>
9 9
10 #include "src/api.h" 10 #include "src/api.h"
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 WasmCompiledModule* GetCompiledModule(Object* wasm_instance); 388 WasmCompiledModule* GetCompiledModule(Object* wasm_instance);
389 389
390 // Check whether the wasm module was generated from asm.js code. 390 // Check whether the wasm module was generated from asm.js code.
391 bool WasmIsAsmJs(Object* instance, Isolate* isolate); 391 bool WasmIsAsmJs(Object* instance, Isolate* isolate);
392 392
393 // Get the script of the wasm module. If the origin of the module is asm.js, the 393 // Get the script of the wasm module. If the origin of the module is asm.js, the
394 // returned Script will be a JavaScript Script of Script::TYPE_NORMAL, otherwise 394 // returned Script will be a JavaScript Script of Script::TYPE_NORMAL, otherwise
395 // it's of type TYPE_WASM. 395 // it's of type TYPE_WASM.
396 Handle<Script> GetScript(Handle<JSObject> instance); 396 Handle<Script> GetScript(Handle<JSObject> instance);
397 397
398 // Compute the disassembly of a wasm function.
399 // Returns the disassembly string, and a table mapping byte offsets to line and
400 // column in the disassembly.
titzer 2016/11/16 14:23:59 Format isn't totally clear from the comment. Mayb
Clemens Hammacher 2016/11/16 15:21:19 Done.
401 std::pair<std::string, std::vector<std::tuple<uint32_t, int, int>>>
402 DisassembleFunction(Handle<WasmCompiledModule> compiled_module, int func_index);
403
398 // Get the asm.js source position for the given byte offset in the given 404 // Get the asm.js source position for the given byte offset in the given
399 // function. 405 // function.
400 int GetAsmWasmSourcePosition(Handle<JSObject> instance, int func_index, 406 int GetAsmWasmSourcePosition(Handle<JSObject> instance, int func_index,
401 int byte_offset); 407 int byte_offset);
402 408
403 V8_EXPORT_PRIVATE MaybeHandle<WasmModuleObject> CreateModuleObjectFromBytes( 409 V8_EXPORT_PRIVATE MaybeHandle<WasmModuleObject> CreateModuleObjectFromBytes(
404 Isolate* isolate, const byte* start, const byte* end, ErrorThrower* thrower, 410 Isolate* isolate, const byte* start, const byte* end, ErrorThrower* thrower,
405 ModuleOrigin origin, Handle<Script> asm_js_script, 411 ModuleOrigin origin, Handle<Script> asm_js_script,
406 const byte* asm_offset_tables_start, const byte* asm_offset_tables_end); 412 const byte* asm_offset_tables_start, const byte* asm_offset_tables_end);
407 413
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 int instance_count); 447 int instance_count);
442 void ValidateModuleState(Isolate* isolate, Handle<JSObject> wasm_module); 448 void ValidateModuleState(Isolate* isolate, Handle<JSObject> wasm_module);
443 void ValidateOrphanedInstance(Isolate* isolate, Handle<JSObject> instance); 449 void ValidateOrphanedInstance(Isolate* isolate, Handle<JSObject> instance);
444 450
445 } // namespace testing 451 } // namespace testing
446 } // namespace wasm 452 } // namespace wasm
447 } // namespace internal 453 } // namespace internal
448 } // namespace v8 454 } // namespace v8
449 455
450 #endif // V8_WASM_MODULE_H_ 456 #endif // V8_WASM_MODULE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698