| commit | d82be109a2673917e72f0e2eeee31d96faf7dbdd | [log] [tgz] |
|---|---|---|
| author | Sigmund Cherem <sigmund@google.com> | Fri Feb 09 01:59:46 2024 |
| committer | Commit Queue <dart-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Feb 09 01:59:46 2024 |
| tree | ad47106d50f593a13a829353b60b916bbd3133ad | |
| parent | 244f8cee8746455c8deede0e8615c56613281401 [diff] |
[jsinterop] fix lowering of callMethod unchecked calls. The lowering for external calls works in multiple steps: - we first expand it into a `js_util.callMethod` call (which uses .apply internally) - which we later refine in to a `js_util._callMethodUncheckedN` call, if possible (which calls the member directly) The second step only happens if we can statically verify the arity of the method being called and that every argument passed doesn't need a allow-interop check. The latter is bypassed if we know from the types that it cannot be a Dart Function. The new JS interop always satisfies the check, but the second step above failed to regonize it because it didn't account for extension types. This CL does the incremental fix to recognize it. Long term, we should instead change the lowering to use directly the js_interop_unsafe methods, and tailor the lowering to the new interop. Fixes https://github.com/dart-lang/sdk/issues/54862 Change-Id: Ieee560e5cd6bd9b6921368477bf8212cae5a1faa Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351221 Commit-Queue: Sigmund Cherem <sigmund@google.com> Reviewed-by: Srujan Gaddam <srujzs@google.com>
Dart is:
Approachable: Develop with a strongly typed programming language that is consistent, concise, and offers modern language features like null safety and patterns.
Portable: Compile to ARM, x64, or RISC-V machine code for mobile, desktop, and backend. Compile to JavaScript or WebAssembly for the web.
Productive: Make changes iteratively: use hot reload to see the result instantly in your running app. Diagnose app issues using DevTools.
Dart's flexible compiler technology lets you run Dart code in different ways, depending on your target platform and goals:
Dart Native: For programs targeting devices (mobile, desktop, server, and more), Dart Native includes both a Dart VM with JIT (just-in-time) compilation and an AOT (ahead-of-time) compiler for producing machine code.
Dart Web: For programs targeting the web, Dart Web includes both a development time compiler (dartdevc) and a production time compiler (dart2js).
Dart is free and open source.
See LICENSE and PATENT_GRANT.
Visit dart.dev to learn more about the language, tools, and to find codelabs.
Browse pub.dev for more packages and libraries contributed by the community and the Dart team.
Our API reference documentation is published at api.dart.dev, based on the stable release. (We also publish docs from our beta and dev channels, as well as from the primary development branch).
If you want to build Dart yourself, here is a guide to getting the source, preparing your machine to build the SDK, and building.
There are more documents on our wiki.
The easiest way to contribute to Dart is to file issues.
You can also contribute patches, as described in Contributing.