[DDC] Don't use CFE constructor tearoff lowering and instead use the same lowering as static method tearoffs #50527
Labels
area-web
Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop.
P3
A lower priority bug or feature request
web-dev-compiler
Currently, the CFE lowers tearoffs for constructors as static methods on the relevant class. DDC then forwards a call to this static method in order to fetch the tearoff. While this is useful, this means extra code size for every constructor e.g.
and the calling code:
C0
here is already a tear-off, so we should just leverage that instead of this dual indirection. We already do that with static methods:So, instead of using the synthetic static methods for constructor tear-offs, we can just return a reference to the constructor instead e.g.
The text was updated successfully, but these errors were encountered: