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

Unified Diff: src/frames.h

Issue 2069823003: [wasm] Enable wasm frame inspection for debugging (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@split-wasm-debug
Patch Set: Add two DCHECKs 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/debug/mirrors.js ('k') | src/frames.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/frames.h
diff --git a/src/frames.h b/src/frames.h
index a1e438c6943494684ced2512f82f4ea78f598cfe..0e48a4ac7a594ff3aecd2b442314608898df56d3 100644
--- a/src/frames.h
+++ b/src/frames.h
@@ -682,15 +682,24 @@ class StandardFrame : public StackFrame {
bool is_standard() const override { return true; }
// Accessors.
- inline Object* context() const;
+ virtual Object* receiver() const;
+ virtual Script* script() const;
+ virtual Object* context() const;
// Access the expressions in the stack frame including locals.
inline Object* GetExpression(int index) const;
inline void SetExpression(int index, Object* value);
int ComputeExpressionsCount() const;
+ // Access the parameters.
+ virtual Object* GetParameter(int index) const;
+ virtual int ComputeParametersCount() const;
+
void SetCallerFp(Address caller_fp) override;
+ // Check if this frame is a constructor frame invoked through 'new'.
+ virtual bool IsConstructor() const;
+
static StandardFrame* cast(StackFrame* frame) {
DCHECK(frame->is_standard());
return static_cast<StandardFrame*>(frame);
@@ -747,16 +756,16 @@ class JavaScriptFrame : public StandardFrame {
// Accessors.
virtual JSFunction* function() const;
- virtual Object* receiver() const;
+ Object* receiver() const override;
+ Object* context() const override;
+ Script* script() const override;
inline void set_receiver(Object* value);
// Access the parameters.
inline Address GetParameterSlot(int index) const;
- inline Object* GetParameter(int index) const;
- inline int ComputeParametersCount() const {
- return GetNumberOfIncomingArguments();
- }
+ Object* GetParameter(int index) const override;
+ int ComputeParametersCount() const override;
// Access the operand stack.
inline Address GetOperandSlot(int index) const;
@@ -770,7 +779,7 @@ class JavaScriptFrame : public StandardFrame {
void SetParameterValue(int index, Object* value) const;
// Check if this frame is a constructor frame invoked through 'new'.
- bool IsConstructor() const;
+ bool IsConstructor() const override;
// Determines whether this frame includes inlined activations. To get details
// about the inlined frames use {GetFunctions} and {Summarize}.
@@ -1001,8 +1010,10 @@ class WasmFrame : public StandardFrame {
// Determine the code for the frame.
Code* unchecked_code() const override;
- Object* wasm_obj();
- uint32_t function_index();
+ // Accessors.
+ Object* wasm_obj() const;
+ uint32_t function_index() const;
+ Script* script() const override;
static WasmFrame* cast(StackFrame* frame) {
DCHECK(frame->is_wasm());
@@ -1192,6 +1203,7 @@ class JavaScriptFrameIterator BASE_EMBEDDED {
class StackTraceFrameIterator BASE_EMBEDDED {
public:
explicit StackTraceFrameIterator(Isolate* isolate);
+ StackTraceFrameIterator(Isolate* isolate, StackFrame::Id id);
bool done() const { return iterator_.done(); }
void Advance();
@@ -1202,6 +1214,11 @@ class StackTraceFrameIterator BASE_EMBEDDED {
inline JavaScriptFrame* javascript_frame() const;
inline WasmFrame* wasm_frame() const;
+ // Advance to the frame holding the arguments for the current
+ // frame. This only affects the current frame if it is a javascript frame and
+ // has adapted arguments.
+ void AdvanceToArgumentsFrame();
+
private:
StackFrameIterator iterator_;
bool IsValidFrame(StackFrame* frame) const;
« no previous file with comments | « src/debug/mirrors.js ('k') | src/frames.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698