Commit 5fc4649d authored by Benedikt Meurer's avatar Benedikt Meurer Committed by Commit Bot

[debug][wasm] Move DebugEvaluate implementation to wasm-debug.cc.

Previously the proxies that make up the DebugEvaluate implementation for
Wasm frames lived in wasm-js.cc, but that was quite confusing since

(a) the rest of the debug support for Wasm lives in wasm-debug.cc (and
    we intend to eventually unify the DebugEvaluate and Scope objects),
    and
(b) the wasm-js.cc file is explicitly about the WebAssembly JS API
    that's part of the WebAssembly specification, and the DebugEvaluate
    proxies aren't part of that.

Bug: chromium:1162229, chromium:1071432, chromium:1127914
Change-Id: I63016dcace6d8e2af4a03c8eed4f02d464c1dee1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2609418
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: 's avatarZhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71911}
parent d09b35f3
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include "src/objects/contexts.h" #include "src/objects/contexts.h"
#include "src/snapshot/snapshot.h" #include "src/snapshot/snapshot.h"
#include "src/wasm/wasm-debug.h" #include "src/wasm/wasm-debug.h"
#include "src/wasm/wasm-js.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {
...@@ -101,7 +100,7 @@ MaybeHandle<Object> DebugEvaluate::Local(Isolate* isolate, ...@@ -101,7 +100,7 @@ MaybeHandle<Object> DebugEvaluate::Local(Isolate* isolate,
WasmFrame* frame = WasmFrame::cast(it.frame()); WasmFrame* frame = WasmFrame::cast(it.frame());
Handle<SharedFunctionInfo> outer_info( Handle<SharedFunctionInfo> outer_info(
isolate->native_context()->empty_function().shared(), isolate); isolate->native_context()->empty_function().shared(), isolate);
Handle<JSProxy> context_extension = WasmJs::GetJSDebugProxy(frame); Handle<JSProxy> context_extension = wasm::GetJSDebugProxy(frame);
Handle<ScopeInfo> scope_info = Handle<ScopeInfo> scope_info =
ScopeInfo::CreateForWithScope(isolate, Handle<ScopeInfo>::null()); ScopeInfo::CreateForWithScope(isolate, Handle<ScopeInfo>::null());
Handle<Context> context = isolate->factory()->NewWithContext( Handle<Context> context = isolate->factory()->NewWithContext(
......
This diff is collapsed.
...@@ -21,6 +21,7 @@ namespace internal { ...@@ -21,6 +21,7 @@ namespace internal {
template <typename T> template <typename T>
class Handle; class Handle;
class JSObject; class JSObject;
class JSProxy;
template <typename T> template <typename T>
class Vector; class Vector;
class WasmFrame; class WasmFrame;
...@@ -194,6 +195,8 @@ class V8_EXPORT_PRIVATE DebugInfo { ...@@ -194,6 +195,8 @@ class V8_EXPORT_PRIVATE DebugInfo {
std::unique_ptr<DebugInfoImpl> impl_; std::unique_ptr<DebugInfoImpl> impl_;
}; };
Handle<JSProxy> GetJSDebugProxy(WasmFrame* frame);
} // namespace wasm } // namespace wasm
} // namespace internal } // namespace internal
} // namespace v8 } // namespace v8
......
This diff is collapsed.
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
namespace v8 { namespace v8 {
namespace internal { namespace internal {
class JSProxy;
class WasmFrame; class WasmFrame;
namespace wasm { namespace wasm {
...@@ -21,8 +20,6 @@ class WasmJs { ...@@ -21,8 +20,6 @@ class WasmJs {
public: public:
V8_EXPORT_PRIVATE static void Install(Isolate* isolate, V8_EXPORT_PRIVATE static void Install(Isolate* isolate,
bool exposed_on_global_object); bool exposed_on_global_object);
V8_EXPORT_PRIVATE static Handle<JSProxy> GetJSDebugProxy(WasmFrame* frame);
}; };
} // namespace internal } // namespace internal
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment