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

Side by Side Diff: src/frames.h

Issue 2413693003: [wasm] Stack inspection support for asm.js frames (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « src/debug/mirrors.js ('k') | src/frames.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #ifndef V8_FRAMES_H_ 5 #ifndef V8_FRAMES_H_
6 #define V8_FRAMES_H_ 6 #define V8_FRAMES_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/handles.h" 9 #include "src/handles.h"
10 #include "src/safepoint-table.h" 10 #include "src/safepoint-table.h"
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 727
728 class StandardFrame : public StackFrame { 728 class StandardFrame : public StackFrame {
729 public: 729 public:
730 // Testers. 730 // Testers.
731 bool is_standard() const override { return true; } 731 bool is_standard() const override { return true; }
732 732
733 // Accessors. 733 // Accessors.
734 virtual Object* receiver() const; 734 virtual Object* receiver() const;
735 virtual Script* script() const; 735 virtual Script* script() const;
736 virtual Object* context() const; 736 virtual Object* context() const;
737 virtual int position() const;
737 738
738 // Access the expressions in the stack frame including locals. 739 // Access the expressions in the stack frame including locals.
739 inline Object* GetExpression(int index) const; 740 inline Object* GetExpression(int index) const;
740 inline void SetExpression(int index, Object* value); 741 inline void SetExpression(int index, Object* value);
741 int ComputeExpressionsCount() const; 742 int ComputeExpressionsCount() const;
742 743
743 // Access the parameters. 744 // Access the parameters.
744 virtual Object* GetParameter(int index) const; 745 virtual Object* GetParameter(int index) const;
745 virtual int ComputeParametersCount() const; 746 virtual int ComputeParametersCount() const;
746 747
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
950 friend class StackFrameIteratorBase; 951 friend class StackFrameIteratorBase;
951 952
952 Object* StackSlotAt(int index) const; 953 Object* StackSlotAt(int index) const;
953 }; 954 };
954 955
955 956
956 class InterpretedFrame : public JavaScriptFrame { 957 class InterpretedFrame : public JavaScriptFrame {
957 public: 958 public:
958 Type type() const override { return INTERPRETED; } 959 Type type() const override { return INTERPRETED; }
959 960
961 // Accessors.
962 int position() const override;
963
960 // Lookup exception handler for current {pc}, returns -1 if none found. 964 // Lookup exception handler for current {pc}, returns -1 if none found.
961 int LookupExceptionHandlerInTable( 965 int LookupExceptionHandlerInTable(
962 int* data, HandlerTable::CatchPrediction* prediction) override; 966 int* data, HandlerTable::CatchPrediction* prediction) override;
963 967
964 // Returns the current offset into the bytecode stream. 968 // Returns the current offset into the bytecode stream.
965 int GetBytecodeOffset() const; 969 int GetBytecodeOffset() const;
966 970
967 // Updates the current offset into the bytecode stream, mainly used for stack 971 // Updates the current offset into the bytecode stream, mainly used for stack
968 // unwinding to continue execution at a different bytecode offset. 972 // unwinding to continue execution at a different bytecode offset.
969 void PatchBytecodeOffset(int new_offset); 973 void PatchBytecodeOffset(int new_offset);
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
1060 // returns the stack slot count of the entire frame. 1064 // returns the stack slot count of the entire frame.
1061 int LookupExceptionHandlerInTable(int* data); 1065 int LookupExceptionHandlerInTable(int* data);
1062 1066
1063 // Determine the code for the frame. 1067 // Determine the code for the frame.
1064 Code* unchecked_code() const override; 1068 Code* unchecked_code() const override;
1065 1069
1066 // Accessors. 1070 // Accessors.
1067 Object* wasm_obj() const; 1071 Object* wasm_obj() const;
1068 uint32_t function_index() const; 1072 uint32_t function_index() const;
1069 Script* script() const override; 1073 Script* script() const override;
1074 int position() const override;
1070 1075
1071 static WasmFrame* cast(StackFrame* frame) { 1076 static WasmFrame* cast(StackFrame* frame) {
1072 DCHECK(frame->is_wasm()); 1077 DCHECK(frame->is_wasm());
1073 return static_cast<WasmFrame*>(frame); 1078 return static_cast<WasmFrame*>(frame);
1074 } 1079 }
1075 1080
1076 protected: 1081 protected:
1077 inline explicit WasmFrame(StackFrameIteratorBase* iterator); 1082 inline explicit WasmFrame(StackFrameIteratorBase* iterator);
1078 1083
1079 Address GetCallerStackPointer() const override; 1084 Address GetCallerStackPointer() const override;
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
1321 1326
1322 1327
1323 // Reads all frames on the current stack and copies them into the current 1328 // Reads all frames on the current stack and copies them into the current
1324 // zone memory. 1329 // zone memory.
1325 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); 1330 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone);
1326 1331
1327 } // namespace internal 1332 } // namespace internal
1328 } // namespace v8 1333 } // namespace v8
1329 1334
1330 #endif // V8_FRAMES_H_ 1335 #endif // V8_FRAMES_H_
OLDNEW
« 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