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

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

Issue 2968003004: Revert "The current growth strategy for growable arrays allocates a backing array of size 2 at (emp… (Closed)
Patch Set: Created 3 years, 5 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/vm/debugger_api_impl.cc ('k') | runtime/vm/gc_sweeper.cc » ('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) 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
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::MakeFixedLength(pieces)); 764 const Array& arr = Array::Handle(zone, Array::MakeArray(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
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
OLDNEW
« no previous file with comments | « runtime/vm/debugger_api_impl.cc ('k') | runtime/vm/gc_sweeper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698