Chromium Code Reviews| 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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 234 DISALLOW_COPY_AND_ASSIGN(StackFrameIterator); | 234 DISALLOW_COPY_AND_ASSIGN(StackFrameIterator); |
| 235 }; | 235 }; |
| 236 | 236 |
| 237 | 237 |
| 238 // Iterator for iterating over all dart frames (skips over exit frames, | 238 // Iterator for iterating over all dart frames (skips over exit frames, |
| 239 // entry frames and stub frames). | 239 // entry frames and stub frames). |
| 240 class DartFrameIterator : public ValueObject { | 240 class DartFrameIterator : public ValueObject { |
| 241 public: | 241 public: |
| 242 DartFrameIterator() : frames_(StackFrameIterator::kDontValidateFrames) { } | 242 DartFrameIterator() : frames_(StackFrameIterator::kDontValidateFrames) { } |
| 243 explicit DartFrameIterator(uword last_fp) | 243 explicit DartFrameIterator(uword last_fp) |
| 244 : frames_(last_fp, StackFrameIterator::kDontValidateFrames) {} | 244 : frames_(last_fp, StackFrameIterator::kDontValidateFrames) { } |
| 245 explicit DartFrameIterator(uword fp, uword sp, uword pc) | |
|
siva
2014/04/10 17:58:22
explicit not needed as it has more than one parame
Cutch
2014/04/10 20:17:32
Done.
| |
| 246 : frames_(fp, sp, pc, StackFrameIterator::kDontValidateFrames) { } | |
| 245 // Get next dart frame. | 247 // Get next dart frame. |
| 246 StackFrame* NextFrame() { | 248 StackFrame* NextFrame() { |
| 247 StackFrame* frame = frames_.NextFrame(); | 249 StackFrame* frame = frames_.NextFrame(); |
| 248 while (frame != NULL && !frame->IsDartFrame()) { | 250 while (frame != NULL && !frame->IsDartFrame()) { |
| 249 frame = frames_.NextFrame(); | 251 frame = frames_.NextFrame(); |
| 250 } | 252 } |
| 251 return frame; | 253 return frame; |
| 252 } | 254 } |
| 253 | 255 |
| 254 private: | 256 private: |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 295 uword pc_; | 297 uword pc_; |
| 296 GrowableArray<DeoptInstr*> deopt_instructions_; | 298 GrowableArray<DeoptInstr*> deopt_instructions_; |
| 297 Array& object_table_; | 299 Array& object_table_; |
| 298 | 300 |
| 299 DISALLOW_COPY_AND_ASSIGN(InlinedFunctionsIterator); | 301 DISALLOW_COPY_AND_ASSIGN(InlinedFunctionsIterator); |
| 300 }; | 302 }; |
| 301 | 303 |
| 302 } // namespace dart | 304 } // namespace dart |
| 303 | 305 |
| 304 #endif // VM_STACK_FRAME_H_ | 306 #endif // VM_STACK_FRAME_H_ |
| OLD | NEW |