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 8561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8572 : Smi::FromInt(2); // 2 == "no". | 8572 : Smi::FromInt(2); // 2 == "no". |
8573 } | 8573 } |
8574 if (FLAG_deopt_every_n_times) { | 8574 if (FLAG_deopt_every_n_times) { |
8575 return Smi::FromInt(6); // 6 == "maybe deopted". | 8575 return Smi::FromInt(6); // 6 == "maybe deopted". |
8576 } | 8576 } |
8577 return function->IsOptimized() ? Smi::FromInt(1) // 1 == "yes". | 8577 return function->IsOptimized() ? Smi::FromInt(1) // 1 == "yes". |
8578 : Smi::FromInt(2); // 2 == "no". | 8578 : Smi::FromInt(2); // 2 == "no". |
8579 } | 8579 } |
8580 | 8580 |
8581 | 8581 |
| 8582 RUNTIME_FUNCTION(MaybeObject*, Runtime_UnblockConcurrentRecompilation) { |
| 8583 RUNTIME_ASSERT(FLAG_block_concurrent_recompilation); |
| 8584 isolate->optimizing_compiler_thread()->Unblock(); |
| 8585 return isolate->heap()->undefined_value(); |
| 8586 } |
| 8587 |
| 8588 |
8582 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetOptimizationCount) { | 8589 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetOptimizationCount) { |
8583 HandleScope scope(isolate); | 8590 HandleScope scope(isolate); |
8584 ASSERT(args.length() == 1); | 8591 ASSERT(args.length() == 1); |
8585 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); | 8592 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); |
8586 return Smi::FromInt(function->shared()->opt_count()); | 8593 return Smi::FromInt(function->shared()->opt_count()); |
8587 } | 8594 } |
8588 | 8595 |
8589 | 8596 |
8590 static bool IsSuitableForOnStackReplacement(Isolate* isolate, | 8597 static bool IsSuitableForOnStackReplacement(Isolate* isolate, |
8591 Handle<JSFunction> function, | 8598 Handle<JSFunction> function, |
(...skipping 6235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14827 // Handle last resort GC and make sure to allow future allocations | 14834 // Handle last resort GC and make sure to allow future allocations |
14828 // to grow the heap without causing GCs (if possible). | 14835 // to grow the heap without causing GCs (if possible). |
14829 isolate->counters()->gc_last_resort_from_js()->Increment(); | 14836 isolate->counters()->gc_last_resort_from_js()->Increment(); |
14830 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 14837 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
14831 "Runtime::PerformGC"); | 14838 "Runtime::PerformGC"); |
14832 } | 14839 } |
14833 } | 14840 } |
14834 | 14841 |
14835 | 14842 |
14836 } } // namespace v8::internal | 14843 } } // namespace v8::internal |
OLD | NEW |