Commit c91fd18
[dart2wasm] Use native int parsing in JSCM
JSCM (JS compatibility mode) started as an experiment to have a
compilation mode that is semantically as close to dart2js as possible,
to make migration from dart2js easy.
However we've since decided to follow VM semantics in dart2wasm, and
JSCM now mainly exists to test JS-backed typed data and string classes.
The default mode allocates Wasm-array-backed strings and typed data
classes when they are allocated in Dart, so the JS-backed classes are
are only tested in JS interop tests in the default mode. In JSCM we only
have JS-backed classes so all tests allocate JS-backed typed data and
string classes.
Integer parsing in JSCM is currently just a `parseInt` JS call, which is
not compatible with the VM or dart2js semantics.
Since which one to follow does not make any difference in terms of test
coverage of dart2wasm standard library, do the simple thing and reuse
the default mode's `int` parser.
Fixes these tests in JSCM:
- co19/LanguageFeatures/Digit-separators/parse_A01_t01
- co19/LanguageFeatures/Digit-separators/parse_A01_t02
- co19/LanguageFeatures/Digit-separators/parse_A01_t03
- co19/LanguageFeatures/Digit-separators/parse_A03_t01
- co19/LanguageFeatures/Digit-separators/parse_A03_t02
- co19/LanguageFeatures/Digit-separators/parse_A03_t03
- co19/LibTest/core/Uri/parseIPv6Address_A02_t01
- co19/LibTest/core/int/parse_A01_t02
- co19/LibTest/core/int/parse_A02_t01
- co19/LibTest/core/int/parse_A03_t02
- co19/LibTest/core/int/parse_A04_t02
- corelib/int_parse_radix_int64_test/02
- corelib/int_parse_radix_test/02
- corelib/int_parse_radix_test/none
- corelib/int_parse_with_limited_ints_test
- corelib/int_try_parse_test
- corelib/integer_parsed_arith_vm_test
- corelib/integer_parsed_div_rem_vm_test/01
- corelib/integer_parsed_div_rem_vm_test/none
- corelib/integer_parsed_mul_div_vm_test
- corelib/num_parse_test/01
- corelib/num_parse_test/none
- corelib/num_try_parse_test
- corelib/uri_ipv4_test
- corelib/uri_test
- language/operator/arithmetic_int64_test
- language/operator/arithmetic_test
- lib/async/stream_controller_test
- lib/convert/json_chunk_test
- lib/convert/json_test
- lib/convert/json_utf8_chunk_test
- lib/math/math2_test
- lib/math/math_test
Fixes #56849.
Change-Id: Iea72eeb39a80e00c023b780c185b4fabe549c568
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/390860
Reviewed-by: Slava Egorov <[email protected]>
Commit-Queue: Ömer Ağacan <[email protected]>1 parent 9046485 commit c91fd18
File tree
4 files changed
+10
-39
lines changed- sdk/lib
- _internal/wasm_js_compatibility/lib
4 files changed
+10
-39
lines changedLines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
210 | 211 | | |
211 | 212 | | |
212 | | - | |
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| 185 | + | |
185 | 186 | | |
186 | 187 | | |
187 | | - | |
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
| |||
0 commit comments