Commit Graph

162 Commits

Author SHA1 Message Date
Vyacheslav Egorov b2721473aa [VM,Kernel] Report an error on import of dart:mirrors when mirrors are disabled
Otherwise VM simply crashes further down in the pipeline.

Update corelib/apply3_test status to match this change.

R=kustermann@google.com

Bug:
Change-Id: Iffb4d2bc7e513d5a79123b029f7ea7c4e1033056
Reviewed-on: https://dart-review.googlesource.com/19003
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2017-11-07 15:37:09 +00:00
Erik Corry 3828f6ac10 Allow date_time11 to pass.
R=brianwilkerson@google.com

Bug:
Change-Id: I58f115fce42dd8f6f1ca6df6d5dbbd538209937d
Reviewed-on: https://dart-review.googlesource.com/18545
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-11-06 18:24:06 +00:00
Samir Jindel edc4cb1f90 Fix incorrect type inference in Bigint.modInverse.
Bug:
Change-Id: I73639d68c191d74815f7ac78bc98dc862efd319a
Reviewed-on: https://dart-review.googlesource.com/18841
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-06 17:04:28 +00:00
Erik Corry 0d4f518de0 Disable test that fails after DST ended
R=floitsch@google.com

Bug:
Change-Id: I67f61526de019916d13578621f4f6926c03086a8
Reviewed-on: https://dart-review.googlesource.com/18521
Reviewed-by: Erik Corry <erikcorry@google.com>
2017-11-06 14:46:08 +00:00
Jenny Messerly 384678e4b3 port DDC's code_generator to Kernel
Change-Id: I2b6a5f56a69f5d3a965aefc3f8d4550d5940ac5a
Reviewed-on: https://dart-review.googlesource.com/17980
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2017-11-04 22:17:56 +00:00
Paul Berry cd49cf1201 Insert implicit downcasts for compound assignments.
Change-Id: I090594e16fa890864775b2ebc58842d861c134a4
Reviewed-on: https://dart-review.googlesource.com/18517
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-11-03 22:07:10 +00:00
Lasse R.H. Nielsen adcb6a7399 Make main invocation not fail strong-mode type checking.
Bug: http://dartbug.com/31270
Change-Id: Id6ad2a429d5dc44b437a0fdd8fb4889d3dccf194
Reviewed-on: https://dart-review.googlesource.com/18480
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-03 16:06:00 +00:00
Ryan Macnak 442e0e8192 Test double.hashCode with and without intrinsics.
Change-Id: I34c317d3f11bef061cb9f2f6ad1123e948ef78f2
Reviewed-on: https://dart-review.googlesource.com/16683
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Kasper Lund <kasperl@google.com>
2017-10-26 23:59:32 +00:00
Sigmund Cherem 5d2613d632 Status updates for vm-kernel in strong mode
Change-Id: I93a4429822f374741b0211e755ed9d5b1b43fe23
Reviewed-on: https://dart-review.googlesource.com/16623
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2017-10-25 20:25:49 +00:00
Samir Jindel 55eb75d56f [kernel] Delay type finalization when parsing function types.
Currently, the Kernel FE doesn't set up parent pointers correctly for
signature function types. This prevents type parameters on generic
function types from being finalized correctly. In addition, finalization
of generic interface types within a generic function type can crash if they
reference not-yet-finalized type parameters of the enclosing function type.

This review solves both issues. Several failing tests pass again, although
more thorough testing is blocked on Github issue #31213 (nested generic function
types crashing in Fasta).

Bug:
Change-Id: Ib5ee6b2566492e3fd6688fe5a6b6976692562ea1
Reviewed-on: https://dart-review.googlesource.com/16360
Reviewed-by: Régis Crelier <regis@google.com>
2017-10-25 10:36:57 +00:00
Sigmund Cherem e2e3934b62 Add status entries for dartk and dartkp in strong mode
This is an initial step and some entries say "Pass", which indicates
that the test was marked earlier in some other (more general) section and that
we should split that section.

Change-Id: I0417d55dcdec352f730c298bb155d112eb341711
Reviewed-on: https://dart-review.googlesource.com/16322
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2017-10-24 21:49:19 +00:00
Kasper Lund 1db8615e29 Avoid just truncating to the nearby int in double.hashCode.
Preserves the property that doubles and ints that are equal
share the same hash code, but gives different doubles a much
higher chance of having different hash codes.

BUG=https://github.com/dart-lang/sdk/issues/2884

Change-Id: Ia97164087db568f26ffbbd6854ed9c19f81e9611
Reviewed-on: https://dart-review.googlesource.com/15140
Commit-Queue: Kasper Lund <kasperl@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-10-23 06:47:20 +00:00
Jens Johansen c8b2183bb5 [kernel] Disallow const x = [] and const y = {}
This CL makes fasta issue an error when trying to create a non-const
ListLiteral or MapLiteral in a context where const is required.

Bug:
Change-Id: I27ea151a38eb1198faa83a8cfa57453a4e225e1a
Reviewed-on: https://dart-review.googlesource.com/15460
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2017-10-20 09:38:57 +00:00
Régis Crelier 0e5efbda08 Implicitly pass --reify-generic-functions option to the VM when testing Dart 2.0
Fix migrated Dart 1.0 tests for Dart 2.0
Update status files

Change-Id: I41c8a6d06008ec0213e78cdc578b24b24668d312
Reviewed-on: https://dart-review.googlesource.com/14940
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2017-10-18 22:18:46 +00:00
Harry Terkelsen f36b1f49d6 Only set model.scopeInfo for the outer member, not nested closures
Change-Id: I848e18e1000158b4a198782227bfb2524104e805
Reviewed-on: https://dart-review.googlesource.com/14700
Reviewed-by: Emily Fortuna <efortuna@google.com>
2017-10-18 21:00:06 +00:00
Bob Nystrom 07b9df22ac Use the Expect.throws___() helper methods throughout tests.
No behavioral changes, just getting rid of a lot of redundant closures
and helper functions.

Change-Id: I55c52c2cc9e5505bb64203c31aad8d76847f8eeb
Reviewed-on: https://dart-review.googlesource.com/14320
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2017-10-17 23:37:15 +00:00
Florian Loitsch 88f58757b1 Fix datetime for daylight-saving transitions.
Change-Id: I0ec35937a76ada32991b79bcdac57912731db489
Reviewed-on: https://dart-review.googlesource.com/14380
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-10-17 08:26:21 +00:00
pq d184bcef2a Revert "Fix datetime for daylight-saving transitions."[TBR]
This reverts commit 95d3298ae7.

floitsch@ to revisit and re-apply tommorrow.

Bug:
Change-Id: I54b0851fdf4b931d1718f850ffe9d467495dc745
Reviewed-on: https://dart-review.googlesource.com/14080
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2017-10-16 17:20:09 +00:00
Florian Loitsch 95d3298ae7 Fix datetime for daylight-saving transitions.
This is a temporary fix, until https://dart-review.googlesource.com/c/sdk/+/9300 works for iOS.

Fixes #30550.
BUG= http://dartbug.com/30550

Change-Id: Id8ef8508510d577023e32402d8ea6f257f2f16d1
Reviewed-on: https://dart-review.googlesource.com/14044
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Florian Loitsch <floitsch@google.com>
2017-10-16 15:00:06 +00:00
Harry Terkelsen f690f6225e Use the validating constructor when creating a Symbol.
Change-Id: Iae150ad036f8a72dcc853b86ecd01c569d28bd0b
Reviewed-on: https://dart-review.googlesource.com/11963
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-10-06 19:54:47 +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
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
Johnni Winther 0ed5cadad3 Update dart2js_with_kernel status
Change-Id: Ibb41fa04c4e05b56e908925f83c16e68cf8b68ed
Reviewed-on: https://dart-review.googlesource.com/10860
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-10-04 07:16:30 +00:00
Jennifer Messerly d3c3b54113 enable tests that can now pass with DDC's extension member fix
This is a follow up to https://dart-review.googlesource.com/c/sdk/+/7442 that enables tests.

Change-Id: Ida28ff4b69c98862b32693864270b93821f23f34
Reviewed-on: https://dart-review.googlesource.com/9428
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jennifer Messerly <jmesserly@google.com>
2017-09-29 23:31:44 +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
Johnni Winther 772a0aff33 Handle and report erroneous compile time constants
Change-Id: I2ee86dbd714227e8e0894539ca64258fd11badfc
Reviewed-on: https://dart-review.googlesource.com/7820
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2017-09-22 18:57:37 +00:00
Stephen Adams aa0d5a428e Hack to fix incorrect getMightBePassedToApply under --disable-type-inference
R=sigmund@google.com

Bug:
Change-Id: Ie0378a923473e2b5ff7eaabdff499ddb01050f3e
Reviewed-on: https://dart-review.googlesource.com/7489
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-09-22 02:47:23 +00:00
Emily Fortuna ac98f741d5 Make JRecordFields not instance members (they were falsely categorized as such because the boxes were "classes").
Bug:
Change-Id: I5ea7ab26e5bb7c52a59b4f81b1489190b2d00fd0
Reviewed-on: https://dart-review.googlesource.com/7220
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-09-20 19:26:08 +00:00
Emily Fortuna 9a531f9b50 Get async/await working with the entity model.
Bug:
Change-Id: I803cb8f8a681563d76d6eed56116267f64a9ba8a
Reviewed-on: https://dart-review.googlesource.com/7106
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-09-19 22:29:34 +00:00
Emily Fortuna 942963fa2e Add TypeVariable analysis in closure conversion.
Bug:
Change-Id: I4155ceb042295934cc3c9125d275dc5f034675dd
Reviewed-on: https://dart-review.googlesource.com/6025
Commit-Queue: Emily Fortuna <efortuna@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-09-18 20:26:33 +00:00
Stephen Adams 69b50ed990 dart2js-kernel: Fix bug with finding optional parameter default values
Change-Id: Iefa443318124838aeafa9998e08d1143c1976dc4
Reviewed-on: https://dart-review.googlesource.com/6346
Reviewed-by: Emily Fortuna <efortuna@google.com>
2017-09-15 23:54:22 +00:00
Stephen Adams dccce129e4 dart2js-kernel: Don't crash on non-constant constants
Change-Id: I7919ccdcd72f6653d2baa3c25c5d18df982ccda4
Reviewed-on: https://dart-review.googlesource.com/5941
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-09-15 21:44:24 +00:00
Johnni Winther 5aa3259698 Handle break to labeled statement
No tests yet. Kernel doesn't support file-offsets on labeled statement.

Change-Id: I5dcfcc21433aec5ad0be26bfef5bbca0b609ba35
Reviewed-on: https://dart-review.googlesource.com/5161
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-09-14 08:59:11 +00:00
Stephen Adams 0bfad6483e de-dup dart2js kernel status files
TBR=sigmund@google.com

Bug:
Change-Id: I41d0bfdad38f0ab65649cd9d69e82097e9877fe2
Reviewed-on: https://dart-review.googlesource.com/5483
Reviewed-by: Stephen Adams <sra@google.com>
2017-09-13 17:13:03 +00:00
Emily Fortuna 553e4a0967 Don't make field entities for variables in boxes.
Bug:
Change-Id: Ie31e88438da93a1d54c8c688a5ccd212bb81bb28
Reviewed-on: https://dart-review.googlesource.com/4241
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Emily Fortuna <efortuna@google.com>
2017-09-11 23:32:51 +00:00
Harry Terkelsen d1a34a2c7f add type variables for all classes in the hierarchy for a constructor
Change-Id: I4c8df08e5893297c0d662bec469c8e06992369cf
Reviewed-on: https://dart-review.googlesource.com/4605
Commit-Queue: Harry Terkelsen <het@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-09-08 23:19:20 +00:00
Harry Terkelsen 607e3ecd69 Fixed the test by checking if typedefs are malformed.
This prevents the getFunctionTypeOfTypedef call from failing in
checked mode by returning a MalformedType.

Revert "Revert "Add types referenced in is-checks to the class hierarchy""

This reverts commit e0a4839c3e.

Change-Id: I1e94ba5ba345c36e04e54da6e8c0580a21836838
Reviewed-on: https://dart-review.googlesource.com/3422
Reviewed-by: Harry Terkelsen <het@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-09-07 19:56:26 +00:00
Florian Loitsch 914fc10173 disable failing tests.
Change-Id: Ie3f54ba7ddd963ff9effd7fcd367e326bf3d8296
Reviewed-on: https://dart-review.googlesource.com/3521
Reviewed-by: William Hesse <whesse@google.com>
2017-09-06 16:13:13 +00:00
Harry Terkelsen e0a4839c3e Revert "Add types referenced in is-checks to the class hierarchy"
This reverts commit a577b303f0.

Bug:
Change-Id: I8a02bf3ef559de8af62aef9d4b7e840975bb5b47
Reviewed-on: https://dart-review.googlesource.com/3343
Reviewed-by: Harry Terkelsen <het@google.com>
2017-09-05 23:13:29 +00:00
Harry Terkelsen a577b303f0 Add types referenced in is-checks to the class hierarchy
Change-Id: Ia250501052efc051779f75f9d582c1ceaa2c78f4
Reviewed-on: https://dart-review.googlesource.com/3384
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-09-05 21:53:35 +00:00
Emily Fortuna 3aa574d95d Add ability to look up type parameters that are associated with ClassEntities with the element environment.
This is the reapplication of this already approved CL: https://codereview.chromium.org/3010943002/ but now with Gerrit.

Bug:
Change-Id: I4c2204d1f76bdec4bcad993c8a11b5f003d38d77
Reviewed-on: https://dart-review.googlesource.com/3341
Reviewed-by: Stephen Adams <sra@google.com>
2017-09-05 19:36:55 +00:00
Harry Terkelsen bb312921ac Revert "Add types referenced in is-checks to the class hierarchy"
This reverts commit c8d2478747.

BUG=

Review-Url: https://codereview.chromium.org/3012733002 .
2017-09-01 15:27:28 -07:00
Harry Terkelsen c8d2478747 Add types referenced in is-checks to the class hierarchy
R=johnniwinther@google.com, sigmund@google.com

Review-Url: https://codereview.chromium.org/3011793002 .
2017-09-01 15:02:59 -07:00
Emily Fortuna b1dd578da7 Don't try to add abstract methods to the codegen work queue to generate bodies
BUG=
R=johnniwinther@google.com, sigmund@google.com

Review-Url: https://codereview.chromium.org/3012683002 .
2017-09-01 10:21:03 -07:00
Johnni Winther 374df045e7 Handle forwarding constructors to unnamed mixin applications
+ handle instance fields from mixins
+ change class sorting to put unnamed mixin applications last

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/3005823002 .
2017-09-01 19:07:02 +02:00
Janice Collins 51cc9689b3 Remove corelib and corelib_strong and migrate last two remaining tests.
This includes a migration of linked_hash_map_from_iterable_test and
stacktrace_current_test, which were migrated without changes.

BUG=
R=rnystrom@google.com, whesse@google.com

Review-Url: https://codereview.chromium.org/3004073002 .
2017-09-01 08:11:15 -07:00
Emily Fortuna 98e36f719e Add boxing for modified variables
BUG=
R=sra@google.com

Review-Url: https://codereview.chromium.org/3007743002 .
2017-08-29 16:27:28 -07:00
Johnni Winther 1fc47782e9 Update --dart2js-with-kernel status
Review-Url: https://codereview.chromium.org/3006773002 .
2017-08-29 11:39:41 +02:00
Alexander Aprelev 7cbb96c199 Wholesale update tests status in attempt to make (fyi) dartkp buildbots green.
Buildbots are here: https://build.chromium.org/p/client.dart.fyi/console.

BUG=
R=asiva@google.com

Review-Url: https://codereview.chromium.org/3000423002 .
2017-08-28 18:32:21 -07:00
Emily Fortuna 63754bba71 Add more tests for closures and change closure indexing to be by FunctionExpression or FunctionDeclaration rather than FunctionNode.
BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/3003963002 .
2017-08-28 14:24:58 -07:00