Skip to content

Dead instance calls left in code #40402

Open
@askeksa-google

Description

@askeksa-google

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.

Metadata

Metadata

Assignees

Labels

P3A lower priority bug or feature requestarea-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.triagedIssue has been triaged by sub teamvm-aot-code-sizeRelated to improvements in AOT code sizevm-tfa

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions