| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 // patching. If there is not enough room a new relocation | 159 // patching. If there is not enough room a new relocation |
| 160 // information object is allocated and comments are added until it | 160 // information object is allocated and comments are added until it |
| 161 // is big enough. | 161 // is big enough. |
| 162 static void EnsureRelocSpaceForLazyDeoptimization(Handle<Code> code); | 162 static void EnsureRelocSpaceForLazyDeoptimization(Handle<Code> code); |
| 163 | 163 |
| 164 // Deoptimize the function now. Its current optimized code will never be run | 164 // Deoptimize the function now. Its current optimized code will never be run |
| 165 // again and any activations of the optimized code will get deoptimized when | 165 // again and any activations of the optimized code will get deoptimized when |
| 166 // execution returns. | 166 // execution returns. |
| 167 static void DeoptimizeFunction(JSFunction* function); | 167 static void DeoptimizeFunction(JSFunction* function); |
| 168 | 168 |
| 169 // Iterate over all the functions which share the same code object |
| 170 // and make them use unoptimized version. |
| 171 static void ReplaceCodeForRelatedFunctions(JSFunction* function, Code* code); |
| 172 |
| 169 // Deoptimize all functions in the heap. | 173 // Deoptimize all functions in the heap. |
| 170 static void DeoptimizeAll(); | 174 static void DeoptimizeAll(); |
| 171 | 175 |
| 172 static void DeoptimizeGlobalObject(JSObject* object); | 176 static void DeoptimizeGlobalObject(JSObject* object); |
| 173 | 177 |
| 174 static void VisitAllOptimizedFunctionsForContext( | 178 static void VisitAllOptimizedFunctionsForContext( |
| 175 Context* context, OptimizedFunctionVisitor* visitor); | 179 Context* context, OptimizedFunctionVisitor* visitor); |
| 176 | 180 |
| 177 static void VisitAllOptimizedFunctionsForGlobalObject( | 181 static void VisitAllOptimizedFunctionsForGlobalObject( |
| 178 JSObject* object, OptimizedFunctionVisitor* visitor); | 182 JSObject* object, OptimizedFunctionVisitor* visitor); |
| (...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 829 Object** expression_stack_; | 833 Object** expression_stack_; |
| 830 int source_position_; | 834 int source_position_; |
| 831 | 835 |
| 832 friend class Deoptimizer; | 836 friend class Deoptimizer; |
| 833 }; | 837 }; |
| 834 #endif | 838 #endif |
| 835 | 839 |
| 836 } } // namespace v8::internal | 840 } } // namespace v8::internal |
| 837 | 841 |
| 838 #endif // V8_DEOPTIMIZER_H_ | 842 #endif // V8_DEOPTIMIZER_H_ |
| OLD | NEW |