| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VM_STACK_FRAME_H_ | 5 #ifndef VM_STACK_FRAME_H_ |
| 6 #define VM_STACK_FRAME_H_ | 6 #define VM_STACK_FRAME_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 #include "vm/object.h" | 9 #include "vm/object.h" |
| 10 #include "vm/stub_code.h" | 10 #include "vm/stub_code.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 // Visit objects in the frame. | 34 // Visit objects in the frame. |
| 35 virtual void VisitObjectPointers(ObjectPointerVisitor* visitor); | 35 virtual void VisitObjectPointers(ObjectPointerVisitor* visitor); |
| 36 | 36 |
| 37 // Print a frame. | 37 // Print a frame. |
| 38 virtual void Print() const; | 38 virtual void Print() const; |
| 39 | 39 |
| 40 // Check validity of a frame, used for assertion purposes. | 40 // Check validity of a frame, used for assertion purposes. |
| 41 virtual bool IsValid() const; | 41 virtual bool IsValid() const; |
| 42 | 42 |
| 43 // Frame type. | 43 // Frame type. |
| 44 virtual bool IsDartFrame() const { return LookupDartCode() != Code::null(); } | 44 virtual bool IsDartFrame() const { |
| 45 ASSERT(IsValid()); |
| 46 return !(IsStubFrame() || IsEntryFrame() || IsExitFrame()); |
| 47 } |
| 45 virtual bool IsStubFrame() const; | 48 virtual bool IsStubFrame() const; |
| 46 virtual bool IsEntryFrame() const { return false; } | 49 virtual bool IsEntryFrame() const { return false; } |
| 47 virtual bool IsExitFrame() const { return false; } | 50 virtual bool IsExitFrame() const { return false; } |
| 48 | 51 |
| 49 RawFunction* LookupDartFunction() const; | 52 RawFunction* LookupDartFunction() const; |
| 50 RawCode* LookupDartCode() const; | 53 RawCode* LookupDartCode() const; |
| 51 bool FindExceptionHandler(uword* handler_pc) const; | 54 bool FindExceptionHandler(uword* handler_pc) const; |
| 52 | 55 |
| 53 // Find code object corresponding to pc (only frames running dart code or | 56 // Find code object corresponding to pc (only frames running dart code or |
| 54 // stub code will have a code object associated with them). | 57 // stub code will have a code object associated with them). |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 | 228 |
| 226 private: | 229 private: |
| 227 StackFrameIterator frames_; | 230 StackFrameIterator frames_; |
| 228 | 231 |
| 229 DISALLOW_COPY_AND_ASSIGN(DartFrameIterator); | 232 DISALLOW_COPY_AND_ASSIGN(DartFrameIterator); |
| 230 }; | 233 }; |
| 231 | 234 |
| 232 } // namespace dart | 235 } // namespace dart |
| 233 | 236 |
| 234 #endif // VM_STACK_FRAME_H_ | 237 #endif // VM_STACK_FRAME_H_ |
| OLD | NEW |