| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 ASSERT(IsValid()); | 50 ASSERT(IsValid()); |
| 51 return !(IsEntryFrame() || IsExitFrame() || IsStubFrame()); | 51 return !(IsEntryFrame() || IsExitFrame() || IsStubFrame()); |
| 52 } | 52 } |
| 53 virtual bool IsStubFrame() const; | 53 virtual bool IsStubFrame() const; |
| 54 virtual bool IsEntryFrame() const { return false; } | 54 virtual bool IsEntryFrame() const { return false; } |
| 55 virtual bool IsExitFrame() const { return false; } | 55 virtual bool IsExitFrame() const { return false; } |
| 56 | 56 |
| 57 RawFunction* LookupDartFunction() const; | 57 RawFunction* LookupDartFunction() const; |
| 58 RawCode* LookupDartCode() const; | 58 RawCode* LookupDartCode() const; |
| 59 bool FindExceptionHandler(uword* handler_pc) const; | 59 bool FindExceptionHandler(uword* handler_pc) const; |
| 60 // Returns token_pos of the pc(), or -1 if none exists. |
| 61 intptr_t GetTokenPos() const; |
| 62 |
| 60 | 63 |
| 61 protected: | 64 protected: |
| 62 StackFrame() : fp_(0), sp_(0) { } | 65 StackFrame() : fp_(0), sp_(0) { } |
| 63 | 66 |
| 64 // Name of the frame, used for generic frame printing functionality. | 67 // Name of the frame, used for generic frame printing functionality. |
| 65 virtual const char* GetName() const { return IsStubFrame()? "stub" : "dart"; } | 68 virtual const char* GetName() const { return IsStubFrame()? "stub" : "dart"; } |
| 66 | 69 |
| 67 private: | 70 private: |
| 68 RawCode* GetCodeObject() const; | 71 RawCode* GetCodeObject() const; |
| 69 | 72 |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 | 221 |
| 219 private: | 222 private: |
| 220 StackFrameIterator frames_; | 223 StackFrameIterator frames_; |
| 221 | 224 |
| 222 DISALLOW_COPY_AND_ASSIGN(DartFrameIterator); | 225 DISALLOW_COPY_AND_ASSIGN(DartFrameIterator); |
| 223 }; | 226 }; |
| 224 | 227 |
| 225 } // namespace dart | 228 } // namespace dart |
| 226 | 229 |
| 227 #endif // VM_STACK_FRAME_H_ | 230 #endif // VM_STACK_FRAME_H_ |
| OLD | NEW |