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
[stable][dart2wasm] Use node's enclosing library annotation for lowerings
Closes#55359
The current library's annotation is used for the interop lowerings
in dart2wasm. For most members, this is okay because we emit the
equivalent JS code for the member when we visit the procedure and
not when we visit the invocation. However, for methods, the invocation
determines the resulting JS call due to the existence of optional
parameters. In that case, if the invocation was not in the same
library as the interop member declaration, it results in using the
wrong library's annotation value.
Adds tests for this case and does some cleanup of existing tests.
Specifically:
- Adds a consistent naming scheme for test libraries that are
namespaced.
- Adds code to delete the non-namespaced declarations so that the
namespaced interop methods don't accidentally call those declarations.
- Removes differentArgsMethod which was already tested in
js_default_test.
- Removes use of js_util in favor of js_interop_unsafe.
Cherry-pick: https://dart-review.googlesource.com/c/sdk/+/361241
Cherry-pick-request: #55430
Change-Id: I37661ed200c6db367e3f29f50b0877834f4c1639
Bug: #55359
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/362190
Reviewed-by: Kevin Chisholm <[email protected]>
Commit-Queue: Srujan Gaddam <[email protected]>
0 commit comments