Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Side by Side Diff: runtime/vm/code_generator.cc

Issue 1978603002: Remove DebuggerEvent. Refactor remaining code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: before landing Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/lib/developer.cc ('k') | runtime/vm/debugger.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/code_generator.h" 5 #include "vm/code_generator.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/ast.h" 8 #include "vm/ast.h"
9 #include "vm/code_patcher.h" 9 #include "vm/code_patcher.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 if (!FLAG_support_debugger) { 661 if (!FLAG_support_debugger) {
662 UNREACHABLE(); 662 UNREACHABLE();
663 return; 663 return;
664 } 664 }
665 DartFrameIterator iterator; 665 DartFrameIterator iterator;
666 StackFrame* caller_frame = iterator.NextFrame(); 666 StackFrame* caller_frame = iterator.NextFrame();
667 ASSERT(caller_frame != NULL); 667 ASSERT(caller_frame != NULL);
668 const Code& orig_stub = Code::Handle( 668 const Code& orig_stub = Code::Handle(
669 zone, isolate->debugger()->GetPatchedStubAddress(caller_frame->pc())); 669 zone, isolate->debugger()->GetPatchedStubAddress(caller_frame->pc()));
670 const Error& error = 670 const Error& error =
671 Error::Handle(zone, isolate->debugger()->SignalBpReached()); 671 Error::Handle(zone, isolate->debugger()->PauseBreakpoint());
672 if (!error.IsNull()) { 672 if (!error.IsNull()) {
673 Exceptions::PropagateError(error); 673 Exceptions::PropagateError(error);
674 UNREACHABLE(); 674 UNREACHABLE();
675 } 675 }
676 arguments.SetReturn(orig_stub); 676 arguments.SetReturn(orig_stub);
677 } 677 }
678 #else 678 #else
679 // Gets called from the simulator when the breakpoint is reached. 679 // Gets called from the simulator when the breakpoint is reached.
680 DEFINE_RUNTIME_ENTRY(BreakpointRuntimeHandler, 0) { 680 DEFINE_RUNTIME_ENTRY(BreakpointRuntimeHandler, 0) {
681 if (!FLAG_support_debugger) { 681 if (!FLAG_support_debugger) {
682 UNREACHABLE(); 682 UNREACHABLE();
683 return; 683 return;
684 } 684 }
685 const Error& error = Error::Handle(isolate->debugger()->SignalBpReached()); 685 const Error& error = Error::Handle(isolate->debugger()->PauseBreakpoint());
686 if (!error.IsNull()) { 686 if (!error.IsNull()) {
687 Exceptions::PropagateError(error); 687 Exceptions::PropagateError(error);
688 UNREACHABLE(); 688 UNREACHABLE();
689 } 689 }
690 } 690 }
691 #endif // !defined(TARGET_ARCH_DBC) 691 #endif // !defined(TARGET_ARCH_DBC)
692 692
693 693
694 DEFINE_RUNTIME_ENTRY(SingleStepHandler, 0) { 694 DEFINE_RUNTIME_ENTRY(SingleStepHandler, 0) {
695 if (!FLAG_support_debugger) { 695 if (!FLAG_support_debugger) {
696 UNREACHABLE(); 696 UNREACHABLE();
697 return; 697 return;
698 } 698 }
699 const Error& error = 699 const Error& error =
700 Error::Handle(zone, isolate->debugger()->DebuggerStepCallback()); 700 Error::Handle(zone, isolate->debugger()->PauseStepping());
701 if (!error.IsNull()) { 701 if (!error.IsNull()) {
702 Exceptions::PropagateError(error); 702 Exceptions::PropagateError(error);
703 UNREACHABLE(); 703 UNREACHABLE();
704 } 704 }
705 } 705 }
706 706
707 707
708 // An instance call of the form o.f(...) could not be resolved. Check if 708 // An instance call of the form o.f(...) could not be resolved. Check if
709 // there is a getter with the same name. If so, invoke it. If the value is 709 // there is a getter with the same name. If so, invoke it. If the value is
710 // a closure, invoke it with the given arguments. If the value is a 710 // a closure, invoke it with the given arguments. If the value is a
(...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1850 const intptr_t elm_size = old_data.ElementSizeInBytes(); 1850 const intptr_t elm_size = old_data.ElementSizeInBytes();
1851 const TypedData& new_data = 1851 const TypedData& new_data =
1852 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); 1852 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld));
1853 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); 1853 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size);
1854 typed_data_cell.SetAt(0, new_data); 1854 typed_data_cell.SetAt(0, new_data);
1855 arguments.SetReturn(new_data); 1855 arguments.SetReturn(new_data);
1856 } 1856 }
1857 1857
1858 1858
1859 } // namespace dart 1859 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/lib/developer.cc ('k') | runtime/vm/debugger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698