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 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 static void EnsureRelocSpaceForLazyDeoptimization(Handle<Code> code); | 477 static void EnsureRelocSpaceForLazyDeoptimization(Handle<Code> code); |
478 | 478 |
479 // Deoptimize the function now. Its current optimized code will never be run | 479 // Deoptimize the function now. Its current optimized code will never be run |
480 // again and any activations of the optimized code will get deoptimized when | 480 // again and any activations of the optimized code will get deoptimized when |
481 // execution returns. | 481 // execution returns. |
482 static void DeoptimizeFunction(JSFunction* function); | 482 static void DeoptimizeFunction(JSFunction* function); |
483 | 483 |
484 // Deoptimize all code in the given isolate. | 484 // Deoptimize all code in the given isolate. |
485 static void DeoptimizeAll(Isolate* isolate); | 485 static void DeoptimizeAll(Isolate* isolate); |
486 | 486 |
487 // Deoptimize code associated with the given global object. | |
488 static void DeoptimizeGlobalObject(JSObject* object); | |
489 | |
490 // Deoptimizes all optimized code that has been previously marked | 487 // Deoptimizes all optimized code that has been previously marked |
491 // (via code->set_marked_for_deoptimization) and unlinks all functions that | 488 // (via code->set_marked_for_deoptimization) and unlinks all functions that |
492 // refer to that code. | 489 // refer to that code. |
493 static void DeoptimizeMarkedCode(Isolate* isolate); | 490 static void DeoptimizeMarkedCode(Isolate* isolate); |
494 | 491 |
495 // Visit all the known optimized functions in a given isolate. | 492 // Visit all the known optimized functions in a given isolate. |
496 static void VisitAllOptimizedFunctions( | 493 static void VisitAllOptimizedFunctions( |
497 Isolate* isolate, OptimizedFunctionVisitor* visitor); | 494 Isolate* isolate, OptimizedFunctionVisitor* visitor); |
498 | 495 |
499 // The size in bytes of the code required at a lazy deopt patch site. | 496 // The size in bytes of the code required at a lazy deopt patch site. |
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1141 Object** expression_stack_; | 1138 Object** expression_stack_; |
1142 int source_position_; | 1139 int source_position_; |
1143 | 1140 |
1144 friend class Deoptimizer; | 1141 friend class Deoptimizer; |
1145 }; | 1142 }; |
1146 | 1143 |
1147 } // namespace internal | 1144 } // namespace internal |
1148 } // namespace v8 | 1145 } // namespace v8 |
1149 | 1146 |
1150 #endif // V8_DEOPTIMIZER_H_ | 1147 #endif // V8_DEOPTIMIZER_H_ |
OLD | NEW |