Commit Graph

1230 Commits

Author SHA1 Message Date
Aske Simon Christensen f051cd5b4d [CFE] Transform spread and if in const collections early.
This makes sure that the AST before constant evaluation only contains
official kernel nodes.

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

Change-Id: Ic4e8e15adeaea8ad4700d6feb67e31f5f0a54f7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103123
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-05-21 11:07:26 +00:00
Jens Johansen 7f67e83e36 Add sanity check assert int class hierarchy
Change-Id: Iddcf2b64f745bb9385fb5b1621afa68056da89a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103127
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-05-21 08:23:08 +00:00
Jens Johansen 099af47a69 [kernel] add ability to disable offsets for bazel worker to use
This is a lightly modified version of Jennys CL @
https://dart-review.googlesource.com/100275

Change-Id: I46a1665d84d04602af1f338cf963bc25b4e6b25c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101280
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-05-21 07:55:10 +00:00
Jacob Richman e2976acd22 Add --track-widget-creation flag to frontend_server.
This is needed to activate the kernel transformer embedded with the kernel package from the flutter engine.

Change-Id: I3253e01723b662eb48b4b3743ac5bcc1b44c7d46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102920
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Jacob Richman <jacobr@google.com>
2019-05-20 22:47:28 +00:00
Aske Simon Christensen 8754351283 [CFE] Run widget transformer before constant evaluation.
Change-Id: I51ded35ecb95cb5cfbac5ecf8967e0918a48269a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101987
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
2019-05-10 11:02:49 +00:00
Aske Simon Christensen 1179467a5e Move widget transformer to kernel package
Change-Id: I7f9ece029e181d380f37028ed04f97d4fdfb12b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101985
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-05-10 11:02:49 +00:00
Paul Berry 3f90f04a74 Prepare to publish analyzer 0.36.3
Change-Id: Ibe4fb287ff6774fa71fd9d5e5a67b0f3f8b8c530
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101300
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-05-03 16:57:54 +00:00
Jens Johansen 407378879b Error reporting and ~no location data
We shouldn't crash and reporting something as being on line 1 of a file
because we don't know where in the file it is, doesn't seem right.

Change-Id: Ia8d6145e21a136903771d876633036b292ea12ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100842
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-05-01 10:24:46 +00:00
Aske Simon Christensen af3ec66106 [Kernel] Fix specification of constant reference.
Change-Id: Ic17294da65e3f27d52692975a48b8aa3132c2739
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100841
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Auto-Submit: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-04-30 10:24:38 +00:00
Jens Johansen ed8e4255a4 Proposed fix to #36644
TL;DR: Unbind canonical names doesn't do what you think it does and
probably shouldn't (ever) be used. This CL stops using it in a few places.

Longer version:

When loading a dill file it:
- First loads the table of canonical names. These have no references yet.
- When a canonical name is asked for its reference it creates one if it
  doesn't yet have one.
- When loading, for instance, a library, it asks for the reference.

When unbinding a canonical name:
- It removes itself (the canonical name) from the reference
- It removes the reference in itself
- Note: Whatever has a pointer to the reference keeps it, and the
  reference points to whatever node it already pointed to.

This also means, that if we have a dill file that's split in two and:
- Load #1
- Load #2
that works fine, but if we
- Load #1
- Unbind canonical names
- Binds canonical names
- Load #2
stuff is not bound correctly (and an error is thrown).

And - the cause of this bug:
- Load #1
- Load #2
everything is fine
- Unbind canonical names
- Binds canonical names
- Load #2'
stuff is not bound correctly --- references points to stuff loaded as #2,
not as #2'. On top of being weird, wrong and confusing it also caused wrong
things to be but into the class hierarchy which ultimatly caused the crash.

This CL fixes it by not calling unbind and force loading of dill files
(at specific call sites) to create new libraries
(and in the process overwriting references ".node").

Revert "[dartdevc] Retry ddc incremental compile on crash"

This reverts commit ecdbdf00b8.

Revert "[kernel_worker] retry on failure"

This reverts commit 43eebea5a3.

Fixes #36644

Bug: #36644
Change-Id: Id8f548179e6a409b01f2ebfa3219f94cb64b1c05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100380
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-04-26 07:18:28 +00:00
Paul Berry d6a09ff02f Prepare to publish analyzer version 0.36.2
Change-Id: I4ae73e8a55cf8c0d013152eb15bea74f2c1f69e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100321
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-04-24 02:32:36 +00:00
Paul Berry 2d6313c9e4 Prepare to publish analyzer version 0.36.1
Change-Id: I84e132ff2b2635cc5703a58c88f5ab1767e4970e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99965
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-04-22 18:05:19 +00:00
Paul Berry b7b7a63407 Fix relative import from pkg/kernel/test to pkg/kernel/lib.
This doesn't work due to the file organization used in google3.

Change-Id: I814a087bd9c6e10fc7738c782af6f54fde3cf000
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99181
Auto-Submit: Paul Berry <paulberry@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2019-04-12 07:17:47 +00:00
Nate Bosch f657371972 Change dev_dependencies to any
Using path dependencies here is misleading - they are not sufficient for a
`pub get` and we do not expect to do a pub solve in this package. In order to
suppress the warnings on `pub publish` we need only the `any` dependencies and
can rely on the repo's `.packages` file to resolve their path.

Change-Id: I5e7b2d50ece2c133b2583fd75eab3509db400a95
Bug: 36581
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99204
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2019-04-11 20:55:22 +00:00
Jens Johansen 1555594ddb Include a per-library index of owned sources in kernel
This for instance allows the VM to include all patches
(e.g. the previously missing `runtime/lib/date_patch.dart`)
in what's returned from `LoadedScripts()`.

Over time this also allows for `LoadedScripts()` to be simplified and
become faster (it's currently something like O(m + m*n) where m is the
number of results in DictionaryIterator(*this) and n is the number of
returned scripts).

Change-Id: I4b5a6a0fe666b774fc0987d099ed02e81ac97b43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98660
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2019-04-11 12:40:49 +00:00
Jens Johansen 88068ebfe3 Add missing _getLocationInEnclosingFile on Typedef
Change-Id: I81fbef620fd1742fe9a6e6428596718b038b0925
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98462
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-04-11 12:34:04 +00:00
Jens Johansen 460d00616c Better printing of imports
Before a import of, say "hello.dart" was printed as
"import './hello.dart'".
Now instead it is printed as "import 'hello.dart'".

At the same time we get rid of a dependency.

Change-Id: I352f0f507168fde75358704ec9bf0e248bb8179d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98480
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-04-11 11:43:23 +00:00
Jens Johansen fe535ac27c Add missing offset to yield produced by await for
Fixes #36069.
Fixes #28916.

Change-Id: I1acc6b9f0aaba100827749a1f3653f5cc9e4fd2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98665
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-04-11 11:16:13 +00:00
Dmitry Stefantsov 4ab4545ff7 [cfe] Add type and file offset to constant expressions
Closes #36471.

Bug: http://dartbug.com/36471
Change-Id: I5ac294057f2f69f1a8edfdf1106f65908fc257ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98677
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-04-10 09:55:36 +00:00
Johnni Winther 4fc0e1f13d Use .nullType as type of null and fix null type handling in getStaticTypeAsInstanceOf
The .getStaticType results for NullLiteral and NullConstant are inconsistent. The former returns `const BottomType()` and the latter return `TypeEnvironment.nullType`.

To avoid this inconsistency and since `const BottomType()` is really the "unreachable" type, used for instance of for the type of a throw expression, the implementation is changed to consistently use the .nullType.

For this to work, getStaticTypeAsInstanceOf (and the equivalent dart2js implementation), and the `Type.fromStaticType` constructor in the VM type flow analysis have to special case the .nullType.

Change-Id: If6b806d4a39ef7b906275c43fa2089b9d140523b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98563
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-04-09 06:49:17 +00:00
Kevin Millikin b700223542 [cfe] Do not reset the VM async name generator
In the VM-specific async transformation, an index is used to generate
fresh temporary names for values that are live across an await.
Before it was always 0 when translating a statement because there are
no live values on entry or exit to a statement.

When translating statements nested inside block expressions there can
be live values, so the index should not be reset.

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

Change-Id: I6103d75c25f312ab1538a7c0f8fee0fea9f01b27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98664
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-04-05 09:00:24 +00:00
Aske Simon Christensen a069ddda21 [CFE] Produce InstanceCreation from unevaluated constructor invocation.
Thread assert enable flag through in dart2js to make the dart2js cfe
constant evaluation unit test properly pass the flag.

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

Change-Id: Ie4ac86ce96feda1548120fed54ece9ca03387496
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98570
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-04-04 12:22:50 +00:00
Aske Simon Christensen f63eaab3af [kernel] Add instance creation kernel node.
This is used in constant evaluation to represent const constructor
invocations with unevaluated field values or asserts.

Change-Id: I1d2d60a18f967a4dd195b3b5895db9a126c47803
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98561
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-04-04 12:22:50 +00:00
Jens Johansen 8ce2d7a4e1 [CFE] Better error messages on errors with user definable operators
Fixes #36383

Change-Id: I24fd51bdb3ead75973009fe515819f9c8354e1b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98332
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-04-02 10:46:18 +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
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
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
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
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
Paul Berry 61e71e785f Prepare to publish analyzer version 0.36.0
Change-Id: I858ebe2a1717a467ef1901d5e643fe3e416036f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97544
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-03-21 19:08:11 +00:00
Jens Johansen e9e0daee5c Add importUri and fileUri to Source.
This will enable the VM to map URIs to package-URIs to solve problems
such as https://github.com/dart-lang/sdk/issues/35859

Change-Id: I15520325a5b81a99a7e3f56c2e35fd775d9da946
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96905
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2019-03-20 08:44:33 +00:00
Aske Simon Christensen c10ee9971f [CFE] Move constant evaluator to Fasta.
Reland of https://dart-review.googlesource.com/c/sdk/+/96081

Change-Id: Ie9e6a0d26703469396fa6ea4803f49ce387f495b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97224
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-03-18 15:42:05 +00:00
William Hesse 3b2e368376 Revert 5 changes with failures
TBR=askesc@google.com

Revert "[CFE] Move constant evaluator to Fasta."

This reverts commit 845b5b2df1.

Revert "[CFE] Always call the constant evaluator by the evaluate method."

This reverts commit 91bc4ec2b9.

Revert "[CFE] Use Fasta diagnostics in the constant evaluator."

This reverts commit c7b572aa29.

Revert "[CFE] Check for null in constant evaluation"

This reverts commit e6d2751e9c.

Revert "Rename import after moving file."

This reverts commit a6e2c5eb4c.

Change-Id: Iadfe087c0110f6f331b82d990213f95d3ef4541b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97223
Reviewed-by: William Hesse <whesse@google.com>
2019-03-18 12:25:32 +00:00
Aske Simon Christensen 845b5b2df1 [CFE] Move constant evaluator to Fasta.
This is in preparation for recognizing Fasta-specific nodes in the
constant evaluator, and for using the Fasta diagnostics framework.

Change-Id: I8535fbb68e622f1814a1d577c348d87e573b6b34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96081
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-03-18 10:42:14 +00:00
Paul Berry 44753660ec Prepare to publish analyzer 0.35.4
Change-Id: I265b0d0bf970f3962a66689895e7dd640fea91a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97006
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-03-15 22:33:45 +00:00
Aske Simon Christensen dfb6d250b1 [kernel] Better printing of string and unevaluated constants.
This makes the printed constant pool easier to read.

Change-Id: I54d8223faeed9cb92454f4f0128f60b7e839ee42
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96904
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-03-14 13:54:59 +00:00
Peter von der Ahé 0cbce074ac Add toString to Substitution
Change-Id: I7fb82f781aeafb4ef4a037c405a7201e9b52ba1a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96651
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-03-13 06:46:21 +00:00
Peter von der Ahé b990c503c8 Fix typo in mixin transformer
Change-Id: Ie351a9419a1957f777f229c6caf8515a90c0e6d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96649
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-03-13 06:46:21 +00:00
Aske Simon Christensen 576c4c71d9 [CFE] Always clone subexpressions of unevaluated constants.
This makes the constant evaluator entirely non-destructive.

Change-Id: I0d347b51821e393e46c8d7782f0ccbc35712f0de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96101
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-03-11 08:37:10 +00:00
Aske Simon Christensen ff55d429f6 [kernel] Collection concatenation nodes.
These arise when the constant evaluator partially evaluates collections
containing spreads or control-flow constructs with unevaluated
subexpressions. They are removed by the final constant evaluation.

Change-Id: Icdd155c4805cbcefe6aa4b45c2f85ec258e7bd36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95760
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-03-08 13:08:55 +00:00
Jens Johansen 235e5f3709 Allow component to easily adopt libraries at will
Change-Id: Ia84d56b4c7d7403467b04e90c2b63859ecee509d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96042
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-03-08 11:01:17 +00:00
Aske Simon Christensen b5a1f6c36b Reland "[CFE] Move constant evaluation number semantics handling to front end."
This is a reland of c2b466b09f

Original change's description:
> [CFE] Move constant evaluation number semantics handling to front end.
> 
> JavaScript number semantics is currently implemented as the simplistic
> version previously present in DDC. This is a starting point for fully
> detailed JS number semantics.
> 
> Change-Id: Id728b3dacec892a5cbf7ece0d9faea51427f5f9b
> Reviewed-on: https://dart-review.googlesource.com/c/94746
> Commit-Queue: Aske Simon Christensen <askesc@google.com>
> Reviewed-by: Sigmund Cherem <sigmund@google.com>

Change-Id: I1a488ef41bda819d34cb45cd481fd8fd88bfb01e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95460
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-03-06 10:30:37 +00:00
Aske Simon Christensen c769743f67 [CFE] Transform constants in annotations on all parameters.
The constant transformer would only transform optional parameters,
since these are the only ones that can contain default values. This
caused it to miss annotations on required positional parameters.

Change-Id: I49bfc84a1a533cec87db557306fdeb3569156947
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/93981
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-03-05 10:18:37 +00:00
Aske Simon Christensen bc2b78886d [CFE] handle set literals in constant evaluator.
Change-Id: I9dc5f7a3d2e7bc0f53e0370042bc59d688a8c4b3
Reviewed-on: https://dart-review.googlesource.com/c/95021
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-03-04 10:20:56 +00:00
Aske Simon Christensen 2b2e71770c [kernel] Add SetConstant node to Kernel.
Change-Id: I83da1afc9f15009c650a871a51ca8171b482d4df
Reviewed-on: https://dart-review.googlesource.com/c/94863
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-03-04 10:20:56 +00:00
Kevin Millikin 053dfbb2ac [cfe] Compile list spread elements into block expressions
Change-Id: Ic869cbfb2f3dc13a56be771acf0e12df850ff3c6
Reviewed-on: https://dart-review.googlesource.com/c/94748
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-03-04 08:29:56 +00:00
Aske Simon Christensen 1471b8e444 Revert "[CFE] Move constant evaluation number semantics handling to front end."
This reverts commit c2b466b09f.

Reason for revert: Broke precompiled, DDC and others.

Original change's description:
> [CFE] Move constant evaluation number semantics handling to front end.
> 
> JavaScript number semantics is currently implemented as the simplistic
> version previously present in DDC. This is a starting point for fully
> detailed JS number semantics.
> 
> Change-Id: Id728b3dacec892a5cbf7ece0d9faea51427f5f9b
> Reviewed-on: https://dart-review.googlesource.com/c/94746
> Commit-Queue: Aske Simon Christensen <askesc@google.com>
> Reviewed-by: Sigmund Cherem <sigmund@google.com>

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

Change-Id: I732c75b72df0e0f084ad2784349bee346ae5b7ed
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/95027
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-03-01 14:34:15 +00:00
Jens Johansen 6e06047004 AST to Text more resilient in writeAdditionalExports
Change-Id: If2a3e87f935e75421802358b028894a8fbb093d9
Reviewed-on: https://dart-review.googlesource.com/c/95025
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-03-01 14:24:53 +00:00
Aske Simon Christensen c2b466b09f [CFE] Move constant evaluation number semantics handling to front end.
JavaScript number semantics is currently implemented as the simplistic
version previously present in DDC. This is a starting point for fully
detailed JS number semantics.

Change-Id: Id728b3dacec892a5cbf7ece0d9faea51427f5f9b
Reviewed-on: https://dart-review.googlesource.com/c/94746
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-01 13:30:53 +00:00
Paul Berry 545ebe1741 Prepare to publish analyzer 0.35.3
This is needed so that we can publish a version of analyzer_plugin
that depends on it; also so that dartfmt work on "UI as code" features
can proceed.

Change-Id: I7647fd69fec28b9e788f89e915c14779815fcc02
Reviewed-on: https://dart-review.googlesource.com/c/94803
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-02-28 20:54:19 +00:00