Commit Graph

2317 Commits

Author SHA1 Message Date
Florian Loitsch 354a4ec420 Migrate test block 149.
Change-Id: I6529a9ac0ad6557dc751be5c6f7bf14c9d45f909
Reviewed-on: https://dart-review.googlesource.com/11400
Commit-Queue: Florian Loitsch <floitsch@google.com>
Reviewed-by: Jakob Roland Andersen <jakobr@google.com>
2017-10-05 10:36:11 +00:00
Johnni Winther 8673ef8aa6 Update dart2js_with_kernel status
Change-Id: I757f3279c114288e928174b063d29a526428851e
Reviewed-on: https://dart-review.googlesource.com/11440
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-10-05 08:23:49 +00:00
Jakob Roland Andersen d7c5584976 Migrate test block 143.
Change-Id: I843937de387436e07b289ccc35efa6776d59c142
Reviewed-on: https://dart-review.googlesource.com/11280
Reviewed-by: Jakob Roland Andersen <jakobr@google.com>
2017-10-05 07:27:28 +00:00
Johnni Winther f9cb6c4137 Remove dart2js_with_kernel_in_ssa test option
Change-Id: I2da692a4d458acc4b36e14beb99e1fb9d2bdec70
Reviewed-on: https://dart-review.googlesource.com/10861
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-10-05 06:53:39 +00:00
Florian Loitsch 3b64211ab2 Migrate test block 127.
Change-Id: I05a4baa3c641d71ccee1fce1e7f680f3fd9f42fc
Reviewed-on: https://dart-review.googlesource.com/9041
Commit-Queue: Jakob Roland Andersen <jakobr@google.com>
Reviewed-by: Jakob Roland Andersen <jakobr@google.com>
2017-10-05 06:43:21 +00:00
Florian Loitsch ec69c47c12 Migration of test block 126.
Change-Id: I8bbccbfae0194f246b8305ea4ca7bb02b5b6a9ec
Reviewed-on: https://dart-review.googlesource.com/7546
Commit-Queue: Florian Loitsch <floitsch@google.com>
Reviewed-by: Jakob Roland Andersen <jakobr@google.com>
2017-10-04 21:38:10 +00:00
Brian Wilkerson d5612c786d Update status file to fix broken bots (TBR)
Change-Id: I5b1f865f715f5a8db97fc32e64fd25c195bc8633
Reviewed-on: https://dart-review.googlesource.com/11200
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-10-04 20:09:35 +00:00
Emily Fortuna 0eca8a1748 Add RTI while walking closure info.
Bug:
Change-Id: If1b33706d3b7a784f292a9f133779109109d8d25
Reviewed-on: https://dart-review.googlesource.com/8321
Commit-Queue: Emily Fortuna <efortuna@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-10-04 19:24:31 +00:00
Jennifer Messerly 3a79c35f3c optimize maps/sets in DDC, fixes #29865
- string/int keys use identity maps
- construct the correct type rather than relying on factory constructors when possible
- checks if key has identity semantics and use that when possible
- avoid helper calls/casts/etc in implementations
- use native ES6 Map/Set key order tracking
- optimized constructor for map literals
- fixes #30466, const maps are now canonicalized correctly

Change-Id: Id44acf3d9bf8cb153a4755aa28df08fe91bfc633
Reviewed-on: https://dart-review.googlesource.com/8167
Reviewed-by: Vijay Menon <vsm@google.com>
2017-10-04 19:04:27 +00:00
Brian Wilkerson 082bbdb6a7 Remove flag and enable asserts in initializers by default
Change-Id: Ia81f5ec936981dc08ff4c740f3511c6b7c9e6eb6
Reviewed-on: https://dart-review.googlesource.com/10740
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-10-04 18:45:09 +00:00
pq 75436a61a8 Status fix for block 142 test failures on dart2js minified [TBR].
Bug:
Change-Id: Ie649a88311730f4be69a868f1c3a46a4b166a506
Reviewed-on: https://dart-review.googlesource.com/10706
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2017-10-03 22:09:17 +00:00
Harry Terkelsen dfb71004c7 Register seen classes as part of the impact.
This allows us to construct the class hierarchy from the impact results.

Change-Id: Id10a197eb80e60d5e25e093ffdadf8d0af092ecf
Reviewed-on: https://dart-review.googlesource.com/10208
Commit-Queue: Harry Terkelsen <het@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-10-03 21:36:33 +00:00
pq dd069fc800 Migrate test block 142 to Dart 2.0.
Bug:
Change-Id: I358bcf6d7d3d4c78b572ed4bbcb05696c47268cc
Reviewed-on: https://dart-review.googlesource.com/10640
Reviewed-by: Ben Konyi <bkonyi@google.com>
2017-10-03 20:00:27 +00:00
Janice Collins 3bed0647a0 Migrate block 162 to Dart 2.0.
Based heavily on https://codereview.chromium.org/3007803002, but built from scratch with the updated migration script.

Change-Id: I52ecd5dd97a73ec2f5fc524de532c5605c5d0a7d
Reviewed-on: https://dart-review.googlesource.com/9360
Commit-Queue: Janice Collins <jcollins@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2017-10-03 17:47:59 +00:00
Samir Jindel 195c62ff0c [kernel] Begin reducing type erasure.
1. We no longer remove type parameters on functions.
2. We no longer remove type arguments at call sites.
3. We allow non-captured function type parameters to be used outside closures. 

Bug:
Change-Id: I116ec54c90b04be90e1157042c22797e57a7c51c
Reviewed-on: https://dart-review.googlesource.com/9342
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2017-10-03 14:33:30 +00:00
Jens Johansen 2e75b6cce9 [kernel] Fix closure in for loop
In kernel the loop level wasn't set correctly for for loops, resulting
in the loop variable not always being fresh.

Examples:

```
  // Capture the loop variable, ensure we capture the right value.
  for (int i = 0; i < 10; i++) { if (i == 7) f = () => "i = $i"; }

  print(f());
  // There is only one instance of k. The captured variable continues to change.
  int k;
  for (k = 0; k < 10; k++) { if (k == 7) f = () => "k = $k"; }
  print(f());
```

resulted in
i = 10
k = 10

(i.e. it's wrong)

whereas

```
  // Capture the loop variable, ensure we capture the right value.
  for (int i = 0; i < 10; i++) { if (i == 7) { f = () => "i = $i"; } }
  print(f());
  {
    // There is only one instance of k. The captured variable continues to change.
    int k;
    for (k = 0; k < 10; k++) { if (k == 7) { f = () => "k = $k"; } }
    print(f());
  }
```

resultet in

i = 7
k = 10

(i.e. it's correct).

Now both examples produce the correct result.

Change-Id: I1fb4c888c6a0eaa690f62226e093508992b33ed4
Reviewed-on: https://dart-review.googlesource.com/9961
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-10-03 07:56:13 +00:00
Jens Johansen 471d92dfe4 [kernel] Get class type arguments correctly
Previously we got the length of the class' type_parameters().
Now instead we use the class' NumTypeArguments().

Bug:
Change-Id: I3807443765e4926efc17eba54d3bf4f50e8e30c6
Reviewed-on: https://dart-review.googlesource.com/9482
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2017-10-03 07:26:28 +00:00
Régis Crelier b1dd843fd4 Add test verifying that generic function types are disallowed as type argument.
Change-Id: I76d4fd13f0370d7d42b17aa9e63a391b60a89463
Reviewed-on: https://dart-review.googlesource.com/9369
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2017-10-02 18:50:37 +00:00
Johnni Winther d72adaf8ca Handle ordering of function types in constants.
Change-Id: If45607ff420ead098fb99e65293f517b7d003615
Reviewed-on: https://dart-review.googlesource.com/9640
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2017-09-29 15:35:34 +00:00
Erik Ernst df42be789b Fixed several grammar bugs, updated status file for language_2.
The spec parser now parses all of language_2; many files are skipped,
but that is because they are multi-tests or because they contain
intentional syntax errors (negative tests).

Change-Id: I7061f0512702f3cb9631b32c79c3c1c1e2b7b0a6
Reviewed-on: https://dart-review.googlesource.com/8641
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2017-09-29 11:34:52 +00:00
William Hesse ec52cfb757 Update status for language_2/overridden_no_such_method_test
TBR=kmillikin@google.com

Change-Id: Ibaece1fa6a446dabdc8534928665d6ed053f363e
Reviewed-on: https://dart-review.googlesource.com/9483
Reviewed-by: William Hesse <whesse@google.com>
2017-09-29 10:16:46 +00:00
Ben Konyi 876bb0c494 Migrated test block 130 to Dart 2.0.
Slightly tricky block. Many map_literal* tests were modified as they were creating maps with
multiple instances of the same key.

Bug:
Change-Id: I5dcaa458ee8f68a4934950bb32229ff92100149b
Reviewed-on: https://dart-review.googlesource.com/9064
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2017-09-29 04:24:02 +00:00
Stephen Adams 80515d7616 dart2js status fnord
TBR=efortuna@google.com
Bug:
Change-Id: If1d36909b44df729c59bdca30d71ebd86348ef38
Reviewed-on: https://dart-review.googlesource.com/9440
Reviewed-by: Stephen Adams <sra@google.com>
2017-09-29 01:08:44 +00:00
Konstantin Shcheglov d4dec4e1a4 Create GenericTypeAliasElement for both FunctionTypeAlias and GenericTypeAlias nodes.
Some pain points are:

1. It is a breaking change. I think I will break it even more by removing
   FunctionTypeAliasElement altogether.

2. We lose ability to keep track that this FunctionType is instantiation
   of a typedef. Just like in Kernel.

3. We sometimes have to look up to see if the GenericFunctionTypeElement
   is a function in a named GenericTypeAliasElement.

R=brianwilkerson@google.com, paulberry@google.com

Bug:
Change-Id: Ib250cc446a0ed5b8969f16f7cc6293ef4acf01a8
Reviewed-on: https://dart-review.googlesource.com/9421
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-09-29 00:39:05 +00:00
Jennifer Messerly 749d298b6c fix extension member discovery in DDC
In particular, some types like the base/mixin classes for Map in dart:collection did not work correctly.
This also has cleanups/optimizations to how DDC registers signatures, partially addressing #30499
Also fixes #29897, const maps are now immutable in DDC.

Change-Id: Icfdc7921d255a58a9e13908cf800832f787314ee
Reviewed-on: https://dart-review.googlesource.com/7442
Reviewed-by: Jennifer Messerly <jmesserly@google.com>
2017-09-28 23:21:43 +00:00
Stephen Adams ec669fdf91 update dart2js status again
TBR=asiva@google.com

Bug:
Change-Id: Ic92f1a2d185b6e08b7ad73c670e68fb78bcedd8f
Reviewed-on: https://dart-review.googlesource.com/9425
Reviewed-by: Stephen Adams <sra@google.com>
2017-09-28 21:52:35 +00:00
Stephen Adams 44dca2e316 dart2js status updates
TBR=asiva@google.com

Bug:
Change-Id: Ica29e70ab8129b931fab8e751d433d96cd5bc36f
Reviewed-on: https://dart-review.googlesource.com/9422
Reviewed-by: Stephen Adams <sra@google.com>
2017-09-28 21:24:41 +00:00
Stephen Adams 3996c3c5fa remove duplicate lines and sections from language_2_dart2js.status
TBR=efortuna@google.com

Bug:
Change-Id: I30922b21649f86e09f3694cd116696a70bef2160
Reviewed-on: https://dart-review.googlesource.com/9370
Reviewed-by: Stephen Adams <sra@google.com>
2017-09-28 19:28:39 +00:00
pq 151ce28748 Block 134 fixes to address d8 unchecked issues [TBR].
Bug:
Change-Id: I37d3cac7374bf347e249b56be90ce127af13b344
Reviewed-on: https://dart-review.googlesource.com/9366
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2017-09-28 18:01:59 +00:00
Ben Konyi c89c6e021a Fixed status file issue causing test to fail.
Bug:
Change-Id: I10adbb4a6a56a76fe3eeb1bc0b0a15042cbd8e61
Reviewed-on: https://dart-review.googlesource.com/9365
Reviewed-by: Ben Konyi <bkonyi@google.com>
2017-09-28 17:38:02 +00:00
Ben Konyi 5bb98ebc33 Migrated test block 161 to Dart 2.0.
This block contained a lot of static type warnings and took a lot of
status file wrangling to get right.

Bug:
Change-Id: I037402a31f978af15716964c8ff5192036df4276
Reviewed-on: https://dart-review.googlesource.com/7440
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2017-09-28 17:15:51 +00:00
Jaime Wren 3b9e54e400 TBR- analyzer bot fix after landing test block 63
Change-Id: I96a93852c485058f1b9ad18d3529b4c98b4fa5f6
Reviewed-on: https://dart-review.googlesource.com/9362
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2017-09-28 17:11:20 +00:00
pq 57d452dbf7 Migrate test block 134 to Dart 2.0.
Bug:
Change-Id: I67bba5c5049c62b8313d49efe36c81fc600b995a
Reviewed-on: https://dart-review.googlesource.com/7847
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2017-09-28 16:15:47 +00:00
Jaime Wren d18c5c3620 Migrated test block 63 to Dart 2.0
Change-Id: I35b3ceb1ac2aa7fc4e26a28ff814bccba6bbb004
Reviewed-on: https://dart-review.googlesource.com/7200
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2017-09-28 16:06:08 +00:00
Johnni Winther fd247b1539 Add ErroneousConstructorConstant
+ use source locations for fasta messages

Change-Id: I1abba76f4f5653f8d7278cb2b368ae25ce33160b
Reviewed-on: https://dart-review.googlesource.com/8840
Reviewed-by: Stephen Adams <sra@google.com>
2017-09-28 08:06:42 +00:00
Stephen Adams 9e8ac04935 dart2js status for invocation_mirror_test
TBR=floitsch@google.com
Bug:
Change-Id: I16f9ef86306cc59a80927defe79ff87bec70b7e9
Reviewed-on: https://dart-review.googlesource.com/9141
Reviewed-by: Stephen Adams <sra@google.com>
2017-09-28 01:10:46 +00:00
Stephen Adams 56db0e80f5 Generate closure class names more like the AST version
Bug:
Change-Id: I95be2384fd67c17bc713732d902ec414e439d7af
Reviewed-on: https://dart-review.googlesource.com/9122
Reviewed-by: Emily Fortuna <efortuna@google.com>
2017-09-28 00:58:49 +00:00
Jaime Wren 31fb4d3633 TBR- Analyzer bot fix after block 60 migration
Change-Id: Ib8ee9961284fc8ae67067af7ba3986d4ef87eab0
Reviewed-on: https://dart-review.googlesource.com/9060
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2017-09-27 19:32:35 +00:00
Jaime Wren 3d020fa91e Migrated test block 60 to Dart 2.0, take 2
Original review at https://dart-review.googlesource.com/c/sdk/+/7160

Change-Id: If2aeecec04640bee3b622d97c8fcdd6cb1bdd369
Reviewed-on: https://dart-review.googlesource.com/8731
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2017-09-27 18:07:05 +00:00
Dan Rubel 888e768d84 update status files
Two language tests are now passing as a result of
https://github.com/dart-lang/sdk/commit/f0caee1b24f14a4245c749ab4ef78a6200e3ac7a
Change-Id: I1a2754515fa426b05bb1c45e79a22f95d590eba8
Reviewed-on: https://dart-review.googlesource.com/8900
Reviewed-by: Dan Rubel <danrubel@google.com>
2017-09-27 14:24:34 +00:00
Ben Konyi b69a1f60ba Migrated test block 61 to Dart 2.0.
No changes made to this block.

Bug:
Change-Id: I4e627bdf2f407894bd1f6ae3353e24709f9c8f70
Reviewed-on: https://dart-review.googlesource.com/8100
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2017-09-27 14:16:35 +00:00
Ben Konyi ef4d11e894 Migrated test block 59 to Dart 2.0.
No major changes.

Bug:
Change-Id: If12047444ce4869353ee058d16b745eaef0101e9
Reviewed-on: https://dart-review.googlesource.com/8081
Reviewed-by: Erik Ernst <eernst@google.com>
2017-09-27 14:14:04 +00:00
Erik Ernst fb2c6431d2 Adjusted method_override?_test as suggested in review of Gerrit 7683
Review of Gerrit CL 7683 wasn't finished when that CL was landed. This
CL makes the changes that I suggested in that unfinished & unsent
review.

Change-Id: I356071ba7797dd8655a083a3aed23f550dc865a6
Reviewed-on: https://dart-review.googlesource.com/8140
Reviewed-by: Ben Konyi <bkonyi@google.com>
2017-09-27 13:53:05 +00:00
Dan Rubel f0caee1b24 Improve import directive recovery and report analyzer errors
- New handleRecoverImport event
    for clauses in import directive that are out of order
- New error codes for
    Duplicate prefix
    Prefix after combinator

Change-Id: I0fea7ad4b4014a0b8578d3982e0515fe85044854
Reviewed-on: https://dart-review.googlesource.com/7980
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-09-27 12:56:46 +00:00
Stephen Adams 2ea83486e1 dart2js kernel: generate constants for default arguments in Function.apply
Change-Id: I5bd0a8deaf16069749a574eb2ed132738e2e0747
Reviewed-on: https://dart-review.googlesource.com/8280
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-09-27 00:35:53 +00:00
Régis Crelier 708952b3b0 Do not conflate 2 issues into 1 test.
Passing the type argument vector <int> in the 'none' configuration is not
correct, but this is not what this test is supposed to check.

Change-Id: I2afd2987e572a6b4340a7d70ee92878abc67055e
Reviewed-on: https://dart-review.googlesource.com/8729
Reviewed-by: Ben Konyi <bkonyi@google.com>
2017-09-26 23:19:15 +00:00
pq a02ca2070f Migrate block 141 to Dart 2.0.
Bug:
Change-Id: If806f50a6254c187fc862fc7e5c19f45ccb9a8e8
Reviewed-on: https://dart-review.googlesource.com/8361
Reviewed-by: Ben Konyi <bkonyi@google.com>
2017-09-26 18:42:04 +00:00
pq 650a1159ff Migrate test block 65 to Dart 2.0.
Bug:
Change-Id: Ibf50302eb7a1cec7546f4ceb87f8c19808479568
Reviewed-on: https://dart-review.googlesource.com/8380
Reviewed-by: Janice Collins <jcollins@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2017-09-26 16:55:42 +00:00
Johnni Winther 9ff0a7ad55 Update dart2js_with_kernel status
Change-Id: If00388b939e5df667237ea4bcf91a25311b058e1
Reviewed-on: https://dart-review.googlesource.com/8520
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-09-26 10:08:31 +00:00
Ben Konyi a5d702c9c3 Status file fix for failures on dart2js-linux-d8-minified bot.
Bug:
Change-Id: Iae72cd315315ab1518e4d42f43a60a726dfc47cc
Reviewed-on: https://dart-review.googlesource.com/8101
Reviewed-by: Ben Konyi <bkonyi@google.com>
2017-09-25 14:59:39 +00:00