Open
Description
Sometimes, the table dispatch transformation encounters instance calls for which no targets exist in the program. This happens when the TFA tree shaker has deemed all of those targets unreachable but hasn't removed the calls to them. Logically, such a call is itself either unreachable, or the receiver is always null.
In debug mode, the table dispatch transformation inserts a null check followed by a breakpoint with a comment saying Dead instance call executed.
. Searching for that comment in the disassembly reveals the offending calls. For instance, running
DART_CONFIGURATION=DebugX64 pkg/vm/tool/precompiler2 --use-table-dispatch --disassemble pkg/compiler/bin/dart2js.dart dart2js.snapshot
reveals 7 such callsites.