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 1815733003: Remove recently introduced FunctionType vm class by merging it into class Type. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address comment Created 4 years, 9 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/compiler.cc ('k') | runtime/vm/flow_graph_builder.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 "vm/dart_api_impl.h" 9 #include "vm/dart_api_impl.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 pieces.Add(Symbols::SingleQuote()); 486 pieces.Add(Symbols::SingleQuote());
487 if (exception_type == kCast) { 487 if (exception_type == kCast) {
488 pieces.Add(dst_name); 488 pieces.Add(dst_name);
489 } else if (dst_name.Length() > 0) { 489 } else if (dst_name.Length() > 0) {
490 pieces.Add(Symbols::SpaceOfSpace()); 490 pieces.Add(Symbols::SpaceOfSpace());
491 pieces.Add(Symbols::SingleQuote()); 491 pieces.Add(Symbols::SingleQuote());
492 pieces.Add(dst_name); 492 pieces.Add(dst_name);
493 pieces.Add(Symbols::SingleQuote()); 493 pieces.Add(Symbols::SingleQuote());
494 } 494 }
495 // Print URIs of src and dst types. 495 // Print URIs of src and dst types.
496 pieces.Add(Symbols::SpaceWhereNewLine()); 496 // Do not print "where" when no URIs get printed.
497 bool printed_where = false;
497 if (!src_type.IsNull()) { 498 if (!src_type.IsNull()) {
498 pieces.Add(String::Handle(zone, src_type.EnumerateURIs())); 499 const String& uris = String::Handle(zone, src_type.EnumerateURIs());
500 if (uris.Length() > Symbols::SpaceIsFromSpace().Length()) {
501 printed_where = true;
502 pieces.Add(Symbols::SpaceWhereNewLine());
503 pieces.Add(uris);
504 }
499 } 505 }
500 if (!dst_type.IsDynamicType() && !dst_type.IsVoidType()) { 506 if (!dst_type.IsDynamicType() && !dst_type.IsVoidType()) {
501 pieces.Add(String::Handle(zone, dst_type.EnumerateURIs())); 507 const String& uris = String::Handle(zone, dst_type.EnumerateURIs());
508 if (uris.Length() > Symbols::SpaceIsFromSpace().Length()) {
509 if (!printed_where) {
510 pieces.Add(Symbols::SpaceWhereNewLine());
511 }
512 pieces.Add(uris);
513 }
502 } 514 }
503 } 515 }
504 } 516 }
505 const String& error_msg = 517 const String& error_msg =
506 String::Handle(zone, Symbols::FromConcatAll(pieces)); 518 String::Handle(zone, Symbols::FromConcatAll(pieces));
507 args.SetAt(3, error_msg); 519 args.SetAt(3, error_msg);
508 520
509 // Type errors in the core library may be difficult to diagnose. 521 // Type errors in the core library may be difficult to diagnose.
510 // Print type error information before throwing the error when debugging. 522 // Print type error information before throwing the error when debugging.
511 if (FLAG_print_stacktrace_at_throw) { 523 if (FLAG_print_stacktrace_at_throw) {
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 } 711 }
700 712
701 return DartLibraryCalls::InstanceCreate(library, 713 return DartLibraryCalls::InstanceCreate(library,
702 *class_name, 714 *class_name,
703 *constructor_name, 715 *constructor_name,
704 arguments); 716 arguments);
705 } 717 }
706 718
707 719
708 } // namespace dart 720 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698