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 8296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
8307 | 8307 |
8308 return isolate->heap()->undefined_value(); | 8308 return isolate->heap()->undefined_value(); |
8309 } | 8309 } |
8310 | 8310 |
8311 | 8311 |
8312 RUNTIME_FUNCTION(MaybeObject*, Runtime_CompleteOptimization) { | 8312 RUNTIME_FUNCTION(MaybeObject*, Runtime_CompleteOptimization) { |
8313 HandleScope scope(isolate); | 8313 HandleScope scope(isolate); |
8314 ASSERT(args.length() == 1); | 8314 ASSERT(args.length() == 1); |
8315 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); | 8315 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); |
8316 if (FLAG_parallel_recompilation && V8::UseCrankshaft()) { | 8316 if (FLAG_parallel_recompilation && V8::UseCrankshaft()) { |
8317 // While function is in optimization pipeline, it is marked with builtins. | 8317 // While function is in optimization pipeline, it is marked with builtins. |
Hannes Payer (out of office)
2013/07/01 08:54:26
Can we update the comment with the description you
| |
8318 while (function->code()->kind() == Code::BUILTIN) { | 8318 while (function->IsMarkedForParallelRecompilation() || |
8319 function->IsInRecompileQueue() || | |
8320 function->IsMarkedForInstallingRecompiledCode()) { | |
8319 isolate->optimizing_compiler_thread()->InstallOptimizedFunctions(); | 8321 isolate->optimizing_compiler_thread()->InstallOptimizedFunctions(); |
8320 OS::Sleep(50); | 8322 OS::Sleep(50); |
8321 } | 8323 } |
8322 } | 8324 } |
8323 return isolate->heap()->undefined_value(); | 8325 return isolate->heap()->undefined_value(); |
8324 } | 8326 } |
8325 | 8327 |
8326 | 8328 |
8327 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetOptimizationStatus) { | 8329 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetOptimizationStatus) { |
8328 HandleScope scope(isolate); | 8330 HandleScope scope(isolate); |
(...skipping 5590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
13919 // Handle last resort GC and make sure to allow future allocations | 13921 // Handle last resort GC and make sure to allow future allocations |
13920 // to grow the heap without causing GCs (if possible). | 13922 // to grow the heap without causing GCs (if possible). |
13921 isolate->counters()->gc_last_resort_from_js()->Increment(); | 13923 isolate->counters()->gc_last_resort_from_js()->Increment(); |
13922 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 13924 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
13923 "Runtime::PerformGC"); | 13925 "Runtime::PerformGC"); |
13924 } | 13926 } |
13925 } | 13927 } |
13926 | 13928 |
13927 | 13929 |
13928 } } // namespace v8::internal | 13930 } } // namespace v8::internal |
OLD | NEW |