8e4b0bda23
This ensures that all messages are passed to instrumentation. Issues addressed in this CL: * When I added addCompileTimeError, I forgot to remove addError. * All messages now all arrive in a single location (Loader). SourceLoader adds instrumentation by overriding recordMessage. * As I changed the type inferrer to use addCompileTimeError, I broke DDC. This is because the front_end API (generateKernelInternal in kernel_generator_impl.dart) returns null if there are any errors reported via addCompileTimeError (and this didn't happen with addError, that shouldn't have been there anyways). * Due to the previous problem, I changed generateKernelInternal to ignore errors, but then I started getting missing compile-time errors. This turned out to be due to the the silent parameter used during outline- and diet-parsing. * I've removed all the "silent" parameters. This didn't work reliably and have been confusing Brian, Dan, and me several times when making parser changes. Instead we detect duplicated messages and avoid reporting them more than once. * Types in error messages got names that where using a global object (globalDebuggingNames in pkg/kernel/lib/text/ast_to_text.dart). This meant that the #lib prefix would vary depending on how many tests were run which affected the serialized error message in pkg/front_end/testcases/invalid_assignment.dart.strong.expect. Change-Id: I3d89372d6593a6e7e50cce733f61eedb881e15ed Reviewed-on: https://dart-review.googlesource.com/24481 Commit-Queue: Peter von der Ahé <ahe@google.com> Reviewed-by: Paul Berry <paulberry@google.com> Reviewed-by: Kevin Millikin <kmillikin@google.com>