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 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
807 } | 807 } |
808 | 808 |
809 return Handle<String>::cast(result); | 809 return Handle<String>::cast(result); |
810 } | 810 } |
811 | 811 |
812 | 812 |
813 static Object* RuntimePreempt(Isolate* isolate) { | 813 static Object* RuntimePreempt(Isolate* isolate) { |
814 // Clear the preempt request flag. | 814 // Clear the preempt request flag. |
815 isolate->stack_guard()->Continue(PREEMPT); | 815 isolate->stack_guard()->Continue(PREEMPT); |
816 | 816 |
817 ContextSwitcher::PreemptionReceived(); | |
818 | |
819 #ifdef ENABLE_DEBUGGER_SUPPORT | 817 #ifdef ENABLE_DEBUGGER_SUPPORT |
820 if (isolate->debug()->InDebugger()) { | 818 if (isolate->debug()->InDebugger()) { |
821 // If currently in the debugger don't do any actual preemption but record | 819 // If currently in the debugger don't do any actual preemption but record |
822 // that preemption occoured while in the debugger. | 820 // that preemption occoured while in the debugger. |
823 isolate->debug()->PreemptionWhileInDebugger(); | 821 isolate->debug()->PreemptionWhileInDebugger(); |
824 } else { | 822 } else { |
825 // Perform preemption. | 823 // Perform preemption. |
826 v8::Unlocker unlocker(reinterpret_cast<v8::Isolate*>(isolate)); | 824 v8::Unlocker unlocker(reinterpret_cast<v8::Isolate*>(isolate)); |
827 Thread::YieldCPU(); | 825 Thread::YieldCPU(); |
828 } | 826 } |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
954 ASSERT(FLAG_concurrent_recompilation); | 952 ASSERT(FLAG_concurrent_recompilation); |
955 stack_guard->Continue(INSTALL_CODE); | 953 stack_guard->Continue(INSTALL_CODE); |
956 isolate->optimizing_compiler_thread()->InstallOptimizedFunctions(); | 954 isolate->optimizing_compiler_thread()->InstallOptimizedFunctions(); |
957 } | 955 } |
958 isolate->runtime_profiler()->OptimizeNow(); | 956 isolate->runtime_profiler()->OptimizeNow(); |
959 return isolate->heap()->undefined_value(); | 957 return isolate->heap()->undefined_value(); |
960 } | 958 } |
961 | 959 |
962 | 960 |
963 } } // namespace v8::internal | 961 } } // namespace v8::internal |
OLD | NEW |