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

Side by Side Diff: src/runtime/runtime-debug.cc

Issue 2490663002: [wasm] Move all heap-allocated WASM structures into wasm-objects.h. (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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #include "src/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/debug/debug-evaluate.h" 8 #include "src/debug/debug-evaluate.h"
9 #include "src/debug/debug-frames.h" 9 #include "src/debug/debug-frames.h"
10 #include "src/debug/debug-scopes.h" 10 #include "src/debug/debug-scopes.h"
(...skipping 1888 matching lines...) Expand 10 before | Expand all | Expand 10 after
1899 1899
1900 // TODO(5530): Remove once uses in debug.js are gone. 1900 // TODO(5530): Remove once uses in debug.js are gone.
1901 RUNTIME_FUNCTION(Runtime_GetWasmFunctionOffsetTable) { 1901 RUNTIME_FUNCTION(Runtime_GetWasmFunctionOffsetTable) {
1902 DCHECK(args.length() == 1); 1902 DCHECK(args.length() == 1);
1903 HandleScope scope(isolate); 1903 HandleScope scope(isolate);
1904 CONVERT_ARG_CHECKED(JSValue, script_val, 0); 1904 CONVERT_ARG_CHECKED(JSValue, script_val, 0);
1905 1905
1906 CHECK(script_val->value()->IsScript()); 1906 CHECK(script_val->value()->IsScript());
1907 Handle<Script> script = Handle<Script>(Script::cast(script_val->value())); 1907 Handle<Script> script = Handle<Script>(Script::cast(script_val->value()));
1908 1908
1909 Handle<wasm::WasmDebugInfo> debug_info = 1909 Handle<WasmDebugInfo> debug_info =
1910 wasm::GetDebugInfo(handle(script->wasm_instance(), isolate)); 1910 wasm::GetDebugInfo(handle(script->wasm_instance(), isolate));
1911 Handle<FixedArray> elements = wasm::WasmDebugInfo::GetFunctionOffsetTable( 1911 Handle<FixedArray> elements = WasmDebugInfo::GetFunctionOffsetTable(
1912 debug_info, script->wasm_function_index()); 1912 debug_info, script->wasm_function_index());
1913 return *isolate->factory()->NewJSArrayWithElements(elements); 1913 return *isolate->factory()->NewJSArrayWithElements(elements);
1914 } 1914 }
1915 1915
1916 // TODO(5530): Remove once uses in debug.js are gone. 1916 // TODO(5530): Remove once uses in debug.js are gone.
1917 RUNTIME_FUNCTION(Runtime_DisassembleWasmFunction) { 1917 RUNTIME_FUNCTION(Runtime_DisassembleWasmFunction) {
1918 DCHECK(args.length() == 1); 1918 DCHECK(args.length() == 1);
1919 HandleScope scope(isolate); 1919 HandleScope scope(isolate);
1920 CONVERT_ARG_CHECKED(JSValue, script_val, 0); 1920 CONVERT_ARG_CHECKED(JSValue, script_val, 0);
1921 1921
1922 CHECK(script_val->value()->IsScript()); 1922 CHECK(script_val->value()->IsScript());
1923 Handle<Script> script = Handle<Script>(Script::cast(script_val->value())); 1923 Handle<Script> script = Handle<Script>(Script::cast(script_val->value()));
1924 1924
1925 Handle<wasm::WasmDebugInfo> debug_info = 1925 Handle<WasmDebugInfo> debug_info =
1926 wasm::GetDebugInfo(handle(script->wasm_instance(), isolate)); 1926 wasm::GetDebugInfo(handle(script->wasm_instance(), isolate));
1927 return *wasm::WasmDebugInfo::DisassembleFunction( 1927 return *WasmDebugInfo::DisassembleFunction(debug_info,
1928 debug_info, script->wasm_function_index()); 1928 script->wasm_function_index());
1929 } 1929 }
1930 1930
1931 } // namespace internal 1931 } // namespace internal
1932 } // namespace v8 1932 } // namespace v8
OLDNEW
« no previous file with comments | « src/frames.cc ('k') | src/runtime/runtime-test.cc » ('j') | src/wasm/wasm-module.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698