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...) Expand 10 before | Expand all | Expand 10 after 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() { | 752 int GetSourcePosition() { |
753 return reinterpret_cast<Address>(pc_); | 753 return source_position_; |
754 } | 754 } |
755 | 755 |
756 private: | 756 private: |
757 // Set the frame function. | 757 // Set the frame function. |
758 void SetFunction(JSFunction* function) { | 758 void SetFunction(JSFunction* function) { |
759 function_ = function; | 759 function_ = function; |
760 } | 760 } |
761 | 761 |
762 // Set an incoming argument. | 762 // Set an incoming argument. |
763 void SetParameter(int index, Object* obj) { | 763 void SetParameter(int index, Object* obj) { |
764 ASSERT(0 <= index && index < parameters_count()); | 764 ASSERT(0 <= index && index < parameters_count()); |
765 parameters_[index] = obj; | 765 parameters_[index] = obj; |
766 } | 766 } |
767 | 767 |
768 // Set an expression on the expression stack. | 768 // Set an expression on the expression stack. |
769 void SetExpression(int index, Object* obj) { | 769 void SetExpression(int index, Object* obj) { |
770 ASSERT(0 <= index && index < expression_count()); | 770 ASSERT(0 <= index && index < expression_count()); |
771 expression_stack_[index] = obj; | 771 expression_stack_[index] = obj; |
772 } | 772 } |
773 | 773 |
774 JSFunction* function_; | 774 JSFunction* function_; |
775 int parameters_count_; | 775 int parameters_count_; |
776 int expression_count_; | 776 int expression_count_; |
777 Object** parameters_; | 777 Object** parameters_; |
778 Object** expression_stack_; | 778 Object** expression_stack_; |
779 intptr_t pc_; | 779 int source_position_; |
780 | 780 |
781 friend class Deoptimizer; | 781 friend class Deoptimizer; |
782 }; | 782 }; |
783 #endif | 783 #endif |
784 | 784 |
785 } } // namespace v8::internal | 785 } } // namespace v8::internal |
786 | 786 |
787 #endif // V8_DEOPTIMIZER_H_ | 787 #endif // V8_DEOPTIMIZER_H_ |
OLD | NEW |