OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
658 public: | 658 public: |
659 DeoptimizedFrameInfo(Deoptimizer* deoptimizer, int frame_index); | 659 DeoptimizedFrameInfo(Deoptimizer* deoptimizer, int frame_index); |
660 virtual ~DeoptimizedFrameInfo(); | 660 virtual ~DeoptimizedFrameInfo(); |
661 | 661 |
662 // GC support. | 662 // GC support. |
663 void Iterate(ObjectVisitor* v); | 663 void Iterate(ObjectVisitor* v); |
664 | 664 |
665 // Return the height of the expression stack. | 665 // Return the height of the expression stack. |
666 int expression_count() { return expression_count_; } | 666 int expression_count() { return expression_count_; } |
667 | 667 |
668 // Get the frame function. | |
669 Object* GetFunction() { | |
Sven Panne
2011/07/06 12:24:19
Why should we make the typing weaker here than it
Søren Thygesen Gjesse
2011/07/06 13:01:43
Good point, changed to JSFunction*.
| |
670 return function_; | |
671 } | |
672 | |
668 // Get an expression from the expression stack. | 673 // Get an expression from the expression stack. |
669 Object* GetExpression(int index) { | 674 Object* GetExpression(int index) { |
670 ASSERT(0 <= index && index < expression_count()); | 675 ASSERT(0 <= index && index < expression_count()); |
671 return expression_stack_[index]; | 676 return expression_stack_[index]; |
672 } | 677 } |
673 | 678 |
674 private: | 679 private: |
680 // Set the frame function. | |
681 void SetFunction(JSFunction* function) { | |
682 function_ = function; | |
683 } | |
684 | |
675 // Set an expression on the expression stack. | 685 // Set an expression on the expression stack. |
676 void SetExpression(int index, Object* obj) { | 686 void SetExpression(int index, Object* obj) { |
677 ASSERT(0 <= index && index < expression_count()); | 687 ASSERT(0 <= index && index < expression_count()); |
678 expression_stack_[index] = obj; | 688 expression_stack_[index] = obj; |
679 } | 689 } |
680 | 690 |
691 Object* function_; | |
681 int expression_count_; | 692 int expression_count_; |
682 Object** expression_stack_; | 693 Object** expression_stack_; |
683 | 694 |
684 friend class Deoptimizer; | 695 friend class Deoptimizer; |
685 }; | 696 }; |
686 #endif | 697 #endif |
687 | 698 |
688 } } // namespace v8::internal | 699 } } // namespace v8::internal |
689 | 700 |
690 #endif // V8_DEOPTIMIZER_H_ | 701 #endif // V8_DEOPTIMIZER_H_ |
OLD | NEW |