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

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

Issue 2493773003: [inspector] Introduce translation of wasm frames (Closed)
Patch Set: Fix last patch 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 list of <byte_offset, line, column>
400 // entries, mapping wasm byte offsets to line and column in the disassembly.
401 // The list is guaranteed to be ordered by the byte_offset.
402 std::pair<std::string, std::vector<std::tuple<uint32_t, int, int>>>
403 DisassembleFunction(Handle<WasmCompiledModule> compiled_module, int func_index);
404
398 // Get the asm.js source position for the given byte offset in the given 405 // Get the asm.js source position for the given byte offset in the given
399 // function. 406 // function.
400 int GetAsmWasmSourcePosition(Handle<JSObject> instance, int func_index, 407 int GetAsmWasmSourcePosition(Handle<JSObject> instance, int func_index,
401 int byte_offset); 408 int byte_offset);
402 409
403 V8_EXPORT_PRIVATE MaybeHandle<WasmModuleObject> CreateModuleObjectFromBytes( 410 V8_EXPORT_PRIVATE MaybeHandle<WasmModuleObject> CreateModuleObjectFromBytes(
404 Isolate* isolate, const byte* start, const byte* end, ErrorThrower* thrower, 411 Isolate* isolate, const byte* start, const byte* end, ErrorThrower* thrower,
405 ModuleOrigin origin, Handle<Script> asm_js_script, 412 ModuleOrigin origin, Handle<Script> asm_js_script,
406 const byte* asm_offset_tables_start, const byte* asm_offset_tables_end); 413 const byte* asm_offset_tables_start, const byte* asm_offset_tables_end);
407 414
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 int instance_count); 448 int instance_count);
442 void ValidateModuleState(Isolate* isolate, Handle<JSObject> wasm_module); 449 void ValidateModuleState(Isolate* isolate, Handle<JSObject> wasm_module);
443 void ValidateOrphanedInstance(Isolate* isolate, Handle<JSObject> instance); 450 void ValidateOrphanedInstance(Isolate* isolate, Handle<JSObject> instance);
444 451
445 } // namespace testing 452 } // namespace testing
446 } // namespace wasm 453 } // namespace wasm
447 } // namespace internal 454 } // namespace internal
448 } // namespace v8 455 } // namespace v8
449 456
450 #endif // V8_WASM_MODULE_H_ 457 #endif // V8_WASM_MODULE_H_
OLDNEW
« src/js/messages.js ('K') | « src/js/messages.js ('k') | src/wasm/wasm-module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698