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

Unified Diff: src/wasm/wasm-debug.cc

Issue 2503403005: [wasm] Remove two obsolete functions (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | src/wasm/wasm-module.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-debug.cc
diff --git a/src/wasm/wasm-debug.cc b/src/wasm/wasm-debug.cc
index 11c2ef8aa53e3dc134c87dbc15f01e5bb15177f6..979fad83310dda0e9062237cd45215da5cda277e 100644
--- a/src/wasm/wasm-debug.cc
+++ b/src/wasm/wasm-debug.cc
@@ -30,9 +30,10 @@ FixedArray *GetAsmJsOffsetTables(Handle<WasmDebugInfo> debug_info,
return FixedArray::cast(offset_tables);
}
- Handle<JSObject> wasm_instance(debug_info->wasm_instance(), isolate);
- Handle<WasmCompiledModule> compiled_module(GetCompiledModule(*wasm_instance),
- isolate);
+ Handle<WasmInstanceObject> wasm_instance(debug_info->wasm_instance(),
+ isolate);
+ Handle<WasmCompiledModule> compiled_module(
+ wasm_instance->get_compiled_module(), isolate);
DCHECK(compiled_module->has_asm_js_offset_tables());
AsmJsOffsetsResult asm_offsets;
@@ -76,14 +77,15 @@ FixedArray *GetAsmJsOffsetTables(Handle<WasmDebugInfo> debug_info,
}
} // namespace
-Handle<WasmDebugInfo> WasmDebugInfo::New(Handle<JSObject> wasm) {
- Isolate *isolate = wasm->GetIsolate();
+Handle<WasmDebugInfo> WasmDebugInfo::New(Handle<WasmInstanceObject> instance) {
+ Isolate *isolate = instance->GetIsolate();
Factory *factory = isolate->factory();
Handle<FixedArray> arr =
factory->NewFixedArray(kWasmDebugInfoNumEntries, TENURED);
- arr->set(kWasmDebugInfoWasmObj, *wasm);
+ arr->set(kWasmDebugInfoWasmObj, *instance);
int hash = 0;
- Handle<SeqOneByteString> wasm_bytes = GetWasmBytes(wasm);
+ Handle<SeqOneByteString> wasm_bytes =
+ instance->get_compiled_module()->module_bytes();
{
DisallowHeapAllocation no_gc;
hash = StringHasher::HashSequentialString(
@@ -108,17 +110,17 @@ WasmDebugInfo *WasmDebugInfo::cast(Object *object) {
return reinterpret_cast<WasmDebugInfo *>(object);
}
-JSObject *WasmDebugInfo::wasm_instance() {
- return JSObject::cast(get(kWasmDebugInfoWasmObj));
+WasmInstanceObject *WasmDebugInfo::wasm_instance() {
+ return WasmInstanceObject::cast(get(kWasmDebugInfoWasmObj));
}
int WasmDebugInfo::GetAsmJsSourcePosition(Handle<WasmDebugInfo> debug_info,
int func_index, int byte_offset) {
Isolate *isolate = debug_info->GetIsolate();
- Handle<JSObject> instance(debug_info->wasm_instance(), isolate);
+ Handle<WasmInstanceObject> instance(debug_info->wasm_instance(), isolate);
FixedArray *offset_tables = GetAsmJsOffsetTables(debug_info, isolate);
- WasmCompiledModule *compiled_module = wasm::GetCompiledModule(*instance);
+ WasmCompiledModule *compiled_module = instance->get_compiled_module();
int num_imported_functions =
compiled_module->module()->num_imported_functions;
DCHECK_LE(num_imported_functions, func_index);
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | src/wasm/wasm-module.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698