| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 |
| 11 // with the distribution. | 11 // with the distribution. |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 static void DeoptimizeGlobalObject(JSObject* object); | 147 static void DeoptimizeGlobalObject(JSObject* object); |
| 148 | 148 |
| 149 static void VisitAllOptimizedFunctionsForContext( | 149 static void VisitAllOptimizedFunctionsForContext( |
| 150 Context* context, OptimizedFunctionVisitor* visitor); | 150 Context* context, OptimizedFunctionVisitor* visitor); |
| 151 | 151 |
| 152 static void VisitAllOptimizedFunctionsForGlobalObject( | 152 static void VisitAllOptimizedFunctionsForGlobalObject( |
| 153 JSObject* object, OptimizedFunctionVisitor* visitor); | 153 JSObject* object, OptimizedFunctionVisitor* visitor); |
| 154 | 154 |
| 155 static void VisitAllOptimizedFunctions(OptimizedFunctionVisitor* visitor); | 155 static void VisitAllOptimizedFunctions(OptimizedFunctionVisitor* visitor); |
| 156 | 156 |
| 157 // The size in bytes of the code required at a lazy deopt patch site. |
| 158 static int patch_size(); |
| 159 |
| 157 // Patch all stack guard checks in the unoptimized code to | 160 // Patch all stack guard checks in the unoptimized code to |
| 158 // unconditionally call replacement_code. | 161 // unconditionally call replacement_code. |
| 159 static void PatchStackCheckCode(Code* unoptimized_code, | 162 static void PatchStackCheckCode(Code* unoptimized_code, |
| 160 Code* check_code, | 163 Code* check_code, |
| 161 Code* replacement_code); | 164 Code* replacement_code); |
| 162 | 165 |
| 166 // Patch stack guard check at instruction before pc_after in |
| 167 // the unoptimized code to unconditionally call replacement_code. |
| 168 static void PatchStackCheckCodeAt(Address pc_after, |
| 169 Code* check_code, |
| 170 Code* replacement_code); |
| 171 |
| 163 // Change all patched stack guard checks in the unoptimized code | 172 // Change all patched stack guard checks in the unoptimized code |
| 164 // back to a normal stack guard check. | 173 // back to a normal stack guard check. |
| 165 static void RevertStackCheckCode(Code* unoptimized_code, | 174 static void RevertStackCheckCode(Code* unoptimized_code, |
| 166 Code* check_code, | 175 Code* check_code, |
| 167 Code* replacement_code); | 176 Code* replacement_code); |
| 168 | 177 |
| 178 // Change all patched stack guard checks in the unoptimized code |
| 179 // back to a normal stack guard check. |
| 180 static void RevertStackCheckCodeAt(Address pc_after, |
| 181 Code* check_code, |
| 182 Code* replacement_code); |
| 183 |
| 169 ~Deoptimizer(); | 184 ~Deoptimizer(); |
| 170 | 185 |
| 171 void InsertHeapNumberValues(int index, JavaScriptFrame* frame); | 186 void InsertHeapNumberValues(int index, JavaScriptFrame* frame); |
| 172 | 187 |
| 173 static void ComputeOutputFrames(Deoptimizer* deoptimizer, Isolate* isolate); | 188 static void ComputeOutputFrames(Deoptimizer* deoptimizer, Isolate* isolate); |
| 174 | 189 |
| 175 static Address GetDeoptimizationEntry(int id, BailoutType type); | 190 static Address GetDeoptimizationEntry(int id, BailoutType type); |
| 176 static int GetDeoptimizationId(Address addr, BailoutType type); | 191 static int GetDeoptimizationId(Address addr, BailoutType type); |
| 177 static int GetOutputInfo(DeoptimizationOutputData* data, | 192 static int GetOutputInfo(DeoptimizationOutputData* data, |
| 178 unsigned node_id, | 193 unsigned node_id, |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 Handle<Code> code_; | 535 Handle<Code> code_; |
| 521 | 536 |
| 522 // Next pointer for linked list. | 537 // Next pointer for linked list. |
| 523 DeoptimizingCodeListNode* next_; | 538 DeoptimizingCodeListNode* next_; |
| 524 }; | 539 }; |
| 525 | 540 |
| 526 | 541 |
| 527 } } // namespace v8::internal | 542 } } // namespace v8::internal |
| 528 | 543 |
| 529 #endif // V8_DEOPTIMIZER_H_ | 544 #endif // V8_DEOPTIMIZER_H_ |
| OLD | NEW |