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

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

Issue 2069823003: [wasm] Enable wasm frame inspection for debugging (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@split-wasm-debug
Patch Set: fix gcmole reports Created 4 years, 6 months 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 #include "src/base/atomic-utils.h" 5 #include "src/base/atomic-utils.h"
6 #include "src/macro-assembler.h" 6 #include "src/macro-assembler.h"
7 #include "src/objects.h" 7 #include "src/objects.h"
8 #include "src/property-descriptor.h" 8 #include "src/property-descriptor.h"
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after
1056 } 1056 }
1057 1057
1058 WasmDebugInfo* GetDebugInfo(JSObject* wasm) { 1058 WasmDebugInfo* GetDebugInfo(JSObject* wasm) {
1059 Object* info = wasm->GetInternalField(kWasmDebugInfo); 1059 Object* info = wasm->GetInternalField(kWasmDebugInfo);
1060 if (!info->IsUndefined(wasm->GetIsolate())) return WasmDebugInfo::cast(info); 1060 if (!info->IsUndefined(wasm->GetIsolate())) return WasmDebugInfo::cast(info);
1061 Handle<WasmDebugInfo> new_info = WasmDebugInfo::New(handle(wasm)); 1061 Handle<WasmDebugInfo> new_info = WasmDebugInfo::New(handle(wasm));
1062 wasm->SetInternalField(kWasmDebugInfo, *new_info); 1062 wasm->SetInternalField(kWasmDebugInfo, *new_info);
1063 return *new_info; 1063 return *new_info;
1064 } 1064 }
1065 1065
1066 int GetNumberOfFunctions(JSObject* wasm) {
1067 Object* func_names_obj = wasm->GetInternalField(kWasmFunctionNamesArray);
1068 // TODO(clemensh): this looks inside an array constructed elsewhere. Refactor.
1069 return ByteArray::cast(func_names_obj)->get_int(0);
1070 }
1071
1066 } // namespace wasm 1072 } // namespace wasm
1067 } // namespace internal 1073 } // namespace internal
1068 } // namespace v8 1074 } // namespace v8
OLDNEW
« src/debug/mirrors.js ('K') | « src/wasm/wasm-module.h ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698