dart-sdk/runtime/docs
Alexander Markov 0e5a539315 [vm/aot] Keep toString methods on exception classes in toString transformer
Flutter in google3 uses --delete-tostring-package-uri compiler option
to remove toString methods in package:flutter and dart:ui to reduce
size in release mode.
This has unfortunate effect of removing toString methods from exception
classes which may provide valuable information for investigating
problems seen in the wild.

This change adds a new @pragma('flutter:keep-to-string-in-subtypes')
on classes to keep toString methods on all subtypes of the annotated
classes. This pragma is now used on Exception and Error classes in
dart:core.

TEST=pkg/vm/test/transformations/to_string_transformer_test.dart

Issue: https://github.com/flutter/flutter/issues/61562
Change-Id: Ib739c83cdf6b539208f705ba198e63b8bc54fa61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/227920
Reviewed-by: Dan Field <dnfield@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-01-13 15:32:50 +00:00
..
compiler [vm] Require all recognized methods to be marked with pragma. 2020-11-16 13:49:50 +00:00
images [vm/docs] Publish "Introduction to Dart VM" source and build tools. 2020-02-04 09:04:32 +00:00
infra [vm/test] Convert vm/cc/IRTest_TypedDataAOT_{NotInlining,Regress43534} to the new IL tests 2022-01-04 15:29:06 +00:00
aot_binary_size_analysis.md [build] Remove runtime_kernel target from GN build 2021-08-13 10:09:41 +00:00
dwarf_stack_traces.md [build] Remove runtime_kernel target from GN build 2021-08-13 10:09:41 +00:00
gc.md Incorrect wording 2021-10-04 08:39:38 +00:00
index.md [vm] Rename clustered_snapshot.h/cc to app_snapshot.h/cc. 2021-09-16 00:13:34 +00:00
pragmas.md [vm/aot] Keep toString methods on exception classes in toString transformer 2022-01-13 15:32:50 +00:00
snapshot_profiling.md Fix typo in snapshot_profiling.md. heapsnaphsot -> heapsnapshot 2019-11-25 15:58:15 +00:00
types.md master branch to main 2021-09-15 06:22:23 +00:00