4a95930f0d
This impact was added so the compiler would correctly consider JavaScriptFunction live when allowInterop was used. At some point, this behavior regressed but the effect of this was hidden by the existence of dart:js_interop JS types. Because the JS types were implemented using package:js classes, the compiler assumed JavaScriptFunction was always live. As we are migrating them to extension types, this bug resurfaced. There are two key details in this CL: - The allowInterop impact needs to register that JavaScriptFunction is instantiated. needToInitializeIsolateAffinityTag is not enough. - Both resolution and codegen need to add the impact. Before this CL, we checked for use of allowInterop during SSA and registered that it was being used, and we only processed the impact if it was being used. However, this check of the registration only occurred during resolution. Since resolution occurs before codegen, we never actually processed the impact. It isn't clear why both details are needed for tests/web/regress/issue/37576_test to pass. Change-Id: Ieff8ac5c4d040cc034f58ecb09a4246d2d8f87b7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336626 Reviewed-by: Stephen Adams <sra@google.com> Commit-Queue: Srujan Gaddam <srujzs@google.com>