| 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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 private: | 222 private: |
| 223 StackFrameIterator frames_; | 223 StackFrameIterator frames_; |
| 224 | 224 |
| 225 DISALLOW_COPY_AND_ASSIGN(DartFrameIterator); | 225 DISALLOW_COPY_AND_ASSIGN(DartFrameIterator); |
| 226 }; | 226 }; |
| 227 | 227 |
| 228 | 228 |
| 229 // Iterator for iterating over all inlined dart functions in an optimized | 229 // Iterator for iterating over all inlined dart functions in an optimized |
| 230 // dart frame (the iteration includes the function that is inlining the | 230 // dart frame (the iteration includes the function that is inlining the |
| 231 // other functions). | 231 // other functions). |
| 232 class InlinedFunctionsInDartFrameIterator : public ValueObject { | 232 class InlinedFunctionsIterator : public ValueObject { |
| 233 public: | 233 public: |
| 234 explicit InlinedFunctionsInDartFrameIterator(StackFrame* frame); | 234 explicit InlinedFunctionsIterator(StackFrame* frame); |
| 235 RawFunction* GetNextFunction(uword* pc); | 235 bool Done() const { return index_ == -1; } |
| 236 void Advance(); |
| 237 |
| 238 RawFunction* function() const { |
| 239 ASSERT(!Done()); |
| 240 return function_.raw(); |
| 241 } |
| 242 |
| 243 uword pc() const { |
| 244 ASSERT(!Done()); |
| 245 return pc_; |
| 246 } |
| 247 |
| 248 RawCode* code() const { |
| 249 ASSERT(!Done()); |
| 250 return code_.raw(); |
| 251 } |
| 236 | 252 |
| 237 private: | 253 private: |
| 254 void SetDone() { index_ = -1; } |
| 255 |
| 238 intptr_t index_; | 256 intptr_t index_; |
| 257 Code& code_; |
| 258 DeoptInfo& deopt_info_; |
| 259 Function& function_; |
| 260 uword pc_; |
| 239 GrowableArray<DeoptInstr*> deopt_instructions_; | 261 GrowableArray<DeoptInstr*> deopt_instructions_; |
| 240 Array& object_table_; | 262 Array& object_table_; |
| 241 | 263 |
| 242 DISALLOW_COPY_AND_ASSIGN(InlinedFunctionsInDartFrameIterator); | 264 DISALLOW_COPY_AND_ASSIGN(InlinedFunctionsIterator); |
| 243 }; | 265 }; |
| 244 | 266 |
| 245 } // namespace dart | 267 } // namespace dart |
| 246 | 268 |
| 247 #endif // VM_STACK_FRAME_H_ | 269 #endif // VM_STACK_FRAME_H_ |
| OLD | NEW |