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 7904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7915 // If the function is not compiled ignore the lazy | 7915 // If the function is not compiled ignore the lazy |
7916 // recompilation. This can happen if the debugger is activated and | 7916 // recompilation. This can happen if the debugger is activated and |
7917 // the function is returned to the not compiled state. | 7917 // the function is returned to the not compiled state. |
7918 if (!function->shared()->is_compiled()) { | 7918 if (!function->shared()->is_compiled()) { |
7919 function->ReplaceCode(function->shared()->code()); | 7919 function->ReplaceCode(function->shared()->code()); |
7920 return function->code(); | 7920 return function->code(); |
7921 } | 7921 } |
7922 | 7922 |
7923 // If the function is not optimizable or debugger is active continue using the | 7923 // If the function is not optimizable or debugger is active continue using the |
7924 // code from the full compiler. | 7924 // code from the full compiler. |
7925 if (!function->shared()->code()->optimizable() || | 7925 if (!FLAG_crankshaft || |
| 7926 !function->shared()->code()->optimizable() || |
7926 isolate->DebuggerHasBreakPoints()) { | 7927 isolate->DebuggerHasBreakPoints()) { |
7927 if (FLAG_trace_opt) { | 7928 if (FLAG_trace_opt) { |
7928 PrintF("[failed to optimize "); | 7929 PrintF("[failed to optimize "); |
7929 function->PrintName(); | 7930 function->PrintName(); |
7930 PrintF(": is code optimizable: %s, is debugger enabled: %s]\n", | 7931 PrintF(": is code optimizable: %s, is debugger enabled: %s]\n", |
7931 function->shared()->code()->optimizable() ? "T" : "F", | 7932 function->shared()->code()->optimizable() ? "T" : "F", |
7932 isolate->DebuggerHasBreakPoints() ? "T" : "F"); | 7933 isolate->DebuggerHasBreakPoints() ? "T" : "F"); |
7933 } | 7934 } |
7934 function->ReplaceCode(function->shared()->code()); | 7935 function->ReplaceCode(function->shared()->code()); |
7935 return function->code(); | 7936 return function->code(); |
(...skipping 5351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13287 // Handle last resort GC and make sure to allow future allocations | 13288 // Handle last resort GC and make sure to allow future allocations |
13288 // to grow the heap without causing GCs (if possible). | 13289 // to grow the heap without causing GCs (if possible). |
13289 isolate->counters()->gc_last_resort_from_js()->Increment(); | 13290 isolate->counters()->gc_last_resort_from_js()->Increment(); |
13290 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 13291 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
13291 "Runtime::PerformGC"); | 13292 "Runtime::PerformGC"); |
13292 } | 13293 } |
13293 } | 13294 } |
13294 | 13295 |
13295 | 13296 |
13296 } } // namespace v8::internal | 13297 } } // namespace v8::internal |
OLD | NEW |