| 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 RUNTIME_VM_STACK_FRAME_H_ | 5 #ifndef RUNTIME_VM_STACK_FRAME_H_ |
| 6 #define RUNTIME_VM_STACK_FRAME_H_ | 6 #define RUNTIME_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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 } | 94 } |
| 95 virtual bool IsStubFrame() const; | 95 virtual bool IsStubFrame() const; |
| 96 virtual bool IsEntryFrame() const { return false; } | 96 virtual bool IsEntryFrame() const { return false; } |
| 97 virtual bool IsExitFrame() const { return false; } | 97 virtual bool IsExitFrame() const { return false; } |
| 98 | 98 |
| 99 RawFunction* LookupDartFunction() const; | 99 RawFunction* LookupDartFunction() const; |
| 100 RawCode* LookupDartCode() const; | 100 RawCode* LookupDartCode() const; |
| 101 bool FindExceptionHandler(Thread* thread, | 101 bool FindExceptionHandler(Thread* thread, |
| 102 uword* handler_pc, | 102 uword* handler_pc, |
| 103 bool* needs_stacktrace, | 103 bool* needs_stacktrace, |
| 104 bool* is_catch_all) const; | 104 bool* is_catch_all, |
| 105 bool* is_optimized) const; |
| 105 // Returns token_pos of the pc(), or -1 if none exists. | 106 // Returns token_pos of the pc(), or -1 if none exists. |
| 106 TokenPosition GetTokenPos() const; | 107 TokenPosition GetTokenPos() const; |
| 107 | 108 |
| 108 protected: | 109 protected: |
| 109 explicit StackFrame(Thread* thread) | 110 explicit StackFrame(Thread* thread) |
| 110 : fp_(0), sp_(0), pc_(0), thread_(thread) {} | 111 : fp_(0), sp_(0), pc_(0), thread_(thread) {} |
| 111 | 112 |
| 112 // Name of the frame, used for generic frame printing functionality. | 113 // Name of the frame, used for generic frame printing functionality. |
| 113 virtual const char* GetName() const { | 114 virtual const char* GetName() const { |
| 114 return IsStubFrame() ? "stub" : "dart"; | 115 return IsStubFrame() ? "stub" : "dart"; |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 | 403 |
| 403 | 404 |
| 404 DART_FORCE_INLINE static uword LocalVarAddress(uword fp, intptr_t index) { | 405 DART_FORCE_INLINE static uword LocalVarAddress(uword fp, intptr_t index) { |
| 405 return fp + LocalVarIndex(0, index) * kWordSize; | 406 return fp + LocalVarIndex(0, index) * kWordSize; |
| 406 } | 407 } |
| 407 | 408 |
| 408 | 409 |
| 409 } // namespace dart | 410 } // namespace dart |
| 410 | 411 |
| 411 #endif // RUNTIME_VM_STACK_FRAME_H_ | 412 #endif // RUNTIME_VM_STACK_FRAME_H_ |
| OLD | NEW |