Commit Graph

21 Commits

Author SHA1 Message Date
Johnni Winther 12f510fbd1 [dart2js] Use new method invocation encoding
Change-Id: Iab73f25a19fe8718cb68327fef5878d25b735030
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188523
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2021-03-17 17:26:25 +00:00
Sam Rawlins 18bc70b898 Remove unnecessary imports from compiler/test
Bug: https://github.com/dart-lang/sdk/issues/44569
Change-Id: Iacb5553755af38e931431cb5aa4e3495cd34539f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190602
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-03-16 19:44:10 +00:00
Stephen Adams 39aa454e7b [dart2js] Implement int.>>> optimizations
Change-Id: I7d54bc523bb81c5ae8d6fed4ec2e6df473206788
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187340
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2021-03-09 02:20:06 +00:00
Lasse R.H. Nielsen d352bc28b8 Remove (most) uses of the "non-nullable" experiment flag.
Since the flag is now enabled by default, there should be no mention of it.
There are still some uses in front_end/testcases that are not just removable
(it also uses `no-non-nullable`). There migth be more uses that are not
as easily found as grepping for `--enable-experiment

Removes two VM tests where fixing them meant they were just duplicating
the corresponding non *_2/ tests.
Fixes #44941

TEST= Large number of tests chaged.=(no-)?non-nullable`.

Change-Id: Ief755981ccde9a5482fcdf408c2929c74433a710
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183688
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2021-02-12 17:16:54 +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 531a3a4ffd Reland [dart2js] Remove GlobalsLocalsMap from JClosedWorld
The removes the GlobalsLocalsMap from JClosedWorld and instead includes
it as a part of GlobalInferenceResults.

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

Change-Id: I384b21bf285009c82ca9ec8740443cda0a6fa493
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183001
Commit-Queue: Johnni Winther <johnniwinther@google.com>
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
Ivan Inozemtsev 7194e888ae Revert submission 181620
Reason for revert: b/179155154
Reverted Changes:
I17bd9d9e0:[dart2js] Refactor closure data to use AST nodes i...
I6578b727d:[dart2js] Remove GlobalsLocalsMap from JClosedWorl...

Change-Id: I6cb48937220d2ed3814002254c0717feebe78a94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182502
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-02-03 10:52:38 +00:00
Johnni Winther 51726cf38c [dart2js] Remove GlobalsLocalsMap from JClosedWorld
The removes the GlobalsLocalsMap from JClosedWorld and instead includes
it as a part of GlobalInferenceResults.

Change-Id: I6578b727d1046841e5d18e6a7dedaf4dc657e37d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181620
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-02-02 17:10:29 +00:00
Mayank Patke a2778def75 [dart2js] Use wrapped abstract value domain in test mode.
This should cause no change in behavior, but the layer of indirection
keeps us from assuming that typemasks are the underlying implementation
of the abstract value domain.

Change-Id: I2b51b0da489407de86d5638b2eda9541fdd0276e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171780
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-11-12 20:11:50 +00:00
Leaf Petersen a6faf8f2f9 [Language] Enable null safety in Dart 2.12.
Closes https://github.com/dart-lang/sdk/issues/22

Change-Id: I662dd17fda0ff62a871314896fbf1dbe220f41de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166790
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
2020-10-29 18:25:56 +00:00
Joshua Litt 043bebcd02 [dart2js] Fixes to dart2js unit tests to support nnbd by default.
Change-Id: I440dddd34a62bfe8c0f3fd563888acb680c2b031
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168141
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-10-20 18:40:44 +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
Stephen Adams 8f3b2e1853 [dart2j2] Rewriting optimizations of bit operations
Various algebraic simplifications of bitwise operations.
Together they allow the Flutter Color class to be well optimized.

Change-Id: Icf7f4f14f77045f943cdec41c6a526a42c179538
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150268
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2020-10-14 20:15:58 +00:00
Joshua Litt eab26cd2bd [dart2js] Flip flag to defer class types.
Change-Id: Ia1f913a01f2be006158967b145db3ee34b297cfe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155660
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-08-17 20:25:09 +00:00
Christian Altamirano d983751b77 [dart2js] Refactor a few methods for type masks
Pass the CommonMasks abstract value domain instead of the JClosedWorld to TypeMask methods that need access to *their* abstract value domain. It is wrong to get the abstract value domain from the JClosedWorld because when we try to wrap abstract values, the abstract value domain in the JClosedWorld is the wrapper domain, not the domain being wrapped.

Change-Id: I5bbd0f4c56abe45714dd0a2657f73ef240efae0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155640
Commit-Queue: Christian Altamirano <coam@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-07-28 17:25:40 +00:00
Mayank Patke 3b67681bcc [dart2js] Clean up (pre-)NNBD unit test configurations.
Change-Id: Ife85aafa90b1b0347fabb6e95f3d6c00c5307cd2
Bug: https://github.com/dart-lang/sdk/issues/42063
Fixes: https://github.com/dart-lang/sdk/issues/42063
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152440
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-06-25 18:44:32 +00:00
Stephen Adams d8b7ec5163 [dart2js] Share large strings
On a per output-unit basis, repeated large strings are shared via a
`string$` pool.

TODOs:

- don't do it with strings passed to JS() code (they might need
  to be property accesses).

- tweak thresholds, using different thresholds for slow/run-once code.

Change-Id: Ib14245d9d428e52fb2ca23f34fa533de97fa2208
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136304
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-06-19 16:34:13 +00:00
Stephen Adams e3fac1dde2 [dart2js] Remove Options.useNewRti
Change-Id: Ib959cddf7929e2e5d6f3e514e718976fd0135b7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150473
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-06-09 17:01:55 +00:00
Joshua Litt 05ca544f15 [dart2js] Move tests/compiler/dart2js_extra to tests/dart2js_2.
Change-Id: Iaa0ca2b4f2d1b15f79ddca37834d3ed2497bc068
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149242
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-06-03 15:15:30 +00:00
Joshua Litt 20faaa5d94 [dart2js] Move dart2js unit tests to pkg/compiler/test.
Change-Id: Ib18f554c1076f27a3f7c0df5a36410da41a1f467
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148784
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-05-28 18:51:11 +00:00