| 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 7986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7997 if (FLAG_trace_deopt) { | 7997 if (FLAG_trace_deopt) { |
| 7998 PrintF("[removing optimized code for: "); | 7998 PrintF("[removing optimized code for: "); |
| 7999 function->PrintName(); | 7999 function->PrintName(); |
| 8000 PrintF("]\n"); | 8000 PrintF("]\n"); |
| 8001 } | 8001 } |
| 8002 function->ReplaceCode(function->shared()->code()); | 8002 function->ReplaceCode(function->shared()->code()); |
| 8003 } else { | 8003 } else { |
| 8004 Deoptimizer::DeoptimizeFunction(*function); | 8004 Deoptimizer::DeoptimizeFunction(*function); |
| 8005 } | 8005 } |
| 8006 // Flush optimized code cache for this function. | 8006 // Flush optimized code cache for this function. |
| 8007 function->shared()->ClearOptimizedCodeMap(); | 8007 function->shared()->ClearOptimizedCodeMap("notify deoptimized"); |
| 8008 | 8008 |
| 8009 return isolate->heap()->undefined_value(); | 8009 return isolate->heap()->undefined_value(); |
| 8010 } | 8010 } |
| 8011 | 8011 |
| 8012 | 8012 |
| 8013 RUNTIME_FUNCTION(MaybeObject*, Runtime_NotifyOSR) { | 8013 RUNTIME_FUNCTION(MaybeObject*, Runtime_NotifyOSR) { |
| 8014 NoHandleAllocation ha(isolate); | 8014 NoHandleAllocation ha(isolate); |
| 8015 Deoptimizer* deoptimizer = Deoptimizer::Grab(isolate); | 8015 Deoptimizer* deoptimizer = Deoptimizer::Grab(isolate); |
| 8016 delete deoptimizer; | 8016 delete deoptimizer; |
| 8017 return isolate->heap()->undefined_value(); | 8017 return isolate->heap()->undefined_value(); |
| (...skipping 5479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13497 // Handle last resort GC and make sure to allow future allocations | 13497 // Handle last resort GC and make sure to allow future allocations |
| 13498 // to grow the heap without causing GCs (if possible). | 13498 // to grow the heap without causing GCs (if possible). |
| 13499 isolate->counters()->gc_last_resort_from_js()->Increment(); | 13499 isolate->counters()->gc_last_resort_from_js()->Increment(); |
| 13500 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 13500 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
| 13501 "Runtime::PerformGC"); | 13501 "Runtime::PerformGC"); |
| 13502 } | 13502 } |
| 13503 } | 13503 } |
| 13504 | 13504 |
| 13505 | 13505 |
| 13506 } } // namespace v8::internal | 13506 } } // namespace v8::internal |
| OLD | NEW |