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

Side by Side Diff: src/frames.h

Issue 1220223005: Cleanup frame description constant. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_graph-builder-new-target
Patch Set: Addressed comments. Created 5 years, 5 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/arm64/full-codegen-arm64.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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 static const int kContextOffset = -1 * kPointerSize - kCPSlotSize; 127 static const int kContextOffset = -1 * kPointerSize - kCPSlotSize;
128 static const int kConstantPoolOffset = kCPSlotSize ? -1 * kPointerSize : 0; 128 static const int kConstantPoolOffset = kCPSlotSize ? -1 * kPointerSize : 0;
129 static const int kCallerFPOffset = 0 * kPointerSize; 129 static const int kCallerFPOffset = 0 * kPointerSize;
130 static const int kCallerPCOffset = +1 * kFPOnStackSize; 130 static const int kCallerPCOffset = +1 * kFPOnStackSize;
131 static const int kCallerSPOffset = kCallerPCOffset + 1 * kPCOnStackSize; 131 static const int kCallerSPOffset = kCallerPCOffset + 1 * kPCOnStackSize;
132 132
133 static const int kLastObjectOffset = kContextOffset; 133 static const int kLastObjectOffset = kContextOffset;
134 }; 134 };
135 135
136 136
137 class ArgumentsAdaptorFrameConstants : public AllStatic {
138 public:
139 // FP-relative.
140 static const int kLengthOffset = StandardFrameConstants::kExpressionsOffset;
141
142 static const int kFrameSize =
143 StandardFrameConstants::kFixedFrameSize + kPointerSize;
144 };
145
146
147 class InternalFrameConstants : public AllStatic {
148 public:
149 // FP-relative.
150 static const int kCodeOffset = StandardFrameConstants::kExpressionsOffset;
151 };
152
153
154 class ConstructFrameConstants : public AllStatic {
155 public:
156 // FP-relative.
157 static const int kImplicitReceiverOffset =
158 StandardFrameConstants::kExpressionsOffset - 2 * kPointerSize;
159 static const int kOriginalConstructorOffset =
160 StandardFrameConstants::kExpressionsOffset - 2 * kPointerSize;
161 static const int kLengthOffset =
162 StandardFrameConstants::kExpressionsOffset - 1 * kPointerSize;
163 static const int kCodeOffset =
164 StandardFrameConstants::kExpressionsOffset - 0 * kPointerSize;
165
166 static const int kFrameSize =
167 StandardFrameConstants::kFixedFrameSize + 3 * kPointerSize;
168 };
169
170
137 // Abstract base class for all stack frames. 171 // Abstract base class for all stack frames.
138 class StackFrame BASE_EMBEDDED { 172 class StackFrame BASE_EMBEDDED {
139 public: 173 public:
140 #define DECLARE_TYPE(type, ignore) type, 174 #define DECLARE_TYPE(type, ignore) type,
141 enum Type { 175 enum Type {
142 NONE = 0, 176 NONE = 0,
143 STACK_FRAME_TYPE_LIST(DECLARE_TYPE) 177 STACK_FRAME_TYPE_LIST(DECLARE_TYPE)
144 NUMBER_OF_TYPES, 178 NUMBER_OF_TYPES,
145 // Used by FrameScope to indicate that the stack frame is constructed 179 // Used by FrameScope to indicate that the stack frame is constructed
146 // manually and the FrameScope does not need to emit code. 180 // manually and the FrameScope does not need to emit code.
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 }; 930 };
897 931
898 932
899 // Reads all frames on the current stack and copies them into the current 933 // Reads all frames on the current stack and copies them into the current
900 // zone memory. 934 // zone memory.
901 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); 935 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone);
902 936
903 } } // namespace v8::internal 937 } } // namespace v8::internal
904 938
905 #endif // V8_FRAMES_H_ 939 #endif // V8_FRAMES_H_
OLDNEW
« no previous file with comments | « src/arm64/full-codegen-arm64.cc ('k') | src/frames.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698