Alexander Markov
efce7c1cb0
[vm,dyn_modules] Fix single-target cid range dispatch for dynamically loaded classes
...
In AOT mode, when call site is transitioned from monomorphic state
(with receiver cid1) to polymorphic (with receiver cid2),
there is an optimization which checks if all _allocated_ classes
in the class id range cid1..cid2 have the same dispatch target.
If so, a specialized SingleTargetCall stub is used.
The problem is that 'allocated' bit is only set during precompilation,
and dynamically loaded classes were not considered as valid receiver
classes by this optimization.
As a result, the following situation could happen:
cid1 < cid3 < cid2,
cid1 dispatches to target1
cid2 dispatches to target1
cid3 should dispatch to target2, but it is still in range cid1..cid2 and
SingleTargetCall stub would incorrectly dispatch it to target1.
The fix is to treat all dynamically loaded classes as allocated when
checking for single target optimization.
TEST=pkg/dynamic_modules/test/data/single_target_cid_range_dispatch
Fixes b/493677699
Change-Id: I42e407385a5d9b0a4a1017f713b47587c3c6a818
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/488920
Commit-Queue: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Ryan Macnak <rmacnak@google.com >
Reviewed-by: Slava Egorov <vegorov@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2026-03-19 06:12:41 -07:00
..
2026-03-18 10:45:00 -07:00
2024-07-23 10:43:43 +00:00
2026-03-16 10:24:42 -07:00
2026-03-04 13:45:22 -08:00
2025-08-12 09:21:21 -07:00
2025-02-26 14:01:44 -08:00
2026-02-04 10:16:41 -08:00
2026-02-04 10:16:41 -08:00
2025-07-08 02:36:10 -07:00
2026-02-23 09:54:47 -08:00
2026-02-04 10:16:41 -08:00
2025-10-14 13:15:21 -07:00
2025-11-10 02:29:41 -08:00
2026-02-04 10:16:41 -08:00
2024-08-28 08:52:19 +00:00
2026-01-28 10:27:29 -08:00
2024-04-17 19:14:41 +00:00
2026-02-04 10:16:41 -08:00
2026-02-27 07:43:14 -08:00
2026-02-27 07:43:14 -08:00
2025-05-05 15:21:13 -07:00
2026-03-18 10:18:06 -07:00
2026-03-18 10:18:06 -07:00
2026-03-10 16:44:26 -07:00
2026-03-09 10:16:02 -07:00
2026-03-02 07:55:38 -08:00
2026-02-23 09:54:47 -08:00
2026-02-23 09:54:47 -08:00
2026-01-27 09:14:39 -08:00
2026-01-27 09:14:39 -08:00
2026-03-11 13:24:40 -07:00
2024-10-24 03:24:08 +00:00
2024-06-10 20:38:30 +00:00
2026-03-02 08:13:26 -08:00
2026-03-02 07:55:38 -08:00
2026-02-04 10:16:41 -08:00
2026-02-04 10:16:41 -08:00
2025-07-29 12:54:49 -07:00
2026-01-29 13:18:24 -08:00
2025-07-29 12:54:49 -07:00
2025-10-07 10:44:02 -07:00
2025-10-07 10:44:02 -07:00
2025-07-29 12:54:49 -07:00
2026-01-29 13:18:24 -08:00
2025-07-29 12:54:49 -07:00
2026-01-29 13:18:24 -08:00
2025-09-12 04:19:40 -07:00
2025-10-07 10:44:02 -07:00
2025-10-01 09:41:26 -07:00
2026-03-04 17:15:55 -08:00
2026-01-14 08:42:22 -08:00
2026-01-14 08:42:22 -08:00
2026-02-19 09:43:52 -08:00
2026-02-23 03:45:57 -08:00
2025-11-18 14:33:11 -08:00
2026-03-04 17:15:55 -08:00
2026-03-04 17:15:55 -08:00
2025-06-18 13:07:22 -07:00
2024-02-15 23:08:48 +00:00
2025-06-18 13:07:22 -07:00
2025-06-18 13:07:22 -07:00
2025-06-18 13:07:22 -07:00
2024-03-14 21:48:59 +00:00
2024-03-15 19:26:13 +00:00
2024-12-04 14:36:46 +00:00
2026-03-12 09:08:14 -07:00
2026-02-23 09:54:47 -08:00
2025-08-19 13:35:51 -07:00
2024-04-17 19:14:41 +00:00
2024-12-03 23:24:48 +00:00
2026-02-17 14:25:39 -08:00
2026-01-27 09:14:39 -08:00
2026-02-25 04:48:51 -08:00
2026-01-27 09:14:39 -08:00
2025-11-19 07:45:52 -08:00
2025-11-21 06:42:16 -08:00
2024-08-19 21:46:26 +00:00
2024-01-22 16:07:39 +00:00
2025-07-29 12:54:49 -07:00
2025-07-29 12:54:49 -07:00
2025-06-12 20:46:54 -07:00
2025-07-29 12:54:49 -07:00
2025-07-29 12:54:49 -07:00
2026-01-27 09:14:39 -08:00
2026-02-18 09:18:10 -08:00
2024-08-19 21:46:26 +00:00
2026-02-04 10:16:41 -08:00
2026-02-04 10:16:41 -08:00
2026-02-17 14:14:59 -08:00
2025-06-17 06:22:15 -07:00
2026-02-04 10:16:41 -08:00
2026-02-04 10:16:41 -08:00
2026-02-04 10:16:41 -08:00
2025-05-27 06:30:20 -07:00
2024-12-04 14:36:46 +00:00
2026-01-27 09:14:39 -08:00
2026-01-27 09:14:39 -08:00
2026-02-18 15:26:18 -08:00
2026-02-18 15:26:18 -08:00
2025-09-17 18:16:01 -07:00
2026-03-18 10:18:06 -07:00
2026-03-18 10:18:06 -07:00
2025-09-08 08:04:16 -07:00
2026-03-04 12:40:19 -08:00
2026-03-04 12:40:19 -08:00
2026-02-23 09:54:47 -08:00
2025-12-01 16:15:39 -08:00
2025-12-01 16:15:39 -08:00
2024-08-15 14:09:52 +00:00
2026-02-17 14:14:59 -08:00
2024-04-17 19:14:41 +00:00
2026-02-04 10:16:41 -08:00
2025-05-05 15:21:13 -07:00
2026-02-25 04:48:51 -08:00
2026-02-25 04:48:51 -08:00
2024-06-27 18:29:58 +00:00
2026-01-14 08:42:22 -08:00
2026-02-04 10:16:41 -08:00
2026-01-29 13:18:24 -08:00
2025-10-01 10:06:20 -07:00
2026-01-29 13:18:24 -08:00
2025-10-01 10:06:20 -07:00
2026-01-29 13:18:24 -08:00
2025-10-01 10:06:20 -07:00
2025-09-15 10:00:29 -07:00
2026-03-16 09:35:38 -07:00
2026-03-16 09:35:38 -07:00
2025-07-15 09:29:41 -07:00
2025-07-21 14:56:01 -07:00
2026-02-18 09:18:10 -08:00
2026-03-04 12:40:19 -08:00
2026-02-25 04:48:51 -08:00
2026-01-30 11:16:13 -08:00
2025-05-13 14:29:37 -07:00
2025-05-13 14:29:37 -07:00
2024-12-04 14:36:46 +00:00
2024-03-20 20:08:13 +00:00
2025-09-10 06:37:12 -07:00
2026-03-09 03:36:55 -07:00
2025-09-29 11:04:13 -07:00
2024-06-10 20:38:30 +00:00
2026-03-02 07:55:38 -08:00
2026-03-02 07:55:38 -08:00
2025-11-24 01:38:20 -08:00
2025-07-15 09:29:41 -07:00
2025-06-10 12:15:25 -07:00
2025-06-10 12:15:25 -07:00
2025-06-10 12:15:25 -07:00
2026-01-21 10:59:51 -08:00
2026-01-21 10:59:51 -08:00
2026-01-27 09:14:39 -08:00
2026-02-18 09:18:10 -08:00
2025-02-26 14:01:44 -08:00
2025-02-26 14:01:44 -08:00
2026-02-04 10:16:41 -08:00
2025-11-19 07:45:52 -08:00
2024-09-12 15:16:12 +00:00
2026-01-27 09:14:39 -08:00
2026-01-27 09:14:39 -08:00
2026-03-04 12:40:19 -08:00
2025-01-22 07:48:37 -08:00
2025-01-22 07:48:37 -08:00
2025-05-13 14:29:37 -07:00
2025-05-13 14:29:37 -07:00
2026-03-18 14:53:09 -07:00
2025-11-21 06:42:16 -08:00
2025-08-11 13:41:12 -07:00
2025-08-26 09:22:30 -07:00
2024-08-19 21:46:26 +00:00
2026-02-17 14:25:39 -08:00
2025-06-03 10:36:23 -07:00
2024-09-18 21:07:59 +00:00
2024-09-18 21:07:59 +00:00
2024-05-16 16:33:52 +00:00
2026-03-04 16:07:20 -08:00
2024-05-02 16:36:20 +00:00
2026-03-11 14:05:49 -07:00
2025-06-02 10:04:39 -07:00
2026-01-28 13:49:00 -08:00
2023-12-14 22:48:49 +00:00
2024-09-25 17:28:44 +00:00
2025-07-07 17:02:17 -07:00
2024-08-28 16:41:50 +00:00
2025-07-28 13:32:36 -07:00
2026-02-23 09:54:47 -08:00
2026-02-04 10:16:41 -08:00
2026-03-02 13:52:34 -08:00
2026-03-02 13:52:34 -08:00
2026-03-02 07:55:38 -08:00
2026-03-12 09:46:50 -07:00
2026-03-12 09:46:50 -07:00
2026-01-27 09:14:39 -08:00
2026-01-27 09:14:39 -08:00
2026-01-27 09:14:39 -08:00
2026-01-27 09:14:39 -08:00
2026-01-27 09:14:39 -08:00
2024-09-24 22:41:40 +00:00
2024-08-07 12:59:35 +00:00
2024-09-24 22:41:40 +00:00
2024-08-07 12:59:35 +00:00
2025-11-26 10:44:51 -08:00
2024-08-07 12:59:35 +00:00
2025-04-22 11:34:41 -07:00
2024-08-07 12:59:35 +00:00
2024-09-24 22:41:40 +00:00
2024-08-07 12:59:35 +00:00
2025-12-15 15:45:21 -08:00
2024-08-07 12:59:35 +00:00
2026-01-20 05:58:38 -08:00
2026-01-14 03:53:04 -08:00
2026-01-27 09:14:39 -08:00
2025-05-21 01:36:22 -07:00
2026-01-27 09:14:39 -08:00
2026-02-23 09:54:47 -08:00
2026-02-23 09:54:47 -08:00
2024-04-15 11:10:23 +00:00
2024-04-15 11:10:23 +00:00
2026-02-25 04:48:51 -08:00
2024-09-12 15:16:12 +00:00
2026-01-27 09:14:39 -08:00
2026-01-27 09:14:39 -08:00
2026-02-25 04:48:51 -08:00
2026-02-04 10:16:41 -08:00
2026-01-20 05:58:38 -08:00
2026-02-25 04:48:51 -08:00
2026-03-12 08:41:30 -07:00
2026-02-04 10:16:41 -08:00
2024-04-17 19:14:41 +00:00
2025-10-07 15:13:14 -07:00
2025-10-07 15:13:14 -07:00
2025-07-15 10:29:12 -07:00
2026-02-04 10:16:41 -08:00
2026-01-28 10:27:29 -08:00
2026-03-18 14:53:09 -07:00
2025-08-04 14:05:01 -07:00
2025-08-04 14:05:01 -07:00
2025-09-15 10:00:29 -07:00
2026-02-23 09:54:47 -08:00
2026-03-19 06:12:41 -07:00
2026-03-18 10:18:06 -07:00
2026-01-27 09:14:39 -08:00
2026-02-04 10:16:41 -08:00
2025-04-24 11:07:56 -07:00
2025-04-14 07:36:31 -07:00
2026-03-12 09:08:14 -07:00
2024-06-10 20:38:30 +00:00
2026-01-20 05:58:38 -08:00
2026-03-17 12:28:30 -07:00
2025-08-12 09:21:21 -07:00
2026-01-14 03:53:04 -08:00
2025-06-18 13:07:22 -07:00
2025-06-18 13:07:22 -07:00
2026-01-14 03:53:04 -08:00
2026-03-18 10:18:06 -07:00
2026-03-18 10:18:06 -07:00
2026-02-17 14:25:39 -08:00
2024-11-26 19:24:31 +00:00
2026-03-04 12:40:19 -08:00
2026-03-04 12:40:19 -08:00
2025-12-10 11:19:19 -08:00
2025-06-18 13:07:22 -07:00
2025-06-18 13:07:22 -07:00
2026-02-17 14:14:59 -08:00
2025-11-21 06:42:16 -08:00
2025-11-19 07:45:52 -08:00
2026-02-04 10:16:41 -08:00
2025-11-24 15:59:56 -08:00
2025-11-17 06:56:33 -08:00
2025-10-01 09:51:59 -07:00
2026-02-04 10:16:41 -08:00
2024-08-15 14:09:52 +00:00
2024-12-04 14:36:46 +00:00
2025-12-12 06:44:20 -08:00
2025-07-15 09:31:25 -07:00
2025-11-21 06:42:16 -08:00
2024-08-15 14:09:52 +00:00
2026-01-14 08:42:22 -08:00
2025-07-02 07:16:22 -07:00
2025-12-11 08:23:57 -08:00
2026-03-18 10:45:00 -07:00
2026-03-18 10:45:00 -07:00
2026-02-23 13:01:19 -08:00
2025-08-25 14:43:41 -07:00
2025-08-25 14:43:41 -07:00
2026-01-14 03:53:04 -08:00
2025-12-01 12:47:18 -08:00
2025-10-27 11:17:38 -07:00
2026-01-07 12:47:21 -08:00
2025-10-24 04:34:01 -07:00
2026-01-20 05:58:38 -08:00
2026-01-20 05:58:38 -08:00
2024-09-12 15:16:12 +00:00
2025-02-24 10:44:28 -08:00
2025-05-12 12:32:19 -07:00
2025-05-23 07:23:22 -07:00
2025-02-24 10:44:28 -08:00
2024-12-17 13:30:50 -08:00
2024-04-17 19:14:41 +00:00
2026-01-27 09:14:39 -08:00
2026-01-27 09:14:39 -08:00
2025-08-25 14:43:41 -07:00
2026-01-27 09:14:39 -08:00
2026-01-30 11:16:13 -08:00
2024-04-17 19:14:41 +00:00
2025-05-27 06:30:20 -07:00
2026-02-26 03:28:56 -08:00
2026-02-25 04:48:51 -08:00
2024-04-17 19:14:41 +00:00
2026-03-03 06:58:35 -08:00
2026-03-03 06:58:35 -08:00
2026-01-27 09:14:39 -08:00
2026-01-27 09:14:39 -08:00
2025-10-20 15:58:20 -07:00
2025-09-24 13:14:32 -07:00
2025-10-20 10:49:20 -07:00
2025-06-30 15:50:40 -07:00
2026-02-17 14:14:59 -08:00
2025-10-14 13:15:21 -07:00
2026-02-18 09:18:10 -08:00
2025-05-23 06:19:16 -07:00
2025-05-23 06:19:16 -07:00
2025-05-23 06:19:16 -07:00
2026-02-17 14:14:59 -08:00
2026-02-04 10:16:41 -08:00
2025-06-18 13:07:22 -07:00
2024-06-14 23:24:19 +00:00
2024-08-07 12:59:35 +00:00
2026-01-28 13:49:00 -08:00
2024-01-09 12:36:55 +00:00
2026-01-28 13:49:00 -08:00
2026-01-28 13:49:00 -08:00
2026-01-13 14:28:00 -08:00
2025-06-18 06:09:14 -07:00
2025-06-20 03:29:19 -07:00
2025-07-07 17:02:17 -07:00
2026-02-17 10:31:46 -08:00
2026-02-04 10:16:41 -08:00
2024-08-07 12:59:35 +00:00
2026-02-23 09:54:47 -08:00