OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_DEOPTIMIZER_H_ | 5 #ifndef V8_DEOPTIMIZER_H_ |
6 #define V8_DEOPTIMIZER_H_ | 6 #define V8_DEOPTIMIZER_H_ |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
915 int parameters_count() { return parameters_count_; } | 915 int parameters_count() { return parameters_count_; } |
916 | 916 |
917 // Return the height of the expression stack. | 917 // Return the height of the expression stack. |
918 int expression_count() { return expression_count_; } | 918 int expression_count() { return expression_count_; } |
919 | 919 |
920 // Get the frame function. | 920 // Get the frame function. |
921 JSFunction* GetFunction() { | 921 JSFunction* GetFunction() { |
922 return function_; | 922 return function_; |
923 } | 923 } |
924 | 924 |
| 925 // Get the frame context. |
| 926 Object* GetContext() { return context_; } |
| 927 |
925 // Check if this frame is preceded by construct stub frame. The bottom-most | 928 // Check if this frame is preceded by construct stub frame. The bottom-most |
926 // inlined frame might still be called by an uninlined construct stub. | 929 // inlined frame might still be called by an uninlined construct stub. |
927 bool HasConstructStub() { | 930 bool HasConstructStub() { |
928 return has_construct_stub_; | 931 return has_construct_stub_; |
929 } | 932 } |
930 | 933 |
931 // Get an incoming argument. | 934 // Get an incoming argument. |
932 Object* GetParameter(int index) { | 935 Object* GetParameter(int index) { |
933 DCHECK(0 <= index && index < parameters_count()); | 936 DCHECK(0 <= index && index < parameters_count()); |
934 return parameters_[index]; | 937 return parameters_[index]; |
(...skipping 16 matching lines...) Expand all Loading... |
951 parameters_[index] = obj; | 954 parameters_[index] = obj; |
952 } | 955 } |
953 | 956 |
954 // Set an expression on the expression stack. | 957 // Set an expression on the expression stack. |
955 void SetExpression(int index, Object* obj) { | 958 void SetExpression(int index, Object* obj) { |
956 DCHECK(0 <= index && index < expression_count()); | 959 DCHECK(0 <= index && index < expression_count()); |
957 expression_stack_[index] = obj; | 960 expression_stack_[index] = obj; |
958 } | 961 } |
959 | 962 |
960 JSFunction* function_; | 963 JSFunction* function_; |
| 964 Object* context_; |
961 bool has_construct_stub_; | 965 bool has_construct_stub_; |
962 int parameters_count_; | 966 int parameters_count_; |
963 int expression_count_; | 967 int expression_count_; |
964 Object** parameters_; | 968 Object** parameters_; |
965 Object** expression_stack_; | 969 Object** expression_stack_; |
966 int source_position_; | 970 int source_position_; |
967 | 971 |
968 friend class Deoptimizer; | 972 friend class Deoptimizer; |
969 }; | 973 }; |
970 | 974 |
971 } } // namespace v8::internal | 975 } } // namespace v8::internal |
972 | 976 |
973 #endif // V8_DEOPTIMIZER_H_ | 977 #endif // V8_DEOPTIMIZER_H_ |
OLD | NEW |