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 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 } | 495 } |
496 | 496 |
497 | 497 |
498 void StackGuard::FullDeopt() { | 498 void StackGuard::FullDeopt() { |
499 ExecutionAccess access(isolate_); | 499 ExecutionAccess access(isolate_); |
500 thread_local_.interrupt_flags_ |= FULL_DEOPT; | 500 thread_local_.interrupt_flags_ |= FULL_DEOPT; |
501 set_interrupt_limits(access); | 501 set_interrupt_limits(access); |
502 } | 502 } |
503 | 503 |
504 | 504 |
| 505 bool StackGuard::IsDeoptMarkedCode() { |
| 506 ExecutionAccess access(isolate_); |
| 507 return (thread_local_.interrupt_flags_ & DEOPT_MARKED_CODE) != 0; |
| 508 } |
| 509 |
| 510 |
| 511 void StackGuard::DeoptMarkedCode() { |
| 512 ExecutionAccess access(isolate_); |
| 513 thread_local_.interrupt_flags_ |= DEOPT_MARKED_CODE; |
| 514 set_interrupt_limits(access); |
| 515 } |
| 516 |
| 517 |
505 #ifdef ENABLE_DEBUGGER_SUPPORT | 518 #ifdef ENABLE_DEBUGGER_SUPPORT |
506 bool StackGuard::IsDebugBreak() { | 519 bool StackGuard::IsDebugBreak() { |
507 ExecutionAccess access(isolate_); | 520 ExecutionAccess access(isolate_); |
508 return thread_local_.interrupt_flags_ & DEBUGBREAK; | 521 return thread_local_.interrupt_flags_ & DEBUGBREAK; |
509 } | 522 } |
510 | 523 |
511 | 524 |
512 void StackGuard::DebugBreak() { | 525 void StackGuard::DebugBreak() { |
513 ExecutionAccess access(isolate_); | 526 ExecutionAccess access(isolate_); |
514 thread_local_.interrupt_flags_ |= DEBUGBREAK; | 527 thread_local_.interrupt_flags_ |= DEBUGBREAK; |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1006 return isolate->TerminateExecution(); | 1019 return isolate->TerminateExecution(); |
1007 } | 1020 } |
1008 if (stack_guard->IsInterrupted()) { | 1021 if (stack_guard->IsInterrupted()) { |
1009 stack_guard->Continue(INTERRUPT); | 1022 stack_guard->Continue(INTERRUPT); |
1010 return isolate->StackOverflow(); | 1023 return isolate->StackOverflow(); |
1011 } | 1024 } |
1012 if (stack_guard->IsFullDeopt()) { | 1025 if (stack_guard->IsFullDeopt()) { |
1013 stack_guard->Continue(FULL_DEOPT); | 1026 stack_guard->Continue(FULL_DEOPT); |
1014 Deoptimizer::DeoptimizeAll(isolate); | 1027 Deoptimizer::DeoptimizeAll(isolate); |
1015 } | 1028 } |
| 1029 if (stack_guard->IsDeoptMarkedCode()) { |
| 1030 stack_guard->Continue(DEOPT_MARKED_CODE); |
| 1031 Deoptimizer::DeoptimizeMarkedCode(isolate); |
| 1032 } |
1016 if (stack_guard->IsInstallCodeRequest()) { | 1033 if (stack_guard->IsInstallCodeRequest()) { |
1017 ASSERT(isolate->concurrent_recompilation_enabled()); | 1034 ASSERT(isolate->concurrent_recompilation_enabled()); |
1018 stack_guard->Continue(INSTALL_CODE); | 1035 stack_guard->Continue(INSTALL_CODE); |
1019 isolate->optimizing_compiler_thread()->InstallOptimizedFunctions(); | 1036 isolate->optimizing_compiler_thread()->InstallOptimizedFunctions(); |
1020 } | 1037 } |
1021 isolate->runtime_profiler()->OptimizeNow(); | 1038 isolate->runtime_profiler()->OptimizeNow(); |
1022 return isolate->heap()->undefined_value(); | 1039 return isolate->heap()->undefined_value(); |
1023 } | 1040 } |
1024 | 1041 |
1025 | 1042 |
1026 } } // namespace v8::internal | 1043 } } // namespace v8::internal |
OLD | NEW |