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 8052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8063 RUNTIME_FUNCTION(MaybeObject*, Runtime_RunningInSimulator) { | 8063 RUNTIME_FUNCTION(MaybeObject*, Runtime_RunningInSimulator) { |
8064 SealHandleScope shs(isolate); | 8064 SealHandleScope shs(isolate); |
8065 #if defined(USE_SIMULATOR) | 8065 #if defined(USE_SIMULATOR) |
8066 return isolate->heap()->true_value(); | 8066 return isolate->heap()->true_value(); |
8067 #else | 8067 #else |
8068 return isolate->heap()->false_value(); | 8068 return isolate->heap()->false_value(); |
8069 #endif | 8069 #endif |
8070 } | 8070 } |
8071 | 8071 |
8072 | 8072 |
| 8073 RUNTIME_FUNCTION(MaybeObject*, Runtime_IsParallelSupported) { |
| 8074 HandleScope scope(isolate); |
| 8075 return FLAG_parallel_recompilation |
| 8076 ? isolate->heap()->true_value() : isolate->heap()->false_value(); |
| 8077 } |
| 8078 |
| 8079 |
8073 RUNTIME_FUNCTION(MaybeObject*, Runtime_OptimizeFunctionOnNextCall) { | 8080 RUNTIME_FUNCTION(MaybeObject*, Runtime_OptimizeFunctionOnNextCall) { |
8074 HandleScope scope(isolate); | 8081 HandleScope scope(isolate); |
8075 RUNTIME_ASSERT(args.length() == 1 || args.length() == 2); | 8082 RUNTIME_ASSERT(args.length() == 1 || args.length() == 2); |
8076 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); | 8083 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); |
8077 | 8084 |
8078 if (!function->IsOptimizable()) return isolate->heap()->undefined_value(); | 8085 if (!function->IsOptimizable()) return isolate->heap()->undefined_value(); |
8079 function->MarkForLazyRecompilation(); | 8086 function->MarkForLazyRecompilation(); |
8080 | 8087 |
8081 Code* unoptimized = function->shared()->code(); | 8088 Code* unoptimized = function->shared()->code(); |
8082 if (args.length() == 2 && | 8089 if (args.length() == 2 && |
(...skipping 5551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13634 // Handle last resort GC and make sure to allow future allocations | 13641 // Handle last resort GC and make sure to allow future allocations |
13635 // to grow the heap without causing GCs (if possible). | 13642 // to grow the heap without causing GCs (if possible). |
13636 isolate->counters()->gc_last_resort_from_js()->Increment(); | 13643 isolate->counters()->gc_last_resort_from_js()->Increment(); |
13637 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 13644 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
13638 "Runtime::PerformGC"); | 13645 "Runtime::PerformGC"); |
13639 } | 13646 } |
13640 } | 13647 } |
13641 | 13648 |
13642 | 13649 |
13643 } } // namespace v8::internal | 13650 } } // namespace v8::internal |
OLD | NEW |