Commit Graph

2 Commits

Author SHA1 Message Date
Stephen Adams 08f90cad84 [dart2js] Use 'num(ber)' wherever possible instead of 'double'
JSDouble represents doubles that are not integers. It is usually wrong
to use JSDouble, so use JSNumber instead where we mean 'all double
values'.

This fixes #44818 by not mistakenly pretending that division cannot
have an integral result.

Will follow up with a CL to rename JSDouble.

Fixed: 44818
Change-Id: Ic324df2ee1f2c7434bc0b064c0dbd7b6800ad93b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183360
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-02-08 22:06:54 +00:00
Stephen Adams d5e790b2b1 [dart2js] Add golden function codegen tests
As with other 'id_equivalence' tests, the information can be generated
via the '-g' flag.

Bug: 43778
Change-Id: I316d539f7575e349dc55ecb564de7b65f0f21575
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167480
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2020-10-14 22:32:38 +00:00