| Index: src/frames.h
|
| diff --git a/src/frames.h b/src/frames.h
|
| index 213e8f74fc92d3e56bddbe0a679e02030e28090c..0468679e7938ea478b5a0e3a3153e9e037756fac 100644
|
| --- a/src/frames.h
|
| +++ b/src/frames.h
|
| @@ -672,15 +672,23 @@ class StandardFrame : public StackFrame {
|
| bool is_standard() const override { return true; }
|
|
|
| // Accessors.
|
| - inline Object* context() 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);
|
| @@ -738,15 +746,15 @@ class JavaScriptFrame : public StandardFrame {
|
| // Accessors.
|
| virtual JSFunction* function() const;
|
| virtual Object* receiver() const;
|
| + 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;
|
| @@ -760,7 +768,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}.
|
| @@ -970,8 +978,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());
|
| @@ -1161,6 +1171,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();
|
|
|
| @@ -1171,6 +1182,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;
|
|
|