| 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 static void DeoptimizeAll(Isolate* isolate); | 170 static void DeoptimizeAll(Isolate* isolate); |
| 171 | 171 |
| 172 // Deoptimize code associated with the given global object. | 172 // Deoptimize code associated with the given global object. |
| 173 static void DeoptimizeGlobalObject(JSObject* object); | 173 static void DeoptimizeGlobalObject(JSObject* object); |
| 174 | 174 |
| 175 // Deoptimizes all optimized code that has been previously marked | 175 // Deoptimizes all optimized code that has been previously marked |
| 176 // (via code->set_marked_for_deoptimization) and unlinks all functions that | 176 // (via code->set_marked_for_deoptimization) and unlinks all functions that |
| 177 // refer to that code. | 177 // refer to that code. |
| 178 static void DeoptimizeMarkedCode(Isolate* isolate); | 178 static void DeoptimizeMarkedCode(Isolate* isolate); |
| 179 | 179 |
| 180 static void PatchStackForMarkedCode(Isolate* isolate); |
| 181 |
| 180 // Visit all the known optimized functions in a given isolate. | 182 // Visit all the known optimized functions in a given isolate. |
| 181 static void VisitAllOptimizedFunctions( | 183 static void VisitAllOptimizedFunctions( |
| 182 Isolate* isolate, OptimizedFunctionVisitor* visitor); | 184 Isolate* isolate, OptimizedFunctionVisitor* visitor); |
| 183 | 185 |
| 184 // The size in bytes of the code required at a lazy deopt patch site. | 186 // The size in bytes of the code required at a lazy deopt patch site. |
| 185 static int patch_size(); | 187 static int patch_size(); |
| 186 | 188 |
| 187 ~Deoptimizer(); | 189 ~Deoptimizer(); |
| 188 | 190 |
| 189 void MaterializeHeapObjects(JavaScriptFrameIterator* it); | 191 void MaterializeHeapObjects(JavaScriptFrameIterator* it); |
| (...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 962 Object** parameters_; | 964 Object** parameters_; |
| 963 Object** expression_stack_; | 965 Object** expression_stack_; |
| 964 int source_position_; | 966 int source_position_; |
| 965 | 967 |
| 966 friend class Deoptimizer; | 968 friend class Deoptimizer; |
| 967 }; | 969 }; |
| 968 | 970 |
| 969 } } // namespace v8::internal | 971 } } // namespace v8::internal |
| 970 | 972 |
| 971 #endif // V8_DEOPTIMIZER_H_ | 973 #endif // V8_DEOPTIMIZER_H_ |
| OLD | NEW |