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

Side by Side Diff: src/frames.h

Issue 1665833002: [interpreter] Switch context during stack unwinding. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. Created 4 years, 10 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/compiler/bytecode-graph-builder.cc ('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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 StandardFrameConstants::kFixedFrameSizeFromFp + 2 * kPointerSize; 183 StandardFrameConstants::kFixedFrameSizeFromFp + 2 * kPointerSize;
184 184
185 // FP-relative. 185 // FP-relative.
186 static const int kBytecodeOffsetFromFp = 186 static const int kBytecodeOffsetFromFp =
187 -StandardFrameConstants::kFixedFrameSizeFromFp - 2 * kPointerSize; 187 -StandardFrameConstants::kFixedFrameSizeFromFp - 2 * kPointerSize;
188 static const int kRegisterFilePointerFromFp = 188 static const int kRegisterFilePointerFromFp =
189 -StandardFrameConstants::kFixedFrameSizeFromFp - 3 * kPointerSize; 189 -StandardFrameConstants::kFixedFrameSizeFromFp - 3 * kPointerSize;
190 190
191 // Expression index for {StandardFrame::GetExpressionAddress}. 191 // Expression index for {StandardFrame::GetExpressionAddress}.
192 static const int kBytecodeOffsetExpressionIndex = 1; 192 static const int kBytecodeOffsetExpressionIndex = 1;
193 static const int kRegisterFileExpressionIndex = 2;
193 194
194 // Register file pointer relative. 195 // Register file pointer relative.
195 static const int kLastParamFromRegisterPointer = 196 static const int kLastParamFromRegisterPointer =
196 StandardFrameConstants::kFixedFrameSize + 3 * kPointerSize; 197 StandardFrameConstants::kFixedFrameSize + 3 * kPointerSize;
197 198
198 static const int kBytecodeOffsetFromRegisterPointer = 1 * kPointerSize; 199 static const int kBytecodeOffsetFromRegisterPointer = 1 * kPointerSize;
199 static const int kNewTargetFromRegisterPointer = 2 * kPointerSize; 200 static const int kNewTargetFromRegisterPointer = 2 * kPointerSize;
200 static const int kFunctionFromRegisterPointer = 3 * kPointerSize; 201 static const int kFunctionFromRegisterPointer = 3 * kPointerSize;
201 static const int kContextFromRegisterPointer = 4 * kPointerSize; 202 static const int kContextFromRegisterPointer = 4 * kPointerSize;
202 }; 203 };
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 int LookupExceptionHandlerInTable( 726 int LookupExceptionHandlerInTable(
726 int* stack_slots, HandlerTable::CatchPrediction* prediction) override; 727 int* stack_slots, HandlerTable::CatchPrediction* prediction) override;
727 728
728 // Returns the current offset into the bytecode stream. 729 // Returns the current offset into the bytecode stream.
729 int GetBytecodeOffset() const; 730 int GetBytecodeOffset() const;
730 731
731 // Updates the current offset into the bytecode stream, mainly used for stack 732 // Updates the current offset into the bytecode stream, mainly used for stack
732 // unwinding to continue execution at a different bytecode offset. 733 // unwinding to continue execution at a different bytecode offset.
733 void PatchBytecodeOffset(int new_offset); 734 void PatchBytecodeOffset(int new_offset);
734 735
736 // Access to the interpreter register file for this frame.
737 Object* GetInterpreterRegister(int register_index) const;
738
735 // Build a list with summaries for this frame including all inlined frames. 739 // Build a list with summaries for this frame including all inlined frames.
736 void Summarize(List<FrameSummary>* frames) override; 740 void Summarize(List<FrameSummary>* frames) override;
737 741
738 protected: 742 protected:
739 inline explicit InterpretedFrame(StackFrameIteratorBase* iterator); 743 inline explicit InterpretedFrame(StackFrameIteratorBase* iterator);
740 744
741 private: 745 private:
742 friend class StackFrameIteratorBase; 746 friend class StackFrameIteratorBase;
743 }; 747 };
744 748
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
987 991
988 992
989 // Reads all frames on the current stack and copies them into the current 993 // Reads all frames on the current stack and copies them into the current
990 // zone memory. 994 // zone memory.
991 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); 995 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone);
992 996
993 } // namespace internal 997 } // namespace internal
994 } // namespace v8 998 } // namespace v8
995 999
996 #endif // V8_FRAMES_H_ 1000 #endif // V8_FRAMES_H_
OLDNEW
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/frames.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698