Ömer Sinan Ağacan
78ce85a7fe
[dart2wasm,tfa] Don't infer class of string values in comparisons
...
In dart2wasm, when a comparison like `x == "hello"` is true, we can't
assume that the class of `x` is the same as the class of `"hello"`:
- If `x` is received from JS, it will be `JSStringImpl`.
- If it's a substring of a `TwoByteString`, it will be `TwoByteString`.
- Otherwise it will be `OneByteString`.
Update `Target` with the new method
```
bool get canInferStringClassAfterEqualityComparison => true;
```
to allow TFA to *not* infer classes of string values after comparisons.
Override the method to return `false` in dart2wasm's `Target`
implementation.
Fixes #59901 .
Tested: web/wasm/issue_59901_test
Change-Id: I1a6c8deaf27c54240dd4e821dbd8160914502ad7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/404562
Reviewed-by: Martin Kustermann <kustermann@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Ömer Ağacan <omersa@google.com >
2025-01-16 03:24:39 -08:00
..
2024-11-19 00:59:10 +00:00
2024-11-19 00:59:10 +00:00
2024-11-19 00:59:10 +00:00
2025-01-07 14:07:13 -08:00
2024-01-23 01:26:09 +00:00
2025-01-16 03:24:39 -08:00
2024-10-11 16:53:52 +00:00
2023-02-14 20:13:57 +00:00
2023-02-14 01:35:05 +00:00
2024-07-30 03:13:58 +00:00
2024-12-13 11:10:26 -08:00
2024-12-13 14:09:46 -08:00
2024-10-11 16:53:52 +00:00
2024-07-30 03:13:58 +00:00
2023-08-09 23:17:18 +00:00
2023-01-30 15:58:38 +00:00
2023-10-27 01:36:28 +00:00
2024-11-19 00:59:10 +00:00
2024-10-09 08:38:48 +00:00
2024-10-09 08:38:48 +00:00
2024-10-09 08:38:48 +00:00
2024-11-19 00:59:10 +00:00
2022-09-07 14:49:17 +00:00
2022-09-07 14:49:17 +00:00
2022-09-07 14:49:17 +00:00
2022-09-07 14:49:17 +00:00
2023-09-01 00:05:09 +00:00
2024-11-19 00:59:10 +00:00
2024-09-10 15:29:28 +00:00
2024-07-10 01:39:58 +00:00
2024-07-10 01:39:58 +00:00
2022-09-07 14:49:17 +00:00
2024-11-19 00:59:10 +00:00
2024-10-11 16:53:52 +00:00
2024-10-11 16:53:52 +00:00
2024-10-11 16:53:52 +00:00
2024-10-11 16:53:52 +00:00
2024-10-11 16:53:52 +00:00
2024-10-11 16:53:52 +00:00
2024-10-11 16:53:52 +00:00
2024-10-11 16:53:52 +00:00
2024-10-11 16:53:52 +00:00
2023-10-25 15:37:50 +00:00
2023-10-25 15:37:50 +00:00
2021-08-04 23:27:18 +00:00
2024-10-11 16:53:52 +00:00
2024-10-11 16:53:52 +00:00
2024-10-11 16:53:52 +00:00
2024-10-11 16:53:52 +00:00
2023-06-07 17:57:26 +00:00
2024-11-19 00:59:10 +00:00
2024-11-19 00:59:10 +00:00
2024-10-01 09:10:22 +00:00
2024-11-19 00:59:10 +00:00
2022-09-07 14:49:17 +00:00
2024-01-23 01:26:09 +00:00
2024-11-19 00:59:10 +00:00
2021-07-26 13:22:31 +00:00
2024-11-19 00:59:10 +00:00
2024-11-19 00:59:10 +00:00
2024-11-19 00:59:10 +00:00
2023-01-05 01:26:52 +00:00
2024-11-27 00:35:50 +00:00
2024-06-12 21:28:23 +00:00
2024-06-12 21:28:23 +00:00
2024-07-17 21:53:48 +00:00
2022-04-20 15:24:18 +00:00
2024-11-19 00:59:10 +00:00
2024-11-19 00:59:10 +00:00
2022-07-20 06:04:34 +00:00
2022-07-20 06:04:34 +00:00
2022-07-20 06:04:34 +00:00
2022-07-20 06:04:34 +00:00
2022-07-20 06:04:34 +00:00
2021-09-13 21:59:20 +00:00
2022-05-10 22:56:23 +00:00
2023-10-27 01:36:28 +00:00
2024-11-19 00:59:10 +00:00
2024-11-19 00:59:10 +00:00
2022-09-07 14:49:17 +00:00
2024-01-23 01:26:09 +00:00
2024-11-19 00:59:10 +00:00
2024-01-23 01:26:09 +00:00
2024-01-23 01:26:09 +00:00
2024-01-23 01:26:09 +00:00
2021-08-27 00:37:56 +00:00
2022-09-07 14:49:17 +00:00
2024-11-19 00:59:10 +00:00
2023-05-25 23:45:25 +00:00
2022-03-09 22:18:27 +00:00
2024-04-16 23:30:10 +00:00
2024-10-09 08:38:48 +00:00
2024-01-23 01:26:09 +00:00
2024-11-19 00:59:10 +00:00
2024-12-16 10:01:23 -08:00
2024-11-19 00:59:10 +00:00
2024-11-19 00:59:10 +00:00
2022-03-09 22:18:27 +00:00
2024-11-19 00:59:10 +00:00
2024-12-18 01:14:17 -08:00