OLD | NEW |
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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 // FP-relative. | 155 // FP-relative. |
156 static const int kCodeOffset = StandardFrameConstants::kExpressionsOffset; | 156 static const int kCodeOffset = StandardFrameConstants::kExpressionsOffset; |
157 }; | 157 }; |
158 | 158 |
159 | 159 |
160 class ConstructFrameConstants : public AllStatic { | 160 class ConstructFrameConstants : public AllStatic { |
161 public: | 161 public: |
162 // FP-relative. | 162 // FP-relative. |
163 static const int kImplicitReceiverOffset = | 163 static const int kImplicitReceiverOffset = |
164 StandardFrameConstants::kExpressionsOffset - 4 * kPointerSize; | 164 StandardFrameConstants::kExpressionsOffset - 4 * kPointerSize; |
165 static const int kOriginalConstructorOffset = | 165 static const int kNewTargetOffset = |
166 StandardFrameConstants::kExpressionsOffset - 3 * kPointerSize; | 166 StandardFrameConstants::kExpressionsOffset - 3 * kPointerSize; |
167 static const int kLengthOffset = | 167 static const int kLengthOffset = |
168 StandardFrameConstants::kExpressionsOffset - 2 * kPointerSize; | 168 StandardFrameConstants::kExpressionsOffset - 2 * kPointerSize; |
169 static const int kAllocationSiteOffset = | 169 static const int kAllocationSiteOffset = |
170 StandardFrameConstants::kExpressionsOffset - 1 * kPointerSize; | 170 StandardFrameConstants::kExpressionsOffset - 1 * kPointerSize; |
171 static const int kCodeOffset = | 171 static const int kCodeOffset = |
172 StandardFrameConstants::kExpressionsOffset - 0 * kPointerSize; | 172 StandardFrameConstants::kExpressionsOffset - 0 * kPointerSize; |
173 | 173 |
174 static const int kFrameSize = | 174 static const int kFrameSize = |
175 StandardFrameConstants::kFixedFrameSize + 5 * kPointerSize; | 175 StandardFrameConstants::kFixedFrameSize + 5 * kPointerSize; |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
576 // Debugger access. | 576 // Debugger access. |
577 void SetParameterValue(int index, Object* value) const; | 577 void SetParameterValue(int index, Object* value) const; |
578 | 578 |
579 // Check if this frame is a constructor frame invoked through 'new'. | 579 // Check if this frame is a constructor frame invoked through 'new'. |
580 bool IsConstructor() const; | 580 bool IsConstructor() const; |
581 | 581 |
582 // Determines whether this frame includes inlined activations. To get details | 582 // Determines whether this frame includes inlined activations. To get details |
583 // about the inlined frames use {GetFunctions} and {Summarize}. | 583 // about the inlined frames use {GetFunctions} and {Summarize}. |
584 bool HasInlinedFrames() const; | 584 bool HasInlinedFrames() const; |
585 | 585 |
586 // Returns the original constructor function that was used in the constructor | 586 // Returns the new target function that was used in the constructor call to |
587 // call to this frame. Note that this is only valid on constructor frames. | 587 // this frame. Note that this is only valid on constructor frames. |
588 Object* GetOriginalConstructor() const; | 588 Object* GetNewTarget() const; |
589 | 589 |
590 // Check if this frame has "adapted" arguments in the sense that the | 590 // Check if this frame has "adapted" arguments in the sense that the |
591 // actual passed arguments are available in an arguments adaptor | 591 // actual passed arguments are available in an arguments adaptor |
592 // frame below it on the stack. | 592 // frame below it on the stack. |
593 inline bool has_adapted_arguments() const; | 593 inline bool has_adapted_arguments() const; |
594 int GetArgumentsLength() const; | 594 int GetArgumentsLength() const; |
595 | 595 |
596 // Garbage collection support. | 596 // Garbage collection support. |
597 void Iterate(ObjectVisitor* v) const override; | 597 void Iterate(ObjectVisitor* v) const override; |
598 | 598 |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
958 | 958 |
959 | 959 |
960 // Reads all frames on the current stack and copies them into the current | 960 // Reads all frames on the current stack and copies them into the current |
961 // zone memory. | 961 // zone memory. |
962 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); | 962 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); |
963 | 963 |
964 } // namespace internal | 964 } // namespace internal |
965 } // namespace v8 | 965 } // namespace v8 |
966 | 966 |
967 #endif // V8_FRAMES_H_ | 967 #endif // V8_FRAMES_H_ |
OLD | NEW |