| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 static void VisitAllOptimizedFunctions(OptimizedFunctionVisitor* visitor); | 129 static void VisitAllOptimizedFunctions(OptimizedFunctionVisitor* visitor); |
| 130 | 130 |
| 131 // Patch all stack guard checks in the unoptimized code to | 131 // Patch all stack guard checks in the unoptimized code to |
| 132 // unconditionally call replacement_code. | 132 // unconditionally call replacement_code. |
| 133 static void PatchStackCheckCode(Code* unoptimized_code, | 133 static void PatchStackCheckCode(Code* unoptimized_code, |
| 134 Code* check_code, | 134 Code* check_code, |
| 135 Code* replacement_code); | 135 Code* replacement_code); |
| 136 | 136 |
| 137 // Patch stack guard check at instruction before pc_after in | 137 // Patch stack guard check at instruction before pc_after in |
| 138 // the unoptimized code to unconditionally call replacement_code. | 138 // the unoptimized code to unconditionally call replacement_code. |
| 139 static void PatchStackCheckAt(Address pc_after, | 139 static void PatchStackCheckCodeAt(Address pc_after, |
| 140 Code* check_code, | 140 Code* check_code, |
| 141 Code* replacement_code); | 141 Code* replacement_code); |
| 142 | 142 |
| 143 // Change all patched stack guard checks in the unoptimized code | 143 // Change all patched stack guard checks in the unoptimized code |
| 144 // back to a normal stack guard check. | 144 // back to a normal stack guard check. |
| 145 static void RevertStackCheckCode(Code* unoptimized_code, | 145 static void RevertStackCheckCode(Code* unoptimized_code, |
| 146 Code* check_code, | 146 Code* check_code, |
| 147 Code* replacement_code); | 147 Code* replacement_code); |
| 148 | 148 |
| 149 // Change all patched stack guard checks in the unoptimized code |
| 150 // back to a normal stack guard check. |
| 151 static void RevertStackCheckCodeAt(Address pc_after, |
| 152 Code* check_code, |
| 153 Code* replacement_code); |
| 154 |
| 149 ~Deoptimizer(); | 155 ~Deoptimizer(); |
| 150 | 156 |
| 151 void InsertHeapNumberValues(int index, JavaScriptFrame* frame); | 157 void InsertHeapNumberValues(int index, JavaScriptFrame* frame); |
| 152 | 158 |
| 153 static void ComputeOutputFrames(Deoptimizer* deoptimizer); | 159 static void ComputeOutputFrames(Deoptimizer* deoptimizer); |
| 154 | 160 |
| 155 static Address GetDeoptimizationEntry(int id, BailoutType type); | 161 static Address GetDeoptimizationEntry(int id, BailoutType type); |
| 156 static int GetDeoptimizationId(Address addr, BailoutType type); | 162 static int GetDeoptimizationId(Address addr, BailoutType type); |
| 157 static int GetOutputInfo(DeoptimizationOutputData* data, | 163 static int GetOutputInfo(DeoptimizationOutputData* data, |
| 158 unsigned node_id, | 164 unsigned node_id, |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 Handle<Code> code_; | 517 Handle<Code> code_; |
| 512 | 518 |
| 513 // Next pointer for linked list. | 519 // Next pointer for linked list. |
| 514 DeoptimizingCodeListNode* next_; | 520 DeoptimizingCodeListNode* next_; |
| 515 }; | 521 }; |
| 516 | 522 |
| 517 | 523 |
| 518 } } // namespace v8::internal | 524 } } // namespace v8::internal |
| 519 | 525 |
| 520 #endif // V8_DEOPTIMIZER_H_ | 526 #endif // V8_DEOPTIMIZER_H_ |
| OLD | NEW |