-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dart2wasm/ddc/dart2js] Lower Function.toJS and JSExportedDartFunctio…
…n.toDart Lowers these extension methods to some helper functions instead of allowInterop to improve performance and get consistent semantics. Specifically: - Function.toJS no longer gives you the same JSFunction when calling toJS on the same function multiple times in the JS compilers. - Adds fast calling syntax for functions with 0-5 args in the JS compilers. - Allows additional args to be passed to converted functions that are omitted in the JS compilers. - The static type now determines the number of args that can be passed to the JS function in the JS compilers. - Fixes an issue in dart2wasm where if too few arguments are passed, the call may succeed due to conversion of undefined to null. - Adds throws when a user tries to wrap a JS function that returned from Function.toJS in the JS compilers. Closes #55515 Addresses #48186 CoreLibraryReviewExempt: Changes to docs only in API surface. Change-Id: I41d864dc5e02b597d9f1c16c88e3c04872f28225 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368065 Reviewed-by: Nicholas Shahan <[email protected]> Reviewed-by: Stephen Adams <[email protected]> Commit-Queue: Srujan Gaddam <[email protected]> Reviewed-by: Martin Kustermann <[email protected]>
- Loading branch information
Showing
15 changed files
with
1,114 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.