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 8233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
8244 has_other_activations = activations_finder.has_activations(); | 8244 has_other_activations = activations_finder.has_activations(); |
8245 } | 8245 } |
8246 | 8246 |
8247 if (!has_other_activations) { | 8247 if (!has_other_activations) { |
8248 if (FLAG_trace_deopt) { | 8248 if (FLAG_trace_deopt) { |
8249 PrintF("[removing optimized code for: "); | 8249 PrintF("[removing optimized code for: "); |
8250 function->PrintName(); | 8250 function->PrintName(); |
8251 PrintF("]\n"); | 8251 PrintF("]\n"); |
8252 } | 8252 } |
8253 function->ReplaceCode(function->shared()->code()); | 8253 function->ReplaceCode(function->shared()->code()); |
8254 // Flush optimized code cache for this function. | |
8255 function->shared()->set_optimized_code_map(Smi::FromInt(0)); | |
Michael Starzinger
2012/05/23 11:16:29
It seems we can hoist that out of the condition.
fschneider
2012/06/14 11:08:23
Done.
| |
8254 } else { | 8256 } else { |
8255 Deoptimizer::DeoptimizeFunction(*function); | 8257 Deoptimizer::DeoptimizeFunction(*function); |
8258 // Flush optimized code cache for this function. | |
8259 function->shared()->set_optimized_code_map(Smi::FromInt(0)); | |
8256 } | 8260 } |
8257 return isolate->heap()->undefined_value(); | 8261 return isolate->heap()->undefined_value(); |
8258 } | 8262 } |
8259 | 8263 |
8260 | 8264 |
8261 RUNTIME_FUNCTION(MaybeObject*, Runtime_NotifyOSR) { | 8265 RUNTIME_FUNCTION(MaybeObject*, Runtime_NotifyOSR) { |
8262 Deoptimizer* deoptimizer = Deoptimizer::Grab(isolate); | 8266 Deoptimizer* deoptimizer = Deoptimizer::Grab(isolate); |
8263 delete deoptimizer; | 8267 delete deoptimizer; |
8264 return isolate->heap()->undefined_value(); | 8268 return isolate->heap()->undefined_value(); |
8265 } | 8269 } |
(...skipping 5239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
13505 // Handle last resort GC and make sure to allow future allocations | 13509 // Handle last resort GC and make sure to allow future allocations |
13506 // to grow the heap without causing GCs (if possible). | 13510 // to grow the heap without causing GCs (if possible). |
13507 isolate->counters()->gc_last_resort_from_js()->Increment(); | 13511 isolate->counters()->gc_last_resort_from_js()->Increment(); |
13508 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 13512 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
13509 "Runtime::PerformGC"); | 13513 "Runtime::PerformGC"); |
13510 } | 13514 } |
13511 } | 13515 } |
13512 | 13516 |
13513 | 13517 |
13514 } } // namespace v8::internal | 13518 } } // namespace v8::internal |
OLD | NEW |