Commit graph

15 commits

Author SHA1 Message Date
Mayank Patke e8daaefabf [dart2js] Ensure generic local functions are marked as potentially
needing type arguments.

Change-Id: I50831df2530395b9ec3562be171422b0b6455335
Bug: https://github.com/dart-lang/sdk/issues/42501
Fixes: https://github.com/dart-lang/sdk/issues/42501
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152606
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-06-26 21:27:38 +00:00
Mayank Patke cf62339751 [dart2js] Ensure type arguments are passed when invoking a generic
function property.

Change-Id: I387977e2f1fb7732d94331b7a97cceeec767aaae
Bug: https://github.com/dart-lang/sdk/issues/41449
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151301
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-06-24 20:12:39 +00:00
Stephen Adams 7425b3de51 [dart2js] Remove more dead code.
Change-Id: Iff5b3921f40981c8122d7720ce80a5f01731aa47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151883
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-06-19 21:20:07 +00:00
Stephen Adams 0ccc96f470 [dart2js] remove more old-rti code
Change-Id: I462dd6aec1bf39c16e340699b2803254fd4fc941
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151345
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2020-06-17 20:31:01 +00:00
Joshua Litt 3798e5c2f0 [dart2js] Fix some compilation errors in dart2js/native.
Change-Id: Idb614189a31ceaeb53a9acb1f23f0ff3f46eb9c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150666
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-06-16 01:20:18 +00:00
Stephen Adams cf1681e11e [dart2js] Remove more unused old rti helpers
Change-Id: Icbc50554f2b3ae2cb74b32c9876c7c0cdf15c75b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150640
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-06-15 18:23:17 +00:00
Stephen Adams bbeda37c05 Address review comments from 150935
Change-Id: Ia137c8c139e13cb9b3f8017328f5a79edfcbc0b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151022
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-06-12 05:54:28 +00:00
Stephen Adams a13a2d7c84 Redo "[dart2js] Delete unused old-rti helpers"
Change-Id: I756a1adde6bbecdb5f28eb93f93041463435476d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151041
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-06-12 01:29:39 +00:00
Johnni Winther ab034e69b4 [dart2js] Fix reduction to declared type in type promotion computation
When reducing the type promotion in case of assignment, the target
info wasn't correctly handling the reduction to the trivial state.
This caused an error in a following join computation.


Closes #42281

Change-Id: I2144f5401e9736308dc37147f7a5cb9ab1be8583
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150935
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-06-11 18:52:38 +00:00
Stephen Adams 96fc158e4e Revert "[dart2js] Delete unused old-rti helpers"
This reverts commit e75b824aed.

Reason for revert: Break in google3 

Original change's description:
> [dart2js] Delete unused old-rti helpers
> 
> Change-Id: I0f97dddbfcbe5f51dff1d7d68f880e85d62768a4
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150504
> Commit-Queue: Stephen Adams <sra@google.com>
> Reviewed-by: Sigmund Cherem <sigmund@google.com>

TBR=sra@google.com,sigmund@google.com,joshualitt@google.com

Change-Id: If71d84fda4ce596bb762d32454a4c635185f189f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150780
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-06-10 17:46:40 +00:00
Stephen Adams e75b824aed [dart2js] Delete unused old-rti helpers
Change-Id: I0f97dddbfcbe5f51dff1d7d68f880e85d62768a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150504
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-06-09 18:24:53 +00:00
Stephen Adams 89c5b5c904 [dart2js] Call-through stubs must forward type arguments
There are several problems contributing to issue 41449.
This fixes the malformed call-through stubs.

Change-Id: I90f1584f221956ee3fe4111314cba2813a16837c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150283
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-06-08 18:40:53 +00:00
Stephen Adams 4b9c2356e9 [dart2js] Don't confuse value and location.
A HParameterValue can be an SSA value or a mutable local variable
accessed via HLocalFet/HLocalSet. The latter happens in code that is not
completely SSA-converted (due to exception control flow).

The main bug is that the check on a mutable-variable-mode HParameterValue
should have been on a HLocalGet of the value, and not the HParameterValue
itself. This means that a reference to the HParameterValue cannot be
replaced with a strengthening check, as that breaks the invariant that
HLocalGet/Set refer to variables. There was code in types_propagation
that tried to work around this broken invariant.

The bug (issue 42189) required
  - An elided instance method parameter
  - try(-catch)(-finally) to avoid complete SSA-conversion
  - -O0 to avoid optimizing away the check early with inferred types

The first attempt at a fix was to not check the elided parameter at all
since the default value is statically checked. This is still worthwhile.

Bug: 42189
Change-Id: Idd5e2b1485eba4950a36d1e4ff57ebe35e4c98a0
Fixed: 42189
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150171
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-06-07 00:11:11 +00:00
Joshua Litt 451694e855 [dart2js] Move dart2js_native to dart2js/native.
Change-Id: I2f879fe18376b8c1b82fc201d488425dc154d2b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149341
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-06-04 18:11:49 +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