| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 }; | 254 }; |
| 255 | 255 |
| 256 | 256 |
| 257 // Exit frames are used to exit JavaScript execution and go to C. | 257 // Exit frames are used to exit JavaScript execution and go to C. |
| 258 class ExitFrame: public StackFrame { | 258 class ExitFrame: public StackFrame { |
| 259 public: | 259 public: |
| 260 virtual Type type() const { return EXIT; } | 260 virtual Type type() const { return EXIT; } |
| 261 | 261 |
| 262 virtual Code* FindCode() const; | 262 virtual Code* FindCode() const; |
| 263 | 263 |
| 264 // Garbage colletion support. | 264 // Garbage collection support. |
| 265 virtual void Iterate(ObjectVisitor* v) const; | 265 virtual void Iterate(ObjectVisitor* v) const; |
| 266 | 266 |
| 267 static ExitFrame* cast(StackFrame* frame) { | 267 static ExitFrame* cast(StackFrame* frame) { |
| 268 ASSERT(frame->is_exit()); | 268 ASSERT(frame->is_exit()); |
| 269 return static_cast<ExitFrame*>(frame); | 269 return static_cast<ExitFrame*>(frame); |
| 270 } | 270 } |
| 271 | 271 |
| 272 // Compute the state and type of an exit frame given a frame | 272 // Compute the state and type of an exit frame given a frame |
| 273 // pointer. Used when constructing the first stack frame seen by an | 273 // pointer. Used when constructing the first stack frame seen by an |
| 274 // iterator and the frames following entry frames. | 274 // iterator and the frames following entry frames. |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 int GetProvidedParametersCount() const; | 383 int GetProvidedParametersCount() const; |
| 384 | 384 |
| 385 // Check if this frame is a constructor frame invoked through 'new'. | 385 // Check if this frame is a constructor frame invoked through 'new'. |
| 386 bool IsConstructor() const; | 386 bool IsConstructor() const; |
| 387 | 387 |
| 388 // Check if this frame has "adapted" arguments in the sense that the | 388 // Check if this frame has "adapted" arguments in the sense that the |
| 389 // actual passed arguments are available in an arguments adaptor | 389 // actual passed arguments are available in an arguments adaptor |
| 390 // frame below it on the stack. | 390 // frame below it on the stack. |
| 391 inline bool has_adapted_arguments() const; | 391 inline bool has_adapted_arguments() const; |
| 392 | 392 |
| 393 // Garbage colletion support. | 393 // Garbage collection support. |
| 394 virtual void Iterate(ObjectVisitor* v) const; | 394 virtual void Iterate(ObjectVisitor* v) const; |
| 395 | 395 |
| 396 // Printing support. | 396 // Printing support. |
| 397 virtual void Print(StringStream* accumulator, | 397 virtual void Print(StringStream* accumulator, |
| 398 PrintMode mode, | 398 PrintMode mode, |
| 399 int index) const; | 399 int index) const; |
| 400 | 400 |
| 401 // Determine the code for the frame. | 401 // Determine the code for the frame. |
| 402 virtual Code* FindCode() const; | 402 virtual Code* FindCode() const; |
| 403 | 403 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 | 452 |
| 453 private: | 453 private: |
| 454 friend class StackFrameIterator; | 454 friend class StackFrameIterator; |
| 455 }; | 455 }; |
| 456 | 456 |
| 457 | 457 |
| 458 class InternalFrame: public StandardFrame { | 458 class InternalFrame: public StandardFrame { |
| 459 public: | 459 public: |
| 460 virtual Type type() const { return INTERNAL; } | 460 virtual Type type() const { return INTERNAL; } |
| 461 | 461 |
| 462 // Garbage colletion support. | 462 // Garbage collection support. |
| 463 virtual void Iterate(ObjectVisitor* v) const; | 463 virtual void Iterate(ObjectVisitor* v) const; |
| 464 | 464 |
| 465 // Determine the code for the frame. | 465 // Determine the code for the frame. |
| 466 virtual Code* FindCode() const; | 466 virtual Code* FindCode() const; |
| 467 | 467 |
| 468 static InternalFrame* cast(StackFrame* frame) { | 468 static InternalFrame* cast(StackFrame* frame) { |
| 469 ASSERT(frame->is_internal()); | 469 ASSERT(frame->is_internal()); |
| 470 return static_cast<InternalFrame*>(frame); | 470 return static_cast<InternalFrame*>(frame); |
| 471 } | 471 } |
| 472 | 472 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 JavaScriptFrame* FindJavaScriptFrame(int n); | 578 JavaScriptFrame* FindJavaScriptFrame(int n); |
| 579 | 579 |
| 580 private: | 580 private: |
| 581 StackFrameIterator iterator_; | 581 StackFrameIterator iterator_; |
| 582 }; | 582 }; |
| 583 | 583 |
| 584 | 584 |
| 585 } } // namespace v8::internal | 585 } } // namespace v8::internal |
| 586 | 586 |
| 587 #endif // V8_FRAMES_H_ | 587 #endif // V8_FRAMES_H_ |
| OLD | NEW |