Stephen Adams
3ec6a72b93
[dart2js] Cleanup triple-shift flags
...
Bug: 45335
Change-Id: I4fc2f970884439d9e4f0957dd4f756c13511306a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196560
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2021-04-24 18:55:12 +00:00
Stephen Adams
470576682a
[dart2js] Access closureFromTearOff directly
...
Change-Id: I52fc6cee1affc778a8e8a9de712514f6f1f153fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196622
Reviewed-by: Joshua Litt <joshualitt@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2021-04-23 21:40:12 +00:00
Joshua Litt
bf02e85330
[dart2js] Use DeferredStatement in existing Finalizers.
...
Change-Id: Iadc4b2d6f1fa0bebb57ac25012571078b9bfcdb4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195189
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Joshua Litt <joshualitt@google.com >
2021-04-22 17:37:46 +00:00
Emmanuel Pellereau
335f55a601
Revert "Optimize js_util setProperty calls for non-function value types."
...
This reverts commit 853597a978 .
Reason for revert: Breaks google3 (b/186088197)
Original change's description:
> Optimize js_util setProperty calls for non-function value types.
>
> No change in the generated JavaScript for dart2js base on a sample
> foo.dart file and tests/lib/js/js_util/properties_test.dart
>
> Bug: #44533
> Change-Id: Ib6866fa7fca1f13b03c75dd4f1eac904b18811e3
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193838
> Reviewed-by: Sigmund Cherem <sigmund@google.com >
> Commit-Queue: Riley Porter <rileyporter@google.com >
TBR=sigmund@google.com ,srujzs@google.com ,rileyporter@google.com
Change-Id: I3f08d29e2d6a1a7846b8d67fadc314ad947f54cf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: #44533
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196484
Reviewed-by: David Morgan <davidmorgan@google.com >
Commit-Queue: David Morgan <davidmorgan@google.com >
2021-04-22 09:27:29 +00:00
Stephen Adams
b529afd10a
[dart2js] rename setRuntimeTypeInfo to _setArrayType
...
For a long time now this is used only to put types on JSArray.
Change-Id: I31f15d313d7e131eecac76697a8938c197f83e7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195940
Reviewed-by: Mayank Patke <fishythefish@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2021-04-22 02:06:31 +00:00
Riley Porter
853597a978
Optimize js_util setProperty calls for non-function value types.
...
No change in the generated JavaScript for dart2js base on a sample
foo.dart file and tests/lib/js/js_util/properties_test.dart
Bug: #44533
Change-Id: Ib6866fa7fca1f13b03c75dd4f1eac904b18811e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193838
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Riley Porter <rileyporter@google.com >
2021-04-21 19:01:11 +00:00
Mark Zhou
5b9a3f5c9a
[dart2js] Cleaning up no-legacy-mode failures.
...
Partial revert of: https://dart-review.googlesource.com/c/sdk/+/158160
Change-Id: I81bf4b07a45d3bd83bbbd04cf4fb78d9cc94b68f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196020
Reviewed-by: Joshua Litt <joshualitt@google.com >
Commit-Queue: Mark Zhou <markzipan@google.com >
2021-04-20 23:24:08 +00:00
Johnni Winther
6ec6fd7b4a
[dart2js] Remove equals-null work-arounds
...
Change-Id: I4fad40687cda6bb8a21a6d249fe9ecda2a576ff0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195265
Reviewed-by: Mayank Patke <fishythefish@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2021-04-20 04:53:29 +00:00
Mayank Patke
b23c6fb544
[dart2js] Disable CFE lowering for initialized late statics.
...
No additional work needs to be done in the late lowering since the
existing `_lazy` and `_lazyFinal` mechanisms already do the right thing.
Change-Id: I1dd6cb5ce3c882cac5f0206f1cbc87fd53c6fffe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195174
Commit-Queue: Mayank Patke <fishythefish@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2021-04-16 06:34:27 +00:00
Mayank Patke
5535b1603f
[dart2js] Ensure the _Cell constructor is called eagerly.
...
Change-Id: Ie342505a91061571fe18465e58df5f6f4ef24db7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195173
Reviewed-by: Stephen Adams <sra@google.com >
2021-04-16 06:34:27 +00:00
Mayank Patke
3b4e4f6f47
[dart2js] Cache Cell-specific kernel AST nodes on CoreTypes.
...
Change-Id: I82957eb405d7ab5c76ad1caf90ed510279ec8a7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195540
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2021-04-16 06:34:27 +00:00
Stephen Adams
7754a868dd
[dart2js] Remove static state accessors
...
Change-Id: I58391845d3e28b041b7bb1746e696610d113ea7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195511
Reviewed-by: Joshua Litt <joshualitt@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2021-04-16 03:43:17 +00:00
Joshua Litt
32e3f78ba4
[js_ast] add DeferredStatement to js ast.
...
Change-Id: I921eb7638039435711974d4fc40a3b9471a03f7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195172
Commit-Queue: Joshua Litt <joshualitt@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2021-04-15 20:16:27 +00:00
Stephen Adams
6e48eb730c
[dart2js] Remove 'operatorIsType'
...
Change-Id: I223a2744c401d4b7452853917d1cb5d4474f446f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195486
Reviewed-by: Joshua Litt <joshualitt@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2021-04-15 18:32:57 +00:00
Stephen Adams
813019a9c5
[dart2js] Remove old-rti substitution property from namer
...
Change-Id: I696220cba191b5df4ffd14abd62a718708366f7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195308
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Joshua Litt <joshualitt@google.com >
2021-04-15 04:46:56 +00:00
Joshua Litt
298795da23
[dart2js] Create DeferredHolderExpression to defer holder names.
...
Change-Id: I5a6b2f56d0e63e8979687e16841a8696b9c6507f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194113
Commit-Queue: Joshua Litt <joshualitt@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2021-04-14 18:27:25 +00:00
Stephen Adams
acd5f6e997
[dart2js] Add test for string method specializers
...
Change-Id: I4bbc7d7353c6ccc5eb3b0b9feb08c16f35c24fb6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194885
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2021-04-13 06:53:39 +00:00
Mayank Patke
05a0508e7c
[dart2js] Implement Cell lowering for initialized local variables.
...
Change-Id: I99c1274e1a74693be329ad9f582baf2a9817934a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194961
Commit-Queue: Mayank Patke <fishythefish@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2021-04-13 02:25:46 +00:00
Mayank Patke
5d20034a82
Reland "[dart2js] Implement Cell lowering for uninitialized static fields."
...
This is a reland of da42b0d323
Original change's description:
> [dart2js] Implement Cell lowering for uninitialized static fields.
>
> Change-Id: If0cd7c95a8e52de19893892acae662619075d87b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193835
> Commit-Queue: Mayank Patke <fishythefish@google.com >
> Reviewed-by: Johnni Winther <johnniwinther@google.com >
Change-Id: Ic8089989c2c474c4204be9742601be82f9aa108f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194901
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Mayank Patke <fishythefish@google.com >
2021-04-12 21:11:26 +00:00
Mayank Patke
c745c6d26a
Revert "[dart2js] Implement Cell lowering for uninitialized static fields."
...
This reverts commit da42b0d323 .
Reason for revert: g3 failures
Original change's description:
> [dart2js] Implement Cell lowering for uninitialized static fields.
>
> Change-Id: If0cd7c95a8e52de19893892acae662619075d87b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193835
> Commit-Queue: Mayank Patke <fishythefish@google.com >
> Reviewed-by: Johnni Winther <johnniwinther@google.com >
TBR=johnniwinther@google.com ,sra@google.com ,fishythefish@google.com
Change-Id: Ic90ebf140b2105f06afa43ae7d332c01887cd8d5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194900
Reviewed-by: Mayank Patke <fishythefish@google.com >
Commit-Queue: Mayank Patke <fishythefish@google.com >
2021-04-09 20:42:45 +00:00
Mayank Patke
da42b0d323
[dart2js] Implement Cell lowering for uninitialized static fields.
...
Change-Id: If0cd7c95a8e52de19893892acae662619075d87b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193835
Commit-Queue: Mayank Patke <fishythefish@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2021-04-09 19:46:23 +00:00
Joshua Litt
28aa79ddd7
Reland "[dart2js] Add support for bundling fragments."
...
This is a reland of d0f55d0e42
Original change's description:
> [dart2js] Add support for bundling fragments.
>
> Also changes the default to bundling rather than interleaving fragments.
>
> Change-Id: Id79d03a8a8b5be7465b8535f6c9c47dfad120c9c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191484
> Commit-Queue: Joshua Litt <joshualitt@google.com >
> Reviewed-by: Stephen Adams <sra@google.com >
> Reviewed-by: Sigmund Cherem <sigmund@google.com >
Change-Id: I0347ddb6dd93eb57f0abc259fc477ec3a9d7231b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194323
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Joshua Litt <joshualitt@google.com >
2021-04-08 17:46:50 +00:00
Stephen Adams
2f327a61e3
Redo "[dart2js] Avoid premature interceptor optimizations"
...
This reverts commit fc349bdbb5 .
Change-Id: Idb991651abdd8a60a1a2ef838f7396ad6c892223
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194207
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2021-04-08 17:01:10 +00:00
Joshua Litt
05a0e79a76
Revert "[dart2js] Add support for bundling fragments."
...
This reverts commit d0f55d0e42 .
Reason for revert: Investigating 5% spike in memory usage
Original change's description:
> [dart2js] Add support for bundling fragments.
>
> Also changes the default to bundling rather than interleaving fragments.
>
> Change-Id: Id79d03a8a8b5be7465b8535f6c9c47dfad120c9c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191484
> Commit-Queue: Joshua Litt <joshualitt@google.com >
> Reviewed-by: Stephen Adams <sra@google.com >
> Reviewed-by: Sigmund Cherem <sigmund@google.com >
TBR=sra@google.com ,sigmund@google.com ,joshualitt@google.com
Change-Id: I3d61f14981d9314163974c6a38d5a5e0d76b5a98
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194322
Reviewed-by: Joshua Litt <joshualitt@google.com >
Commit-Queue: Joshua Litt <joshualitt@google.com >
2021-04-07 23:53:20 +00:00
Mayank Patke
8f832e2c6b
[dart2js] Implement Cell lowering for uninitialized locals.
...
Change-Id: I7233e1484cc19e5f24d215bfd2c1e34c8f12961b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193588
Commit-Queue: Mayank Patke <fishythefish@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2021-04-07 19:43:07 +00:00
Mayank Patke
c089922d2a
Reland "[dart2js] Implement Cell abstraction for late lowering."
...
This is a reland of b647020318
Original change's description:
> [dart2js] Implement Cell abstraction for late lowering.
>
> Change-Id: Ib5fe8ed8e43513283a4e05f216e068241e8d63da
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193587
> Commit-Queue: Mayank Patke <fishythefish@google.com >
> Reviewed-by: Stephen Adams <sra@google.com >
Change-Id: I75501a556819463dab09842be11790b5f4ef1c7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193890
Reviewed-by: Mayank Patke <fishythefish@google.com >
2021-04-07 19:43:07 +00:00
Joshua Litt
d0f55d0e42
[dart2js] Add support for bundling fragments.
...
Also changes the default to bundling rather than interleaving fragments.
Change-Id: Id79d03a8a8b5be7465b8535f6c9c47dfad120c9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191484
Commit-Queue: Joshua Litt <joshualitt@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2021-04-07 18:30:47 +00:00
Ivan Inozemtsev
fc349bdbb5
Revert "[dart2js] Avoid premature interceptor optimizations"
...
This reverts commit db6f65e661 .
Reason for revert: b/184605569
Original change's description:
> [dart2js] Avoid premature interceptor optimizations
>
> Add a SsaFinalizeInterceptors phase that does optimizations with the
> interceptor calling convention.
>
> This puts the the caller and callee sides of the dummy explicit
> receiver optimization in the same phase.
>
> Change-Id: I07fe0483c2658c3744b76a235edb24720d7ea60f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193140
> Commit-Queue: Stephen Adams <sra@google.com >
> Reviewed-by: Mayank Patke <fishythefish@google.com >
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I0e2959f329030f12a43a9aef16cfee9b94bbf250
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194061
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com >
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com >
2021-04-06 08:09:07 +00:00
Stephen Adams
0087b0538b
Revert "[dart2js] Implement Cell abstraction for late lowering."
...
This reverts commit b647020318 .
Reason: test failures.
Change-Id: I1c4987ede89bebfcc5f14273f0bfbaf809507a43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193883
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2021-04-02 16:59:31 +00:00
Stephen Adams
db6f65e661
[dart2js] Avoid premature interceptor optimizations
...
Add a SsaFinalizeInterceptors phase that does optimizations with the
interceptor calling convention.
This puts the the caller and callee sides of the dummy explicit
receiver optimization in the same phase.
Change-Id: I07fe0483c2658c3744b76a235edb24720d7ea60f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193140
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Mayank Patke <fishythefish@google.com >
2021-04-02 04:54:58 +00:00
Mayank Patke
b647020318
[dart2js] Implement Cell abstraction for late lowering.
...
Change-Id: Ib5fe8ed8e43513283a4e05f216e068241e8d63da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193587
Commit-Queue: Mayank Patke <fishythefish@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2021-04-01 23:57:27 +00:00
Joshua Litt
5ca3b45541
[dart2js] Remove unused 'classesOnlyNeededForRti' field.
...
Change-Id: I424fd9fcf6c7f8a9d0f724b5599fc96242bb9042
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192943
Commit-Queue: Joshua Litt <joshualitt@google.com >
Reviewed-by: Mayank Patke <fishythefish@google.com >
2021-03-31 17:30:29 +00:00
Joshua Litt
81092839c7
Reland "[dart2js] Avoid reserializing the closed world alongside type inference."
...
This is a reland of 7b022a7f2f
Original change's description:
> [dart2js] Avoid reserializing the closed world alongside type inference.
>
> This cl adds a temporary flag '--no-closed-world-in-data' in order to
> support serializing global inference results with and without the closed
> world.
>
> This flag only exists to allow us to roll this into google3. Afterwards,
> it will be removed.
>
> Change-Id: I6e9712739edd148edcf43007b6ece35efa688538
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192124
> Commit-Queue: Joshua Litt <joshualitt@google.com >
> Reviewed-by: Sigmund Cherem <sigmund@google.com >
> Reviewed-by: Johnni Winther <johnniwinther@google.com >
Change-Id: I47c08edb868f272c7501ae139a9533fa07d4176f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193585
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Joshua Litt <joshualitt@google.com >
2021-03-31 16:11:39 +00:00
Joshua Litt
70db4908e4
Revert "[dart2js] Avoid reserializing the closed world alongside type inference."
...
This reverts commit 7b022a7f2f .
Reason for revert: Missed one of the references to write-data
Original change's description:
> [dart2js] Avoid reserializing the closed world alongside type inference.
>
> This cl adds a temporary flag '--no-closed-world-in-data' in order to
> support serializing global inference results with and without the closed
> world.
>
> This flag only exists to allow us to roll this into google3. Afterwards,
> it will be removed.
>
> Change-Id: I6e9712739edd148edcf43007b6ece35efa688538
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192124
> Commit-Queue: Joshua Litt <joshualitt@google.com >
> Reviewed-by: Sigmund Cherem <sigmund@google.com >
> Reviewed-by: Johnni Winther <johnniwinther@google.com >
TBR=johnniwinther@google.com ,sigmund@google.com ,joshualitt@google.com
Change-Id: Icc8082462f02bc7336953c915ef2203697085358
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193584
Reviewed-by: Joshua Litt <joshualitt@google.com >
Commit-Queue: Joshua Litt <joshualitt@google.com >
2021-03-30 22:29:03 +00:00
Mayank Patke
66f36512c5
[dart2js] Avoid repeating RTI type redirections across output units.
...
Change-Id: I71746528b44dc2afab7b85ecc807491d12cb51a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191985
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Mayank Patke <fishythefish@google.com >
2021-03-30 21:05:51 +00:00
Joshua Litt
4bd278742b
[dart2js] Remove omitted output units from deferred_loading_test.
...
Change-Id: I69f728129b865cae3ec46426af2890127378e44b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193090
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Joshua Litt <joshualitt@google.com >
2021-03-30 18:17:23 +00:00
Joshua Litt
7b022a7f2f
[dart2js] Avoid reserializing the closed world alongside type inference.
...
This cl adds a temporary flag '--no-closed-world-in-data' in order to
support serializing global inference results with and without the closed
world.
This flag only exists to allow us to roll this into google3. Afterwards,
it will be removed.
Change-Id: I6e9712739edd148edcf43007b6ece35efa688538
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192124
Commit-Queue: Joshua Litt <joshualitt@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2021-03-30 16:59:41 +00:00
Joshua Litt
2febc7d526
[dart2js] Create abstractions to support bundling.
...
Change-Id: I2d8a7ecae963aa5b51e1405652633b72545f7cd9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191468
Commit-Queue: Joshua Litt <joshualitt@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2021-03-25 20:59:14 +00:00
Mayank Patke
400939dfe7
[dart2js] Support additional types of instantiations in RTI need.
...
Bug: https://github.com/dart-lang/sdk/issues/41681
Change-Id: Ibf2f822740168e5545b110319738849a667752ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191860
Commit-Queue: Mayank Patke <fishythefish@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2021-03-25 00:43:33 +00:00
Stephen Adams
3f6cb524d2
[dart2js] Move on-shot interceptors to instruction selection
...
Doing this too early inhibited optimizations on interceptors.
Change-Id: I141a4a63fd615d2ed8418952b5d485a86b8e82d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192731
Reviewed-by: Mayank Patke <fishythefish@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2021-03-24 16:11:42 +00:00
Joshua Litt
fd4eefc22d
[dart2js] Move determination of fragments to emitter phase.
...
Change-Id: I0aaf02a8900445fc76b87de17e21b6488ca2fe46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191240
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Joshua Litt <joshualitt@google.com >
2021-03-23 21:55:53 +00:00
Stephen Adams
20bdf38514
[dart2js] Fix variable allocator live-range bug
...
The controlling condition of a control-flow operator (?:, &&, ||)
needs to have the same live range as the other operands.
Change-Id: Iee999a1b400ef35ccbb761fcd7266952c9a95be9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192605
Reviewed-by: Mayank Patke <fishythefish@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2021-03-23 15:38:36 +00:00
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
Johnni Winther
92e237c835
[cfe,dartdevc,dart2js] Use InstanceGetterInvocation for getter/field invocation
...
The web compilers don't support getter/field invocation encoded as a
FunctionInvocation on an InstanceGet because it doesn't work for
getter/field invocation of js-interop properties, since the InstanceGet
wouldn't result in a Dart function but just JavaScript function.
To support this in the new method invocation encoding, a special
expression, InstanceGetterInvocation, is used to encode getter/field
invocations in dart2js and ddc.
Change-Id: I21da8e8686f66ae4ce4d44245073b9e424f975b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192181
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2021-03-23 09:49:06 +00:00
Joshua Litt
6f6afa4dba
[dart2js] Add component detection to deferred fragment merge.
...
This is to avoid merging unrelated code into language files.
Change-Id: Ief514d0761fbb471a0460c78db35c0a07bf78f6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191800
Commit-Queue: Joshua Litt <joshualitt@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2021-03-22 18:57:24 +00:00
Joshua Litt
51ca2145bb
[dart2js] Fix finalization bug in namer_names.dart
...
Change-Id: I8ad37e67bfee2b8fb022fcffedee74c4c6b19b6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192043
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Joshua Litt <joshualitt@google.com >
2021-03-22 18:26:15 +00:00
Johnni Winther
d59c8bc4fd
[cfe,dart2js] Handle LocalFunctionInvocation in ListFactorySpecializer
...
The CloneVisitorNotMembers contains a mapping from variables to their
corresponding clones. The ListFactorySpecializer special cased access
to this mapping to support conditional cloning. When dart2js switchted
to used the new method invocation encoding, this left the
LocalFunctionInvocation unhandled, leading to null check error when
local functions where invoked in the closure passed to List.generate.
This CL makes this mapping private and adds getter/setter methods for
lookup and registration. The ListFactorySpecializer now instead overrides
the getter to support conditional cloning instead of handling each use
case.
Bug: b/183083319
Change-Id: I2fd3b79137c51a424f17127b502e6a945c6796a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191901
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2021-03-18 14:34:33 +00:00
Joshua Litt
c5c80648b9
[dart2js] Land accurate compute merging dependency algorithm.
...
Change-Id: If47a670631c4c4d63b0fd834a01dc30275b416d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191241
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Joshua Litt <joshualitt@google.com >
2021-03-17 17:27:44 +00:00
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
766791bb7d
Remove unnecessary imports from compiler/lib
...
Bug: https://github.com/dart-lang/sdk/issues/44569
Change-Id: Iaec46afafca5dece288d4d36640a164eb2458a66
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190601
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2021-03-16 19:36:39 +00:00