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 8617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8628 return Smi::FromInt(ast_id.ToInt()); | 8628 return Smi::FromInt(ast_id.ToInt()); |
8629 } else { | 8629 } else { |
8630 if (function->IsMarkedForLazyRecompilation()) { | 8630 if (function->IsMarkedForLazyRecompilation()) { |
8631 function->ReplaceCode(function->shared()->code()); | 8631 function->ReplaceCode(function->shared()->code()); |
8632 } | 8632 } |
8633 return Smi::FromInt(-1); | 8633 return Smi::FromInt(-1); |
8634 } | 8634 } |
8635 } | 8635 } |
8636 | 8636 |
8637 | 8637 |
| 8638 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetAllocationTimeout) { |
| 8639 SealHandleScope shs(isolate); |
| 8640 ASSERT(args.length() == 2); |
| 8641 #ifdef DEBUG |
| 8642 CONVERT_SMI_ARG_CHECKED(interval, 0); |
| 8643 CONVERT_SMI_ARG_CHECKED(timeout, 1); |
| 8644 isolate->heap()->set_allocation_timeout(timeout); |
| 8645 FLAG_gc_interval = interval; |
| 8646 #endif |
| 8647 return isolate->heap()->undefined_value(); |
| 8648 } |
| 8649 |
| 8650 |
8638 RUNTIME_FUNCTION(MaybeObject*, Runtime_CheckIsBootstrapping) { | 8651 RUNTIME_FUNCTION(MaybeObject*, Runtime_CheckIsBootstrapping) { |
8639 SealHandleScope shs(isolate); | 8652 SealHandleScope shs(isolate); |
8640 RUNTIME_ASSERT(isolate->bootstrapper()->IsActive()); | 8653 RUNTIME_ASSERT(isolate->bootstrapper()->IsActive()); |
8641 return isolate->heap()->undefined_value(); | 8654 return isolate->heap()->undefined_value(); |
8642 } | 8655 } |
8643 | 8656 |
8644 | 8657 |
8645 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetRootNaN) { | 8658 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetRootNaN) { |
8646 SealHandleScope shs(isolate); | 8659 SealHandleScope shs(isolate); |
8647 RUNTIME_ASSERT(isolate->bootstrapper()->IsActive()); | 8660 RUNTIME_ASSERT(isolate->bootstrapper()->IsActive()); |
(...skipping 5833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14481 // Handle last resort GC and make sure to allow future allocations | 14494 // Handle last resort GC and make sure to allow future allocations |
14482 // to grow the heap without causing GCs (if possible). | 14495 // to grow the heap without causing GCs (if possible). |
14483 isolate->counters()->gc_last_resort_from_js()->Increment(); | 14496 isolate->counters()->gc_last_resort_from_js()->Increment(); |
14484 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 14497 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
14485 "Runtime::PerformGC"); | 14498 "Runtime::PerformGC"); |
14486 } | 14499 } |
14487 } | 14500 } |
14488 | 14501 |
14489 | 14502 |
14490 } } // namespace v8::internal | 14503 } } // namespace v8::internal |
OLD | NEW |