OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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/exceptions.h" | 5 #include "vm/exceptions.h" |
6 | 6 |
7 #include "platform/address_sanitizer.h" | 7 #include "platform/address_sanitizer.h" |
8 | 8 |
9 #include "lib/stacktrace.h" | 9 #include "lib/stacktrace.h" |
10 | 10 |
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
754 const String& uris = String::Handle(zone, dst_type.EnumerateURIs()); | 754 const String& uris = String::Handle(zone, dst_type.EnumerateURIs()); |
755 if (uris.Length() > Symbols::SpaceIsFromSpace().Length()) { | 755 if (uris.Length() > Symbols::SpaceIsFromSpace().Length()) { |
756 if (!printed_where) { | 756 if (!printed_where) { |
757 pieces.Add(Symbols::SpaceWhereNewLine()); | 757 pieces.Add(Symbols::SpaceWhereNewLine()); |
758 } | 758 } |
759 pieces.Add(uris); | 759 pieces.Add(uris); |
760 } | 760 } |
761 } | 761 } |
762 } | 762 } |
763 } | 763 } |
764 const Array& arr = Array::Handle(zone, Array::MakeArray(pieces)); | 764 const Array& arr = Array::Handle(zone, Array::MakeFixedLength(pieces)); |
765 const String& error_msg = String::Handle(zone, String::ConcatAll(arr)); | 765 const String& error_msg = String::Handle(zone, String::ConcatAll(arr)); |
766 args.SetAt(3, error_msg); | 766 args.SetAt(3, error_msg); |
767 | 767 |
768 // Type errors in the core library may be difficult to diagnose. | 768 // Type errors in the core library may be difficult to diagnose. |
769 // Print type error information before throwing the error when debugging. | 769 // Print type error information before throwing the error when debugging. |
770 if (FLAG_print_stacktrace_at_throw) { | 770 if (FLAG_print_stacktrace_at_throw) { |
771 THR_Print("'%s': Failed type check: line %" Pd " pos %" Pd ": ", | 771 THR_Print("'%s': Failed type check: line %" Pd " pos %" Pd ": ", |
772 String::Handle(zone, script.url()).ToCString(), line, column); | 772 String::Handle(zone, script.url()).ToCString(), line, column); |
773 THR_Print("%s\n", error_msg.ToCString()); | 773 THR_Print("%s\n", error_msg.ToCString()); |
774 } | 774 } |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
983 } | 983 } |
984 | 984 |
985 Thread* thread = Thread::Current(); | 985 Thread* thread = Thread::Current(); |
986 NoReloadScope no_reload_scope(thread->isolate(), thread); | 986 NoReloadScope no_reload_scope(thread->isolate(), thread); |
987 return DartLibraryCalls::InstanceCreate(library, *class_name, | 987 return DartLibraryCalls::InstanceCreate(library, *class_name, |
988 *constructor_name, arguments); | 988 *constructor_name, arguments); |
989 } | 989 } |
990 | 990 |
991 | 991 |
992 } // namespace dart | 992 } // namespace dart |
OLD | NEW |