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 8442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8453 } | 8453 } |
8454 bool sync_with_compiler_thread = true; | 8454 bool sync_with_compiler_thread = true; |
8455 if (args.length() == 2) { | 8455 if (args.length() == 2) { |
8456 CONVERT_ARG_HANDLE_CHECKED(String, sync, 1); | 8456 CONVERT_ARG_HANDLE_CHECKED(String, sync, 1); |
8457 if (sync->IsOneByteEqualTo(STATIC_ASCII_VECTOR("no sync"))) { | 8457 if (sync->IsOneByteEqualTo(STATIC_ASCII_VECTOR("no sync"))) { |
8458 sync_with_compiler_thread = false; | 8458 sync_with_compiler_thread = false; |
8459 } | 8459 } |
8460 } | 8460 } |
8461 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); | 8461 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); |
8462 if (FLAG_parallel_recompilation && sync_with_compiler_thread) { | 8462 if (FLAG_parallel_recompilation && sync_with_compiler_thread) { |
8463 while (function->IsInRecompileQueue() || | 8463 while (function->IsMarkedForParallelRecompilation() || |
| 8464 function->IsInRecompileQueue() || |
8464 function->IsMarkedForInstallingRecompiledCode()) { | 8465 function->IsMarkedForInstallingRecompiledCode()) { |
8465 isolate->optimizing_compiler_thread()->InstallOptimizedFunctions(); | 8466 isolate->optimizing_compiler_thread()->InstallOptimizedFunctions(); |
8466 OS::Sleep(50); | 8467 OS::Sleep(50); |
8467 } | 8468 } |
8468 } | 8469 } |
8469 if (FLAG_always_opt) { | 8470 if (FLAG_always_opt) { |
8470 // We may have always opt, but that is more best-effort than a real | 8471 // We may have always opt, but that is more best-effort than a real |
8471 // promise, so we still say "no" if it is not optimized. | 8472 // promise, so we still say "no" if it is not optimized. |
8472 return function->IsOptimized() ? Smi::FromInt(3) // 3 == "always". | 8473 return function->IsOptimized() ? Smi::FromInt(3) // 3 == "always". |
8473 : Smi::FromInt(2); // 2 == "no". | 8474 : Smi::FromInt(2); // 2 == "no". |
(...skipping 5490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13964 // Handle last resort GC and make sure to allow future allocations | 13965 // Handle last resort GC and make sure to allow future allocations |
13965 // to grow the heap without causing GCs (if possible). | 13966 // to grow the heap without causing GCs (if possible). |
13966 isolate->counters()->gc_last_resort_from_js()->Increment(); | 13967 isolate->counters()->gc_last_resort_from_js()->Increment(); |
13967 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 13968 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
13968 "Runtime::PerformGC"); | 13969 "Runtime::PerformGC"); |
13969 } | 13970 } |
13970 } | 13971 } |
13971 | 13972 |
13972 | 13973 |
13973 } } // namespace v8::internal | 13974 } } // namespace v8::internal |
OLD | NEW |