Commit 282ea58
[dart2wasm] Make json parser use JS
The `double.parse()` function first runs a regular expression over the
string to validate it's a valid string representation of a double.
Though the json parser does this kind of validation itself, so we can
avoid this regexp match and call the JavaScript `parseFloat()` function
directly.
Change-Id: Ib2c2c4789d63b75b9a24eac5b5ee2b3483c65327
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410320
Reviewed-by: Ömer Ağacan <[email protected]>
Commit-Queue: Martin Kustermann <[email protected]>parseFloat() directly instead of double.parse()
1 parent d3f28d7 commit 282ea58
1 file changed
+11
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
311 | | - | |
| 311 | + | |
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
| |||
719 | 719 | | |
720 | 720 | | |
721 | 721 | | |
722 | | - | |
| 722 | + | |
723 | 723 | | |
724 | 724 | | |
725 | 725 | | |
| |||
1683 | 1683 | | |
1684 | 1684 | | |
1685 | 1685 | | |
1686 | | - | |
1687 | | - | |
| 1686 | + | |
1688 | 1687 | | |
1689 | 1688 | | |
1690 | 1689 | | |
| |||
1777 | 1776 | | |
1778 | 1777 | | |
1779 | 1778 | | |
1780 | | - | |
1781 | | - | |
| 1779 | + | |
1782 | 1780 | | |
1783 | 1781 | | |
1784 | 1782 | | |
| |||
2044 | 2042 | | |
2045 | 2043 | | |
2046 | 2044 | | |
2047 | | - | |
2048 | | - | |
| 2045 | + | |
2049 | 2046 | | |
2050 | 2047 | | |
2051 | 2048 | | |
| |||
2786 | 2783 | | |
2787 | 2784 | | |
2788 | 2785 | | |
| 2786 | + | |
| 2787 | + | |
| 2788 | + | |
| 2789 | + | |
| 2790 | + | |
0 commit comments