| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 107 |
| 108 // Tells whether the given address is inside this handler. | 108 // Tells whether the given address is inside this handler. |
| 109 inline bool includes(Address address) const; | 109 inline bool includes(Address address) const; |
| 110 | 110 |
| 111 // Garbage collection support. | 111 // Garbage collection support. |
| 112 inline void Iterate(ObjectVisitor* v, Code* holder) const; | 112 inline void Iterate(ObjectVisitor* v, Code* holder) const; |
| 113 | 113 |
| 114 // Conversion support. | 114 // Conversion support. |
| 115 static inline StackHandler* FromAddress(Address address); | 115 static inline StackHandler* FromAddress(Address address); |
| 116 | 116 |
| 117 // Testers | 117 // Accessors. |
| 118 inline Context* context() const; |
| 119 inline Code* code() const; |
| 120 inline Kind kind() const; |
| 121 inline unsigned index() const; |
| 122 inline Address frame_pointer() const; |
| 123 |
| 124 // Testers. |
| 118 inline bool is_js_entry() const; | 125 inline bool is_js_entry() const; |
| 119 inline bool is_catch() const; | 126 inline bool is_catch() const; |
| 120 inline bool is_finally() const; | 127 inline bool is_finally() const; |
| 121 | 128 |
| 122 // Generator support to preserve stack handlers. | 129 // Generator support to preserve stack handlers. |
| 123 void Unwind(Isolate* isolate, FixedArray* array, int offset, | 130 void Unwind(Isolate* isolate, FixedArray* array, int offset, |
| 124 int previous_handler_offset) const; | 131 int previous_handler_offset) const; |
| 125 int Rewind(Isolate* isolate, FixedArray* array, int offset, Address fp); | 132 int Rewind(Isolate* isolate, FixedArray* array, int offset, Address fp); |
| 126 | 133 |
| 127 private: | 134 private: |
| 128 // Accessors. | |
| 129 inline Kind kind() const; | |
| 130 inline unsigned index() const; | |
| 131 | |
| 132 inline Object** constant_pool_address() const; | |
| 133 inline Object** context_address() const; | 135 inline Object** context_address() const; |
| 134 inline Object** code_address() const; | 136 inline Object** code_address() const; |
| 135 inline void SetFp(Address slot, Address fp); | 137 inline void SetFp(Address slot, Address fp); |
| 136 | 138 |
| 137 DISALLOW_IMPLICIT_CONSTRUCTORS(StackHandler); | 139 DISALLOW_IMPLICIT_CONSTRUCTORS(StackHandler); |
| 138 }; | 140 }; |
| 139 | 141 |
| 140 | 142 |
| 141 #define STACK_FRAME_TYPE_LIST(V) \ | 143 #define STACK_FRAME_TYPE_LIST(V) \ |
| 142 V(ENTRY, EntryFrame) \ | 144 V(ENTRY, EntryFrame) \ |
| (...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 937 }; | 939 }; |
| 938 | 940 |
| 939 | 941 |
| 940 // Reads all frames on the current stack and copies them into the current | 942 // Reads all frames on the current stack and copies them into the current |
| 941 // zone memory. | 943 // zone memory. |
| 942 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); | 944 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); |
| 943 | 945 |
| 944 } } // namespace v8::internal | 946 } } // namespace v8::internal |
| 945 | 947 |
| 946 #endif // V8_FRAMES_H_ | 948 #endif // V8_FRAMES_H_ |
| OLD | NEW |