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

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

Issue 2493773003: [inspector] Introduce translation of wasm frames (Closed)
Patch Set: More signed/unsigned 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 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 WasmCompiledModule* GetCompiledModule(Object* wasm_instance); 521 WasmCompiledModule* GetCompiledModule(Object* wasm_instance);
522 522
523 // Check whether the wasm module was generated from asm.js code. 523 // Check whether the wasm module was generated from asm.js code.
524 bool WasmIsAsmJs(Object* instance, Isolate* isolate); 524 bool WasmIsAsmJs(Object* instance, Isolate* isolate);
525 525
526 // Get the script of the wasm module. If the origin of the module is asm.js, the 526 // Get the script of the wasm module. If the origin of the module is asm.js, the
527 // returned Script will be a JavaScript Script of Script::TYPE_NORMAL, otherwise 527 // returned Script will be a JavaScript Script of Script::TYPE_NORMAL, otherwise
528 // it's of type TYPE_WASM. 528 // it's of type TYPE_WASM.
529 Handle<Script> GetScript(Handle<JSObject> instance); 529 Handle<Script> GetScript(Handle<JSObject> instance);
530 530
531 // Compute the disassembly of a wasm function.
532 // Returns the disassembly string, and a table mapping byte offsets to line and
533 // column in the disassembly.
534 std::pair<std::string, std::vector<std::tuple<uint32_t, int, int>>>
535 DisassembleFunction(Handle<WasmCompiledModule> compiled_module, int func_index);
536
531 // Get the asm.js source position for the given byte offset in the given 537 // Get the asm.js source position for the given byte offset in the given
532 // function. 538 // function.
533 int GetAsmWasmSourcePosition(Handle<JSObject> instance, int func_index, 539 int GetAsmWasmSourcePosition(Handle<JSObject> instance, int func_index,
534 int byte_offset); 540 int byte_offset);
535 541
536 // Constructs a single function table as a FixedArray of double size, 542 // Constructs a single function table as a FixedArray of double size,
537 // populating it with function signature indices and function indices. 543 // populating it with function signature indices and function indices.
538 Handle<FixedArray> BuildFunctionTable(Isolate* isolate, uint32_t index, 544 Handle<FixedArray> BuildFunctionTable(Isolate* isolate, uint32_t index,
539 const WasmModule* module); 545 const WasmModule* module);
540 546
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 int instance_count); 594 int instance_count);
589 void ValidateModuleState(Isolate* isolate, Handle<JSObject> wasm_module); 595 void ValidateModuleState(Isolate* isolate, Handle<JSObject> wasm_module);
590 void ValidateOrphanedInstance(Isolate* isolate, Handle<JSObject> instance); 596 void ValidateOrphanedInstance(Isolate* isolate, Handle<JSObject> instance);
591 597
592 } // namespace testing 598 } // namespace testing
593 } // namespace wasm 599 } // namespace wasm
594 } // namespace internal 600 } // namespace internal
595 } // namespace v8 601 } // namespace v8
596 602
597 #endif // V8_WASM_MODULE_H_ 603 #endif // V8_WASM_MODULE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698