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

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: address yang's comments 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 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after
1049 } 1049 }
1050 1050
1051 WasmDebugInfo* GetDebugInfo(JSObject* wasm) { 1051 WasmDebugInfo* GetDebugInfo(JSObject* wasm) {
1052 Object* info = wasm->GetInternalField(kWasmDebugInfo); 1052 Object* info = wasm->GetInternalField(kWasmDebugInfo);
1053 if (!info->IsUndefined(wasm->GetIsolate())) return WasmDebugInfo::cast(info); 1053 if (!info->IsUndefined(wasm->GetIsolate())) return WasmDebugInfo::cast(info);
1054 Handle<WasmDebugInfo> new_info = WasmDebugInfo::New(handle(wasm)); 1054 Handle<WasmDebugInfo> new_info = WasmDebugInfo::New(handle(wasm));
1055 wasm->SetInternalField(kWasmDebugInfo, *new_info); 1055 wasm->SetInternalField(kWasmDebugInfo, *new_info);
1056 return *new_info; 1056 return *new_info;
1057 } 1057 }
1058 1058
1059 int GetNumberOfFunctions(JSObject* wasm) {
1060 Object* func_names_obj = wasm->GetInternalField(kWasmFunctionNamesArray);
1061 // TODO(clemensh): this looks inside an array constructed elsewhere. Refactor.
1062 return ByteArray::cast(func_names_obj)->get_int(0);
1063 }
1064
1059 } // namespace wasm 1065 } // namespace wasm
1060 } // namespace internal 1066 } // namespace internal
1061 } // namespace v8 1067 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698