Emily Fortuna
bf94e73568
Fix up type inference to run in checked mode and enable checked mode tests running with kernel script.
...
Bug:
Change-Id: If720b6868fbdf010f4aac614ceea1ddea533c277
Reviewed-on: https://dart-review.googlesource.com/21222
Commit-Queue: Emily Fortuna <efortuna@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2017-11-15 22:34:51 +00:00
Lasse R.H. Nielsen
0b58c4bd10
Change some constant declarations to lowerCase.
...
Retain the old values.
Reapply of https://dart-review.googlesource.com/c/sdk/+/20680 with fixes
for VM method fingerprints.
Change-Id: Ie14e7ccc3194d5561983348e6b6752728913ff4d
Reviewed-on: https://dart-review.googlesource.com/20664
Reviewed-by: Erik Ernst <eernst@google.com >
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com >
2017-11-14 12:59:14 +00:00
Lasse R.H. Nielsen
e61fc07b58
Revert "Change some constant declarations to lowerCase."
...
This reverts commit c048cfb178 .
Reason for revert: VM code fingerprints needs update.
Original change's description:
> Change some constant declarations to lowerCase.
>
> Retain the old values.
>
> Change-Id: I03bd326f379fe5f96d8f6081a7133de956d745c0
> Reviewed-on: https://dart-review.googlesource.com/11520
> Commit-Queue: Lasse R.H. Nielsen <lrn@google.com >
> Reviewed-by: Florian Loitsch <floitsch@google.com >
TBR=lrn@google.com ,floitsch@google.com
Change-Id: I095e8198304ca4e59b39d30b0fdf0af4945e5231
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/20680
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com >
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com >
2017-11-14 11:23:08 +00:00
Lasse R.H. Nielsen
c048cfb178
Change some constant declarations to lowerCase.
...
Retain the old values.
Change-Id: I03bd326f379fe5f96d8f6081a7133de956d745c0
Reviewed-on: https://dart-review.googlesource.com/11520
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com >
Reviewed-by: Florian Loitsch <floitsch@google.com >
2017-11-14 11:13:04 +00:00
Alexander Markov
0a4b151dc4
[Test tool] Pass --strong to dart_bootstrap, disable experimental opts
...
In '-c dartkp --strong' mode test tool should pass --strong option to
dart_bootstrap. Otherwise it uses non-strong vm_platform.dill instead
of vm_platform_strong.dill.
Also, experimental strong-mode based optimizations are disabled for now.
Closes https://github.com/dart-lang/sdk/issues/31348
Closes https://github.com/dart-lang/sdk/issues/31335
Change-Id: I2188b9165ae4daa0510e4e566393810b8165291e
Reviewed-on: https://dart-review.googlesource.com/20304
Reviewed-by: Ryan Macnak <rmacnak@google.com >
Commit-Queue: Alexander Markov <alexmarkov@google.com >
2017-11-11 01:46:01 +00:00
Vyacheslav Egorov
2b88fa0132
[gardening] Update dartkp-debug status files.
...
R=kustermann@google.com
Bug:
Change-Id: Ifc35f8a9b2ccf2fa095a4da510111b04c1ea883e
Reviewed-on: https://dart-review.googlesource.com/20061
Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
2017-11-10 13:35:13 +00:00
Paul Berry
d53ba06f9f
Strong mode fixes for corelib_2/hash_set_test.dart
...
Set<dynamic>.every() and Set<dynamic>.any() require their callback to
have type `(dynamic) -> bool`.
Change-Id: I075728af72dbcda90e343e8af42ef3f4eda2dfbe
Reviewed-on: https://dart-review.googlesource.com/19201
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2017-11-09 21:18:27 +00:00
Paul Berry
f70755d5e4
Strong mode fixes for hash_map2_test.dart
...
The maps used by this test have a reified type argument of `dynamic`,
so the callbacks we pass to `any` and `every` need to be typed
accordingly.
Change-Id: Idd00478cc7667560ad81167db8d4816c8a7fff8d
Reviewed-on: https://dart-review.googlesource.com/19450
Reviewed-by: Janice Collins <jcollins@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2017-11-09 20:24:12 +00:00
Paul Berry
76ea9d3dfd
Strong mode fix for iterable_fold_test.dart
...
List.expand() requires a callback that returns an Iterable.
Change-Id: I969ee15bed5b219a688779317d89f50190b42e06
Reviewed-on: https://dart-review.googlesource.com/19402
Reviewed-by: Janice Collins <jcollins@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2017-11-09 16:49:28 +00:00
Vyacheslav Egorov
fd78da5059
[gardening] Update dartkp status files.
...
Bug:
Change-Id: I51746bfa10bc10acc90c176ef98cf6da081a42d9
Reviewed-on: https://dart-review.googlesource.com/19568
Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
2017-11-09 16:26:01 +00:00
Paul Berry
6a31d08d59
Strong mode fix for uri_query_test.dart
...
The local function test() in testQueryParameters() expects its map to
have type Map<String, String>. Most of the time this happens
automatically by type inference, but when we create the map using `var
map = new Map()` we need to specify the type arguments explicitly.
Change-Id: I2c6c868af776c3fbd25d862ac8a5bfb9147715dc
Reviewed-on: https://dart-review.googlesource.com/19454
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Bob Nystrom <rnystrom@google.com >
2017-11-09 07:42:56 +00:00
Paul Berry
1712abdeec
Strong mode fix for iterable_reduce_test.dart
...
List.expand() requires a callback that returns an Iterable.
Change-Id: I5a665cf9ea4ee78be876912b31300342ac141bd4
Reviewed-on: https://dart-review.googlesource.com/19451
Reviewed-by: Bob Nystrom <rnystrom@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2017-11-09 06:37:26 +00:00
Emily Fortuna
035c85580b
Make fast-startup work with kernel!
...
Bug:
Change-Id: I88bf7fd7609bc816cc6d50daaa7e3a0ec5dc1934
Reviewed-on: https://dart-review.googlesource.com/19403
Commit-Queue: Emily Fortuna <efortuna@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-11-09 01:37:25 +00:00
Paul Berry
133ab78f65
Strong mode fixes for set_test.dart
...
The sets used by this test have a reified type argument of `dynamic`,
so the callbacks we pass to `forEach`, `map`, `where`, etc. need to be
typed accordingly.
Change-Id: I82dd02e021a04acd559c97db740ed2277886ca1b
Reviewed-on: https://dart-review.googlesource.com/19452
Reviewed-by: Ben Konyi <bkonyi@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2017-11-09 00:08:52 +00:00
Paul Berry
e6af092cf2
Strong mode fix for growable_list_test.dart
...
There's no such thing as "unchecked" mode in Dart 2.0. Strong mode
semantics imply that all types are checked.
Change-Id: I377a181f58e71f087d075ff17d7c751bf8b34b13
Reviewed-on: https://dart-review.googlesource.com/19449
Reviewed-by: Bob Nystrom <rnystrom@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2017-11-08 23:38:01 +00:00
Paul Berry
4c3fad39f2
Strong mode fix for apply2_test.dart
...
The type signature of throwsNSME needs to be specified so that map and
list literals appearing later in the source file have their types
correctly inferred.
Change-Id: Ifa60670dc5fb7d39b6f8f028e1b55152e736554c
Reviewed-on: https://dart-review.googlesource.com/19480
Reviewed-by: Bob Nystrom <rnystrom@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2017-11-08 23:34:50 +00:00
Paul Berry
c2bdb15d7f
Strong mode fix for queue_test.dart
...
The queues used by this test have a reified type argument of
`dynamic`, so the callbacks we pass to `map`, `any`, `every`,
etc. need to be typed accordingly.
Change-Id: I67a7e5b1ac0a768fdd4862350a017abb07877ff9
Reviewed-on: https://dart-review.googlesource.com/19444
Reviewed-by: Ben Konyi <bkonyi@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2017-11-08 23:29:46 +00:00
Paul Berry
00c952592c
Strong mode fix for json_map_test
...
The maps returned by JSON.decode have reified type Map<dynamic,
dynamic>, so when we iterate through them using forEach, we need to
pass in a callback that doesn't expect the key type to be String.
Change-Id: I93bb13705916c668ab6fc207ffbf4f50554ee979
Reviewed-on: https://dart-review.googlesource.com/19443
Reviewed-by: Ben Konyi <bkonyi@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2017-11-08 22:53:40 +00:00
Paul Berry
d8962eb8c4
Strong mode fixes for corelib_2/string_fromcharcodes_test.dart
...
String.fromCharCodes requires an Iterable<int>.
Change-Id: Ie4a86d60c1926ecae306592afc1fcefa13aa7f41
Reviewed-on: https://dart-review.googlesource.com/19200
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Bob Nystrom <rnystrom@google.com >
2017-11-08 18:44:56 +00:00
Paul Berry
deb7a92880
Strong mode fix for corelib_2/core_runtime_types_test.dart
...
The lists passed to assertListContains have runtime type
`List<dynamic>`.
Change-Id: Iaf2434f870a51abba920c3e3b148c2e3fcc38e58
Reviewed-on: https://dart-review.googlesource.com/19202
Reviewed-by: Bob Nystrom <rnystrom@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2017-11-08 17:26:51 +00:00
Vyacheslav Egorov
431d32596d
[gardening] Update dartkp status files again.
...
R=kustermann@google.com
Bug:
Change-Id: I9c5d6af6326c4283aa9cff8f0264ce4c9e48bf62
Reviewed-on: https://dart-review.googlesource.com/19185
Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
Commit-Queue: Vyacheslav Egorov <vegorov@google.com >
2017-11-08 12:18:41 +00:00
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