Chromium Code Reviews| Index: src/deoptimizer.h |
| diff --git a/src/deoptimizer.h b/src/deoptimizer.h |
| index 895ed669091e0f6040e1ca1d1e2b7b6880bb1521..f9e51143477d32a472b7282d028a412d57de5f1e 100644 |
| --- a/src/deoptimizer.h |
| +++ b/src/deoptimizer.h |
| @@ -210,32 +210,45 @@ class Deoptimizer : public Malloced { |
| // The size in bytes of the code required at a lazy deopt patch site. |
| static int patch_size(); |
| - // Patch all stack guard checks in the unoptimized code to |
| + // Patch all interrupts with allowed loop depth in the unoptimized code to |
| // unconditionally call replacement_code. |
| - static void PatchStackCheckCode(Code* unoptimized_code, |
| - Code* check_code, |
| - Code* replacement_code); |
| + static void PatchInterruptCode(Code* unoptimized_code, |
| + Code* interrupt_code, |
| + Code* replacement_code); |
| - // Patch stack guard check at instruction before pc_after in |
| + // Patch interrupts at instruction before pc_after in |
| // the unoptimized code to unconditionally call replacement_code. |
| - static void PatchStackCheckCodeAt(Code* unoptimized_code, |
| - Address pc_after, |
| - Code* check_code, |
| - Code* replacement_code); |
| + static void PatchInterruptCodeAt(Code* unoptimized_code, |
| + Address pc_after, |
| + Code* interrupt_code, |
| + Code* replacement_code); |
| - // Change all patched stack guard checks in the unoptimized code |
| - // back to a normal stack guard check. |
| - static void RevertStackCheckCode(Code* unoptimized_code, |
| - Code* check_code, |
| + // Change all patched interrupts patched in the unoptimized code |
| + // back to a normal interrupts. |
|
Jakob Kummerow
2013/04/09 17:23:25
nit: s/interrupts/interrupt/
Yang
2013/04/10 08:08:30
Done.
|
| + static void RevertInterruptCode(Code* unoptimized_code, |
| + Code* interrupt_code, |
|
Jakob Kummerow
2013/04/09 17:23:25
nit: indentation
Yang
2013/04/10 08:08:30
Done.
|
| Code* replacement_code); |
| - // Change all patched stack guard checks in the unoptimized code |
| - // back to a normal stack guard check. |
| - static void RevertStackCheckCodeAt(Code* unoptimized_code, |
| + // Change patched interrupt in the unoptimized code |
| + // back to a normal interrupts. |
|
Jakob Kummerow
2013/04/09 17:23:25
nit: s/interrupts/interrupt/
Yang
2013/04/10 08:08:30
Done.
|
| + static void RevertInterruptCodeAt(Code* unoptimized_code, |
| + Address pc_after, |
| + Code* interrupt_code, |
| + Code* replacement_code); |
| + |
| +#ifdef DEBUG |
| + static bool InterruptCodeIsPatched(Code* unoptimized_code, |
| Address pc_after, |
| - Code* check_code, |
| + Code* interrupt_code, |
| Code* replacement_code); |
| + // Verify that all back edges of a certain loop depth are patched. |
| + static void VerifyInterruptCode(Code* unoptimized_code, |
| + Code* interrupt_code, |
| + Code* replacement_code, |
| + int loop_nesting_level); |
| +#endif // DEBUG |
| + |
| ~Deoptimizer(); |
| void MaterializeHeapObjects(JavaScriptFrameIterator* it); |
| @@ -437,6 +450,7 @@ class Deoptimizer : public Malloced { |
| bool trace_; |
| static const int table_entry_size_; |
| + static const int kBackEdgeEntrySize = 2 * kIntSize + kOneByteSize; |
|
Jakob Kummerow
2013/04/09 17:23:25
This constant belongs close to the definition of t
Yang
2013/04/10 08:08:30
Done.
|
| friend class FrameDescription; |
| friend class DeoptimizingCodeListNode; |