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

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

Issue 10537065: Debugger break on TypeError, AssertionError (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « runtime/include/dart_debugger_api.h ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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_macros.h" 7 #include "vm/assembler_macros.h"
8 #include "vm/code_patcher.h" 8 #include "vm/code_patcher.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/dart_api_impl.h" 10 #include "vm/dart_api_impl.h"
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 arguments.SetReturn(Code::Handle(code.raw())); 865 arguments.SetReturn(Code::Handle(code.raw()));
866 } 866 }
867 867
868 868
869 // Gets called from debug stub when code reaches a breakpoint. 869 // Gets called from debug stub when code reaches a breakpoint.
870 // Arg0: function object of the static function that was about to be called. 870 // Arg0: function object of the static function that was about to be called.
871 DEFINE_RUNTIME_ENTRY(BreakpointStaticHandler, 1) { 871 DEFINE_RUNTIME_ENTRY(BreakpointStaticHandler, 1) {
872 ASSERT(arguments.Count() == 872 ASSERT(arguments.Count() ==
873 kBreakpointStaticHandlerRuntimeEntry.argument_count()); 873 kBreakpointStaticHandlerRuntimeEntry.argument_count());
874 ASSERT(isolate->debugger() != NULL); 874 ASSERT(isolate->debugger() != NULL);
875 isolate->debugger()->BreakpointCallback(); 875 isolate->debugger()->SignalBpReached();
876 // Make sure the static function that is about to be called is 876 // Make sure the static function that is about to be called is
877 // compiled. The stub will jump to the entry point without any 877 // compiled. The stub will jump to the entry point without any
878 // further tests. 878 // further tests.
879 const Function& function = Function::CheckedHandle(arguments.At(0)); 879 const Function& function = Function::CheckedHandle(arguments.At(0));
880 if (!function.HasCode()) { 880 if (!function.HasCode()) {
881 const Error& error = Error::Handle(Compiler::CompileFunction(function)); 881 const Error& error = Error::Handle(Compiler::CompileFunction(function));
882 if (!error.IsNull()) { 882 if (!error.IsNull()) {
883 Exceptions::PropagateError(error); 883 Exceptions::PropagateError(error);
884 } 884 }
885 } 885 }
886 } 886 }
887 887
888 888
889 // Gets called from debug stub when code reaches a breakpoint at a return 889 // Gets called from debug stub when code reaches a breakpoint at a return
890 // in Dart code. 890 // in Dart code.
891 DEFINE_RUNTIME_ENTRY(BreakpointReturnHandler, 0) { 891 DEFINE_RUNTIME_ENTRY(BreakpointReturnHandler, 0) {
892 ASSERT(arguments.Count() == 892 ASSERT(arguments.Count() ==
893 kBreakpointReturnHandlerRuntimeEntry.argument_count()); 893 kBreakpointReturnHandlerRuntimeEntry.argument_count());
894 ASSERT(isolate->debugger() != NULL); 894 ASSERT(isolate->debugger() != NULL);
895 isolate->debugger()->BreakpointCallback(); 895 isolate->debugger()->SignalBpReached();
896 } 896 }
897 897
898 898
899 // Gets called from debug stub when code reaches a breakpoint. 899 // Gets called from debug stub when code reaches a breakpoint.
900 DEFINE_RUNTIME_ENTRY(BreakpointDynamicHandler, 0) { 900 DEFINE_RUNTIME_ENTRY(BreakpointDynamicHandler, 0) {
901 ASSERT(arguments.Count() == 901 ASSERT(arguments.Count() ==
902 kBreakpointDynamicHandlerRuntimeEntry.argument_count()); 902 kBreakpointDynamicHandlerRuntimeEntry.argument_count());
903 ASSERT(isolate->debugger() != NULL); 903 ASSERT(isolate->debugger() != NULL);
904 isolate->debugger()->BreakpointCallback(); 904 isolate->debugger()->SignalBpReached();
905 } 905 }
906 906
907 907
908 static RawFunction* InlineCacheMissHandler( 908 static RawFunction* InlineCacheMissHandler(
909 Isolate* isolate, const GrowableArray<const Instance*>& args) { 909 Isolate* isolate, const GrowableArray<const Instance*>& args) {
910 const Instance& receiver = *args[0]; 910 const Instance& receiver = *args[0];
911 const Code& target_code = 911 const Code& target_code =
912 Code::Handle(ResolveCompileInstanceCallTarget(isolate, receiver)); 912 Code::Handle(ResolveCompileInstanceCallTarget(isolate, receiver));
913 if (target_code.IsNull()) { 913 if (target_code.IsNull()) {
914 // Let the megamorphic stub handle special cases: NoSuchMethod, 914 // Let the megamorphic stub handle special cases: NoSuchMethod,
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
1599 } 1599 }
1600 } 1600 }
1601 } 1601 }
1602 // The cache is null terminated, therefore the loop above should never 1602 // The cache is null terminated, therefore the loop above should never
1603 // terminate by itself. 1603 // terminate by itself.
1604 UNREACHABLE(); 1604 UNREACHABLE();
1605 return Code::null(); 1605 return Code::null();
1606 } 1606 }
1607 1607
1608 } // namespace dart 1608 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/include/dart_debugger_api.h ('k') | runtime/vm/debugger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698