Commit graph

52823 commits

Author SHA1 Message Date
Johnni Winther a671328de3 Merge instance and static member usage maps.
Change-Id: I2c4802b946af162be2257a10502b2c8f823786d1
Reviewed-on: https://dart-review.googlesource.com/30448
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-12-20 14:52:59 +00:00
Erik Ernst aa9765604e New test, checking allowed usages of void typed expressions
Change-Id: I9a3096bb3fb3deca178688029657cd71f8aedf7d
Reviewed-on: https://dart-review.googlesource.com/30840
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2017-12-20 14:04:13 +00:00
Jens Johansen 4e162c5318 [kernel] Fix vm crash when trying to break on default constructor
Writing "break Foo" in observatory with a file including
```
class Foo { }
```

would crash them VM.

This CL introduces a test that reproduces it and fixes the issue.

Bug:
Change-Id: I24780d9204117ade19a0cb590c45aa31b7c04f7e
Reviewed-on: https://dart-review.googlesource.com/30445
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2017-12-20 13:02:12 +00:00
Peter von der Ahé ac068b3cb4 Use options.input if entryPoint is null
Change-Id: Ia7ce42d2caa025b0e1a31872f23bd0364d6cf5f7
Reviewed-on: https://dart-review.googlesource.com/30820
Reviewed-by: Jens Johansen <jensj@google.com>
2017-12-20 12:49:28 +00:00
Vyacheslav Egorov c41e92de84 [vm/aot] Ignore artificial methods when computing single target.
When AOT call specializer computes single target for a method
invocation it needs to ignore artificial methods like field
dispatchers and method extractors that are lazily injected
by the precompiler as compilation of the whole application
progresses.

Lazy injections means that we don't have complete knowledge
when we compile a single method.

Bug:
Change-Id: I249ca397bb3da89f512a1ace49b198a0ffc9bf97
Reviewed-on: https://dart-review.googlesource.com/30520
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2017-12-20 12:35:42 +00:00
Martin Kustermann f150c47ac1 Revert "Don't run strong mode vm tests on simdbc64 until we figure out why it's acting architecture specific."
This reverts commit 2930223f13.

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

Change-Id: I5a4373737b01acfccc7f99f4d120d2443953c7e4
Reviewed-on: https://dart-review.googlesource.com/30800
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-12-20 12:31:31 +00:00
Alexander Thomas 88b82a2c7b [Infra] Allow CQ to submit dependent changes
Change-Id: I30c63a6cd69373d53bf2a57e6a3f7462a8bd3755
Reviewed-on: https://dart-review.googlesource.com/28680
Reviewed-by: William Hesse <whesse@google.com>
2017-12-20 12:14:28 +00:00
Jens Johansen 45a59597fc [kernel] Allow collection of token positions for unfinalized classes
E.g.
```
main() {
  new Foo();
}

class Foo {
  Foo() {
    print("hello from foo");
  }
}
```

debugging with --pause_isolates_on_start, the constructor (or anything else
in class Foo) would not be breakable from the Observatory interface.

This CL fixes that by collecting token positions from unfinalized classes.

Bug:
Change-Id: I93a20f3322b0a343a619625c71236b59c885cb7e
Reviewed-on: https://dart-review.googlesource.com/30441
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2017-12-20 11:59:47 +00:00
Peter von der Ahé 2eab494036 Don't add dynamic to a reused dart:core library.
Change-Id: I6e4b5bef9e6cd244b7dd59d1be676e47358ec9b8
Reviewed-on: https://dart-review.googlesource.com/30453
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2017-12-20 11:05:55 +00:00
Peter von der Ahé 3b6e403f1b Support compiling the SDK from source
Change-Id: Ib5df97ef143c2cf98fc3d92a81d0f6b2f4cb1224
Reviewed-on: https://dart-review.googlesource.com/30452
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2017-12-20 09:37:55 +00:00
Johnni Winther f2c2c99714 Adjust inlining heuristics for in-loop calls
Change-Id: Ifaa1e3ac5405cb9159fd2e6c462e076d9f48b120
Reviewed-on: https://dart-review.googlesource.com/30444
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-12-20 08:20:03 +00:00
Johnni Winther 12ee4edbb8 Implement inlining heuristics on conditional expression.
Change-Id: I183b6345e29d6c00f140dcbd1ffff05faf0e781f
Reviewed-on: https://dart-review.googlesource.com/30442
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-12-20 08:02:14 +00:00
Stephen Adams 72736aff0d Avoid introducing js.Parameters in constructor body
Use the Parameter name in the template so that it is converted into a
VariableUse.

This change fixes some double-counting in the function parameter /
local variable minifier which made the --fast-startup constructors
'miss' using some minified names.

I believe the 'missed' names is a regression.

Saves 50k (0.4%) on one large app.

Change-Id: Ib7597f5c474ef285b082697e368667dbac23931b
Reviewed-on: https://dart-review.googlesource.com/30720
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2017-12-20 06:09:25 +00:00
Emily Fortuna 2930223f13 Don't run strong mode vm tests on simdbc64 until we figure out why it's acting architecture specific.
Bug:
Change-Id: Iacc78a249662c2b547ea9fe9347c09834e6277ac
Reviewed-on: https://dart-review.googlesource.com/30700
Reviewed-by: Emily Fortuna <efortuna@google.com>
Commit-Queue: Emily Fortuna <efortuna@google.com>
2017-12-20 01:16:02 +00:00
Ryan Macnak 9f4ffb64ef Partial static mode changes for vm-service and tests (part 2).
Bug: https://github.com/dart-lang/sdk/issues/31587
Change-Id: Ie2605f5043b9f5d2f9156928e3cd39f74e726853
Reviewed-on: https://dart-review.googlesource.com/30681
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-12-20 00:45:28 +00:00
Dan Rubel 4e8c6e7862 Add more fasta parser field recovery
Change-Id: I8a63e04c80931d2b2e8b24a547cc845837dee5d8
Reviewed-on: https://dart-review.googlesource.com/30625
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2017-12-20 00:38:38 +00:00
Zachary Anderson e6a05106bf [GN] Fix run_dart.py for debian package builder
related #31613

Change-Id: I7ba803d574ea8ad8f801c7a6b2d3486b63fb6ab7
Reviewed-on: https://dart-review.googlesource.com/30660
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2017-12-20 00:23:58 +00:00
Sigmund Cherem b280922064 Fix patch location for isolate library
Change-Id: Ie1f0913eb61dfd77e73d483fd48f235c58ded523
Reviewed-on: https://dart-review.googlesource.com/30626
Reviewed-by: Emily Fortuna <efortuna@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2017-12-20 00:15:43 +00:00
Ryan Macnak dd1c61012a Further update status of io tests.
Change-Id: I9be15374273912276a62b31cc4c5c3e067720b23
Reviewed-on: https://dart-review.googlesource.com/30627
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-12-19 23:58:00 +00:00
Ryan Macnak 8fba2ea2b6 Use OOB messages to schedule compaction for Dart_NotifyLowMemory.
This ensures any finalizers that run during compaction happen on a thread the embedder knows about.

Bug: https://github.com/dart-lang/sdk/issues/31662
Change-Id: If1ca39fe72937ad2bc4607f7cacc4dc82e49be01
Reviewed-on: https://dart-review.googlesource.com/30040
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-12-19 22:38:34 +00:00
Ryan Macnak 0b5300acf3 Update status entry for the split test standalone_2/io/socket_test.
Bug: https://github.com/dart-lang/sdk/issues/27453
Change-Id: Ia9a2e7300b1a346eea6572106458007842ecbbfb
Reviewed-on: https://dart-review.googlesource.com/30680
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-12-19 22:23:07 +00:00
Lasse Reichstein Holst Nielsen b56051abfa Update language_2/async_await_test to not use unittest.
Change-Id: I239e844d90a79afeb54204c3bdfd41b4daabb03c
Reviewed-on: https://dart-review.googlesource.com/26600
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2017-12-19 22:04:16 +00:00
Leaf Petersen 1ed4096b4e Remove generic comment syntax from pkg/dev_compiler.
Bug:
Change-Id: Ifc823c2b703ec70cd97981f08b29396de516f678
Reviewed-on: https://dart-review.googlesource.com/30382
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
2017-12-19 22:03:43 +00:00
Sigmund Cherem a6b28dfee6 Move the use of 'multi-root' out of the FE
Change-Id: If26e4da18d4379041927e100e471a381f5979126
Reviewed-on: https://dart-review.googlesource.com/30600
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2017-12-19 22:00:43 +00:00
Ryan Macnak a144e263ce Allocate from the root VMAR on Fuchsia.
Removes the need for the VmarList.

Overallocate VMOs instead of VMARs to get aligned memory.

Change-Id: I0c2c85e952b8c6958e28ac734b5ba54c7712a512
Reviewed-on: https://dart-review.googlesource.com/30383
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-12-19 21:47:44 +00:00
Ryan Macnak d528e1651f Reapply "Misc "strong" mode fixes for dart:io."
Remove changes to Socket.flush and Socket.done.

Split socket_test and socket_exceptions_test so we can minimize suppressions.

Bug: https://github.com/dart-lang/sdk/issues/31587
Bug: https://github.com/dart-lang/sdk/issues/31685
Bug: https://github.com/dart-lang/sdk/issues/27453
Change-Id: I3c44223480554f57d66be048c0361f6d0c699be2
Reviewed-on: https://dart-review.googlesource.com/30389
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-12-19 21:41:47 +00:00
Vyacheslav Egorov d290d8ecf4 [vm] Detect and expand calls through getters in AOT call specializer.
If we know that receiver is a subclass of a certain type and that this
type has accessor get:m then call o.m(...) is guaranteed to be an
invocation through a getter. Such invocations are executed most
efficiently when expanded into o.get:m().call(...).

Source based pipeline handles this case (at least for invocations on
`this`) directly in the parser, but Kernel based graph builder does not
have this sort of special case.

Instead of teaching Kernel flow graph builder to specially handle
invocations on `this` we teach AOT call specializer to specially handle
all invocations where receiver is known to be a subclass of certain
class. Such optimization is more generic and handles things that
previously were not handled by the optimization.

AOT compiler also has heuristics for injecting field dispatchers into
classes but these heuristics only handle fields of function type and
don't work for fields like `Function f` or `var f`.

Improves ParserCombinators benchmark by 4x.

This relands eea2c168f9 with a fix.

Change-Id: I13a41544c737b980efd431e31e4d15ad31da853e
Reviewed-on: https://dart-review.googlesource.com/30455
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2017-12-19 21:02:04 +00:00
Dan Rubel 166cc11a64 Add fasta parser function expression recovery
Change-Id: Id5e27b8f186da23fd141fda12621f1ae3bcd1f8c
Reviewed-on: https://dart-review.googlesource.com/30580
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2017-12-19 20:57:43 +00:00
Sigmund Cherem 414bad86df Directly create dart2js platform files using its patch files
Change-Id: I1c7d59968bfafeeb5a8b5252fa2d47e3c05b893e
Reviewed-on: https://dart-review.googlesource.com/27404
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Emily Fortuna <efortuna@google.com>
2017-12-19 20:31:57 +00:00
Zachary Anderson 75a50a1c1c [GN] Fix gn_run_binary.py for different error
The debian package builder is throwing a different kind of error.

related #31613

Change-Id: I293b31aab310867656ba05b6f62afc8bdc9285e4
Reviewed-on: https://dart-review.googlesource.com/30467
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2017-12-19 20:30:58 +00:00
Brian Wilkerson cf0b75bc1d Rename parseStatementOpt to parseStatement
Change-Id: I0016bfb44843b6cd6dd36bef724fe25e93630224
Reviewed-on: https://dart-review.googlesource.com/30560
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-12-19 20:23:54 +00:00
Brian Wilkerson 032cc33fd5 Rename parseAsyncModifier to parseAsyncModifierOpt
Change-Id: I1cc4ad97566bcaeebf16be65ba1e8972a526daef
Reviewed-on: https://dart-review.googlesource.com/30468
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-12-19 20:22:54 +00:00
William Hesse c1fe610b9d Update checked-in Dart SDK to 2.0.0-dev.13.0
Bug:

R=athom@google.com

Change-Id: I42f7b93d192f3be15eabbb5b9b769fe7ab1d1376
Reviewed-on: https://dart-review.googlesource.com/30480
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2017-12-19 20:04:24 +00:00
Brian Wilkerson f52274630e Disable a flaky test until it can be investigated
Change-Id: Icabacb7c41fe7727757989e3508dc707a8ddb792
Reviewed-on: https://dart-review.googlesource.com/30466
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-12-19 19:40:43 +00:00
Brian Wilkerson d086c7fb30 Add more partial code recovery tests
Change-Id: I876458a500bd83132e945a4d14d46d5f842acd86
Reviewed-on: https://dart-review.googlesource.com/30464
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-12-19 19:38:43 +00:00
Alexander Markov d8f27c3841 [VM] Enable optimizations based on strong mode types
Strong mode types are queried from:

* Return types of interface targets of instance calls.
* Return types of static calls.
* Types of instance and static fields.
* Types of local variables (for initial types of phis).

The strong mode types are used to specialize int and double operations
and optimize 'is' checks.

https://github.com/dart-lang/sdk/issues/30480
Change-Id: I2302509f396eacfcab8ed41e3f50e8c74dd662fd
Reviewed-on: https://dart-review.googlesource.com/30386
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-12-19 19:23:22 +00:00
Zachary Anderson 3cd62c4b74 [dart:core] Adds @Provisional annotation
@Experimental is already defined in dart:html. Adding the same
annotation to dart:core breaks the build. Removing the annotation from
dart:html and adding it to dart:core is a breaking change, e.g.
if someone has said "import 'dart:html' show Experimental".

This annotation is for use in the upcoming dart:standalone with
the waitFor(Future f) function:

https://dart-review.googlesource.com/c/sdk/+/29449
Change-Id: Iea2f537a2ae89a6097c4284084a2a168e833bb04
Reviewed-on: https://dart-review.googlesource.com/30261
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2017-12-19 19:00:22 +00:00
Brian Wilkerson 4288625d53 Rename parseClassHeader to parseClassHeaderOpt
Change-Id: If488545e2a13ba1f452bdd17321c6065345475e5
Reviewed-on: https://dart-review.googlesource.com/30540
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-12-19 18:54:46 +00:00
Brian Wilkerson 710b866cce Rename parseStuff to parseStuffOpt
Change-Id: I7f663bf8d7f0b08093bc173638f9f3e036cb277f
Reviewed-on: https://dart-review.googlesource.com/30541
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-12-19 18:43:34 +00:00
Kevin Moore 11a1cd5ccc Remove version from unpublished packages
Helps with tooling – and helps avoid accidental publishing

Change-Id: I0aaa029ba737adf9a7eda565a9e620d423427fb0
Reviewed-on: https://dart-review.googlesource.com/30465
Reviewed-by: Jake Macdonald <jakemac@google.com>
2017-12-19 18:26:05 +00:00
Brian Wilkerson 3438b33745 Rename parseConditionalUris to parseConditionalUriStar
Change-Id: Iae15de8658f40b355b545b148d0e74358a9d32e1
Reviewed-on: https://dart-review.googlesource.com/30500
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2017-12-19 18:17:23 +00:00
Zachary Anderson 786508e5cb [GN] Try to fix dartdevc dart invocation
related #31613

Change-Id: Ib01771cc85be37469e7cd862ec3b25f35769db90
Reviewed-on: https://dart-review.googlesource.com/30502
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2017-12-19 17:59:13 +00:00
Ryan Macnak b59923de58 Partial static mode changes for vm-service tests.
Bug: https://github.com/dart-lang/sdk/issues/31587
Change-Id: I9fc7d83aab68ee2b30d71f8a3a75b74fa4dde55e
Reviewed-on: https://dart-review.googlesource.com/30390
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-12-19 17:45:55 +00:00
Brian Wilkerson d973fb3bca Rename parseCombinators to parseCombinatorStar
Change-Id: I5caac387a90c9a103182901ac8a1d2a3283e6440
Reviewed-on: https://dart-review.googlesource.com/30501
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-12-19 17:37:16 +00:00
Sigmund Cherem 3c74884ebb Use the enclosing builder fileUri when creating classes.
This fixes a subttle bug with patching: we were incorrectly storing the origin
uri on a private class that was only defined in a patch file (it was not a
patched class).

Change-Id: I183b8240be2f452f05bc956642363e9d125d2552
Reviewed-on: https://dart-review.googlesource.com/30387
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2017-12-19 17:09:14 +00:00
Dan Rubel 63392bdb36 Add fasta parser import uri recovery
Change-Id: If88a4273866ef80f16f2f3fb561dc929c9b16772
Reviewed-on: https://dart-review.googlesource.com/30462
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2017-12-19 17:00:24 +00:00
Brian Wilkerson 5c43484947 Unify three very similar methods into one
Change-Id: I18fbef8abcc8192f4eb287606ff004ae824dbb5c
Reviewed-on: https://dart-review.googlesource.com/30461
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-12-19 16:39:44 +00:00
Dan Rubel c2ae2137c9 Improve code completion suggestions in argument lists
This updates keyword code completion to suggest 'async', 'async*',
and 'sync' in new situations. This is necessary given that the fasta
parser recovers in a slightly different way than the analyzer parser.

Change-Id: I44cb42bc02874811df94a6586c7b9c9b5d7574c9
Reviewed-on: https://dart-review.googlesource.com/30460
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2017-12-19 16:06:52 +00:00
William Hesse 7a481b1a96 Add CHANGELOG.md section for stable patch release 1.24.3
Bug:
Change-Id: I7e087042dbb2cc20865f94a2e36724a4da9aa72c
R=floitsch@google.com
Reviewed-on: https://dart-review.googlesource.com/30341
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-12-19 15:39:33 +00:00
Peter von der Ahé 0fb21eec2f Tweak and document compile-time constant for enabling Fasta's incremental compiler
Change-Id: Icb45e579233f567319439623d67d2a683fb13514
Reviewed-on: https://dart-review.googlesource.com/30447
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2017-12-19 15:23:43 +00:00