You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now TFA as well as the kernel reader in the VM are not taking annotations for local closures into account. We should enable this to e.g. guide our inliner to recognize @pragma('vm:prefer-inline') or other related vm-specific annotations.
The kernel AST stores those annotations in FunctionDeclaration.variable.annotations.
Let's track this here with at least the sub-parts:
Make TFA + tree shaker aware of those annotations and handle them in a similar way to member annotations (see cl/199200)
Make flow graph builder recognize annotations on local functions when they are lazily created.
VM can use pragmas on local functions, which are actually put on
VariableDeclaration nodes. This change teaches TFA tree shaker to
keep such pragmas.
TEST=pkg/vm/testcases/transformations/type_flow/transformer/pragmas.dart
Issue: #45987
Change-Id: Ic2db375a93b539a131eca2431bef0e317a4d1b2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199520
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
This fixes issue #45710 by adding support for pragma
annotations on local functions which are lazily created
via the flow graph builder (as opposed to the kernel loader).
TEST=Added regression test to notify_debugger_on_exception_test.dart
Bug: #45710, #45987
Change-Id: I13f2f8d2b7d05ea1cb423c142537789e99a919d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199420
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Right now TFA as well as the kernel reader in the VM are not taking annotations for local closures into account. We should enable this to e.g. guide our inliner to recognize
@pragma('vm:prefer-inline')
or other related vm-specific annotations.The kernel AST stores those annotations in
FunctionDeclaration.variable.annotations
.Let's track this here with at least the sub-parts:
/cc @alexmarkov @mraleph
/cc @cskau-g Due to connection with #45710
The text was updated successfully, but these errors were encountered: