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

Side by Side Diff: src/frames.h

Issue 991893003: Remove frame pointer from StackHandler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_stack-handler-1
Patch Set: Created 5 years, 9 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/macro-assembler-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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 class StackHandlerConstants : public AllStatic { 69 class StackHandlerConstants : public AllStatic {
70 public: 70 public:
71 static const int kNextOffset = 0 * kPointerSize; 71 static const int kNextOffset = 0 * kPointerSize;
72 static const int kStateOffset = 1 * kPointerSize; 72 static const int kStateOffset = 1 * kPointerSize;
73 #if V8_TARGET_LITTLE_ENDIAN || !V8_HOST_ARCH_64_BIT 73 #if V8_TARGET_LITTLE_ENDIAN || !V8_HOST_ARCH_64_BIT
74 static const int kStateIntOffset = kStateOffset; 74 static const int kStateIntOffset = kStateOffset;
75 #else 75 #else
76 static const int kStateIntOffset = kStateOffset + kIntSize; 76 static const int kStateIntOffset = kStateOffset + kIntSize;
77 #endif 77 #endif
78 static const int kContextOffset = 2 * kPointerSize; 78 static const int kContextOffset = 2 * kPointerSize;
79 static const int kFPOffset = 3 * kPointerSize;
80 79
81 static const int kSize = kFPOffset + kFPOnStackSize; 80 static const int kSize = kContextOffset + kPointerSize;
82 static const int kSlotCount = kSize >> kPointerSizeLog2; 81 static const int kSlotCount = kSize >> kPointerSizeLog2;
83 }; 82 };
84 83
85 84
86 class StackHandler BASE_EMBEDDED { 85 class StackHandler BASE_EMBEDDED {
87 public: 86 public:
88 enum Kind { 87 enum Kind {
89 JS_ENTRY, 88 JS_ENTRY,
90 CATCH, 89 CATCH,
91 FINALLY, 90 FINALLY,
(...skipping 18 matching lines...) Expand all
110 // Garbage collection support. 109 // Garbage collection support.
111 inline void Iterate(ObjectVisitor* v, Code* holder) const; 110 inline void Iterate(ObjectVisitor* v, Code* holder) const;
112 111
113 // Conversion support. 112 // Conversion support.
114 static inline StackHandler* FromAddress(Address address); 113 static inline StackHandler* FromAddress(Address address);
115 114
116 // Accessors. 115 // Accessors.
117 inline Context* context() const; 116 inline Context* context() const;
118 inline Kind kind() const; 117 inline Kind kind() const;
119 inline unsigned index() const; 118 inline unsigned index() const;
120 inline Address frame_pointer() const;
121 119
122 // Testers. 120 // Testers.
123 inline bool is_js_entry() const; 121 inline bool is_js_entry() const;
124 inline bool is_catch() const; 122 inline bool is_catch() const;
125 inline bool is_finally() const; 123 inline bool is_finally() const;
126 124
127 // Generator support to preserve stack handlers. 125 // Generator support to preserve stack handlers.
128 void Unwind(Isolate* isolate, FixedArray* array, int offset, 126 void Unwind(Isolate* isolate, FixedArray* array, int offset,
129 int previous_handler_offset) const; 127 int previous_handler_offset) const;
130 int Rewind(Isolate* isolate, FixedArray* array, int offset, Address fp); 128 int Rewind(Isolate* isolate, FixedArray* array, int offset, Address fp);
131 129
132 private: 130 private:
133 inline Object** context_address() const; 131 inline Object** context_address() const;
134 inline void SetFp(Address slot, Address fp);
135 132
136 DISALLOW_IMPLICIT_CONSTRUCTORS(StackHandler); 133 DISALLOW_IMPLICIT_CONSTRUCTORS(StackHandler);
137 }; 134 };
138 135
139 136
140 #define STACK_FRAME_TYPE_LIST(V) \ 137 #define STACK_FRAME_TYPE_LIST(V) \
141 V(ENTRY, EntryFrame) \ 138 V(ENTRY, EntryFrame) \
142 V(ENTRY_CONSTRUCT, EntryConstructFrame) \ 139 V(ENTRY_CONSTRUCT, EntryConstructFrame) \
143 V(EXIT, ExitFrame) \ 140 V(EXIT, ExitFrame) \
144 V(JAVA_SCRIPT, JavaScriptFrame) \ 141 V(JAVA_SCRIPT, JavaScriptFrame) \
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 }; 932 };
936 933
937 934
938 // Reads all frames on the current stack and copies them into the current 935 // Reads all frames on the current stack and copies them into the current
939 // zone memory. 936 // zone memory.
940 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); 937 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone);
941 938
942 } } // namespace v8::internal 939 } } // namespace v8::internal
943 940
944 #endif // V8_FRAMES_H_ 941 #endif // V8_FRAMES_H_
OLDNEW
« no previous file with comments | « src/arm64/macro-assembler-arm64.cc ('k') | src/frames.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698