OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 731 matching lines...) Loading... |
742 ASSERT(0 <= index && index < parameters_count()); | 742 ASSERT(0 <= index && index < parameters_count()); |
743 return parameters_[index]; | 743 return parameters_[index]; |
744 } | 744 } |
745 | 745 |
746 // Get an expression from the expression stack. | 746 // Get an expression from the expression stack. |
747 Object* GetExpression(int index) { | 747 Object* GetExpression(int index) { |
748 ASSERT(0 <= index && index < expression_count()); | 748 ASSERT(0 <= index && index < expression_count()); |
749 return expression_stack_[index]; | 749 return expression_stack_[index]; |
750 } | 750 } |
751 | 751 |
| 752 Address GetPc() { |
| 753 return reinterpret_cast<Address>(pc_); |
| 754 } |
| 755 |
752 private: | 756 private: |
753 // Set the frame function. | 757 // Set the frame function. |
754 void SetFunction(JSFunction* function) { | 758 void SetFunction(JSFunction* function) { |
755 function_ = function; | 759 function_ = function; |
756 } | 760 } |
757 | 761 |
758 // Set an incoming argument. | 762 // Set an incoming argument. |
759 void SetParameter(int index, Object* obj) { | 763 void SetParameter(int index, Object* obj) { |
760 ASSERT(0 <= index && index < parameters_count()); | 764 ASSERT(0 <= index && index < parameters_count()); |
761 parameters_[index] = obj; | 765 parameters_[index] = obj; |
762 } | 766 } |
763 | 767 |
764 // Set an expression on the expression stack. | 768 // Set an expression on the expression stack. |
765 void SetExpression(int index, Object* obj) { | 769 void SetExpression(int index, Object* obj) { |
766 ASSERT(0 <= index && index < expression_count()); | 770 ASSERT(0 <= index && index < expression_count()); |
767 expression_stack_[index] = obj; | 771 expression_stack_[index] = obj; |
768 } | 772 } |
769 | 773 |
770 JSFunction* function_; | 774 JSFunction* function_; |
771 int parameters_count_; | 775 int parameters_count_; |
772 int expression_count_; | 776 int expression_count_; |
773 Object** parameters_; | 777 Object** parameters_; |
774 Object** expression_stack_; | 778 Object** expression_stack_; |
| 779 intptr_t pc_; |
775 | 780 |
776 friend class Deoptimizer; | 781 friend class Deoptimizer; |
777 }; | 782 }; |
778 #endif | 783 #endif |
779 | 784 |
780 } } // namespace v8::internal | 785 } } // namespace v8::internal |
781 | 786 |
782 #endif // V8_DEOPTIMIZER_H_ | 787 #endif // V8_DEOPTIMIZER_H_ |
OLD | NEW |