Commit graph

53777 commits

Author SHA1 Message Date
William Hesse e4f5497d0e Update status for dart2js-with-kernel
Change-Id: I233dbf8d5cbc8c93e3dcd3369f067345e6f04a56
Reviewed-on: https://dart-review.googlesource.com/40282
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-02-09 12:53:19 +00:00
Aske Simon Christensen aa85b09931 Remove broken generic supertype optimization.
The class hierarchy analysis maintains, for each class, a map from raw
supertypes to actual, parameterized supertypes. As an optimization, it
can share these maps between a class and one of its subclasses.

However, the sharing/copying mechanism sometimes ends up with entries
in the map that should not have been there.

This commit removes the optimization and always uses a separate map
for each class.

Closes https://github.com/dart-lang/sdk/issues/31996

Change-Id: I4c641d9c7d15706035791dd2b586a24045afceaa
Reviewed-on: https://dart-review.googlesource.com/39765
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-02-09 09:39:07 +00:00
Paul Berry 6539760609 Fix analyzer bots
Change-Id: I4a0ed3b51854442994ca45235050434249b73299
Reviewed-on: https://dart-review.googlesource.com/40241
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-02-09 09:25:08 +00:00
Jenny Messerly 5ef7920d84 fix DDC explicit field initialization to null
This was unintentionally regressed during a fix to field init order. It
does not typically show up in Dart code because undefined and null are
both handled, but it can break JS interop.

Change-Id: I771895826ee09bb6c5e2f9b016eb7673caf61cd1
Reviewed-on: https://dart-review.googlesource.com/40202
Reviewed-by: Vijay Menon <vsm@google.com>
2018-02-09 02:48:07 +00:00
Mike Fairhurst ab5c97ff1c Fix remaining co19 test that is still expecting compiletime error
Change-Id: I26f038f730f72a2ab1e66671982f581087f9af1f
Reviewed-on: https://dart-review.googlesource.com/40204
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2018-02-09 02:31:42 +00:00
William Hesse bc148d44e2 Correct name of lib_2/async/periodic_timer4_test in status file
TBR=lrn@google.com

Change-Id: Ife80122754aa7e69bd98d6dab289a6a2aa9df7f3
Reviewed-on: https://dart-review.googlesource.com/40222
Reviewed-by: William Hesse <whesse@google.com>
2018-02-09 01:50:04 +00:00
William Hesse baaab3968f Mark new periodic_timer4_test as flaky on chrome and ff with all compilers
It is failing on chrome with dartdevc as well

TBR: lrn@google.com
Bug: https://github.com/dart-lang/sdk/issues/32094
Change-Id: I8c6c4734ef4d125fd0e17cba550f2fbd401a69c0
Reviewed-on: https://dart-review.googlesource.com/40221
Reviewed-by: William Hesse <whesse@google.com>
2018-02-09 01:19:56 +00:00
Erik Corry 3f299c18ca Small cleanup of dart2js status files on Dart2 tests
R=whesse@google.com

Change-Id: I91163f895723ba0c5c79b6e75bd1c5eb4566ac61
Reviewed-on: https://dart-review.googlesource.com/40000
Reviewed-by: William Hesse <whesse@google.com>
2018-02-09 01:02:36 +00:00
Sigmund Cherem 521188f838 Fix deferred loading in the presence of type parameters too
(and get rid of a TODO(redemption) that I should have fixed eons ago...)

Change-Id: I218a7bddcc8256ff84b4ec03b54a858e8f5d8687
Reviewed-on: https://dart-review.googlesource.com/40180
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Emily Fortuna <efortuna@google.com>
2018-02-09 00:25:26 +00:00
Mike Fairhurst ef421661dc Fix status files and ref #32100 for staticwarning/compiletimeerror weirdness
Change-Id: I991ffffa37b21cffc5f14528a303e86b14a393ba
Reviewed-on: https://dart-review.googlesource.com/40106
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-09 00:04:52 +00:00
Erik Corry 362e7c7883 [VM] Consolidate architecture-specific Label classes
R=vegorov@google.com

Change-Id: I3f3342282ac21b06e675b21981168f2a6750b6bd
Reviewed-on: https://dart-review.googlesource.com/39524
Commit-Queue: Erik Corry <erikcorry@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-02-08 23:47:12 +00:00
Mike Fairhurst cc6b4219a5 Remove more methods I somehow missed that I needed to remove
Change-Id: I528b8a74db0c13e7868f79e5584712c317b01f3d
Reviewed-on: https://dart-review.googlesource.com/40105
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2018-02-08 23:06:32 +00:00
Dan Rubel 11ed56d0c1 Update status files
Change-Id: I3402d16544aabc6f0df8c738615ea6e9929f5ece
Reviewed-on: https://dart-review.googlesource.com/40160
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2018-02-08 22:24:02 +00:00
Ben Konyi c9700040c3 Restore console to original state on VM exit. Fixes issue #30318.
Change-Id: I31b5da600ed5091cd788cde42b72e2fb910fe03a
Reviewed-on: https://dart-review.googlesource.com/39843
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-02-08 21:56:57 +00:00
Alexander Markov 1a1c7693d2 [VM/compiler] Fix range analysis for 64-bit fixed-size integers
This CL corrects handling of overflows in range analysis to
account for wrap-around (which happens with new integer semantics).

* If there is an overflow while doing computations in range
  analysis, the resulting range is approximated as full int64 range.

* For symbolic range boundaries 'symbol + offset', offset is checked
  to stay within [kMinInt64 - kSmiMin, kMaxInt64 - kSmiMax] in order
  to guarantee that overflow doesn't occur.

Issue: https://github.com/dart-lang/sdk/issues/31920
Change-Id: I2c16adbe3597e9b718ed2f6ce7210426fcc9e6a6
Reviewed-on: https://dart-review.googlesource.com/39423
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-02-08 21:49:42 +00:00
Alexander Thomas 6f58ab48e9 [infra] Re-enable sharding on vm-kernel/vm-kernel-precomp builders
* Send fewer files to shards by not including co19_2 in the file set.

Change-Id: I317a8fc44cf60e0489e23514cf9bf119afa827ee
Reviewed-on: https://dart-review.googlesource.com/39941
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2018-02-08 21:48:52 +00:00
Konstantin Shcheglov 330ad8d287 Fix for NPE when an argument does not correspond to a constructor parameter.
R=brianwilkerson@google.com

Change-Id: I97ba245398e4375e0e132cc3280db0357859e494
Reviewed-on: https://dart-review.googlesource.com/40104
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-08 21:38:57 +00:00
Alexander Markov 357f457059 [VM/kernel] Clean up garbage in batch mode of gen_kernel
Kernel has a global variable globalDebuggingNames which contains
NameSystem. NameSystem permanently holds certain kernel AST objects
(via various Namers). Calling toString() on a kernel AST object may
permanently add it to a global NameSystem, leaking memory.

It becomes a problem when gen_kernel is used in batch mode by
test tool. In such case, resident gen_kernel process is reused
to perform multiple compilations, and globalDebuggingNames
accumulates garbage kernel AST objects from finished compilations.

In this CL, globalDebuggingNames is reset after each compilation
in batch mode of gen_kernel.

Change-Id: Ie05635750fb149bb0e32415f03802e0c66f06a27
Reviewed-on: https://dart-review.googlesource.com/39883
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-02-08 21:38:03 +00:00
Alexander Markov 307177ff9c [Gardening] Update status after changing test
This is a follow-up for
236aef873a

Change-Id: Ie480a96b51deb7aaa91318990199d70edf13adf0
Reviewed-on: https://dart-review.googlesource.com/40100
Reviewed-by: Zach Anderson <zra@google.com>
2018-02-08 21:03:18 +00:00
Siva Chandra 6ff0951bdf Remove the use of redundant flags --dfe and --kernel-binaries.
This change helps in confining flag manipulation to just the embedder.
When we are ready to turn all dart 2 flags to true by default, the
change can be confined to just the VM.

Change-Id: I4ac550c331b1f236a2bd9d0453b7c567eb0c05d3
Reviewed-on: https://dart-review.googlesource.com/38881
Commit-Queue: Siva Chandra <sivachandra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-02-08 20:56:22 +00:00
Alexander Markov 1bebd7aa1d [VM] Support inlining of _TypedList._setInt64 on x64
Issue: https://github.com/dart-lang/sdk/issues/32080
Change-Id: I692d1873acc4c9816ccc6929f51e0ed699f585da
Reviewed-on: https://dart-review.googlesource.com/40103
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-02-08 20:47:41 +00:00
Mike Fairhurst 56d59dd967 Reland https://dart-review.googlesource.com/c/sdk/+/37441 with fixes
Change-Id: If8e2ec2ca1ac4f533dcb56b0c95d55e4a13e0598
Reviewed-on: https://dart-review.googlesource.com/39881
Reviewed-by: Paul Berry <paulberry@google.com>
2018-02-08 20:46:19 +00:00
Konstantin Shcheglov ffd67154f7 Add a new optional field - 'id' to SourceChange.
R=brianwilkerson@google.com

Change-Id: Ibe85415be35982327593ffd1187ec74b1d037463
Reviewed-on: https://dart-review.googlesource.com/40102
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-02-08 20:13:11 +00:00
William Hesse 7c059b2ac8 Update precompiler status for optimized_stacktrace_line test.
This is a follow-up to changelist
https://dart-review.googlesource.com/c/sdk/+/39985
reversing a too-general deletion

Change-Id: I0ab4ec9b63a6e308b33a5ca455678dc8a3df777d
Reviewed-on: https://dart-review.googlesource.com/40061
Reviewed-by: William Hesse <whesse@google.com>
2018-02-08 19:11:04 +00:00
Dan Rubel d4f2f9cef2 Update fasta parser to report constructor initializer errors
This CL updates the fasta parser to report three additional
errors in constructor initializers:

* ExpectedAnInitializer
* MissingAssignmentInInitializer
* RedirectingConstructorWithBody

I also added a comment from a discussion about
https://dart-review.googlesource.com/c/sdk/+/39320

Change-Id: Iecb6fe97e3612a11ccc89864a4fc9f353846504c
Reviewed-on: https://dart-review.googlesource.com/40040
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-08 18:08:40 +00:00
Konstantin Shcheglov 87d73de98a New Quick Assist 'Convert to StatefulWidget'.
R=brianwilkerson@google.com, devoncarew@google.com

Bug: https://github.com/dart-lang/sdk/issues/31823
Change-Id: I0970a9f674f456cee20e96d4b3be3a4e3d577a8a
Reviewed-on: https://dart-review.googlesource.com/39921
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-08 17:39:34 +00:00
Alexander Markov 236aef873a Update test corelib_2/iterable_to_list_test for Dart 2 type inference
According to Leaf, Dart 2 type inference prefers to infer type
which is asked for, even if a more specific type can be inferred
from arguments.

It means that for

  testIterable({"x": 1, "y": 1}.keys, ["x", "y"]);

where

  testIterable(Iterable iterable, List expected, [int depth = 0])

the inferred type of map is Map<String, int>, but inferred type
of list is List (as testIterable argument type is List).

So this test is fixed by specifying type arguments of 'expected'
lists explicitly.

Change-Id: I2deab160038ee7abaad587920cb8fc620e09ebdf
Reviewed-on: https://dart-review.googlesource.com/39441
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-02-08 17:19:12 +00:00
William Hesse be2e6c4f82 Update status for new dartk and dartkp builders
Change-Id: Ie5ed3cade049d1d7831440adece520dd09ad13d7
Reviewed-on: https://dart-review.googlesource.com/39985
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-02-08 16:52:56 +00:00
Lasse Reichstein Holst Nielsen bc27d2355b Mark periodic_timer4 test failing on jsshell
Change-Id: Ica5c86a8bff4ed94a65763437af404600f3eb629
Reviewed-on: https://dart-review.googlesource.com/39984
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-02-08 16:16:52 +00:00
Paul Berry 2f8b0ff200 Remove unused import
Change-Id: I60a43113afcff04eedf3cab44223ce180fd77e97
Reviewed-on: https://dart-review.googlesource.com/39902
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-02-08 15:52:11 +00:00
Brian Wilkerson 5ceaa66dfa Add more recovery tests gleaned from issues
Change-Id: Ib2e366353a9601802bbf9e690b2fad55ccef7fc9
Reviewed-on: https://dart-review.googlesource.com/39882
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-02-08 14:21:51 +00:00
Dmitry Stefantsov 47fbe76d03 Avoid patching with redirecting factories in vm-related patches
Change-Id: Id45696a38b281b1b75a9a0e26d89216388a4ec19
Reviewed-on: https://dart-review.googlesource.com/39942
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-02-08 14:11:50 +00:00
Johnni Winther df4453bbb4 Update dart2js_with_kernel status
Change-Id: I08b8cf15ffb034958729b5c07561e9eec98aba0f
Reviewed-on: https://dart-review.googlesource.com/39961
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-02-08 10:51:37 +00:00
Lasse R.H. Nielsen bdc6e9c862 Add ticks counter to Timer.
Change-Id: Ie5ed28fa8b7ef9c6aea97331267cf3c717b17099
Reviewed-on: https://dart-review.googlesource.com/21342
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-02-08 10:16:00 +00:00
Johnni Winther b7ef215604 Ensure no function type variables on constructors
Closes #32069

Change-Id: I9e8e35aad7844863717d19d6335da87b9c823375
Reviewed-on: https://dart-review.googlesource.com/39700
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-02-08 09:09:09 +00:00
Paul Berry 6ab8bb9cfe Fix the return type of TypeInferenceDebugging.genericExpressionEnter
I neglected to update this when I removed unnecessary typeNeeded
booleans from the type inference engine
(d031b0aecf).

Change-Id: I08b6ebe14c3c03cbc1480c5139162e997ac24f4a
Reviewed-on: https://dart-review.googlesource.com/39541
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-02-08 07:44:52 +00:00
Stephen Adams 2868ded182 Update dart2js status
Main problem - there were dart2js entries outside the dart2js file.

TBR=sigmund@google.com

Change-Id: If86bd49bcd6dd0d5b4c9951053775de4e39508e5
Reviewed-on: https://dart-review.googlesource.com/39901
Reviewed-by: Stephen Adams <sra@google.com>
2018-02-08 06:51:09 +00:00
Konstantin Shcheglov 07ceae4aea Get libraries from the cache, the unit, or new.
Maybe later extract it into a caching wrapper around AnalysisSession?

R=brianwilkerson@google.com

Change-Id: I0f4c962467c6622bc558f7d9abd318024aec7945
Reviewed-on: https://dart-review.googlesource.com/39920
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-02-08 05:05:40 +00:00
Stephen Adams 027aea0657 Fix dart2js kernel corelib_2 status
TBR=sigmund@google.com

Change-Id: I144d0cbbd5080fe20dc566793d95a03eb3bbfbe5
Reviewed-on: https://dart-review.googlesource.com/39900
Reviewed-by: Stephen Adams <sra@google.com>
2018-02-08 03:58:16 +00:00
Jenny Messerly 4f5b5566c1 fix #32082, local variable assignment source location
Also fixes some issues with field initializers; stepping and hover
tooltips should work reasonably now.

Change-Id: I2d0e9e7e14a52ee8c020902f80f835a913f494f3
Reviewed-on: https://dart-review.googlesource.com/39860
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-02-08 02:58:39 +00:00
Régis Crelier e64f37614e [VM runtime] Fix TypeArguments::IsUninstantiatedIdentity() not to return true
for a still unfinalized type argument vector (fixes #31944).
Update status files.

Change-Id: Ib603cd702891dc93775a5fbd09c341bb36922ab3
Reviewed-on: https://dart-review.googlesource.com/39855
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-02-08 02:03:24 +00:00
Stephen Adams 92af8a938a Use length argument only for allocating Array
Change-Id: I051ec7bf3e34162e55212c6f734ceb0d531d04bb
Reviewed-on: https://dart-review.googlesource.com/39853
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-02-08 00:41:59 +00:00
Konstantin Shcheglov f6febf35b1 Don't write EOLs before/after new class members.
R=brianwilkerson@google.com

Change-Id: Ie70423802985fc762fea2cb55a2936a3e3f3add0
Reviewed-on: https://dart-review.googlesource.com/39851
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-02-08 00:40:11 +00:00
Emily Fortuna a87bd928ff Fix test status for async test in strong mode. For some reason this got missed.
Change-Id: Idb204b42bf6b344371e5e143a8275481c2851343
Reviewed-on: https://dart-review.googlesource.com/39854
Reviewed-by: Emily Fortuna <efortuna@google.com>
2018-02-08 00:37:45 +00:00
Siva Chandra 0740e91582 Prevent double deletion of kernel service program.
Change-Id: Iaf7b6f901fcce18a939e3d29ed89888f0e4c6f50
Reviewed-on: https://dart-review.googlesource.com/38923
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Chandra <sivachandra@google.com>
2018-02-08 00:32:30 +00:00
Mike Fairhurst e2f4e6c1c9 Update mockito to be compatible with latest analyzer void changes
Change-Id: I94d8a4eae413df7a5daf5e5da0e42d1de74f43e3
Reviewed-on: https://dart-review.googlesource.com/39847
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-07 23:32:41 +00:00
pq 05a8b5df2f Bump to linter 0.1.43
* new `prefer_const_declarations.dart` lint
* new `prefer_const_literals_to_create_immutables` lint
* miscellaneous documentation improvements

Change-Id: I79f03f4d99fc90d9b6e1efcc8a7a8a6271b0abd4
Reviewed-on: https://dart-review.googlesource.com/39850
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-07 23:29:51 +00:00
Ryan Macnak d7f7cf0ca2 [vm] Speculative fix for race in idle notifier shutdown (monitor use-after-free).
Don't restart the idle notifier when removing a message handler.

Bug: https://github.com/dart-lang/sdk/issues/31979
Change-Id: I7e899807e3d71fa1e70be2921c8348372ed3b54d
Reviewed-on: https://dart-review.googlesource.com/39849
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-02-07 23:18:50 +00:00
Emily Fortuna ef3c271542 Generate signature function in strong mode (previously was behind a flag).
Change-Id: Ia99623beb4f5cbba719833af2d710702d2caaa6d
Reviewed-on: https://dart-review.googlesource.com/38902
Commit-Queue: Emily Fortuna <efortuna@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-02-07 23:02:40 +00:00
Mike Fairhurst ec58f5646a Revert "Make void a static warning to use almost everywhere."
This reverts commit 09eed74a8a.

Reason for revert: Too much SDK code is not yet compliant.

Original change's description:
> Make `void` a static warning to use almost everywhere.
> 
> Changed the hint to a StaticWarningCode, since that's the new spec'd
> error type and the hint is no longer needed.
> 
> Added a new set of methods to test the cases.
> 
> Didn't try to solve the problem generally ("all usages except ... are
> errors" means it easier, in theory, to make a ReportVoidExpressions
> style visitor that catches absolutely all types) because most of the
> work is actually about suppressing errors that are no longer needed.
> Ie, from NO_SUCH_METHOD to USAGE_OF_VOID_RESULT which means we have to
> put the void handling logic into each AST method specially anyway.
> 
> Some redundant tests removed.
> 
> Don't flag: ternaries, void -> void assignments, void returns in
> dynamic.
> 
> Change-Id: Ief8035dcfe582b36b6372180ddcf4e453d320d9c
> Reviewed-on: https://dart-review.googlesource.com/37441
> Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
> Reviewed-by: Leaf Petersen <leafp@google.com>

TBR=leafp@google.com,scheglov@google.com,mfairhurst@google.com

Change-Id: I13ee4c6939468d35506779ade637a040833632f4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/39848
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2018-02-07 22:32:51 +00:00