Commit Graph

8 Commits

Author SHA1 Message Date
Stephen Adams 93313bf12d [dart2js] Fix stack overflow on optimizing '%'
The back-edge test failed to take into account that a block can have a
back-edge to itself.

Fixed: 45413
Change-Id: Ib623e6baa2c1de6df131fc67462978a042df5a4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192606
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-03-23 15:37:46 +00:00
Mayank Patke 97771fb2f2 [dart2js] Add failing tests for issue #45046.
Bug: https://github.com/dart-lang/sdk/issues/45046
Change-Id: I6b0010b78c1781c9c264b9a479dc2136ded3105c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185495
Reviewed-by: Stephen Adams <sra@google.com>
2021-03-12 04:47:59 +00:00
Sigmund Cherem 8d7d867154 [web] delete tests that are no longer valid
Change-Id: I6300287e63666b13a5ba083e30d9d2778d458d85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184281
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2021-02-22 20:01:49 +00:00
Johnni Winther bfee879e19 [dart2js] Add tests for bug in dart2js type promotion
Dart2js type promotion wrongfully uses the type promotion result of
the last argument of an invocation as the result of the invocation
itself.

Change-Id: I188514fdac4edbea24dffbd858c0f8be6cd6ccf0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185781
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-02-22 08:56:18 +00:00
Mayank Patke b615f08e58 [dart2js] Add failing tests for issue #41449.
Bug: https://github.com/dart-lang/sdk/issues/41449
Change-Id: I5526d3f6d15945bdf2ba0f790e1c803471b139c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183120
Reviewed-by: Stephen Adams <sra@google.com>
2021-02-08 23:23:34 +00:00
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
Johnni Winther 6849d737a6 Reland: [dart2js] Refactor closure data to use AST nodes instead of locals
This CL avoids creating locals using KernelToLocalsMap when computing
closure data for the J-model. Instead the closure data uses
ir.VariableDeclaration, JTypeVariable, and internal locals (ThisLocal
and BoxLocal) internally, and the accessor function require passes
a KernelToLocalsMap to convert the internal model to a Locals upon use.
The converted Locals are cached internal for performance only.

This prepares for splitting the GlobalLocalsMap and KernelToLocalsMap
from the JClosedWorld.

Previously landed in https://dart-review.googlesource.com/c/sdk/+/180820
but reverted.

Change-Id: Ic6a2ab63de7cb31c89dd50ca2af3f205a792fd74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183000
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-02-06 08:11:16 +00:00
Sigmund Cherem 912005267d [web] rename suite dart2js -> web.
Change-Id: I46be49b2effec3e38a3dc44cd45cfe736f77fa78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182680
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2021-02-04 23:11:32 +00:00