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

Side by Side Diff: src/frames.h

Issue 1261923007: [turbofan] Unify referencing of stack slots (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Final tweaks Created 5 years, 4 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
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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 class StandardFrameConstants : public AllStatic { 114 class StandardFrameConstants : public AllStatic {
115 public: 115 public:
116 // Fixed part of the frame consists of return address, caller fp, 116 // Fixed part of the frame consists of return address, caller fp,
117 // constant pool (if FLAG_enable_embedded_constant_pool), context, and 117 // constant pool (if FLAG_enable_embedded_constant_pool), context, and
118 // function. StandardFrame::IterateExpressions assumes that kLastObjectOffset 118 // function. StandardFrame::IterateExpressions assumes that kLastObjectOffset
119 // is the last object pointer. 119 // is the last object pointer.
120 static const int kCPSlotSize = 120 static const int kCPSlotSize =
121 FLAG_enable_embedded_constant_pool ? kPointerSize : 0; 121 FLAG_enable_embedded_constant_pool ? kPointerSize : 0;
122 static const int kFixedFrameSizeFromFp = 2 * kPointerSize + kCPSlotSize; 122 static const int kFixedFrameSizeFromFp = 2 * kPointerSize + kCPSlotSize;
123 static const int kFixedFrameSizeAboveFp = kPCOnStackSize + kFPOnStackSize;
123 static const int kFixedFrameSize = 124 static const int kFixedFrameSize =
124 kPCOnStackSize + kFPOnStackSize + kFixedFrameSizeFromFp; 125 kFixedFrameSizeAboveFp + kFixedFrameSizeFromFp;
125 static const int kExpressionsOffset = -3 * kPointerSize - kCPSlotSize; 126 static const int kExpressionsOffset = -3 * kPointerSize - kCPSlotSize;
126 static const int kMarkerOffset = -2 * kPointerSize - kCPSlotSize; 127 static const int kMarkerOffset = -2 * kPointerSize - kCPSlotSize;
127 static const int kContextOffset = -1 * kPointerSize - kCPSlotSize; 128 static const int kContextOffset = -1 * kPointerSize - kCPSlotSize;
128 static const int kConstantPoolOffset = kCPSlotSize ? -1 * kPointerSize : 0; 129 static const int kConstantPoolOffset = kCPSlotSize ? -1 * kPointerSize : 0;
129 static const int kCallerFPOffset = 0 * kPointerSize; 130 static const int kCallerFPOffset = 0 * kPointerSize;
130 static const int kCallerPCOffset = +1 * kFPOnStackSize; 131 static const int kCallerPCOffset = +1 * kFPOnStackSize;
131 static const int kCallerSPOffset = kCallerPCOffset + 1 * kPCOnStackSize; 132 static const int kCallerSPOffset = kCallerPCOffset + 1 * kPCOnStackSize;
132 133
133 static const int kLastObjectOffset = kContextOffset; 134 static const int kLastObjectOffset = kContextOffset;
134 }; 135 };
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 672
672 virtual void Summarize(List<FrameSummary>* frames); 673 virtual void Summarize(List<FrameSummary>* frames);
673 674
674 // Lookup exception handler for current {pc}, returns -1 if none found. Also 675 // Lookup exception handler for current {pc}, returns -1 if none found. Also
675 // returns the expected number of stack slots at the handler site. 676 // returns the expected number of stack slots at the handler site.
676 virtual int LookupExceptionHandlerInTable( 677 virtual int LookupExceptionHandlerInTable(
677 int* stack_slots, HandlerTable::CatchPrediction* prediction); 678 int* stack_slots, HandlerTable::CatchPrediction* prediction);
678 679
679 DeoptimizationInputData* GetDeoptimizationData(int* deopt_index); 680 DeoptimizationInputData* GetDeoptimizationData(int* deopt_index);
680 681
682 static int StackSlotOffsetRelativeToFp(int slot_index);
683
681 protected: 684 protected:
682 inline explicit OptimizedFrame(StackFrameIteratorBase* iterator); 685 inline explicit OptimizedFrame(StackFrameIteratorBase* iterator);
683 686
684 private: 687 private:
685 friend class StackFrameIteratorBase; 688 friend class StackFrameIteratorBase;
686 689
687 Object* StackSlotAt(int index) const; 690 Object* StackSlotAt(int index) const;
688 }; 691 };
689 692
690 693
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 }; 935 };
933 936
934 937
935 // Reads all frames on the current stack and copies them into the current 938 // Reads all frames on the current stack and copies them into the current
936 // zone memory. 939 // zone memory.
937 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); 940 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone);
938 941
939 } } // namespace v8::internal 942 } } // namespace v8::internal
940 943
941 #endif // V8_FRAMES_H_ 944 #endif // V8_FRAMES_H_
OLDNEW
« src/compiler/x64/code-generator-x64.cc ('K') | « src/deoptimizer.cc ('k') | src/frames.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698