OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "execution.h" | 5 #include "execution.h" |
6 | 6 |
7 #include "bootstrapper.h" | 7 #include "bootstrapper.h" |
8 #include "codegen.h" | 8 #include "codegen.h" |
9 #include "deoptimizer.h" | 9 #include "deoptimizer.h" |
10 #include "isolate-inl.h" | 10 #include "isolate-inl.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 #ifdef VERIFY_HEAP | 97 #ifdef VERIFY_HEAP |
98 value->ObjectVerify(); | 98 value->ObjectVerify(); |
99 #endif | 99 #endif |
100 | 100 |
101 // Update the pending exception flag and return the value. | 101 // Update the pending exception flag and return the value. |
102 bool has_exception = value->IsException(); | 102 bool has_exception = value->IsException(); |
103 ASSERT(has_exception == isolate->has_pending_exception()); | 103 ASSERT(has_exception == isolate->has_pending_exception()); |
104 if (has_exception) { | 104 if (has_exception) { |
105 isolate->ReportPendingMessages(); | 105 isolate->ReportPendingMessages(); |
106 // Reset stepping state when script exits with uncaught exception. | 106 // Reset stepping state when script exits with uncaught exception. |
107 if (isolate->debugger()->IsDebuggerActive()) { | 107 if (isolate->debugger()->is_active()) { |
108 isolate->debug()->ClearStepping(); | 108 isolate->debug()->ClearStepping(); |
109 } | 109 } |
110 return MaybeHandle<Object>(); | 110 return MaybeHandle<Object>(); |
111 } else { | 111 } else { |
112 isolate->clear_pending_message(); | 112 isolate->clear_pending_message(); |
113 } | 113 } |
114 | 114 |
115 return Handle<Object>(value, isolate); | 115 return Handle<Object>(value, isolate); |
116 } | 116 } |
117 | 117 |
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
678 | 678 |
679 | 679 |
680 void Execution::DebugBreakHelper(Isolate* isolate) { | 680 void Execution::DebugBreakHelper(Isolate* isolate) { |
681 // Just continue if breaks are disabled. | 681 // Just continue if breaks are disabled. |
682 if (isolate->debug()->disable_break()) return; | 682 if (isolate->debug()->disable_break()) return; |
683 | 683 |
684 // Ignore debug break during bootstrapping. | 684 // Ignore debug break during bootstrapping. |
685 if (isolate->bootstrapper()->IsActive()) return; | 685 if (isolate->bootstrapper()->IsActive()) return; |
686 | 686 |
687 // Ignore debug break if debugger is not active. | 687 // Ignore debug break if debugger is not active. |
688 if (!isolate->debugger()->IsDebuggerActive()) return; | 688 if (!isolate->debugger()->is_active()) return; |
689 | 689 |
690 StackLimitCheck check(isolate); | 690 StackLimitCheck check(isolate); |
691 if (check.HasOverflowed()) return; | 691 if (check.HasOverflowed()) return; |
692 | 692 |
693 { JavaScriptFrameIterator it(isolate); | 693 { JavaScriptFrameIterator it(isolate); |
694 ASSERT(!it.done()); | 694 ASSERT(!it.done()); |
695 Object* fun = it.frame()->function(); | 695 Object* fun = it.frame()->function(); |
696 if (fun && fun->IsJSFunction()) { | 696 if (fun && fun->IsJSFunction()) { |
697 // Don't stop in builtin functions. | 697 // Don't stop in builtin functions. |
698 if (JSFunction::cast(fun)->IsBuiltin()) return; | 698 if (JSFunction::cast(fun)->IsBuiltin()) return; |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
766 isolate_->optimizing_compiler_thread()->InstallOptimizedFunctions(); | 766 isolate_->optimizing_compiler_thread()->InstallOptimizedFunctions(); |
767 } | 767 } |
768 | 768 |
769 isolate_->counters()->stack_interrupts()->Increment(); | 769 isolate_->counters()->stack_interrupts()->Increment(); |
770 isolate_->counters()->runtime_profiler_ticks()->Increment(); | 770 isolate_->counters()->runtime_profiler_ticks()->Increment(); |
771 isolate_->runtime_profiler()->OptimizeNow(); | 771 isolate_->runtime_profiler()->OptimizeNow(); |
772 return isolate_->heap()->undefined_value(); | 772 return isolate_->heap()->undefined_value(); |
773 } | 773 } |
774 | 774 |
775 } } // namespace v8::internal | 775 } } // namespace v8::internal |
OLD | NEW |