| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 7891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7902 // If the function is not compiled ignore the lazy | 7902 // If the function is not compiled ignore the lazy |
| 7903 // recompilation. This can happen if the debugger is activated and | 7903 // recompilation. This can happen if the debugger is activated and |
| 7904 // the function is returned to the not compiled state. | 7904 // the function is returned to the not compiled state. |
| 7905 if (!function->shared()->is_compiled()) { | 7905 if (!function->shared()->is_compiled()) { |
| 7906 function->ReplaceCode(function->shared()->code()); | 7906 function->ReplaceCode(function->shared()->code()); |
| 7907 return function->code(); | 7907 return function->code(); |
| 7908 } | 7908 } |
| 7909 | 7909 |
| 7910 // If the function is not optimizable or debugger is active continue using the | 7910 // If the function is not optimizable or debugger is active continue using the |
| 7911 // code from the full compiler. | 7911 // code from the full compiler. |
| 7912 if (!function->shared()->code()->optimizable() || | 7912 if (!FLAG_crankshaft || |
| 7913 !function->shared()->code()->optimizable() || |
| 7913 isolate->DebuggerHasBreakPoints()) { | 7914 isolate->DebuggerHasBreakPoints()) { |
| 7914 if (FLAG_trace_opt) { | 7915 if (FLAG_trace_opt) { |
| 7915 PrintF("[failed to optimize "); | 7916 PrintF("[failed to optimize "); |
| 7916 function->PrintName(); | 7917 function->PrintName(); |
| 7917 PrintF(": is code optimizable: %s, is debugger enabled: %s]\n", | 7918 PrintF(": is code optimizable: %s, is debugger enabled: %s]\n", |
| 7918 function->shared()->code()->optimizable() ? "T" : "F", | 7919 function->shared()->code()->optimizable() ? "T" : "F", |
| 7919 isolate->DebuggerHasBreakPoints() ? "T" : "F"); | 7920 isolate->DebuggerHasBreakPoints() ? "T" : "F"); |
| 7920 } | 7921 } |
| 7921 function->ReplaceCode(function->shared()->code()); | 7922 function->ReplaceCode(function->shared()->code()); |
| 7922 return function->code(); | 7923 return function->code(); |
| (...skipping 5338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13261 // Handle last resort GC and make sure to allow future allocations | 13262 // Handle last resort GC and make sure to allow future allocations |
| 13262 // to grow the heap without causing GCs (if possible). | 13263 // to grow the heap without causing GCs (if possible). |
| 13263 isolate->counters()->gc_last_resort_from_js()->Increment(); | 13264 isolate->counters()->gc_last_resort_from_js()->Increment(); |
| 13264 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 13265 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
| 13265 "Runtime::PerformGC"); | 13266 "Runtime::PerformGC"); |
| 13266 } | 13267 } |
| 13267 } | 13268 } |
| 13268 | 13269 |
| 13269 | 13270 |
| 13270 } } // namespace v8::internal | 13271 } } // namespace v8::internal |
| OLD | NEW |