Commit c56cabb5 authored by Marja Hölttä's avatar Marja Hölttä Committed by Commit Bot

[wasm] iwyu part 2

BUG=v8:7490

Change-Id: I2a597eda708b2ea34c9e32e39556159b48591b61
Reviewed-on: https://chromium-review.googlesource.com/1039196Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52911}
parent 3a094aec
...@@ -2778,7 +2778,7 @@ WasmValue InterpretedFrame::GetLocalValue(int index) const { ...@@ -2778,7 +2778,7 @@ WasmValue InterpretedFrame::GetLocalValue(int index) const {
WasmValue InterpretedFrame::GetStackValue(int index) const { WasmValue InterpretedFrame::GetStackValue(int index) const {
return ToImpl(this)->GetStackValue(index); return ToImpl(this)->GetStackValue(index);
} }
void InterpretedFrame::Deleter::operator()(InterpretedFrame* ptr) { void InterpretedFrameDeleter::operator()(InterpretedFrame* ptr) {
delete ToImpl(ptr); delete ToImpl(ptr);
} }
......
...@@ -70,12 +70,6 @@ class InterpretedFrame { ...@@ -70,12 +70,6 @@ class InterpretedFrame {
WasmValue GetLocalValue(int index) const; WasmValue GetLocalValue(int index) const;
WasmValue GetStackValue(int index) const; WasmValue GetStackValue(int index) const;
// Deleter struct to delete the underlying InterpretedFrameImpl without
// violating language specifications.
struct Deleter {
void operator()(InterpretedFrame* ptr);
};
private: private:
friend class WasmInterpreter; friend class WasmInterpreter;
// Don't instante InterpretedFrames; they will be allocated as // Don't instante InterpretedFrames; they will be allocated as
...@@ -84,6 +78,12 @@ class InterpretedFrame { ...@@ -84,6 +78,12 @@ class InterpretedFrame {
DISALLOW_COPY_AND_ASSIGN(InterpretedFrame); DISALLOW_COPY_AND_ASSIGN(InterpretedFrame);
}; };
// Deleter struct to delete the underlying InterpretedFrameImpl without
// violating language specifications.
struct InterpretedFrameDeleter {
void operator()(InterpretedFrame* ptr);
};
// An interpreter capable of executing WebAssembly. // An interpreter capable of executing WebAssembly.
class V8_EXPORT_PRIVATE WasmInterpreter { class V8_EXPORT_PRIVATE WasmInterpreter {
public: public:
...@@ -105,7 +105,7 @@ class V8_EXPORT_PRIVATE WasmInterpreter { ...@@ -105,7 +105,7 @@ class V8_EXPORT_PRIVATE WasmInterpreter {
AfterCall = 1 << 1 AfterCall = 1 << 1
}; };
using FramePtr = std::unique_ptr<InterpretedFrame, InterpretedFrame::Deleter>; using FramePtr = std::unique_ptr<InterpretedFrame, InterpretedFrameDeleter>;
// Representation of a thread in the interpreter. // Representation of a thread in the interpreter.
class V8_EXPORT_PRIVATE Thread { class V8_EXPORT_PRIVATE Thread {
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#include "src/machine-type.h" #include "src/machine-type.h"
#include "src/objects.h" #include "src/objects.h"
#include "src/objects/script.h" #include "src/objects/script.h"
#include "src/wasm/wasm-interpreter.h"
// Has to be the last include (doesn't have include guards) // Has to be the last include (doesn't have include guards)
#include "src/objects/object-macros.h" #include "src/objects/object-macros.h"
...@@ -21,12 +20,14 @@ namespace v8 { ...@@ -21,12 +20,14 @@ namespace v8 {
namespace internal { namespace internal {
namespace wasm { namespace wasm {
class InterpretedFrame; class InterpretedFrame;
struct InterpretedFrameDeleter;
class NativeModule; class NativeModule;
struct ModuleEnv; struct ModuleEnv;
class WasmCode; class WasmCode;
struct WasmModule; struct WasmModule;
class SignatureMap; class SignatureMap;
class WireBytesRef; class WireBytesRef;
class WasmInterpreter;
using ValueType = MachineRepresentation; using ValueType = MachineRepresentation;
using FunctionSig = Signature<ValueType>; using FunctionSig = Signature<ValueType>;
} // namespace wasm } // namespace wasm
...@@ -640,8 +641,8 @@ class WasmDebugInfo : public Struct { ...@@ -640,8 +641,8 @@ class WasmDebugInfo : public Struct {
std::vector<std::pair<uint32_t, int>> GetInterpretedStack( std::vector<std::pair<uint32_t, int>> GetInterpretedStack(
Address frame_pointer); Address frame_pointer);
wasm::WasmInterpreter::FramePtr GetInterpretedFrame(Address frame_pointer, std::unique_ptr<wasm::InterpretedFrame, wasm::InterpretedFrameDeleter>
int frame_index); GetInterpretedFrame(Address frame_pointer, int frame_index);
// Unwind the interpreted stack belonging to the passed interpreter entry // Unwind the interpreted stack belonging to the passed interpreter entry
// frame. // frame.
......
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