Ömer Sinan Ağacan
9dc575440d
[dart2wasm] Fix instantiation context types in instantiation trampolines
...
Type for a closure with one argument (Closure-0-1) is subtype of type of
a closure with no arguments (Closure-0-0).
This allows calling the closure with no arguments in the generated code.
(This only happens when the Dart types align, i.e. the argument is
optional)
However instantiation vtable functions for e.g. Closure-1-1 currently
can't be as Closure-1-0, resulting in a type cast error in a code like:
void test<T>([T? x]) {}
void Function() x = runtimeTrue ? test : () {};
x();
Relax the instantiation context struct type in instantiation vtable
functions and downcast the generic closure struct type (type of the
instantiation closure) to the right type before calling instantiation
clsoure.
Fixes #56534 .
Change-Id: I59f9b019c4dc8d2e26ee21f1f6c3c607af0be4d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381641
Reviewed-by: Martin Kustermann <kustermann@google.com >
Commit-Queue: Ömer Ağacan <omersa@google.com >
2024-08-23 07:29:47 +00:00
..
2023-04-20 20:50:39 +00:00
2024-07-24 23:02:55 +00:00
2023-01-05 00:23:40 +00:00
2023-05-19 16:27:58 +00:00
2024-06-01 21:51:11 +00:00
2023-06-15 08:26:27 +00:00
2024-02-27 01:54:00 +00:00
2024-07-18 17:34:08 +00:00
2023-11-28 12:50:05 +00:00
2024-06-06 10:56:12 +00:00
2022-12-19 16:30:06 +00:00
2022-10-17 08:18:49 +00:00
2023-04-22 00:38:28 +00:00
2023-06-16 16:31:27 +00:00
2024-06-06 10:56:12 +00:00
2024-08-19 11:45:02 +00:00
2024-08-19 11:45:02 +00:00
2023-10-03 10:51:15 +00:00
2023-06-15 08:26:27 +00:00
2023-09-26 10:07:42 +00:00
2024-02-14 21:43:47 +00:00
2024-02-14 20:12:05 +00:00
2023-03-17 16:17:50 +00:00
2024-05-01 15:45:58 +00:00
2024-02-08 17:00:59 +00:00
2023-01-10 13:37:33 +00:00
2023-03-02 20:40:20 +00:00
2024-04-05 14:23:00 +00:00
2023-04-20 20:49:17 +00:00
2024-06-14 00:59:57 +00:00
2024-08-19 16:09:14 +00:00
2024-08-13 18:15:38 +00:00
2023-04-20 20:49:17 +00:00
2023-11-02 20:46:20 +00:00
2024-02-14 20:12:05 +00:00
2024-02-14 20:12:05 +00:00
2024-02-15 00:45:52 +00:00
2024-06-06 10:56:12 +00:00
2024-08-13 18:15:38 +00:00
2023-04-19 22:09:18 +00:00
2023-05-09 06:56:44 +00:00
2024-02-08 17:00:59 +00:00
2024-05-08 20:05:18 +00:00
2023-06-15 08:26:27 +00:00
2023-11-28 14:27:39 +00:00
2024-07-18 17:34:08 +00:00
2022-12-15 13:18:50 +00:00
2024-03-20 14:04:29 +00:00
2024-05-03 12:26:59 +00:00
2023-04-19 22:09:18 +00:00
2023-04-22 00:38:28 +00:00
2024-01-23 18:23:32 +00:00
2023-12-28 17:16:09 +00:00
2023-01-19 16:24:29 +00:00
2023-11-27 10:38:31 +00:00
2022-12-19 16:30:06 +00:00
2023-10-03 10:51:15 +00:00
2024-04-09 19:56:01 +00:00
2023-05-24 09:21:20 +00:00
2023-04-20 17:51:42 +00:00
2023-04-20 17:51:42 +00:00
2023-06-20 23:44:08 +00:00
2024-04-26 14:00:04 +00:00
2023-09-22 16:13:10 +00:00
2024-08-13 18:15:38 +00:00
2023-03-01 15:03:39 +00:00
2023-04-20 17:51:42 +00:00
2023-11-29 21:40:21 +00:00
2023-07-25 19:23:02 +00:00
2024-06-01 21:51:11 +00:00
2023-04-20 17:56:18 +00:00
2024-01-23 18:23:32 +00:00
2024-06-06 10:56:12 +00:00
2024-03-07 18:33:58 +00:00
2024-03-20 14:04:29 +00:00
2024-07-09 14:50:59 +00:00
2024-02-08 17:00:59 +00:00
2023-04-20 17:56:18 +00:00
2023-12-01 17:32:48 +00:00
2022-11-08 14:54:17 +00:00
2024-08-19 16:09:14 +00:00
2023-03-01 20:11:25 +00:00
2024-06-06 19:15:57 +00:00
2022-09-07 14:49:17 +00:00
2024-08-23 07:29:47 +00:00
2023-04-19 23:35:16 +00:00
2022-12-14 23:34:18 +00:00
2023-04-20 17:59:44 +00:00
2023-06-16 16:31:27 +00:00
2023-04-20 17:59:44 +00:00
2024-03-20 14:04:29 +00:00
2024-01-31 14:38:43 +00:00
2023-04-20 17:59:44 +00:00
2024-01-23 18:23:32 +00:00
2023-08-11 09:08:32 +00:00
2024-08-19 11:45:02 +00:00
2023-03-01 15:03:39 +00:00
2024-07-30 16:13:18 +00:00
2023-04-14 22:04:28 +00:00
2024-04-23 23:11:17 +00:00
2024-03-08 12:59:59 +00:00
2024-03-20 14:04:29 +00:00
2023-04-20 19:55:31 +00:00
2023-08-22 18:21:10 +00:00
2024-01-23 18:23:32 +00:00
2023-04-20 19:55:31 +00:00
2023-04-20 19:55:31 +00:00
2024-01-03 19:59:53 +00:00
2023-10-03 10:51:15 +00:00
2024-02-14 22:29:33 +00:00
2024-06-06 10:56:12 +00:00
2024-02-28 18:30:20 +00:00
2023-12-07 23:40:27 +00:00
2024-08-20 19:19:28 +00:00
2024-08-16 11:49:19 +00:00
2024-03-20 14:04:29 +00:00
2024-07-11 13:54:13 +00:00
2022-11-03 17:06:42 +00:00
2024-06-12 10:21:23 +00:00
2024-08-09 14:23:29 +00:00
2024-07-30 03:13:58 +00:00
2024-06-12 10:21:23 +00:00
2023-10-09 19:30:29 +00:00
2024-06-12 10:21:23 +00:00
2023-10-09 19:30:29 +00:00
2024-04-05 22:48:17 +00:00
2023-11-16 18:18:00 +00:00
2023-06-15 08:26:27 +00:00
2023-06-15 08:26:27 +00:00
2023-06-15 08:26:27 +00:00
2023-06-15 08:26:27 +00:00
2023-06-15 08:26:27 +00:00
2024-02-23 14:16:01 +00:00
2024-05-17 12:07:56 +00:00
2024-07-05 07:38:49 +00:00
2023-12-07 23:30:06 +00:00
2023-03-02 20:04:19 +00:00
2023-03-02 20:04:19 +00:00
2023-03-02 20:04:19 +00:00