-
Notifications
You must be signed in to change notification settings - Fork 6k
Remove @pragma('vm:entry-point') annotations on members that aren't accessed from C++ #45697
Conversation
…ccessed from C++
The `@pragma('vm:entry-point')` annotation serves as an annotation
telling our AOT compiler that the member is needed and cannot be
tree-shaken because it may be accessed from the outside (i.e. C++).
There are seemingly entry-point annotations on members that aren't actually
used from C++.
=> We remove the annotation from those members in this CL.
|
Curious how you were able to determine this was safe? Can we perhaps add that as a lint? |
The Dart embedder API surface is mainly based on strings (one has to look libraries, classes, methods up by their name). By grepping in the engine C++ sources it seems like the members I removed the annotation from aren't referenced in C++. As a side-effect of making things an entrypoint, it prevents obfuscation. So running obfuscation tests would result in more class / method names being obfuscated, making C++ unable to find them, therefore fail. Lastly, the Dart VM has verification support that ensures anything accessed by-name from the embedder API has the |
|
@mkustermann Is this waiting on roll to land? Looks good to go. |
Apologies, I was preoccupied with other things today. Landed now. In unlikely case something breaks, please revert and I'll take a look (after coming back from vacation) |
…t aren't accessed from C++ (flutter/engine#45697)
…134791) flutter/engine@45bc430...67dd12f 2023-09-14 [email protected] Roll Dart SDK from d25e8d682c8f to 7e4d9f4d8e52 (3 revisions) (flutter/engine#45854) 2023-09-14 [email protected] Remove @pragma('vm:entry-point') annotations on members that aren't accessed from C++ (flutter/engine#45697) 2023-09-14 [email protected] Roll Skia from 6bc9f5886ddf to 9b7c116ed6c2 (1 revision) (flutter/engine#45853) 2023-09-14 [email protected] Switch linux_android_debug_engine from goma to reclient (flutter/engine#45345) 2023-09-14 [email protected] Switch goma to reclient fro standalone targets (flutter/engine#45804) 2023-09-14 [email protected] Handle external window's `WM_CLOSE` in lifecycle manager (flutter/engine#45840) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…lutter#134791) flutter/engine@45bc430...67dd12f 2023-09-14 [email protected] Roll Dart SDK from d25e8d682c8f to 7e4d9f4d8e52 (3 revisions) (flutter/engine#45854) 2023-09-14 [email protected] Remove @pragma('vm:entry-point') annotations on members that aren't accessed from C++ (flutter/engine#45697) 2023-09-14 [email protected] Roll Skia from 6bc9f5886ddf to 9b7c116ed6c2 (1 revision) (flutter/engine#45853) 2023-09-14 [email protected] Switch linux_android_debug_engine from goma to reclient (flutter/engine#45345) 2023-09-14 [email protected] Switch goma to reclient fro standalone targets (flutter/engine#45804) 2023-09-14 [email protected] Handle external window's `WM_CLOSE` in lifecycle manager (flutter/engine#45840) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…ccessed from C++ (#45697) The `@pragma('vm:entry-point')` annotation serves as an annotation telling our AOT compiler that the member is needed and cannot be tree-shaken because it may be accessed from the outside (i.e. C++). There are seemingly entry-point annotations on members that aren't actually used from C++. => We remove the annotation from those members in this CL.
The
@pragma('vm:entry-point')annotation serves as an annotation telling our AOT compiler that the member is needed and cannot be tree-shaken because it may be accessed from the outside (i.e. C++).There are seemingly entry-point annotations on members that aren't actually used from C++.
=> We remove the annotation from those members in this CL.