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 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 } | 509 } |
510 | 510 |
511 | 511 |
512 void StackGuard::FullDeopt() { | 512 void StackGuard::FullDeopt() { |
513 ExecutionAccess access(isolate_); | 513 ExecutionAccess access(isolate_); |
514 thread_local_.interrupt_flags_ |= FULL_DEOPT; | 514 thread_local_.interrupt_flags_ |= FULL_DEOPT; |
515 set_interrupt_limits(access); | 515 set_interrupt_limits(access); |
516 } | 516 } |
517 | 517 |
518 | 518 |
519 bool StackGuard::IsDeoptMarkedCode() { | 519 bool StackGuard::IsDeoptMarkedAllocationSites() { |
520 ExecutionAccess access(isolate_); | 520 ExecutionAccess access(isolate_); |
521 return (thread_local_.interrupt_flags_ & DEOPT_MARKED_CODE) != 0; | 521 return (thread_local_.interrupt_flags_ & DEOPT_MARKED_ALLOCATION_SITES) != 0; |
522 } | 522 } |
523 | 523 |
524 | 524 |
525 void StackGuard::DeoptMarkedCode() { | 525 void StackGuard::DeoptMarkedAllocationSites() { |
526 ExecutionAccess access(isolate_); | 526 ExecutionAccess access(isolate_); |
527 thread_local_.interrupt_flags_ |= DEOPT_MARKED_CODE; | 527 thread_local_.interrupt_flags_ |= DEOPT_MARKED_ALLOCATION_SITES; |
528 set_interrupt_limits(access); | 528 set_interrupt_limits(access); |
529 } | 529 } |
530 | 530 |
531 | 531 |
532 #ifdef ENABLE_DEBUGGER_SUPPORT | 532 #ifdef ENABLE_DEBUGGER_SUPPORT |
533 bool StackGuard::IsDebugBreak() { | 533 bool StackGuard::IsDebugBreak() { |
534 ExecutionAccess access(isolate_); | 534 ExecutionAccess access(isolate_); |
535 return thread_local_.interrupt_flags_ & DEBUGBREAK; | 535 return thread_local_.interrupt_flags_ & DEBUGBREAK; |
536 } | 536 } |
537 | 537 |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1033 return isolate->TerminateExecution(); | 1033 return isolate->TerminateExecution(); |
1034 } | 1034 } |
1035 if (stack_guard->IsInterrupted()) { | 1035 if (stack_guard->IsInterrupted()) { |
1036 stack_guard->Continue(INTERRUPT); | 1036 stack_guard->Continue(INTERRUPT); |
1037 return isolate->StackOverflow(); | 1037 return isolate->StackOverflow(); |
1038 } | 1038 } |
1039 if (stack_guard->IsFullDeopt()) { | 1039 if (stack_guard->IsFullDeopt()) { |
1040 stack_guard->Continue(FULL_DEOPT); | 1040 stack_guard->Continue(FULL_DEOPT); |
1041 Deoptimizer::DeoptimizeAll(isolate); | 1041 Deoptimizer::DeoptimizeAll(isolate); |
1042 } | 1042 } |
1043 if (stack_guard->IsDeoptMarkedCode()) { | 1043 if (stack_guard->IsDeoptMarkedAllocationSites()) { |
1044 stack_guard->Continue(DEOPT_MARKED_CODE); | 1044 stack_guard->Continue(DEOPT_MARKED_ALLOCATION_SITES); |
1045 Deoptimizer::DeoptimizeMarkedCode(isolate); | 1045 isolate->heap()->DeoptMarkedAllocationSites(); |
1046 } | 1046 } |
1047 if (stack_guard->IsInstallCodeRequest()) { | 1047 if (stack_guard->IsInstallCodeRequest()) { |
1048 ASSERT(isolate->concurrent_recompilation_enabled()); | 1048 ASSERT(isolate->concurrent_recompilation_enabled()); |
1049 stack_guard->Continue(INSTALL_CODE); | 1049 stack_guard->Continue(INSTALL_CODE); |
1050 isolate->optimizing_compiler_thread()->InstallOptimizedFunctions(); | 1050 isolate->optimizing_compiler_thread()->InstallOptimizedFunctions(); |
1051 } | 1051 } |
1052 isolate->runtime_profiler()->OptimizeNow(); | 1052 isolate->runtime_profiler()->OptimizeNow(); |
1053 return isolate->heap()->undefined_value(); | 1053 return isolate->heap()->undefined_value(); |
1054 } | 1054 } |
1055 | 1055 |
1056 | 1056 |
1057 } } // namespace v8::internal | 1057 } } // namespace v8::internal |
OLD | NEW |