Commit graph

19330 commits

Author SHA1 Message Date
asiva
f1cfcc621a [test/vm status files] Update vm status file to remove all entries related to spread and control_flow
Change-Id: I45469fea64f1d5144c3cbe2f800f1eb2be7e90d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98525
Reviewed-by: Aart Bik <ajcbik@google.com>
2019-04-03 21:00:36 +00:00
Mayank Patke
11a3dd7332 Split up language_2/control_flow_collections/for_test.
This helps triage/resolve various issues in testRuntimeErrors:
* for_non_bool_condition_test isolates the code causing a crash on the
dart2js-production-linux-d8 configuration. (See
https://github.com/dart-lang/sdk/issues/36442 and the status file.)
* for_null_condition_test will be an approved failure for all dart2js
configurations due to https://github.com/dart-lang/sdk/issues/36446.
* for_runtime_error_test contains all the remaining expected type
errors. On the dart2js-production-linux-d8 configuration (which runs
with -O3), we assume no type errors exist - even ones guarded by
Expect.throwsTypeError - so the optimized code produces runtime errors
instead. See https://dart-review.googlesource.com/c/sdk/+/97820 for a
similar discussion.
* for_test contains the remaining tests, which are valid on all dart2js
configurations.

Change-Id: Ifef4f7d2e27e2731cdd4a3fec03754ea63b6328d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98606
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2019-04-03 19:40:32 +00:00
Mayank Patke
82f8477314 Split up language_2/control_flow_collections/if_test.
This helps triage/resolve issues in testRuntimeErrors:
* if_null_condition_test will be an approved failure for all dart2js
configurations due to https://github.com/dart-lang/sdk/issues/34147.
* if_runtime_error_test contains all the expected type errors. On the
dart2js-production-linux-d8 configuration (which runs with -O3), we
assume no type errors exist - even ones guarded by
Expect.throwsTypeError - so the optimized code produces runtime errors
instead. See https://dart-review.googlesource.com/c/sdk/+/97820 for a
similar discussion.

Change-Id: Iaf2df85af16cc03fcd7ec7ef2a9e57a2bc3ce081
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98622
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2019-04-03 19:33:26 +00:00
Bob Nystrom
ab065aedda Fix a potential infinite loop in type_error_test.
Change-Id: Id5806187d82aeaf07462df1bfd5ae095f1542611
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98454
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-04-03 17:13:31 +00:00
Johnni Winther
93d0e8279a Include liveness of type arguments in supertypes in RTI needed checks computation
Including supertypes (and not just superclasses) this time.

Change-Id: Ib398f6f2fab0ae502dd754727b482641793dd225
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98569
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-04-03 15:03:46 +00:00
Dmitry Stefantsov
9f3e9f37a0 [cfe] Make checks on individual leaves of collection element sub-trees
Closes #36456.

Bug: http://dartbug.com/36456
Change-Id: Ic604fecbabe78eede44cedb2251a68b71f608c41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98567
Auto-Submit: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-04-03 13:54:03 +00:00
Vijay Menon
fad85a6bfa Broken test fixes
These tests break on all backends.  It looks like the original intent was to run to completion.

Change-Id: I895638c522285f280cbb608c82a8a496bfd11d72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98302
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2019-04-03 13:12:23 +00:00
Martin Kustermann
592aee4838 Revert "Reland "Temporary revert of two changes which potentially caused performance regressions in Flutter.""
The change was already reverted and I accidentally relanded this.

Change-Id: I62ff3367db7aaaf3a470727fdb587830a23fe53c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98566
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-04-03 12:50:57 +00:00
Ben Konyi
debd918696 Reland "Temporary revert of two changes which potentially caused performance regressions in Flutter."
This is a reland of 49c94d3600

It appears that the major regressions were introduced not by the typed data unification
changes but rather by 3fd124db1f "[vm] Repair the resolver abstraction." which got
reverted in e979895efb "Revert "[vm] Repair the resolver abstraction."


Original change's description:
> Temporary revert of two changes which potentially caused performance regressions in Flutter.
>
> Revert "[vm] Re-number class ids for internal/external typed data and typed data views"
>
> This reverts commit a062221b76.
>
> Revert "[vm] Unify internal/external/view typed data into new RawTypedDataBase class"
>
> This reverts commit 94362f1af0.
>
> Change-Id: I7189c976aa86cdcf0a3802631bff754baf3ca2cc
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98521
> Reviewed-by: Ben Konyi <bkonyi@google.com>

Change-Id: I758775ccc426a02bce538d07ea04d9c67e8933d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98562
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Auto-Submit: Martin Kustermann <kustermann@google.com>
2019-04-03 12:04:23 +00:00
Kevin Millikin
dbb6bf0237 [cfe] Ensure that async for map entries are marked
When disambiguating between maps and sets, ensure that `await for`
loops are marked as asynchronous.  Otherwise, there will be a spurious
type error because we have a Stream and would expect an Iterable.

Change-Id: Ie97eaf74ff7a9e4dfb262ab0447f4322d04701aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98467
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Auto-Submit: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-04-03 10:27:22 +00:00
Johnni Winther
78fca5b2fa Include liveness of type argument in supertypes in RTI needed checks computation
Change-Id: Ifdde3e8694f8d39ccf10cac0d5dc2cb3cb9225bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98560
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-04-03 10:23:53 +00:00
Dmitry Stefantsov
e1e5bb59c9 [cfe] Check that the condition in if-elements is a bool
Change-Id: If089fa603d586169ca2a368ba7fbf7fffc7ec8d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98484
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-04-03 09:17:24 +00:00
Dmitry Stefantsov
c5f1614bcc [fasta] Don't use invalidCollectionElement when ui-as-code is enabled
Closes #36413.

Bug: http://dartbug.com/36413
Change-Id: Ie9f0b82bab63c802fddb4c5642d374d7cc43455e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98466
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-04-03 09:17:24 +00:00
Mayank Patke
7f09c40db4 Add builder tag to dart2js-production-*-d8 and mark
language_2/control_flow_collections/for_test as Crash on
dart2js-production-linux-d8.

Change-Id: I672daf323a908f7f333fed71c96525dde6f68d91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98504
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2019-04-03 04:05:10 +00:00
Ben Konyi
d63d0b4bcd Revert "Temporary revert of two changes which potentially caused performance regressions in Flutter."
This reverts commit 49c94d3600.

Reason for revert: Relanding

Original change's description:
> Temporary revert of two changes which potentially caused performance regressions in Flutter.
> 
> Revert "[vm] Re-number class ids for internal/external typed data and typed data views"
> 
> This reverts commit a062221b76.
> 
> Revert "[vm] Unify internal/external/view typed data into new RawTypedDataBase class"
> 
> This reverts commit 94362f1af0.
> 
> Change-Id: I7189c976aa86cdcf0a3802631bff754baf3ca2cc
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98521
> Reviewed-by: Ben Konyi <bkonyi@google.com>

TBR=bkonyi@google.com,asiva@google.com

Change-Id: I5c5be67fcec05434283153cb2592ba41afd1f41f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98505
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2019-04-02 23:53:42 +00:00
Ben Konyi
49c94d3600 Temporary revert of two changes which potentially caused performance regressions in Flutter.
Revert "[vm] Re-number class ids for internal/external typed data and typed data views"

This reverts commit a062221b76.

Revert "[vm] Unify internal/external/view typed data into new RawTypedDataBase class"

This reverts commit 94362f1af0.

Change-Id: I7189c976aa86cdcf0a3802631bff754baf3ca2cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98521
Reviewed-by: Ben Konyi <bkonyi@google.com>
2019-04-02 23:53:12 +00:00
Mayank Patke
335a854696 Implement JavaScript semantics for frontend constant folding.
Change-Id: I8232d0f5875d8471d8110582c44fc9d9b8a735f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98240
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-04-02 22:37:46 +00:00
Nicholas Shahan
2ee8bb87e4 Remove control flow collections test skips for all platforms
Issue: #36005
Change-Id: Ibbc1f22c8e4dad9b5a72f97001638772622b74ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98430
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2019-04-02 19:17:47 +00:00
Alexander Markov
8fb77ec84d [vm/bytecode] Preliminary support for new language features in bytecode
Issue: https://github.com/dart-lang/sdk/issues/36214
Issue: https://github.com/dart-lang/sdk/issues/36218

Change-Id: I39149b82cb93c1cb87c64cf9c41c56b753bba13a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98400
Reviewed-by: Aart Bik <ajcbik@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
2019-04-02 19:11:09 +00:00
Mayank Patke
50d4e489d4 Fix type comparisons in language_2/control_flow_collections.
Types are compared with `Expect.equals` instead of `Expect.identical`
since they are not always canonicalized.

Change-Id: I43c878986d190c361efaae321621f204a4bb8495
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98425
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2019-04-02 17:24:49 +00:00
Johnni Winther
14fd3b7d6a Report errors on invalid constants in == and !=
Invocation of == and != is only constant on receivers of types bool, int, double, and String or null operands. This is now handled correctly in constant evaluation. The case for method invocation of `a != b` is removed since it is parsed as `!(a == b)`.

Change-Id: I65d8ddf2716f319f61fc0609803a5237f4aba644
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98349
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-04-02 13:54:28 +00:00
Dmitry Stefantsov
4a1b153fe1 [cfe] Enable type promotion in if-elements of literal collections
Closes #36396.

Bug: http://dartbug.com/36396
Change-Id: I223267cdee1aca38d69354e4f97df7dcc76e9553
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98461
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-04-02 13:33:19 +00:00
Dmitry Stefantsov
45bd79c119 [cfe] Fix inference on variable declarations in for-elements
Closes #36395, closes #36393.

Bug: http://dartbug.com/36395
Change-Id: Ifd35ce2e1a646b484b7fcc83d9fb1a0f9d3ae978
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98333
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-04-02 13:33:19 +00:00
Kevin Millikin
c71888d537 [cfe] Async translation of block expressions
Translate block expressions in the VM's async translation.  Closes
https://github.com/dart-lang/sdk/issues/36277

Change-Id: I606b155bfe1364e948d18043c167a272007411e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98339
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-04-02 10:00:53 +00:00
Mayank Patke
ba473d579f Unskip co19_2/Control-flow-collections for dart2js.
We fail the following:
* type_promotion_A01_t01
* static_errors_A04_t01/01
* static_errors_A04_t01/02
* const_collections_A02_t02/01
* const_collections_A02_t02/03
* const_collections_A02_t02/04

Change-Id: Id568d5ab6ea2047f4bc0ff0d212ae22b6a9ee22f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98444
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2019-04-02 01:16:53 +00:00
Sigmund Cherem
c26f1c6bf7 Do not assume stack trace is not null
Change-Id: Ib795cfdbcf9599f7e4bc2688b9a965f50c0b7c3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98421
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2019-04-02 00:02:53 +00:00
William Hesse
1e77c187c8 Update front-end status for added tests and changed results
Added tests and changes to constant implementation have changed
the result of the front-end compiler on some tests.

Change-Id: I112027f2ca5ed72cc640ce01f577e498020866f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98356
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-04-01 15:52:08 +00:00
Johnni Winther
1a3e8dda3b Handle nested unevaluated constants in constant evaluator
The constant evaluator assumed that any ConstantExpression met during evaluation of a sub expression was not an unevaluated constant. This do occur, for instance when a field is initialized to an unevaluated constant. With the change, unevaluated constants met during evaluation are themselves evaluated.

This change also fixed handling of assert initializers in unevaluated constants.

Change-Id: Id9e676f40bc829c4d234f34a74ef0ca5c4c6ec48
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98348
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-04-01 14:29:32 +00:00
Johnni Winther
05dd851566 Test late CFE constant evaluation.
Tests that dart2js can handle evaluation of unevaluated constants from CFE, including handling of potential compile-time errors found during evaluation.

The CL fixes a bug in the constant evaluator where it created map literals that were not marked as constant as needed.

Change-Id: I7df77a3c68e52392a143478b3567d19e09ebe6bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98347
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-04-01 13:05:52 +00:00
Lasse R.H. Nielsen
413315cacd Add some tests for constants.
Change-Id: I5f06c2849ed3f610023a399f65c0cbfaf1921b34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97510
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2019-04-01 13:03:42 +00:00
William Hesse
dc1f6b352a Update front-end status for co19 roll
This adds some missing status file fixes for the latest co19 roll.
That roll was https://dart-review.googlesource.com/c/sdk/+/98344

Change-Id: I0b7f6ecd993d1a7bfeced7ca4f4d1a7b6a118cd7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98354
Reviewed-by: Alexander Thomas <athom@google.com>
2019-04-01 12:02:55 +00:00
Samir Jindel
154c324786 [vm/ffi] Lock out structs on 32-bit platforms.
Addresses https://github.com/dart-lang/sdk/issues/36334

Change-Id: I880812941748207ea93a789db2f2d4d2938d3f37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97961
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Auto-Submit: Samir Jindel <sjindel@google.com>
2019-04-01 10:30:58 +00:00
Martin Kustermann
94362f1af0 [vm] Unify internal/external/view typed data into new RawTypedDataBase class
This moves the length field as well as an inner pointer to the start of
the data into the RawTypedDataBase class.  The inner pointer is updated
on allocation, scavenges and old space compactions.

To avoid writing more assembly the typed data view factory constructors
will be generated using IL, which will update the inner pointer. This
required adding new IR instructions and changing the existing
UnboxedIntConverter instruction.

This is the foundation work to de-virtualize calls on the public typed
data types, e.g. Uint8List.


Issue https://github.com/dart-lang/sdk/issues/35154

Cq-Include-Trybots: luci.dart.try:vm-canary-linux-debug-try, vm-dartkb-linux-debug-x64-try, vm-dartkb-linux-release-x64-try, vm-kernel-asan-linux-release-x64-try, vm-kernel-checked-linux-release-x64-try, vm-kernel-linux-debug-ia32-try, vm-kernel-linux-debug-simdbc64-try, vm-kernel-linux-debug-x64-try, vm-kernel-linux-product-x64-try, vm-kernel-linux-release-ia32-try, vm-kernel-linux-release-simarm-try, vm-kernel-linux-release-simarm64-try, vm-kernel-linux-release-simdbc64-try, vm-kernel-linux-release-x64-try, vm-kernel-optcounter-threshold-linux-release-ia32-try, vm-kernel-optcounter-threshold-linux-release-x64-try, vm-kernel-precomp-android-release-arm-try, vm-kernel-precomp-bare-linux-release-simarm-try, vm-kernel-precomp-bare-linux-release-simarm64-try, vm-kernel-precomp-bare-linux-release-x64-try, vm-kernel-precomp-linux-debug-x64-try, vm-kernel-precomp-linux-product-x64-try, vm-kernel-precomp-linux-release-simarm-try, vm-kernel-precomp-linux-release-simarm64-try, vm-kernel-precomp-linux-release-x64-try, vm-kernel-precomp-obfuscate-linux-release-x64-try, vm-kernel-precomp-win-release-simarm64-try, vm-kernel-precomp-win-release-x64-try, vm-kernel-reload-linux-debug-x64-try, vm-kernel-reload-linux-release-x64-try, vm-kernel-reload-rollback-linux-debug-x64-try, vm-kernel-reload-rollback-linux-release-x64-try, vm-kernel-win-debug-ia32-try, vm-kernel-win-debug-x64-try, vm-kernel-win-product-x64-try, vm-kernel-win-release-ia32-try, vm-kernel-win-release-x64-try
Change-Id: I1aab0dd93fa0f06a05299ab4cb019cf898b9e1ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97960
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2019-03-30 14:02:50 +00:00
Dmitry Stefantsov
e0a2651ce0 [cfe] Fix downcasts added during set/map disambiguation
Change-Id: I79d559c756994424eb395ecc8f12f84c1bf1e257
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98327
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-03-29 17:18:55 +00:00
Aske Simon Christensen
fb58826aa3 [CFE] Compensate for lowering and desugaring in spread.
This fixes a problem where a set or map in a spread would not be
properly recognized by the constant evaluator when compiling for a
VM target.

Fixes https://github.com/dart-lang/sdk/issues/36387

Change-Id: I01efc932994c143fa5a5a2fbacda21fe9206e3e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98330
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-03-29 16:59:06 +00:00
Johnni Winther
7ef28f0b03 Handle constant field init registration correctly.
+ avoid side-effects of checking enqueuer invariants

Change-Id: Id327371bc70e4b1b5fd4d326b8c8cf8caf50ea0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98142
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-03-29 16:44:15 +00:00
Johnni Winther
da0de0a867 Handle native field impact correctly from ir constants
Change-Id: I0393fd57b78c7cb417888ec3e0ff139b888bf3a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98322
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-03-29 16:41:55 +00:00
William Hesse
00d65e2d84 Roll co19 to revision c3b33ee
Rolls the version of co19 tests in the SDK checkout to
c3b33ee90c5ee7f88fdb0ead08fdbb40c54954d2

Change-Id: I11a181e2fb1e37ff73fb038cd51b3ad38e2a0ae9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98344
Reviewed-by: Jonas Termansen <sortie@google.com>
2019-03-29 16:22:42 +00:00
Erik Ernst
69790e7eb4 Updated Dart.g, tests & status files to support ui-as-code collections
Change-Id: I9ba3aa4e3ebaedee3a2cd20ccdcc533af96b9bda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98018
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2019-03-29 13:33:52 +00:00
Sergey G. Grekhov
a506c708f2 [co19] DEPS updated
Change-Id: Idf7c5bab05f7247853bf3e2f2accbc96e2f8550f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98181
Reviewed-by: William Hesse <whesse@google.com>
2019-03-29 10:31:48 +00:00
Bob Nystrom
0eb76a5b5a Move await for of null tests to a different file.
Those will be failing in 2.3, and we don't want that to make the entire
await_for_test to fail.

Change-Id: I5f81ada877a5ecef8a3034f071313a6729b53aaa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98242
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2019-03-28 23:45:29 +00:00
Sigmund Cherem
8d699db9af Update spread_collections/inference_test to use Type.== instead of identical
dart2js doesn't canonicalize types so comparing with identical causes the test
to fail.

Change-Id: I3e6f19f8ab95d949402c3bf0caf0c31cc0fccbad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98241
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2019-03-28 21:58:49 +00:00
Vijay Menon
bc0148cf87 [ddc] Skip unsupported co19 tests on ddc/ddk
Change-Id: I3a365828a6e7c0f5060238bf65eb11512b66934b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98160
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2019-03-28 19:03:33 +00:00
Ben Konyi
ac2c934563 Reland "[ VM / dart:isolate ] Added ability to set names for spawned isolates."
This reverts commit 638f13ff3d.

Change-Id: Ib5015539b1c93791c2469be6995789f8f0362806
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97845
Commit-Queue: Ben Konyi <bkonyi@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-03-28 16:39:50 +00:00
Aske Simon Christensen
018fd36557 [CFE] Handle spread and if in const map literals.
Change-Id: I5250a115c1c98849a695e1d159532a49605c7caf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98014
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-03-28 15:00:58 +00:00
Aske Simon Christensen
b5be157e09 [CFE] Handle spread and if in const set literals.
Change-Id: I7db79282c1caafb2f8f07cd676e4bbe0941cd264
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98009
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-03-28 15:00:58 +00:00
Aske Simon Christensen
102b1fa39e [CFE] Handle spread and if in const list literals.
Change-Id: I534dcd2e02d8d70b83b55a4890fb1a6e1bf6170d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97307
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-03-28 15:00:58 +00:00
Aske Simon Christensen
665d2d0003 [CFE] Leave const collections to the constant evaluator.
Change-Id: Ib828bfa7f5695657e9e5ca67f7a9c3868a2a8fa1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97936
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-03-28 15:00:58 +00:00
Dmitry Stefantsov
864b22d3ce [cfe] Add inference and type checks to if-elements in maps
Change-Id: I3cacaee173320dd52bead6688fac24e4e4a01f0f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97962
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-03-28 12:30:41 +00:00
Johnni Winther
05f3b12960 Add test for native declarations
Change-Id: Iea9d8d27e6fdefa6f47471a459cdb4363aab65e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98011
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-28 10:29:11 +00:00
Johnni Winther
7baae76480 Always use ir constants in annotations when constant-update-2018 is enabled
Change-Id: Ib5ba6a908904c36a8580f6f47424b6982800dddd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98002
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-28 09:34:21 +00:00
Johnni Winther
10abacba10 Use hasOnlyNonDeferredImportPathsToConstant to add deferred constants
Change-Id: Ifd8b733c526fe4e7ae837a7d17c682e91717feb5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98013
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-28 09:17:31 +00:00
Nicholas Shahan
add5a27120 [infra] Add constant-update-2018 flag to v2.3 lang features tests
Patched changes from https://dart-review.googlesource.com/c/sdk/+/97939

Removed the change to the language_2_kernel.status

Kernel team can update as needed.

Change-Id: Icc347081e6c00fb2ae7616afb452e2c652f9d6b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97942
Reviewed-by: Vijay Menon <vsm@google.com>
2019-03-28 01:35:53 +00:00
Bob Nystrom
ffee99d79b Add asyncExpectThrows<T>() to async_helper.
This lets you test that a callback returns a Future that completes to
a given error. Like Expect.throws(), but async.

At first, I added support for this directly to Expect.throws(), but I
think it's better to minimize the amount of dynamic logic going on in
the language test framework.

I was worried about having to duplicate all of the Expect.throws___()
convenience functions but now that we have generic methods, those
functions aren't that much more convenient.

Change-Id: I8b288945611fa16f8d27056f3cf79181fc22d256
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97881
Reviewed-by: William Hesse <whesse@google.com>
2019-03-27 18:26:15 +00:00
Bob Nystrom
9ea9612ce8 Object can be used in for-in and await for elements.
It's not a compile error. Instead, a runtime cast is inserted.

Change-Id: I871191d9f6fdb72276449abe7016c86ac098fd60
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97946
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-03-27 17:46:10 +00:00
Sergey G. Grekhov
f12715354a [co19] DEPS updated
Change-Id: Ic4b915c1b1fe355577da564ca57d1d6a5c714ee6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97980
Reviewed-by: Alexander Thomas <athom@google.com>
2019-03-27 14:49:31 +00:00
Johnni Winther
8a92d2a8d9 Collect types deeply for deferred loading
Change-Id: I7bbd9499975c78fcdcfa88ceba31cb2e8e5a7cc6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97639
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-27 11:08:37 +00:00
Sergey G. Grekhov
4256a97a3d [co19] DEPS file updated
Change-Id: I9a691a5efc92cc3a32feca683df7c6ec934cce11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97900
Reviewed-by: Alexander Thomas <athom@google.com>
2019-03-27 08:08:05 +00:00
Mayank Patke
419243fc4e Add support for BlockExpression.
Since we already have support for Block in our visitors, we can extend
them to support BlockExpression fairly easily.

co19_2 and language_2 tests still need to be unskipped, but we can't do
that until CFE respects the --enable-experiment=control-flow-collections
flag.

Change-Id: I48da19cc33dbf35c5ead3ea13266b01d3e0de959
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97820
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-26 21:56:51 +00:00
Alexander Markov
61f0f5bc43 [vm/bytecode] Declare members in bytecode
This change replaces kernel AST declarations of fields and functions
with bytecode declarations.

Size of dilp files is reduced by 11-12%.

Startup latency:
Time to the first full frame: 1.945s -> 1.687s
FinalizeClass: 554ms -> 277ms
FinishClassLoading: 296ms -> 156ms

There are following regressions in bytecode mode, which will be fixed
in future:

* dart:mirrors are not supported yet (implementation of mirrors relies
  on reading kernel AST in certain cases).

  As the result, lib_2/mirrors/* tests fail.

* native extensions are not supported yet (annotations on libraries
  and classes in AST are cleaned up as they could reference members
  which are now removed from AST).

  As the result, standalone_2/entrypoints_verification_test test fails.

* language_2/spread_collections/const_error_test/* tests fail
  due to https://github.com/dart-lang/sdk/issues/36286.

Change-Id: I5130f401fd7b84038b136136e7ccc1a6e51b6cea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97561
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-03-26 21:40:10 +00:00
Dmitry Stefantsov
fbc70da0d3 [cfe] Add inference and type checks in for-elements in lists and sets
Change-Id: Ib8e85f674caf0565b25cf29642f4981a4a1534e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97934
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-03-26 17:23:10 +00:00
Dmitry Stefantsov
49a7fa1c11 [cfe] Add inference and type checks for if-elements in lists and sets
Change-Id: Iad4e6a6ed86e17f97f6bb7ad16f2bff20ab84fae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97925
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-03-26 17:23:10 +00:00
Bob Nystrom
73d5c6bab0 Make the collection await for test actually return a stream.
Change-Id: Ie4991915be68500f5edcb7e2cf9a50b84c8ba7e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97880
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2019-03-26 16:42:25 +00:00
Kevin Millikin
1af9f99a5f [cfe] Compile loops in map literals
Add support for compiling for and for-in loops in map literals.  They
are lowered to block expressions.

Change-Id: I555401257ba028543310edbd0547166d7c6a26a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97929
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-03-26 13:45:52 +00:00
Johnni Winther
a8e51c5868 Bypass use of dart2js_platform.dill when experimental flags are non-default
Change-Id: I95e654c6c2a430f7aebb30ced92b33cd35aadca3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97634
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-03-26 13:18:24 +00:00
Kevin Millikin
ac21076110 [cfe] Implement compilation of loops in lists and sets
Implement the translation of for and for-in loops in non-const lists
and sets.  They are lowered to block expressions containing a loop.
It is impossible to target these loops with a break or continue
because they do not contain statements in their body.

Type inference is not yet implemented.

Change-Id: I35ff1650fde54cd376fe0b444891010435c74507
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97922
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-03-26 12:16:22 +00:00
Johnni Winther
0a3cd80d41 Reland "Change default of 'keepFields' in constant transformation to true"
Reviewed in https://dart-review.googlesource.com/c/sdk/+/97632

Change-Id: I042a81ffcf60b3dfb0666f69dcb97a8835036afc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97921
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-03-26 11:48:41 +00:00
Kevin Millikin
12d789fa52 [cfe] Update test status files
New tests were added without status file updates.

Change-Id: Ibd8e48d6a3818e69649e881594be78afd490ba91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97920
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Auto-Submit: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2019-03-26 10:50:01 +00:00
Kevin Millikin
e5374a688c [cfe] Add front-end support for for and for-in
In collection literals, support for and for-in in Fasta's body
builder.  They are removed when encountered during type inference and
their lowering to block expressions is not yet implemented.

Change-Id: I41e6a7a4aca7ffafdc12119e1503e9c0df5a6589
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97628
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-03-26 09:45:29 +00:00
Bob Nystrom
f09097bab8 Add tests for "await for" in collection literals.
This doesn't cover all of the corner cases around the synthesized
stream subscription and stuff, but I honestly don't know if I'm
qualified to write those tests. This should cover all of the basic
static and runtime semantics that users care about.

Change-Id: I7237f0ccb9bf02af291d3175ab2c0074d0547c92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97548
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2019-03-25 21:48:25 +00:00
Vyacheslav Egorov
c9ecdabe5d Revert "Combine override checks and override-based inference in one phase"
This reverts commit 9db4119b67.

Revert "Change default of 'keepFields' in constant transformation to true"

This reverts commit b1e14cbe5f.

Revert "[fasta] Don't create forwarding stub if there's already a member"

This reverts commit 51da94da76.

These commits are reverted to unblock rolls into Flutter.

b1e14cbe5f is reverted because it contained
changes that prevented clean revert of the other CLs.

Change-Id: I8d3c00f0c1b146f4debe7f1a1a7de75be154e265
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97802
Commit-Queue: Alexander Aprelev <aam@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2019-03-25 19:40:26 +00:00
Samir Jindel
580f44aa83 [vm] Enable running FFI tests on Android in JIT-mode.
* Move FFI tests into a separate test suite.
  They never belonged in standalone_2/ since they are not only available in
  the standalone VM. Also, we want to have a separate status file.

* Add new "SharedObjects" option to test files to copy needed shared objects
  to the Android device for testing.

* Add support to compiler/runtime_configuration.dart for testing JIT-mode on Android.

* Add new configurations and builders to test_matrix.json to test JIT-mode on Android.

* Clean up status file entries for FFI (we didn't need to special-case stress & subtype tests).

Change-Id: Ifb32ef7051754f477d00ecd7a0f9b19ca8a66eae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97334
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2019-03-25 16:14:18 +00:00
Aske Simon Christensen
2ce1af9cbe [CFE] Constant evaluation of newly added operators
Change-Id: I2fa73e458035a5703536faccbe8b90eb5e86d2be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97509
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-03-25 12:56:10 +00:00
Johnni Winther
b1e14cbe5f Change default of 'keepFields' in constant transformation to true
This is necessary to support modular constant transformation as
needed for instance of for platform dill files.

This change also restricts the removal of additionExports to fields.

Change-Id: Ie7379f09672d8caeaf0689d42af9e1246b9678fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97632
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-03-25 10:05:18 +00:00
Aske Simon Christensen
133d1b5afe [CFE] Allow 'as' and 'is' expressions as constants.
Also clean out obsolete status file entries due to renamed constant
update test directory.

Change-Id: I135d8c9cac19342143bf8154d1b2e72cf0b8dd01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/93161
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-03-25 09:17:58 +00:00
Jenny Messerly
dfae23d205 [dartdevc] fix #36293, call nSM on callable objects if the lookup fails
Given `obj.foo(1, 2, 3)`, if `obj.foo` succeeds but `call()` on the
resulting object fails, DDC should call `noSuchMethod()` on the result
of `obj.foo`, not on `obj`. This CL also adds a few more test cases that
DDC was failing on.

Change-Id: I76c3cc73e4cc81791f961c6b2a55cbfea7a5240b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97701
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2019-03-22 22:55:11 +00:00
Sigmund Cherem
ee79ca9a74 dart2js support for loading .dill files built modularly
Change-Id: Ie360b13b5be786df9101c96982400136c63dff00
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97462
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-03-22 21:16:21 +00:00
asiva
1bab46b06f [vm] Remove support for '-c', '--checked' flags and '--enable-checked-mode'
1. Remove support for the following flags '-c', '--checked' and '--enable-checked-mode'
2. Cleanup some of the tests and test scripts where these options were being passed.

https://github.com/dart-lang/sdk/issues/34660

Change-Id: I4d8aa0d14bd054cfba08d78a411a0df4fc829df1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97550
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-03-22 17:08:56 +00:00
Johnni Winther
87c553bf3c Ascribe constants to the member world impacts
Change-Id: I978a6453196b47dd4ed5f51dde1d81feaa4f2008
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97502
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-22 12:58:40 +00:00
Johnni Winther
3de6276ad6 Handle deferred constants in the ssa builder
Change-Id: I8fc5e4f01d00a0f1b5ad1b2b51495476f0ec625e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97328
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-22 09:06:03 +00:00
Peter von der Ahé
9db4119b67 Combine override checks and override-based inference in one phase
Change-Id: I2760f72f4eaa44bd192747179e843f017db30874
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97301
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-03-22 08:59:48 +00:00
Bob Nystrom
74b7890597 Fix a few mistakes and oversights in the control flow collection tests.
- Use "{" and "}" for maps.
- Add tests for Object and non-Iterable in for-in loop.
- Fix copy/paste error in inference test.

Change-Id: I563df4e94e221a1a03bbc52cf6f312aae5e07310
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97524
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2019-03-21 23:22:51 +00:00
Régis Crelier
c403804d9c [vm/interpreter] Take arg desc into consideration when resolving call method in invoke field dispatchers.
Add regression test.
This fixes issue 36084.
Issue 36293 filed against ddc, which fails on the new test.

Change-Id: I1112572d72671fbc1d78a768ee85affff41951a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97142
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-03-21 18:51:22 +00:00
Johnni Winther
7dd4259d87 Handle ir constants in inferrer
Change-Id: Ie7b6ff9e62b3b8c78f6c04359cb72f77b249440c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97240
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-21 11:25:40 +00:00
Johnni Winther
8915407f2c Support computation of NativeData directly from IrAnnotationData
Change-Id: Ie11791b61e1ffbc011959d6d7a9f0a502cb1c74f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97114
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-21 10:44:21 +00:00
Erik Ernst
2805a376b2 Added tests for superinterface variance constraints
Change-Id: Ib9e3fbe577c2ba49d1f8f535cbd295ec7fed8d24
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97111
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2019-03-21 09:34:00 +00:00
Samir Jindel
d14dfc5d8a [vm] Support FFI on ARM64 and Android.
Change-Id: I33f3fb1dbf5a4aee4eaea08d0ca51b60114c8680
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97109
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2019-03-20 17:45:23 +00:00
Samir Jindel
b032f1b284 [vm] Support FFI on 32-bit Intel.
Change-Id: I08acf6ef00e899f95dbaf2de36f1aea5e6e7ea3d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97108
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
2019-03-20 17:45:23 +00:00
William Hesse
e2c577333c [testing] Mark an uncatchable flaky test as Skip.
The test corelib_2/regexp/lookbehind_test/01 always passes or fails
uniformly on a single build.  But on different builds, on dartdevk on
mac.

TBR: vsm@google.com

Bug: dartbug.com/36280
Change-Id: If70b7a2f0ce34e9f8ba3032d17e7244f2e84aa96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97332
Reviewed-by: William Hesse <whesse@google.com>
2019-03-20 16:55:55 +00:00
Samir Jindel
5e9df35a57 [vm/ffi] Correctly sign- or zero-extend arguments and return values from native code.
Bugs fixed: dartbug.com/36122

Change-Id: Id64429b8e808356ab19b96ef6faf48577ae962db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96946
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
2019-03-20 13:27:25 +00:00
Peter von der Ahé
8af57275eb Can't override implied setter covariantly
Change-Id: I1704001605f01721b01254fdc032aacebf472c80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97304
Commit-Queue: Peter von der Ahé <ahe@google.com>
Auto-Submit: Peter von der Ahé <ahe@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2019-03-20 10:56:33 +00:00
Sergey G. Grekhov
578249629d [co19 DEPS updated]
Change-Id: Idb3b63052e2981e8a4fc163a7461be1d53a577f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97303
Reviewed-by: William Hesse <whesse@google.com>
2019-03-20 10:41:31 +00:00
Johnni Winther
c4c0db440c Handle ir constants in noSuchMethod handling and deferred load
Change-Id: Ic57e44bd3f03d88119962c235fb6f136785d9ac1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97118
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-20 10:18:13 +00:00
Kevin Millikin
4daa9b94ea [cfe] Compile if elements in lists and sets
If elements are compiled to if statements.  The type inference rules
including insertion of runtime checks are not yet implemented.

Change-Id: Iaa7ab709a7acacf952887b17ac1081a9fecd7cef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97200
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-03-20 08:43:03 +00:00
Jenny Messerly
7fe4253a4e [analyzer] fix #36158, implicit cast missing on covariant return type
Due to API changes, the implicit cast visitor (CodeChecker) was not
finding the correct substituted member type, so the implicit return
type cast was not inserted.

Also fixes another issue that paulberry@ discovered: covariant return
type casts were overwriting the implicit casts from the context type.
The context type should always take priority; implicit covariance
checks are only needed when there isn't a type cast from the context.

Change-Id: I998e8f87371c15175c57864b7e334449268fe339
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97143
Reviewed-by: Paul Berry <paulberry@google.com>
2019-03-20 00:33:41 +00:00
Bob Nystrom
9910374c20 Fix mistakes in control flow ambiguity test.
Change-Id: I3e710b68c24e2896c55661fac0a59463b9240c53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97283
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-03-19 17:28:00 +00:00
Stevie Strickland
af5fc2d4d2 [VM] Partial support for named regexp captures.
See https://github.com/tc39/proposal-regexp-named-groups
for a high-level description of the feature and examples.  This is one of the
features requested in https://github.com/dart-lang/sdk/issues/34935.

This is a partial implementation because while there is a way to retrieve
groups via Dart by name, it requires casting the returned Match to the
new RegExpMatch interface to avoid changing the RegExp interface.
Changing the RegExp interface will happen in a future update, since there
are other planned changes to the RegExp interface coming soon and that way
we only change it once. See https://github.com/dart-lang/sdk/issues/36171
for more details on the planned changes.

Also, since only BMP regular expressions are supported, not full
Unicode ones (i.e., those with the /u flag in ECMAscript), \k<NAME>
will only be parsed as a named back reference if there are named
captures in the string. Otherwise, the \k will be parsed as the identity
escape for backwards compatibility. The new tests illustrate this
difference.

Change-Id: Ieeb0374813db78924c9aa8ac3e652dfb6d4a5934
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95461
Commit-Queue: Stevie Strickland <sstrickl@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-03-19 10:40:15 +00:00
Bob Nystrom
efb3f85c7e Fix for element type inference tests.
Change-Id: I17a924126e0f9294f1ad212ebd12c81abca05d16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97170
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2019-03-19 00:57:11 +00:00
Alexander Markov
f5c16512cc [Tests] Pass VM options (Platform.executableArguments) to sub-processes
When testing runs with certain set of VM options and tests launch
new Dart processes, VM options should be also forwarded to child
processes.

Change-Id: I7207fe87672cd61fd50d7ac77ef1da67744af183
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97169
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-03-18 23:20:41 +00:00
Johnni Winther
9c9ab11450 Reland "Handle ir constants in field analysis and impact tests"
Include initial handling of unevaluated constants from environment.

Change-Id: I288801b42a9e25e440baa3eac9ce88263acea0a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97241
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Auto-Submit: Johnni Winther <johnniwinther@google.com>
2019-03-18 17:57:55 +00:00
Aske Simon Christensen
e62391a162 Revert "Handle ir constants in field analysis and impact tests"
This reverts commit 0cd89e5bd1.

Reason for revert: Conflicts with move of constant evaluator.

Original change's description:
> Handle ir constants in field analysis and impact tests
> 
> Include initial handling of unevaluated constants from environment.
> 
> Change-Id: Ibd330a14dfabad1dee95b64ce7015939412374d3
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97112
> Commit-Queue: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Sigmund Cherem <sigmund@google.com>

TBR=johnniwinther@google.com,sigmund@google.com

Change-Id: Ie01c7dda6152abbf852cd40a00597f019db49e66
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97116
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-03-18 13:01:11 +00:00
Johnni Winther
0cd89e5bd1 Handle ir constants in field analysis and impact tests
Include initial handling of unevaluated constants from environment.

Change-Id: Ibd330a14dfabad1dee95b64ce7015939412374d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97112
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-18 10:30:04 +00:00
Stephen Adams
7a90563ee3 [js_runtime] Try to avoid String.prototype.replace with replacement patterns
Change-Id: I4b063fe77592bbb0ad9f6ffb628c3bdd6323b20c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96220
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-03-15 21:51:15 +00:00
Bob Nystrom
626cb68ad2 More spread test fixes.
Change-Id: I87ff7f75cbe10598f831fb969ad04ba612bd4b0c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97004
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2019-03-15 20:48:55 +00:00
Johnni Winther
eb6f1b6abd Handle effectively constant fields in class stub generator
Closes #36222

Change-Id: Ic8b7a3963e1364903b4b2d7871ff0b12cb134572
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97082
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-15 20:15:25 +00:00
Alexander Markov
06eeeec92e [tests] Remove obsolete VM option --error-on-bad-type from tests
Change-Id: I1ab76f5a86dc53bfa22bd350e6a7aca477c58947
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97043
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-03-15 18:19:55 +00:00
Stephen Adams
9b185051a9 Don't use lazy static initializer in Random.secure()
The lazy static initializer returns null after throwing on the first use.

Change-Id: I44fbb6f8af263dc5c813ed5dff2291fb27e48b4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96984
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-03-15 17:45:06 +00:00
Samir Jindel
025825dc0f [vm] Update ffi status files and fix function_stress_test on Windows.
Issues fixed: dartbug.com/35933, dartbug.com/35935 and datbug.com/36138.

Change-Id: I4a057951abf9a022a3fc7a63e85a32e8fae22a58
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97105
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2019-03-15 15:11:20 +00:00
Daco Harkes
638f13ff3d Revert "[ VM / dart:isolate ] Added ability to set names for spawned isolates."
This reverts commit 59525264e8.

Reason for revert: causes Flutter test observatory and protocol to deadlock.
Issue: https://github.com/dart-lang/sdk/issues/36232

Original change's description:
> [ VM / dart:isolate ] Added ability to set names for spawned isolates.
> 
> Fixes issue #34059
> 
> Change-Id: I315498b02edc184e9e408c93eddb78aa1a5a8a1d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/90341
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com,sigmund@google.com

Change-Id: I5f2115a2ac394a8d4c7c175bc97f2b88b65fcb49
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97107
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2019-03-15 14:40:37 +00:00
Samir Jindel
85f8d3c047 [vm] Build FFI trampolines with IL.
Bugs fixed: dartbug.com/36033, dartbug.com/36034, dartbug.com/36155.

Change-Id: Ic463dd2d299018e03f840ecedc8b7dfa350c6b95
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/94860
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2019-03-15 12:38:54 +00:00
Samir Jindel
4e68a04f3e [vm] Minor improvements to FFI function tests.
Most importantly, we move resolution of symbols in function_test to the toplevel
so the same function object is re-used on each invocation. This makes it possible to
tests repeated invocations with the optimization counter enabled.

Also added some comments and new tests.

Change-Id: I3772a1f15d1ad9924c8583112ddf3b1349fb6c09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96083
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2019-03-15 12:38:54 +00:00
William Hesse
d6ffee639b [co19] Roll co19
Change-Id: I9fa1568bc172636b2ed3d1c2f73e88d9d3950ba1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96947
Reviewed-by: William Hesse <whesse@google.com>
2019-03-15 12:05:39 +00:00
Johnni Winther
d0c4d6b329 Take variance into account when computing rti checks
Change-Id: Ie3f93a6ac1fbf796b1c66bf29d2e9de51f5dee13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96942
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-15 09:40:14 +00:00
Johnni Winther
3e794ec16a Add tests for rti emission on function types
Change-Id: Iee612110afbb83947a7869df3c49138a9ba34832
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96906
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-15 09:40:14 +00:00
Kevin Millikin
495b9c4519 Remove set-literals experimental flag from tests
The set-literals feature has shipped and is on be default.  There is
no longer any need to pass it as an option to tests and the tools
cannot remove support for the flag while it is used in tests.

Change-Id: Ibf105ec01193ebb08d6e22600e6c7748897cc2ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96941
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2019-03-15 07:41:11 +00:00
Bob Nystrom
092a552a52 Fix spread disambiguation test.
Using runtime objects of the right type so that the spread doesn't
throw at runtime before we can check its type.

Change-Id: I6838079ff7f0f0267796058eee4c077c993484d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97002
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2019-03-15 00:15:28 +00:00
Ben Konyi
59525264e8 [ VM / dart:isolate ] Added ability to set names for spawned isolates.
Fixes issue #34059

Change-Id: I315498b02edc184e9e408c93eddb78aa1a5a8a1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/90341
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-03-14 22:23:09 +00:00
Nate Bosch
28d697a6c1 Enforce override annotations in dart2js
Update the excludes in the test directory analysis options to match the
files that were not updated to add override annotations.
Update the excludes in `testing.json` to match the analysis options.

With a consistent analysis options test config the diagnostics in
editors will match what is enforced by the test.

Also clean up the no longer required `enableSuperMixins` config.

Change-Id: If0e23642c25e0b5c1aced6a5a8c8c05a6da538f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96836
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2019-03-14 18:47:05 +00:00
Stevie Strickland
f31b7928ae [VM] Adding regexp lookbehind assertion support.
See https://github.com/tc39/proposal-regexp-lookbehind
for a high-level description of the feature and examples.  This is one of the
features requested in https://github.com/dart-lang/sdk/issues/34935.

This work takes the feature as present in the v8 engine and appropriately
merges it into our irregexp fork. Notable changes to the irregexp codebase to
introduce this feature:

-----

We can no longer assume that all matching proceeds forwards, since lookbehind
matching proceeds backwards. Similarly, we cannot assume that we can only be
at the start of a string if we started matching from that point. The direction
of matching must also be taken into consideration when doing bounds checking,
which previously assumed the engine would never attempt to look before the
start of a string.

-----

We may now parse backreferences to captures before the capture they
reference, since we parse regular expressions left to right, but lookbehinds
perform captures as they evaluate the string from right to left.  Since
RegExpBackReference objects contain a pointer to their corresponding capture,
this means that we may need to create RegExpCapture objects prior to the
parsing of the corresponding captured subexpression.

Thus, RegExpCapture objects are now only initialized with their index, and the
body is set later when the subexpression is encountered and parsed. This means
any method that operates on the body of a RegExpCapture can no longer be const,
which also affects the rest of the RegExpTree class hierarchy. This also means
that we don't have a valid max_match length for backreferences based off the
capture body, and must assume they can end up being any length.

-----


Change-Id: Iffe0e71b17b1a0c6fea77235e8aee5c093005811
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/94540
Commit-Queue: Stevie Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-03-14 14:26:47 +00:00
Kevin Millikin
c9e9b76d4d Skip control-flow-collections tests on all runtimes
This feature is under development in the front end.  Testing it on the
runtimes leads to numerous spurious status changes.  Skip the tests
for now.  The intent is that when a backend change causes a test to
start passing, then that test will be un-skipped.

Change-Id: I6c8c1f45315607039240c3edc61ba8340ae9cda0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96902
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Auto-Submit: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2019-03-14 13:09:07 +00:00
Kevin Millikin
9aea5536fb [cfe] Initial support for compiling if in collections
Support compiling if elements and map entries by constructing
IfElement or IfMapEntry when they are seen.  There is no support for
lowering them to block expressions yet.

Change-Id: I74c2492fefc9703e9e2f639baad7f737bbe63721
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96786
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-03-14 10:08:36 +00:00
Johnni Winther
1ac41d26b4 Support @Creates and @Returns from ir constants
Change-Id: I5afa43354f70e42dad93a568afabb14d2004cf52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96784
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-03-14 08:44:46 +00:00
Nicholas Shahan
5b07ef9d1c [tests] Fix new tests
* Add missing const on expected set.
* Add missing type to map literal.

Change-Id: I25fdfe45926b4943f17661ad5f392ea53ad1f06b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96850
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-03-14 00:44:46 +00:00
Nate Bosch
f2579a8ede Add override annotations in dart2js tests
In preparation of enforcing these in the analysis options.

Change-Id: I316f2efea510ecc8ff1b975e96d166a5f8c0286c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96834
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-14 00:15:46 +00:00
Ryan Macnak
217a027456 [vm, interpreter] Support unboxed fields.
Bug: FL-208
Change-Id: Ia6d6b913ccfc3b279ae89666bfb6f494a098b102
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96523
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-03-13 23:29:56 +00:00
Mayank Patke
4339fe9b51 Add constant evaluation tests for IfNull.
Change-Id: I68229e831cea9e1c9aac548d9da8434bcacdaaff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96710
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2019-03-13 21:36:51 +00:00
Mayank Patke
8adcab9fec Add constant evaluation tests for Identity.
Change-Id: I9ce93147f7cdb96ce659551499a64958a77d1711
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96709
Reviewed-by: Stephen Adams <sra@google.com>
2019-03-13 21:36:51 +00:00
Mayank Patke
3552dbb429 Add constant evaluation tests for Equals.
Change-Id: I20be37af485f8841ec549f33c16e5680e0170444
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96708
Reviewed-by: Stephen Adams <sra@google.com>
2019-03-13 21:36:51 +00:00
Mayank Patke
27328840f9 Add constant evaluation tests for GreaterEqual.
Change-Id: I2e2a3b656710cd130882dd2f7480f9d532a1ba61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96707
Reviewed-by: Stephen Adams <sra@google.com>
2019-03-13 21:36:51 +00:00
Mayank Patke
9f680cd0bd Add constant evaluation tests for Greater.
Change-Id: I356b805ff69307a697e073ea4499217e11541cc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96706
Reviewed-by: Stephen Adams <sra@google.com>
2019-03-13 21:36:51 +00:00
Mayank Patke
0950d473ad Add constant evaluation tests for LessEqual.
Change-Id: If98b28bfbb32b14e1d53546642fae613aa937519
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96705
Reviewed-by: Stephen Adams <sra@google.com>
2019-03-13 21:36:51 +00:00
Mayank Patke
7ff70237d4 Add constant evaluation tests for Less.
Change-Id: I024905e6e90f40301d092de2e4e0e45e379b143b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96704
Reviewed-by: Stephen Adams <sra@google.com>
2019-03-13 21:36:51 +00:00
Mayank Patke
ce9a1bb24e Add constant evaluation tests for Add.
Change-Id: I21b5fd03bfaee3c32573c56d8f529c933f315d14
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96703
Reviewed-by: Stephen Adams <sra@google.com>
2019-03-13 21:36:51 +00:00
Mayank Patke
2fa96dd653 Add constant evaluation tests for Divide.
Change-Id: Ic361816bd0cfa5a6822cb96322bb29fcf7749778
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96405
Reviewed-by: Stephen Adams <sra@google.com>
2019-03-13 21:36:51 +00:00
Mayank Patke
952421a68d Add constant evaluation tests for TruncatingDivide.
Change-Id: I144967283f76570ec6312750995ca219d3a4ad09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96404
Reviewed-by: Stephen Adams <sra@google.com>
2019-03-13 21:36:51 +00:00
Mayank Patke
9fd0ec2560 Add constant evaluation tests for Modulo.
Change-Id: Ia8d7fd2faee166ea71aaca5e1fc797d5d658d8c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96403
Reviewed-by: Stephen Adams <sra@google.com>
2019-03-13 21:36:51 +00:00
Mayank Patke
9262d111fd Add constant evaluation tests for Multiply.
Change-Id: I05e7c3e6b6cb4a137a03f4917b8ab7125a1e19b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96402
Reviewed-by: Stephen Adams <sra@google.com>
2019-03-13 21:36:51 +00:00
Mayank Patke
aba9392f0e Add constant evaluation tests for Subtract.
Change-Id: Id818fc9c2f246b8858fb747d8955604b44348a4d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96401
Reviewed-by: Stephen Adams <sra@google.com>
2019-03-13 21:36:51 +00:00
Mayank Patke
3a38f0bb89 Add constant evaluation tests for BooleanOr.
Change-Id: Ib9f7b409845ff13ecaa49fd1d949ea1bf474281d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/94465
Reviewed-by: Stephen Adams <sra@google.com>
2019-03-13 21:36:51 +00:00
Mayank Patke
052d6d235c Add constant evaluation tests for BooleanAnd.
Change-Id: Icead29835e72027f6f9cd82f799781983843fc89
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/94464
Reviewed-by: Stephen Adams <sra@google.com>
2019-03-13 21:36:51 +00:00
Mayank Patke
be5332c0a5 Add constant evaluation tests for ShiftRight.
Change-Id: I327d98fa496543db885549e3654844da5f9f6a16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/94463
Reviewed-by: Stephen Adams <sra@google.com>
2019-03-13 21:36:51 +00:00
Mayank Patke
4f34218ce1 Add constant evaluation tests for ShiftLeft.
Change-Id: Ie669c127be1f76a64dbb7a96b81b3ce7d1621733
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/94462
Reviewed-by: Stephen Adams <sra@google.com>
2019-03-13 21:36:51 +00:00
Mayank Patke
3df5334137 Add constant evaluation tests for BitXor.
Change-Id: If5b72f5743ebde2304058ba57e50c7dee5173561
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/94344
Reviewed-by: Stephen Adams <sra@google.com>
2019-03-13 21:36:51 +00:00
Mayank Patke
84d8d6b513 Add constant evaluation tests for BitOr.
Change-Id: I93d172601c8c3e83e3a17d4eeb90d06f2fe2fd45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/94343
Reviewed-by: Stephen Adams <sra@google.com>
2019-03-13 21:36:51 +00:00
Mayank Patke
f7972480bd Add constant evaluation tests for BitAnd.
Change-Id: I162aed0534530efb04e7e743d1f29ef041f888fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/94342
Reviewed-by: Stephen Adams <sra@google.com>
2019-03-13 21:36:51 +00:00
Mayank Patke
432c6c8c39 Add constant evaluation tests for Not.
Change-Id: I1afa07efb7f3def69f13719ee3f57cd4d8c00f2a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/94341
Reviewed-by: Stephen Adams <sra@google.com>
2019-03-13 21:36:51 +00:00
Mayank Patke
2e1c78db7b Add constant evaluation tests for Negate.
Change-Id: I9e23fc47538324fcd64c8e2e90e75cf12e8b0491
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/94340
Reviewed-by: Stephen Adams <sra@google.com>
2019-03-13 21:36:51 +00:00
Mayank Patke
5853f129b2 Add constant evaluation tests for BitNot.
Change-Id: I1bc82d76073006a18109eedfc62bd53a70f1685f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/94320
Reviewed-by: Stephen Adams <sra@google.com>
2019-03-13 21:36:51 +00:00
Mayank Patke
aa4a2df5a2 Add structure of constant folding tests.
This test suite is not comprehensive by any means. The goal is to
establish the right structure for the tests (so that we get the right
inlining and constant folding behavior). Broader semantic tests will be
added later.

Change-Id: Ib028ec05f063b98046f5946272cfbfe986244d3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/94040
Reviewed-by: Stephen Adams <sra@google.com>
2019-03-13 21:36:51 +00:00
Sergey G. Grekhov
8436dca626 [co19] DEPS updated
Change-Id: I487418f0a8a1cad37585d985ac2da6807556b4f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96620
Reviewed-by: Alexander Thomas <athom@google.com>
2019-03-13 12:12:06 +00:00
Daco Harkes
a43c525de2 Reland "[vm/ffi] Support Windows 64 bit"
Enables dart:ffi on Windows 64 bit.

Note that function_stress_test.dart fails in two different ways, these are known bugs. https://github.com/dart-lang/sdk/issues/36138

Relanding: Fixed compilation on Android.

Closes: https://github.com/dart-lang/sdk/issues/35771
Change-Id: I7d0c8b64ca8c1726b7d264d4fd9213299a9f7df6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96781
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2019-03-13 11:47:37 +00:00
Johnni Winther
f307524421 Support native member annotations through ir constants
Change-Id: I247385c951d3a794afe7e4066b3b1d1ea14a76b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96641
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-13 09:08:27 +00:00
Peter von der Ahé
69c1d1096d Update test as combined member signature would fail
Change-Id: Ifc336b706fa1315f206f2214eb233489bd21c763
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96645
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-03-13 06:46:21 +00:00
Zichang Guo
0bd674c374 [VM-Runtime] set environment when creating detached process
environ variable should be updated if user provides environment. It only update for normal processes.
Bug= https://github.com/dart-lang/sdk/issues/36132

Change-Id: I2a4639ed53e7376534578a0b1b251025ffaa2278
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96147
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2019-03-12 21:09:35 +00:00
Vyacheslav Egorov
23eb57c2bf Revert "[vm/ffi] Support Windows 64 bit"
This reverts commit 7f812dea1a.

Reason for revert: Flutter build is broken on Golem.

Original change's description:
> [vm/ffi] Support Windows 64 bit
> 
> Enables dart:ffi on Windows 64 bit.
> 
> Note that function_stress_test.dart fails in two different ways, these are known bugs. https://github.com/dart-lang/sdk/issues/36138
> 
> Closes: https://github.com/dart-lang/sdk/issues/35771
> Change-Id: I73012123f2bd90b737fdc1c87c9a9630c20d5660
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95647
> Commit-Queue: Daco Harkes <dacoharkes@google.com>
> Reviewed-by: Samir Jindel <sjindel@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

TBR=kustermann@google.com,sjindel@google.com,dacoharkes@google.com

Change-Id: I5be4538e3c99632a852e4dfb856248eb437fb3ea
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96683
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2019-03-12 19:55:17 +00:00
Daco Harkes
7f812dea1a [vm/ffi] Support Windows 64 bit
Enables dart:ffi on Windows 64 bit.

Note that function_stress_test.dart fails in two different ways, these are known bugs. https://github.com/dart-lang/sdk/issues/36138

Closes: https://github.com/dart-lang/sdk/issues/35771
Change-Id: I73012123f2bd90b737fdc1c87c9a9630c20d5660
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95647
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-03-12 17:30:26 +00:00
Vyacheslav Egorov
b3927f66df [gardening] Mark tests that crash as crashing
This blocks crash uploading which should resolve redness on Mac
which produces huge core dumps.

Change-Id: Iad3f5e1be246d0de6db0aa3eee47b2f6777f5889
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96658
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Auto-Submit: Vyacheslav Egorov <vegorov@google.com>
2019-03-12 16:31:22 +00:00
Johnni Winther
6a2aa920cd Support pragma annotations through ir constants
Change-Id: I40b2662a00596ca9ebbb5301f99b541806e71515
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96280
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-03-12 09:28:32 +00:00
Mark Zhou
3cf7d6a9c7 [tests] Changing expected cast errors to type errors for collections tests
Change-Id: I0e48dba7b1612994075629c43331794bfb2d2530
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96421
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2019-03-11 21:56:41 +00:00
Johnni Winther
440b4cd84e Insert implicit casts when setting interface targets
This preserves the invariant that method invocations and property sets
with an interface target handle static types at the call site.

This is a prerequisite to improving dart2js with implicit checks.
With this we can mark dynamic invocations a statically safe and
discover when instance methods don't need to check parameter types.

Change-Id: Ife7a3f947952b3c1f73316b922b2aa107343068e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95400
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-11 13:08:34 +00:00
Johnni Winther
231c5c138e Create codegen work item for all members
Ensures that constants of effectively constant instance fields are
registered also with --omit-implicit-checks.

Change-Id: Icc31799f1cc5f565321c832780f30c711e9c8c50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96160
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2019-03-08 23:46:55 +00:00
Johnni Winther
068aa0d2e7 Support eagerly initialized static fields.
Change-Id: I4265fe9bcfccc6a99627e57705868a7ee1da828d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/94749
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-03-08 20:48:35 +00:00
Dmitry Stefantsov
1ce3e8af71 Reland "[cfe] Handle spread map entries of static type Null"
This is a reland of ccd2c85a1a

Original change's description:
> [cfe] Handle spread map entries of static type Null
> 
> Change-Id: I164b3fa471deb65da93ecfd60ee836ec22eb93e1
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96080
> Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
> Reviewed-by: Kevin Millikin <kmillikin@google.com>

Change-Id: I4519970d8259481e137424f3506b7fb97307b14a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96134
Reviewed-by: Régis Crelier <regis@google.com>
2019-03-08 19:05:19 +00:00
Nicholas Shahan
d2d098405f [tests] Fix some control flow collections tests
- Remove tests that expect ForElements in const collections.
- Add missing value (or was it the key) in map.

Change-Id: Ic61cbb4326a105618ae4ea169655411359c52045
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96020
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-03-08 17:27:38 +00:00
Régis Crelier
afccd8cbc7 Revert "[cfe] Handle spread map entries of static type Null"
This reverts commit ccd2c85a1a.

Reason for revert: very red bots, gardener not going to blindly approve all redness

Original change's description:
> [cfe] Handle spread map entries of static type Null
> 
> Change-Id: I164b3fa471deb65da93ecfd60ee836ec22eb93e1
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96080
> Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
> Reviewed-by: Kevin Millikin <kmillikin@google.com>

TBR=dmitryas@google.com,askesc@google.com,kmillikin@google.com

Change-Id: Ia8f60993222851a73291662f75556b2e4111a6f0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96123
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2019-03-08 17:19:35 +00:00
Lasse R.H. Nielsen
2e9ff26527 Fix overflow bug in BigInt implementations.
Fixes #36105

Bug: http://dartbug.com/36105
Change-Id: I9adf70d11474f844d2a4fbf5fcc3754562b1cf65
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95644
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2019-03-08 16:11:08 +00:00
Dmitry Stefantsov
ccd2c85a1a [cfe] Handle spread map entries of static type Null
Change-Id: I164b3fa471deb65da93ecfd60ee836ec22eb93e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96080
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-03-08 15:46:31 +00:00
Dmitry Stefantsov
52ff930338 [cfe] Desugar map spread entries in non-const map literals
Change-Id: Ie8f6cc0294888716f4e0349ba07320e684e26e1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95640
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-03-08 12:08:42 +00:00
Johnni Winther
b8069cbeca Refactor computation of modular data
Add ModularStrategy as a step towards loading modular data from disk.

Change-Id: I9d0baebef8899794742164be4350bedbd3da5b68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95650
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-08 08:36:07 +00:00
Johnni Winther
889d5d9240 Fix type error in node_tracer
From https://dart-review.googlesource.com/c/sdk/+/94749
This is triggered by set literal testing.

Change-Id: I151f9154410790820e1f4d6301b0ccde52a72767
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95441
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-03-08 08:21:47 +00:00
Brian Wilkerson
a47ffd2b50 Fix some errors in the control flow collections tests
Change-Id: I87ba6b3d2860439c33b62c02e8f9294d65d31abc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95900
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2019-03-07 21:54:55 +00:00
Aart Bik
5c7b07f783 [dart/vm] Fix bug in kernel binary flow graph builder
Rationale:
Found by DartFuzz. One of the trickier bugs I had to debug.
While building the flow graph from kernel, the finalizer
builder expects the program context to be in the same state
as when the finalizer was seen first, not the context seen
by the breaking/continuing statement. This was done partially,
but only partially. Finding loop context or breakable
and switchable blocks was missing. Something only
a fuzzer can find :-)

https://github.com/dart-lang/sdk/issues/36076

Change-Id: Ie63912c5fad4d3c15f6559b60cc102b237949957
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95720
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-03-07 20:16:18 +00:00
Samir Jindel
bdb07f4a1f [vm/ffi] Fix garbage collection of ffi.Pointer subtypes.
Fixes https://github.com/dart-lang/sdk/issues/36125.

Change-Id: Ib9069d1e15684c785b86954ed8c14e5fdde35fec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95652
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2019-03-07 15:56:08 +00:00
Daco Harkes
2d3b1055d3 [vm/ffi] remove RuntimeError/Fail expectation from status files
Change-Id: Iaff947c213ac6cff666202fca16b3775bcc10413
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95782
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2019-03-07 13:16:06 +00:00
Daco Harkes
b71f6afd2c [vm/ffi] enable function stress test on macos
Change-Id: I92f676ac6c9733123b7cccf4dc24cb723a2b0594
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95655
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
2019-03-07 08:20:08 +00:00
Ryan Macnak
975cc65c17 [vm, interpreter] Implement interpreter stubs for IA32.
Change-Id: I7bb7e51cb46868abcc10c7dcc7cbf1db1ccdc35c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95264
Reviewed-by: Régis Crelier <regis@google.com>
2019-03-06 21:09:30 +00:00
Daco Harkes
7a98559781 [vm/ffi] make Pointer.toString() uniform on all operating systems
Change-Id: I805c8b3c56a18a253c5005945cab47d5a6aa26cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95648
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
2019-03-06 16:48:09 +00:00
Samir Jindel
a85e481d3d [vm/gardening] Fix status file for entrypoints_verification_test.
Fixes https://github.com/dart-lang/sdk/issues/35957

Change-Id: I215538cfa8dcda733bf29aaa3fa2a73817663bb4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95646
Commit-Queue: Samir Jindel <sjindel@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Samir Jindel <sjindel@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2019-03-06 13:56:36 +00:00
Johnni Winther
ea6e83004b Use @pragma instead of package:meta/dart2js in tests
Change-Id: I16c0ed6f391a417d8faa55e68cde902d91e3db32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95220
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2019-03-06 08:32:05 +00:00
Bob Nystrom
57f16820cd Add tests for "await" inside spread, if, and for.
These don't try to comprehensively cover every interaction of async
and the new syntax, but they should test that an implementation handles
an await appearing in all the various places in the new syntax where an
expression is permitted.

Change-Id: I4852815002fcad6697f3bad4103693b1d4288d06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/94121
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2019-03-06 00:10:04 +00:00
Samir Jindel
ed8357cf83 Re-land "[vm/ffi] Stress tests for FFI functions.""
We will only run the tests on supported configurations. Issues are open
to expand coverage.

This reverts commit 1d3a0d5129.

Change-Id: I28d90f36a97914dc0cb04c39046cb4bdafe1740b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95023
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2019-03-05 14:17:08 +00:00
Johnni Winther
204651f3ab Replace package:expect annotations with @pragma
Change-Id: Ib43d0d71a3ee8b0f0e6d676e6a3e448a107b7ca5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95180
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2019-03-05 11:00:17 +00:00
Aske Simon Christensen
99093c0610 [fasta] Required but not inferred constant context.
Add a new kind of constant context in the body builder for expressions
that must be constant but where constness is not inferred.

This context is used for parameter default values and initializing
expressions for non-final fields in classes containing at least one
const constructor.

Fixes https://github.com/dart-lang/sdk/issues/34191

Change-Id: I200ca88586b19335b185dad0839dfad4eef1f75f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/93520
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2019-03-05 09:23:57 +00:00
Aske Simon Christensen
822ebdd1e0 [fasta] Wrap non-const variable accesses inside const expressions.
Change-Id: I8761031da2419a47a947a02721d4ffd86ac7c531
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/93504
Reviewed-by: Peter von der Ahé <ahe@google.com>
2019-03-05 09:23:57 +00:00
Johnni Winther
013cf68624 Replace js_helper annotations with @pragma
@ForceInline is still used by dart:html, will be removed in a later CL.

Change-Id: I480325fe91cc6baefb17ead49f839442e023d441
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95160
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2019-03-05 08:56:18 +00:00
Jenny Messerly
5a8bdc7f34 [dartdevc] fix #36052, missing key in map should result in null
Change-Id: Ic32fb8689fd2163e162b80ad4682e9b10ba4eaee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/94920
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Auto-Submit: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-03-05 01:15:30 +00:00
Bob Nystrom
b88e6dd910 Fix the type argument on the deep flattening spread test.
Change-Id: Icba0904c88a18901c0a2d423a8ce7ab7af8413fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/94941
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2019-03-04 19:20:53 +00:00
Sergey G. Grekhov
2c087433db [co19] DEPS and status files updated
Change-Id: I75e42be513c65799bcb9332a5c4614c00461ec85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/94283
Reviewed-by: William Hesse <whesse@google.com>
2019-03-04 15:35:31 +00:00
Johnni Winther
95cfa6c583 Support native class and js-interop annotations through ir constants
Change-Id: I8e9deb1392dc98d958f13611a984e422b028265c
Reviewed-on: https://dart-review.googlesource.com/c/95032
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-04 08:40:15 +00:00
Régis Crelier
c2a48ee065 [VM] Fix bigint left shift that could cause heap corruption when intrinsified.
The size of the result digit array was not computed correctly.
When 64-bit intrinsics are used, one extra digit pair must be allocated.

Change-Id: Id3ca3a16ef24b598e44bf25221d400b9be71248a
Reviewed-on: https://dart-review.googlesource.com/c/94683
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2019-03-01 18:59:10 +00:00
Johnni Winther
9201b906ee Convert ir.Constant to ConstantValue
Needed for passing the --enable-experiments=constant-update-2018 option to start working on ir.Constant nodes.

Change-Id: I4f3d8fa6a59ddbda1635fe2da64591bcffcb0f12
Reviewed-on: https://dart-review.googlesource.com/c/95030
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-03-01 18:46:00 +00:00
Dmitry Stefantsov
2c8f70cde3 [cfe] Add type inference for spreads in set literals
Change-Id: I60250ec4ba7dba2381d84328095d38cf47b4ea8b
Reviewed-on: https://dart-review.googlesource.com/c/94548
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-03-01 15:17:13 +00:00
Johnni Winther
ba4cfb8613 Initial computation of initializer complexity through the scope visitor.
Change-Id: I2951624a0ad901c7c518b6e5d2f147dceae870cc
Reviewed-on: https://dart-review.googlesource.com/c/94382
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-03-01 08:37:12 +00:00
Alexander Markov
1d3a0d5129 Revert "[vm/ffi] Stress tests for FFI functions."
This reverts commit b186a270e4.

Revert "[vm] Fix windows build after "[vm/ffi] Stress tests for FFI functions.""

This reverts commit 3dcc0c69a1.

Revert "[vm] Update status file for standalone_2/ffi/function_stress_test"

This reverts commit 9d609426b2.

Revert "[gardening] Skip ffi/negative_function_test on asan bot"

This reverts commit 223f407af5.

Reasons for revert:
1) timeouts on app-kernel-linux-debug-x64 bot when it
tries to deflake new tests.
2) crash dump archiving fails on vm-kernel-asan-linux-release-x64
when trying to archive crash dumps from these tests.

Issue: https://github.com/dart-lang/sdk/issues/36033
Issue: https://github.com/dart-lang/sdk/issues/36034
Change-Id: Ifa338fb96b490e8137a8aa6a4a62f4a6f9e6ea83
Reviewed-on: https://dart-review.googlesource.com/c/94963
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
2019-03-01 01:37:09 +00:00
Alexander Markov
223f407af5 [gardening] Skip ffi/negative_function_test on asan bot
This newly added test causes crash dump archiving to fail on
vm-kernel-asan-linux-release-x64 bot. This causes bot to fail
although the test failure was approved.

The test was added in b186a270e4.

Issue: https://github.com/dart-lang/sdk/issues/36033
Issue: https://github.com/dart-lang/sdk/issues/36034
Change-Id: I9ac201124db239d9c4bcce176c54e66cfdf1b54e
Reviewed-on: https://dart-review.googlesource.com/c/94961
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2019-02-28 23:44:49 +00:00
Brian Wilkerson
48ee388791 Fix a typo in a shared test
Change-Id: I096e459ffeae70f944d03715081c3b9f653b01a6
Reviewed-on: https://dart-review.googlesource.com/c/94843
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2019-02-28 21:25:49 +00:00
Aart Bik
a10b0d8763 [vm/compiler] LICM and CSE improvements
Several improvements
(1) makes implicit control dependence of a null check
    explicit by means of data dependence (already
    done for bounds checks); also see the doc in
    runtime/docs/compiler/data_dep_for_control_dep.md
(2) improves CSE properties of various IL nodes
(3) allows LICM on invariant code that may-throw
    as long as the visible behavior is preserved

https://github.com/dart-lang/sdk/issues/35323
https://github.com/dart-lang/sdk/issues/34684

Change-Id: Icb4520a649da38eddc3d7c85af21427d3c64d22e
Reviewed-on: https://dart-review.googlesource.com/c/93822
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-02-28 19:29:06 +00:00
Samir Jindel
9d609426b2 [vm] Update status file for standalone_2/ffi/function_stress_test
Change-Id: I15eba297fb13a57ea4a9cd70364916ceba20ee3a
Reviewed-on: https://dart-review.googlesource.com/c/94755
Reviewed-by: Samir Jindel <sjindel@google.com>
2019-02-28 17:42:53 +00:00
Samir Jindel
b186a270e4 [vm/ffi] Stress tests for FFI functions.
Change-Id: I75251b92688b70b4d14eda7b1fddef0fe94c60fe
Reviewed-on: https://dart-review.googlesource.com/c/94384
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Samir Jindel <sjindel@google.com>
2019-02-28 16:40:36 +00:00
Johnni Winther
9a4c49f301 Update field analysis tests to prepare for eager initializer improvements
Change-Id: Ie9611ed269a42be4d7c406739cf935d569d8606a
Reviewed-on: https://dart-review.googlesource.com/c/94297
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-02-28 10:32:06 +00:00
Johnni Winther
1720704594 Recognize effectively constant static fields
Change-Id: Ic8f7a014a6af2f9d8854e0731fe0d2df11b554da
Reviewed-on: https://dart-review.googlesource.com/c/94281
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-02-28 09:12:26 +00:00
Kevin Millikin
5f095b7039 [Fasta] Add support for spread in map literals
Spreads are compiled as if they were spread elements in list or set
literals.  When one occurs in a map literal it is translated to a new
spread map entry.

Change-Id: Ic618b1e85e595b4c2cd65e184b9d2c49e9c34b79
Reviewed-on: https://dart-review.googlesource.com/c/94547
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-02-28 06:05:00 +00:00
Sigmund Cherem
36c14db2d3 Only refine non-null in SSA
Code-size difference on a large app is very small (0.007% worse), but
this cuts the time spent in type-propagation by more than half
(23s -> 10s on my machine).

I saw a 0.4% code-size regression in pop-pop-win, but that is
recovered once we are smarter about generating simple is-checks
when the "raw" type can be used because the type arguments
match the bounds (see separate CL).

Change-Id: I45c0fb1afabdca3d045aec576c131ed764dc31ce
Reviewed-on: https://dart-review.googlesource.com/c/94120
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2019-02-27 21:48:00 +00:00
Kevin Millikin
d7a7de31bf Update dartkb test expectations
Change-Id: I8137e49fc7982a65c857c206763ffecacd141cac
Reviewed-on: https://dart-review.googlesource.com/c/94545
Reviewed-by: Jens Johansen <jensj@google.com>
2019-02-27 14:26:02 +00:00
Kevin Millikin
a9ef31ba43 [Fasta] Add Kernel syntax for spread elements
Add spread elements to the Kernel syntax.  They are currently replaced
by an invalid expression during type inference.

Change-Id: Icdb489e2c9993c6517983cfafdefc801ebb378ab
Reviewed-on: https://dart-review.googlesource.com/c/94501
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-02-27 11:48:12 +00:00
Johnni Winther
b79e2a8882 Fix equivalence/show_helper
Change-Id: I95952b42bbaa882cedc4c3ab20182381d8424173
Reviewed-on: https://dart-review.googlesource.com/c/94224
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-02-27 10:48:22 +00:00
Johnni Winther
edcaa05375 Support @pragma('dart2js:noElision') on non-internal methods
Change-Id: Ifae3f76107086f6ad47de2f9eda7b7aec589fc89
Reviewed-on: https://dart-review.googlesource.com/c/94284
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-02-27 09:46:52 +00:00
Aske Simon Christensen
dc8a56bc0e Rename set literal tests to end in _test
Change-Id: Ifc33abb2279554373bdfb9c1c54f468d7fd683c2
Reviewed-on: https://dart-review.googlesource.com/c/94480
Commit-Queue: Alexander Thomas <athom@google.com>
Auto-Submit: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2019-02-27 08:14:12 +00:00
Mayank Patke
3d3f6f9d4b Remove immediateUnderSetLiteral.
Change-Id: I5abb8bb6dafa2a7ee88ce4bf559bae20ac0998fd
Reviewed-on: https://dart-review.googlesource.com/c/92401
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-02-26 18:38:00 +00:00
Aart Bik
fa0ba2220e [vm/compiler] Fix bug in Cid range computation
Rationale:
Make sure open range is closed when skipping
special cids. This bug was probably undetected
for a while, since only kByteBufferCid is adjacent
to kNullCid.

https://github.com/flutter/flutter/issues/28260

Change-Id: Ic22c83aeb26c3130132dc901004a0ad818246dbc
Reviewed-on: https://dart-review.googlesource.com/c/93926
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-02-25 22:31:24 +00:00
Aske Simon Christensen
e7d263b05f [fasta] Transform set literals in annotations.
Change-Id: I23e60cb85e1df728fc3be3b38be43e31a1795d1d
Reviewed-on: https://dart-review.googlesource.com/c/93941
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-02-25 10:30:14 +00:00
Nicholas Shahan
646c1f679a [tests] Minor fixes in control flow collections for tests
Change-Id: I61bbe247b8474a6eeb2d63f9acbd99218f2d04e6
Reviewed-on: https://dart-review.googlesource.com/c/94140
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-02-23 01:37:41 +00:00
Sigmund Cherem
5192cd1008 Narrowing improvements in dart2js global inference.
* no longer narrow by selector use, only narrow by type and non-null
* check for narrow nesting
* add non-null in a couple known places

One large apps, I compared the type-masks in dump-info and all differences were improvements with non-null. We weren't doing any narrowing based on the possible targets of a selector.

Change-Id: I270f360f70fbe3171d09ccd71d10517be9140194
Reviewed-on: https://dart-review.googlesource.com/c/90340
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2019-02-23 00:10:11 +00:00
Mayank Patke
8fface97f0 Reland "Eliminate singleton/static access to the constant system and expose its functionality at the top level."
This is a reland of 027b76ecbf

Original change's description:
> Eliminate singleton/static access to the constant system and expose its
> functionality at the top level.
>
> Use sites have been updated to import the library with a prefix.
>
> Change-Id: I0f5e4e47bec089d2d0dc2fcd50caccfd98947cf5
> Reviewed-on: https://dart-review.googlesource.com/c/93842
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>

Change-Id: Ib04a9d48c8dca51020258313256e0fb0df330d9b
Reviewed-on: https://dart-review.googlesource.com/c/94107
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-02-23 00:06:31 +00:00
Mayank Patke
e40b0e04c9 Reland "Merge the JavaScript constant system into the base constant system and flatten the inheritance hierarchy."
This is a reland of cf51eb2fba

Original change's description:
> Merge the JavaScript constant system into the base constant system and
> flatten the inheritance hierarchy.
>
> dart2js only needs one constant system at most.
>
> Change-Id: I72e446652ea44298677e986b06e63152e381353b
> Reviewed-on: https://dart-review.googlesource.com/c/93880
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>

Change-Id: I83960035a7b0989397f9646f2f834ec468aa4908
Reviewed-on: https://dart-review.googlesource.com/c/94106
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-02-23 00:06:31 +00:00
Mayank Patke
6bdd38ae84 Reland "Move the JavaScript constant system into constants/constant_system.dart in preparation to merge it with the base constant system and flatten the constant system hierarchy."
This is a reland of 1702b986c8

Original change's description:
> Move the JavaScript constant system into constants/constant_system.dart
> in preparation to merge it with the base constant system and flatten the
> constant system hierarchy.
>
> Change-Id: I6ef27b210515140d4516336fea015f74c8a0cd6a
> Reviewed-on: https://dart-review.googlesource.com/c/93840
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>

Change-Id: I20ef9755886a6b54135aa7169c9d7de08e8cbe93
Reviewed-on: https://dart-review.googlesource.com/c/94105
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-02-23 00:06:31 +00:00
Mayank Patke
960b08a969 Reland "Remove the Dart constant system and move all required classes into the JavaScript constant system."
This is a reland of 5af8de8954

Original change's description:
> Remove the Dart constant system and move all required classes into the
> JavaScript constant system.
>
> Change-Id: I2a31ea743270459284c42b615b0dffd1c7aa2584
> Reviewed-on: https://dart-review.googlesource.com/c/93746
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>

Change-Id: I8c8399e94dd80c1f543a54454efc9cf59ef6ac7b
Reviewed-on: https://dart-review.googlesource.com/c/94104
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-02-23 00:06:31 +00:00
Mayank Patke
e1992e0178 Revert "Remove the Dart constant system and move all required classes into the"
This reverts commit 5af8de8954.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Remove the Dart constant system and move all required classes into the
> JavaScript constant system.
> 
> Change-Id: I2a31ea743270459284c42b615b0dffd1c7aa2584
> Reviewed-on: https://dart-review.googlesource.com/c/93746
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>

TBR=johnniwinther@google.com,sigmund@google.com,fishythefish@google.com

Change-Id: Ic28807774502d11a53572095616510a642cf75b3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/94081
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2019-02-22 21:54:57 +00:00
Mayank Patke
05d9c60a22 Revert "Move the JavaScript constant system into constants/constant_system.dart"
This reverts commit 1702b986c8.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Move the JavaScript constant system into constants/constant_system.dart
> in preparation to merge it with the base constant system and flatten the
> constant system hierarchy.
> 
> Change-Id: I6ef27b210515140d4516336fea015f74c8a0cd6a
> Reviewed-on: https://dart-review.googlesource.com/c/93840
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>

TBR=johnniwinther@google.com,sigmund@google.com,fishythefish@google.com

Change-Id: If1b6291508c9792a6135a2ad5333b4bb3b800f69
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/94103
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2019-02-22 21:50:57 +00:00
Mayank Patke
388f8e7731 Revert "Merge the JavaScript constant system into the base constant system and"
This reverts commit cf51eb2fba.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Merge the JavaScript constant system into the base constant system and
> flatten the inheritance hierarchy.
> 
> dart2js only needs one constant system at most.
> 
> Change-Id: I72e446652ea44298677e986b06e63152e381353b
> Reviewed-on: https://dart-review.googlesource.com/c/93880
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>

TBR=johnniwinther@google.com,sigmund@google.com,fishythefish@google.com

Change-Id: I2d403834ac3ac41371e041d21eec3d83d152343a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/94102
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2019-02-22 21:46:52 +00:00
Mayank Patke
2c3dfa9e71 Revert "Eliminate singleton/static access to the constant system and expose its"
This reverts commit 027b76ecbf.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Eliminate singleton/static access to the constant system and expose its
> functionality at the top level.
> 
> Use sites have been updated to import the library with a prefix.
> 
> Change-Id: I0f5e4e47bec089d2d0dc2fcd50caccfd98947cf5
> Reviewed-on: https://dart-review.googlesource.com/c/93842
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>

TBR=johnniwinther@google.com,sigmund@google.com,fishythefish@google.com

Change-Id: I65310b2579c6746620ed6129e670206ed9bf5e91
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/94101
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2019-02-22 21:42:52 +00:00
Mayank Patke
027b76ecbf Eliminate singleton/static access to the constant system and expose its
functionality at the top level.

Use sites have been updated to import the library with a prefix.

Change-Id: I0f5e4e47bec089d2d0dc2fcd50caccfd98947cf5
Reviewed-on: https://dart-review.googlesource.com/c/93842
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-02-22 21:34:47 +00:00
Mayank Patke
cf51eb2fba Merge the JavaScript constant system into the base constant system and
flatten the inheritance hierarchy.

dart2js only needs one constant system at most.

Change-Id: I72e446652ea44298677e986b06e63152e381353b
Reviewed-on: https://dart-review.googlesource.com/c/93880
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-02-22 21:34:47 +00:00
Mayank Patke
1702b986c8 Move the JavaScript constant system into constants/constant_system.dart
in preparation to merge it with the base constant system and flatten the
constant system hierarchy.

Change-Id: I6ef27b210515140d4516336fea015f74c8a0cd6a
Reviewed-on: https://dart-review.googlesource.com/c/93840
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-02-22 21:34:47 +00:00
Mayank Patke
5af8de8954 Remove the Dart constant system and move all required classes into the
JavaScript constant system.

Change-Id: I2a31ea743270459284c42b615b0dffd1c7aa2584
Reviewed-on: https://dart-review.googlesource.com/c/93746
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-02-22 21:34:47 +00:00
Dan Rubel
58cea93953 Update BodyBuilder to use handleLiteralSetOrMap
This is the second of several CLs updating the parser and its listeners
to conform to the unified collection spec:
https://github.com/dart-lang/language/pull/200

Change-Id: I5c277d05a3726a3f5a40823cf878f025167340e6
Reviewed-on: https://dart-review.googlesource.com/c/93741
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-02-22 17:31:24 +00:00
Johnni Winther
8e2fcf7782 Advanced tracking of field initialization
Change-Id: I8c8edb517bc3a3805ac0d72388f4e5c7fc34247f
Reviewed-on: https://dart-review.googlesource.com/c/93680
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-02-22 16:08:16 +00:00
Johnni Winther
60e4f194b0 Recognize and inline effectively constant fields
Change-Id: I243ee80ebc45d9cdab2f7c944cf5eceb26185b2c
Reviewed-on: https://dart-review.googlesource.com/c/93436
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2019-02-22 14:06:05 +00:00
Stephen Adams
b60a55510b [dart2js] Disable assignment chaining optimization
Disable while we look into variable allocator assertion.

Change-Id: Ib1e7c2eb869020ae8ecfa123801009adb6a742c7
Reviewed-on: https://dart-review.googlesource.com/c/93925
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-02-22 00:10:23 +00:00
Ryan Macnak
d253642f25 [standalone] Fix isolate messages for processes that a creating an AppJIT snapshot.
The standalone embedder was sorting classes in the main isolate, but not child isolates, causing the CIDs to diverge.

Also fix a few isolate tests.

Bug: https://github.com/dart-lang/sdk/issues/33128
Bug: https://github.com/dart-lang/sdk/issues/36000
Change-Id: Ic21acb02eb623ae177ed242aa21b0e243775e369
Reviewed-on: https://dart-review.googlesource.com/c/93923
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-02-21 22:39:39 +00:00
Jenny Messerly
627e96c9c1 [dartdevc] simplify microtask scheduling using JS Promise
All of DDC's supported platforms have Promises, so we can use them
instead of MutationObservers (web) and timers (node.js).

See issue #20055 (same issue, but for dart2js).

Change-Id: Id635a4a9fa104a2ab19dd20824d209f682f831f9
Reviewed-on: https://dart-review.googlesource.com/c/91765
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2019-02-21 20:13:19 +00:00
Liam Appelbe
ee32f8c87e [VM] Rehash sets after they are read from a snapshot.
Fixes: https://github.com/dart-lang/sdk/issues/35626
Bug: https://github.com/dart-lang/sdk/issues/35626
Change-Id: I4d5b3799072faf8abb16e9eac15b834dbecce07b
Reviewed-on: https://dart-review.googlesource.com/c/93843
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-02-21 19:39:09 +00:00
Sigmund Cherem
e3b8065625 Add support for --dump-info=binary
We continue to accept `--dump-info`, but now also accept `--dump-info=binary` so
we can use the new cheaper encoding.

Change-Id: I971cb9a3634ae1a333cfee14b2927c0e25000a01
Reviewed-on: https://dart-review.googlesource.com/c/93823
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2019-02-21 17:54:39 +00:00
Ryan Macnak
3068192450 [vm] Remove deferred canonicalization from isolate message serialization.
This fixes sending more commonly used types at the expense of less common recursive types.

Bug: https://github.com/dart-lang/sdk/issues/35778
Change-Id: I55f1105d1a8a48b6c4c241c2ce4d2f36863d7b5a
Reviewed-on: https://dart-review.googlesource.com/c/93372
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-02-20 20:11:05 +00:00
Stephen Adams
0e453c637b [dart2js] Chain static assignments
Extend the logic for chaining field assignments to static variables.

Change-Id: Ia87d8ff3400d6f04257a546c7a1bb74775a3019e
Reviewed-on: https://dart-review.googlesource.com/c/93620
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-02-20 20:07:55 +00:00
Johnni Winther
7edb7dddd8 Merge allocator analysis with collection of elided fields
- and rename to field analysis.

This prepares for recognizing effectively constant fields.

Change-Id: I1caa2e1a4f6d90fcd2562ec17d3093bff3a9b0d8
Reviewed-on: https://dart-review.googlesource.com/c/93427
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2019-02-20 16:03:24 +00:00
Aske Simon Christensen
6f8415245d [fasta] Transform set literals in initializers and default values.
The set literal desugaring was missing set literals in constructor
initializers and parameter default values. Furthermore, it assumed
that a constructor that contained a set literal had a body.

Fixes https://github.com/dart-lang/sdk/issues/35989

Change-Id: I42c77b96bbe751ee6f7c7ba7921e9b9df24c16e9
Reviewed-on: https://dart-review.googlesource.com/c/93660
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2019-02-20 15:38:54 +00:00
Johnni Winther
596e0aa645 Include FieldInitializer in allocator analysis
Change-Id: Id3ce8113816193408f704045c130e65fe65e6244
Reviewed-on: https://dart-review.googlesource.com/c/93424
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2019-02-20 10:53:01 +00:00
Samir Jindel
c635896e1b [vm] Fix langauge_2_kernel.status after 93301
Change-Id: I79f57caea89356e7505a07ebd911c8732fccd816
Reviewed-on: https://dart-review.googlesource.com/c/93542
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
Auto-Submit: Samir Jindel <sjindel@google.com>
2019-02-20 10:24:10 +00:00
Bob Nystrom
6cf71022a8 Add a test for type promotion in "if" collection elements.
Change-Id: Ibdb5002fc7646b80978ea447fedd97606476630d
Reviewed-on: https://dart-review.googlesource.com/c/93301
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2019-02-20 02:03:01 +00:00
Daco Harkes
a85ae4e919 [vm/ffi] fix sizeOf on subtypes of Pointer
Change-Id: I9f1f0c6fc618039e0c50d0a70460e1d66d568bca
Reviewed-on: https://dart-review.googlesource.com/c/93502
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2019-02-19 12:57:04 +00:00
Stephen Adams
db71576ef3 [dart2js] Generator bodies can be on super mixin applications
Bug: 35965
Change-Id: Ib611ba596d5778b6da2131e4712bfa669cf5e2b3
Reviewed-on: https://dart-review.googlesource.com/c/93465
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-02-18 16:57:23 +00:00
Johnni Winther
8e5f644d0a Use constant evaluation in allocator analysis
Change-Id: I93543c7f295d4b325a34ced632c2d0a7555391e6
Reviewed-on: https://dart-review.googlesource.com/c/92421
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2019-02-18 13:18:31 +00:00
Johnni Winther
bfa6041801 Add allocator analysis test for the J model
Change-Id: I42fc8bfa4ea35c9025f6f48faa73a7cc16aab3b8
Reviewed-on: https://dart-review.googlesource.com/c/92287
Reviewed-by: Stephen Adams <sra@google.com>
2019-02-18 13:18:31 +00:00
Daco Harkes
620743fb6b [vm/ffi] void functions
Change-Id: I1544e0985d934dfa354143764dee61feb08b2592
Reviewed-on: https://dart-review.googlesource.com/c/93422
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2019-02-18 13:15:21 +00:00
Johnni Winther
885f1cbe31 Fix constant folding of type literal equality
Closes #35853

Change-Id: I1c6caa1c8e074e8fd80c47699d6b0837bec166e0
Reviewed-on: https://dart-review.googlesource.com/c/92422
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-02-18 10:34:20 +00:00
Jenny Messerly
15e7457519 [dartdevc] change browser tests to wait longer for async completion
Also fixes 2 html tests whose failure was caught by this change.

Change-Id: I707cba922bc7e7728ba0b026ad056b547fcd1432
Reviewed-on: https://dart-review.googlesource.com/c/92392
Auto-Submit: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2019-02-16 01:15:01 +00:00
Stephen Adams
1ac61b0c35 [dart2js] Basic chaining of field assignments
t4 = t3.tooltip;
      t2._tooltipText = t4;
      this.currenttooltip = t4;
--->
      this.currenttooltip = t2._tooltipText = t3.tooltip;


        future = new P._Future(0, $.Zone__current, [P.bool]);
        this._stateData = future;
        return future;
--->
        return this._stateData = new P._Future(0, $.Zone__current, [P.bool]);

Change-Id: I8a1c4dae85b8a10f8b2c099668033f0c1ea9b6c4
Reviewed-on: https://dart-review.googlesource.com/c/93342
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-02-15 22:45:46 +00:00
Mayank Patke
99a5057bca Add set tracing.
Change-Id: I889c5ac8d6207c9a25721d939b0f01b4e945a940
Reviewed-on: https://dart-review.googlesource.com/c/92149
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-02-15 20:44:46 +00:00
Mayank Patke
e53cd30112 Add SetTypeMask.
Change-Id: I9f202506c364cc1387efa8cea4cca6038f350470
Reviewed-on: https://dart-review.googlesource.com/c/92146
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-02-15 20:44:46 +00:00
Daco Harkes
185c0f3e89 [gardening] status file entry for entrypoints_verification_test
Issue: https://github.com/dart-lang/sdk/issues/35957
Change-Id: Ic2cfbe25718f1511bb1ae33b785ea9bdff910274
Reviewed-on: https://dart-review.googlesource.com/c/93405
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2019-02-15 09:16:50 +00:00
Ryan Macnak
0e62060be4 [test] Mark standalone_2/io/arguments_test as failing due to a bug in the test harness.
Change-Id: Id1e445f61b4421d1a43e31bcb4e2a455129c5e40
Reviewed-on: https://dart-review.googlesource.com/c/93380
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-02-15 01:36:51 +00:00
Samir Jindel
3b2144fa93 [vm] Respect entry-point annotation on constructors during obfuscation.
Change-Id: Ia61d582fb6dd647b8fcab051b57ff08682076d9d
Cq-Include-Trybots: luci.dart.try:vm-kernel-optcounter-threshold-linux-release-x64-try, vm-kernel-precomp-linux-debug-x64-try, vm-kernel-precomp-linux-release-simarm-try, vm-kernel-precomp-linux-release-simarm64-try, vm-kernel-precomp-linux-release-x64-try, vm-kernel-precomp-mac-release-simarm64-try, vm-kernel-precomp-win-release-x64-try, vm-kernel-precomp-obfuscate-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/93225
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-02-14 20:18:19 +00:00
Liam Appelbe
223eaa6fbb Report noSuchMethod forwarders as synthetic in the mirror api
Fixes http://dartbug.com/34982

Bug: http://dartbug.com/34982
Change-Id: I0302586c5f0e58dd66e238bd32088ebe1c150c0e
Reviewed-on: https://dart-review.googlesource.com/c/93124
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-02-14 18:42:19 +00:00
Samir Jindel
ae7bf9e999 [vm] Support closurization of methods through @pragma entry-points.
Fixes dartbug.com/35720.

Also enable native extensions in AOT.
Increases Flutter Gallery snapshot size by 0.19%.

Change-Id: I1b24c3b9a49a13fd48452e9a89595516a7f01780
Cq-Include-Trybots: luci.dart.try:vm-kernel-optcounter-threshold-linux-release-x64-try, vm-kernel-precomp-linux-debug-x64-try, vm-kernel-precomp-linux-release-simarm-try, vm-kernel-precomp-linux-release-simarm64-try, vm-kernel-precomp-linux-release-x64-try, vm-kernel-precomp-mac-release-simarm64-try, vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/92283
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-02-14 17:47:28 +00:00
Samir Jindel
a5d396cd25 [vm/extensions] Fix native extensions in hot-reload and running from snapshot.
This is a re-land of "[vm/extensions] Fix Loader::ReloadNativeExtensions(...)."

The native extension test was failing in hot-reload: this has been fixed.

Change-Id: Ic18da8cfbc6a3dba8aac09d654dce616487a67d7
Reviewed-on: https://dart-review.googlesource.com/c/92800
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Auto-Submit: Samir Jindel <sjindel@google.com>
2019-02-14 17:47:28 +00:00
Martin Kustermann
4daabe69c3 [vm/gardening] Mark convert/base64_test/01 as flaky
Issue https://github.com/dart-lang/sdk/issues/35948

Change-Id: Ib0358706e96ceda5d49d7a3496354eb903d8a40d
Reviewed-on: https://dart-review.googlesource.com/c/93223
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Auto-Submit: Martin Kustermann <kustermann@google.com>
2019-02-14 16:42:48 +00:00
Daco Harkes
3abc7d34d7 [vm/ffi] Remove platform specific logic from DynamicLibrary.open
Change-Id: Id69e17563c4d64f6ead5e143077a7364520f65a0
Reviewed-on: https://dart-review.googlesource.com/c/93173
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2019-02-14 16:08:28 +00:00
Sergey G. Grekhov
70e300fea0 [co19] DEPS updated
Change-Id: I487933deef8968e2c82904a895ea948831fcd9ff
Reviewed-on: https://dart-review.googlesource.com/c/92700
Reviewed-by: Alexander Thomas <athom@google.com>
2019-02-14 09:02:50 +00:00
Nicholas Shahan
80798fad97 [tests] Add missing parenthesis on <list|map|set>Equals() calls
Change-Id: I2d4fc114ad01ba075c644285d7e87b89570f626b
Reviewed-on: https://dart-review.googlesource.com/c/92661
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-02-13 23:51:37 +00:00
Daco Harkes
4510fa08ca [vm / library] reduce dart:ffi test recursion depth
Change-Id: Iaa5ff60388398fcf5cf89b5e91e931f76f8f6572
Reviewed-on: https://dart-review.googlesource.com/c/93085
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2019-02-13 16:59:56 +00:00
Daco Harkes
76f531e742 [vm / library] dart:ffi status file entry for flaky dartkb crash
Issue: https://github.com/dart-lang/sdk/issues/35935
Change-Id: I938bb508f5d320fc21500c6478a2f32bb4e6a673
Reviewed-on: https://dart-review.googlesource.com/c/93084
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2019-02-13 16:35:36 +00:00
Daco Harkes
0651c8c4fd [vm / library] dart:ffi status file entry for reload crash
issue: https://github.com/dart-lang/sdk/issues/35933
Change-Id: I8d0d5f50ce65747aa8cfe7b36888d87173ea7b4b
Reviewed-on: https://dart-review.googlesource.com/c/93028
Reviewed-by: Samir Jindel <sjindel@google.com>
2019-02-13 13:59:57 +00:00
Daco Harkes
4fa1e3a3ca [vm / library] dart:ffi status file entry for appjitk crashes
Issue: https://github.com/dart-lang/sdk/issues/35934
Change-Id: I64475d76b1ad8687f1b48278b9e0e4adca2e4f7c
Reviewed-on: https://dart-review.googlesource.com/c/93030
Reviewed-by: Samir Jindel <sjindel@google.com>
2019-02-13 13:58:11 +00:00
Daco Harkes
7d46d4b5cb [vm / library] Foreign function interface prototype
Prototype for `dart:ffi` on Linux/MacOS x64 in JIT mode.
`dart:ffi` is experimental and its API is likely to change in the future.
Progress and design decisions are tracked in https://github.com/dart-lang/sdk/projects/13


issue: https://github.com/dart-lang/sdk/issues/34452
Change-Id: Ifa4566388e42c8757f154741d11e303465ef305d
Cq-Include-Trybots: luci.dart.try:vm-kernel-optcounter-threshold-linux-release-x64-try, vm-kernel-precomp-linux-debug-x64-try, vm-kernel-precomp-linux-release-simarm-try, vm-kernel-precomp-linux-release-simarm64-try, vm-kernel-precomp-linux-release-x64-try, vm-kernel-precomp-mac-release-simarm64-try, vm-kernel-precomp-win-release-x64-try, vm-kernel-mac-debug-x64-try, vm-kernel-asan-linux-release-x64
Reviewed-on: https://dart-review.googlesource.com/c/80124
Reviewed-by: Samir Jindel <sjindel@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
2019-02-13 12:42:47 +00:00
Lasse R.H. Nielsen
671865cd1a Fix JSON parser.
JSON parser was not rewritten when integers became fixed-size, so
some large integers could overflow silently and give the wrong
result, as could some doubles where the pre-decimal point digits
overflowed an `int`. Also added overflow protection for exponent.

Change-Id: I02941272c36fba4b9226e324936aebd4a5c5aa3b
Reviewed-on: https://dart-review.googlesource.com/c/91521
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2019-02-13 11:06:35 +00:00
Peter von der Ahé
857d834e64 Remove obsolete expectMoreSpecific parameter
Change-Id: I6d5ff79ba0eec022812da14201fb30ae2625d355
Reviewed-on: https://dart-review.googlesource.com/c/92126
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-02-13 10:51:55 +00:00
Konstantin Shcheglov
f841096701 Fix for crash if MixinDeclaration has a const constructor.
R=brianwilkerson@google.com

Bug: https://buganizer.corp.google.com/issues/124304191
Change-Id: I78f07338c3ac4c254986fb2b19a00bb5fd4201b7
Reviewed-on: https://dart-review.googlesource.com/c/92860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-12 22:16:12 +00:00
Sigmund Cherem
6588eaf794 Fix calls to generator-bodies to correctly model elided parameters
Bug: https://github.com/dart-lang/sdk/issues/35924
Change-Id: If4e2597c1e92f12675f537a1cfba4cb14f9551d8
Reviewed-on: https://dart-review.googlesource.com/c/92862
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2019-02-12 21:58:31 +00:00
Sigmund Cherem
c507acfae4 Fix Js-interop factory calls which broke when eliding optional parameters.
The issue derives from the fact that `parameterStructure` has only the preserved parameters,
however the SSA was emitting values for all arguments.

I fixed this by emitting all parameters. I also noticed that the parameter order should
probably be the native-ordering here as well (it doesn't matter for the factory, but it may
matter for other static native calls, if any)

Bug: https://github.com/dart-lang/sdk/issues/35916
Change-Id: I2e93c7f8e3baf5c9285107d23786bb3bf4f3a511
Reviewed-on: https://dart-review.googlesource.com/c/92626
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2019-02-12 18:53:43 +00:00
Nicholas Shahan
d93ef933d5 [tests] Add 'spread-collections' flag
Some of the new control flow collections tests are using the spread operator.

Change-Id: Id050025342692a5e3d88471840c4f0ca5cdab5da
Reviewed-on: https://dart-review.googlesource.com/c/92480
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-02-11 19:52:19 +00:00
Aart Bik
32603d5626 [vm/compiler] improve equality constant folding
Rationale:
Static calls were formerly unexplored in our constant
folding. This is a first step towards making the
constant folder aware of semantics of recognized methods.

https://github.com/dart-lang/sdk/issues/35882

Change-Id: Id6e366f4d25f08a618931fc3c8a8c065f6358feb
Reviewed-on: https://dart-review.googlesource.com/c/92410
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-02-09 01:09:39 +00:00
Kevin Millikin
be79eb4517 Ship experiment 'set-literals'
Change-Id: Ief182017752b87ef099ac5140ff781cbb14d76a9
Reviewed-on: https://dart-review.googlesource.com/c/92125
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2019-02-08 16:17:55 +00:00
William Hesse
65ac1d08d9 Dartdevc co19 tests - skip co19_2 tests that time out
Change-Id: Ibb27bda2462c673f2e3442fcb80c41ee5e62154a
Reviewed-on: https://dart-review.googlesource.com/c/92425
Reviewed-by: William Hesse <whesse@google.com>
2019-02-08 13:33:41 +00:00
Johnni Winther
60527d7b97 Support computation of ResolutionImpact through ImpactData based on kernel
This is a pre-step to modularizing the world impact computation.

Change-Id: I4f59f9767e7399fdcf9a070074864e6873b61a52
Reviewed-on: https://dart-review.googlesource.com/c/92044
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-02-08 12:02:33 +00:00
Johnni Winther
30d760e0c9 Add unittest of allocator analysis for the K model
This is a prestep towards tracking initialization through field
initializers with the aim at discovering effectively constant instance
fields.

Change-Id: Iefc36382589e4fbe03e1bc4314230f62fb925b9a
Reviewed-on: https://dart-review.googlesource.com/c/92265
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2019-02-08 10:09:49 +00:00
Johnni Winther
45f55183c5 Refactor processing of pragma annotations
Change-Id: I3d4efdab560557d5d9bbab748d003cd360efbe3d
Reviewed-on: https://dart-review.googlesource.com/c/92264
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-02-08 09:55:28 +00:00
Jenny Messerly
246430bc8c [dartdevc] wait for async callbacks to complete in tests
This change ensures that DDC tests won't accidentally "pass", and then
silently fail or timeout later, when the async tests actually run.

Change-Id: Id18d3343e5dadcf266f39568a93381daf4c54e1c
Reviewed-on: https://dart-review.googlesource.com/c/92247
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2019-02-08 01:30:58 +00:00
Aart Bik
9c0a73f943 [dart/vm] Skip finalization error for now
https://github.com/dart-lang/sdk/issues/35885

Change-Id: I79a1c77459b1cf1cdae563cd6e29697e641a57ff
Reviewed-on: https://dart-review.googlesource.com/c/92385
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-02-07 23:38:08 +00:00
Aart Bik
5a7ecfbabe [dart/vm] Skip finalization error for now
https://github.com/dart-lang/sdk/issues/35885

Change-Id: I4d46badddd211b859a7724c4030f83996a5877c9
Reviewed-on: https://dart-review.googlesource.com/c/92402
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-02-07 22:21:08 +00:00
Martin Kustermann
20f12ad874 [gardening] Re-add two status file lines after landing d05000af4d
Change-Id: I38d6b618365353762b7dce3dbf588b0cbb1611f7
Reviewed-on: https://dart-review.googlesource.com/c/92291
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
Auto-Submit: Martin Kustermann <kustermann@google.com>
2019-02-07 18:07:54 +00:00
Martin Kustermann
d05000af4d [gardening] Remove flaky markers and close issues for tests not appearing in flakiness dashboard
Closes https://github.com/dart-lang/sdk/issues/28374
Closes https://github.com/dart-lang/sdk/issues/28502
Closes https://github.com/dart-lang/sdk/issues/29012
Closes https://github.com/dart-lang/sdk/issues/29111
Closes https://github.com/dart-lang/sdk/issues/29136
Closes https://github.com/dart-lang/sdk/issues/29324
Closes https://github.com/dart-lang/sdk/issues/29465
Closes https://github.com/dart-lang/sdk/issues/29524
Closes https://github.com/dart-lang/sdk/issues/33716
Closes https://github.com/dart-lang/sdk/issues/35012
Closes https://github.com/dart-lang/sdk/issues/35092

Change-Id: Ifa7a34646efadd92a86b4ae62c828e6adcec2c3a
Reviewed-on: https://dart-review.googlesource.com/c/92288
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-02-07 16:46:14 +00:00
Johnni Winther
33bc628235 Treeshake unread fields
Change-Id: I188df5fd18163e5b32213a364d0fc163300db7b9
Reviewed-on: https://dart-review.googlesource.com/c/92130
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-02-07 09:58:19 +00:00
Johnni Winther
c591454dd3 Inline unprovided optional parameters
Change-Id: I61c82216965062feee8e01ba2533d0ea7c0052ef
Reviewed-on: https://dart-review.googlesource.com/c/90700
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-02-07 08:44:49 +00:00
William Hesse
392a869ee4 [infra] Skip all co19_2 tests that are timing out on dartdevc.
The deflaking phase of testing is breaking when trying to handle
too many timing-out tests at once, stopping the builder runs.
Skipping them until we can debug the problem.

Change-Id: Id3243d8123465ca119262028dfe04d18d41b48c6
Reviewed-on: https://dart-review.googlesource.com/c/92139
Reviewed-by: Vijay Menon <vsm@google.com>
2019-02-06 17:25:25 +00:00
Kevin Millikin
8f821d408e Fix status files for dartkp
These expectations were for a stale version of the precompiled
runtime.

Change-Id: Ie4bafb50b89e76df4e782d240674968f078a6c6c
Reviewed-on: https://dart-review.googlesource.com/c/92135
Reviewed-by: Samir Jindel <sjindel@google.com>
2019-02-06 13:38:21 +00:00
Kevin Millikin
6b73a02937 Fix status files for simarm and simarm64
Change-Id: I965b0eef9566a5c35e3b94dbe2a5cd1f86eaa250
Reviewed-on: https://dart-review.googlesource.com/c/92133
Reviewed-by: Samir Jindel <sjindel@google.com>
2019-02-06 13:16:00 +00:00
Kevin Millikin
c2778062e7 Add UI as code status file entries for simarm
Change-Id: I54076c4f0350e325729e780bbf0a191e46ca36cd
Reviewed-on: https://dart-review.googlesource.com/c/92127
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Auto-Submit: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-02-06 12:02:18 +00:00
Kevin Millikin
2b8560f4b2 [Fasta] Add spread and control-flow collection flags
Also stop skipping the corresponding tests.  Add status file entries
for Fasta and VM configurations.

Change-Id: Iecc1e048915df598ba69ac79261cfc836d38f95a
Reviewed-on: https://dart-review.googlesource.com/c/92045
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Auto-Submit: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-02-06 10:30:18 +00:00
Kevin Millikin
0828d2c786 [Fasta] Implement exact types for Set literals
Set literals have an exact type of Set<T> for some T.  An implicit
downcast to a subtype is a static error.

Change-Id: I922b078b1b9e595243520e73c7130c23fe91f454
Reviewed-on: https://dart-review.googlesource.com/c/91640
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-02-05 07:43:52 +00:00
Alexander Markov
b59d5a2be9 [vm] Relax assertion about duplicated direct implementors
When mixin application is transformed, mixin is added to the end of
interfaces list. This may cause assertion failure if the same class
is used as mixin and mentioned among implemented interfaces.
This CL relaxes that assertion for mixins as this duplication is very
rare and seems harmless.

Note that it would not be valid to remove duplicated interface/mixin
from the list of interfaces, as it would break dart:mirrors in this case:
dart:mirrors needs to reflect duplicated interface/mixin both in
ClassMirror.superinterfaces (which is populated from the
list of interfaces without last element) and ClassMirror.mixin (the last
element in the list of interfaces).

Fixes https://github.com/dart-lang/sdk/issues/35854

Change-Id: I9b986f7759a76cb6f963ebd837e9ea26f6242f8e
Reviewed-on: https://dart-review.googlesource.com/c/91961
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-02-05 00:35:02 +00:00
Alexander Markov
8231cdb7a3 [gardening] Update status for issue 35854
Issue: https://github.com/dart-lang/sdk/issues/35854
Change-Id: Iea1fca6d203741cf7b7962c90c2170e91910a651
Reviewed-on: https://dart-review.googlesource.com/c/91960
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2019-02-04 22:53:42 +00:00
Alexander Markov
569ee07f91 [vm] Cleanup class finalization checks
Change-Id: If262b5fd271ce8fa0aaa49959f808792f66578cd
Reviewed-on: https://dart-review.googlesource.com/c/90580
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-02-04 21:00:49 +00:00
Aske Simon Christensen
8a45b5eb57 Move environment handling into the front-end constant evaluator.
Change-Id: Id01bad9d9dbb7d5f6104a0f633d8303fecfa29db
Reviewed-on: https://dart-review.googlesource.com/c/91227
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-02-04 13:31:30 +00:00
Johnni Winther
e4b809f0e6 Add unit testing of (some) invoke dynamic specializers
Change-Id: I7c3b100da899050a7eb234d53a70d235b3186675
Reviewed-on: https://dart-review.googlesource.com/c/91829
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-02-04 10:24:03 +00:00
Johnni Winther
0fd1679620 Sort named parameters in native methods by declaration.
Change-Id: Ic4a7f9ad6cf0d362b6582a59c783cc05cc404a31
Reviewed-on: https://dart-review.googlesource.com/c/91828
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-02-04 10:02:23 +00:00
Bob Nystrom
c4dcd85b3a Tests for control flow collections.
Change-Id: I41050143611bdb816b5d91a6cd6f668536b613df
Reviewed-on: https://dart-review.googlesource.com/c/91600
Reviewed-by: Leaf Petersen <leafp@google.com>
2019-02-02 00:34:01 +00:00
Johnni Winther
68d110ac2a Add test for codegen of optional parameters on native functions.
Change-Id: Ice329d52be74f98653e5434b148b2b2c8f46c7d6
Reviewed-on: https://dart-review.googlesource.com/c/91661
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-02-01 09:23:55 +00:00
Bob Nystrom
ec343169e7 Skip the spread tests on platforms that aren't using the new test workflow.
These statuses should be more specific, but this should get the bots
green first.

Change-Id: Ifa734f74f866974332b2926398f2a01eb0707ac7
Reviewed-on: https://dart-review.googlesource.com/c/91767
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2019-02-01 00:30:38 +00:00
Bob Nystrom
9f8a9dc9f4 First stab at tests for "Spread Collections".
I'm sure there's mistakes since I can't parse the tests, much less run
them, but I did my best.

Is there anything else you think we should add? I feel like the tests
around inference are weak, but I don't know what else would help.

Change-Id: If4b573acad4395310ad6fc3477861f8d28c16255
Reviewed-on: https://dart-review.googlesource.com/c/89085
Reviewed-by: Leaf Petersen <leafp@google.com>
2019-01-31 22:09:15 +00:00