Commit graph

968 commits

Author SHA1 Message Date
Dmitry Stefantsov 5dd2aca7fe [kernel] Fix non-deterministic output generation
Bug: http://dartbug.com/34086
Change-Id: I0d8037f1c6db27acb21148576da6a3b58bfb69a6
Reviewed-on: https://dart-review.googlesource.com/68940
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2018-08-08 16:36:06 +00:00
Dmitry Stefantsov 53321309da [kernel] Remove Vector-related Kernel nodes
They were supposed to be used as a part of the closure conversion pass,
which is now obsoleted.

Change-Id: Ie063f6c44487df7cd5d21895e8edc03251525d5f
Reviewed-on: https://dart-review.googlesource.com/68662
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-08-07 11:49:49 +00:00
Jens Johansen 164c7e3195 Debugging sync* and yield
Set position on yield in sync* functions; use yield position in VM.

Change-Id: I1c92fd47e3c8d4f747242e076007c122ea0d2186
Reviewed-on: https://dart-review.googlesource.com/68366
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-08-07 08:39:32 +00:00
Alexander Markov 1babc13b93 [vm/kernel/bytecode] Report compile-time errors from constant evaluation while generating bytecode
Change-Id: I931622f5e442a439f5bfa241aade686b1bc91afd
Reviewed-on: https://dart-review.googlesource.com/68222
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-08-03 19:21:17 +00:00
Dmitry Stefantsov cda3659f7f [fasta] Handle annotations on formals of typedefs
Fixes #33799.

Bug: http://dartbug.com/33799
Change-Id: I5808e45839cece468d890dcaf344df0d4b249a3c
Reviewed-on: https://dart-review.googlesource.com/65701
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2018-08-03 14:29:30 +00:00
Dmitry Stefantsov 637e55d4be [kernel] Add VariableDeclarations to represent formals of Typedefs
Change-Id: Ic1575dadb4fcf644dfdeb436612e2bed72d41a03
Reviewed-on: https://dart-review.googlesource.com/68083
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2018-08-03 12:28:11 +00:00
Jens Johansen ac8fdb5a58 Add :controller_stream and call _asyncStarListenHelper
This changes how we step out of async* functions slightly to match how
Dart1 behaves.

Bug: #29158

Change-Id: I8ee2df5eee8167fd1907a6e9f30c9dc7ab6939b1
Reviewed-on: https://dart-review.googlesource.com/63625
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-08-02 06:49:47 +00:00
Jens Johansen 2e98da68f9 Call _asyncStarMoveNextHelper in kernel
This changes how we step into async* functions slightly to match how
Dart1 behaves.

Bug: #29158
Change-Id: I4969ca48f798bd51f9d2d5bc26dd224fa7eff627
Reviewed-on: https://dart-review.googlesource.com/63624
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-08-02 06:16:15 +00:00
Konstantin Shcheglov 1fe0518d3b Resolve values of duplicate named arguments.
Change-Id: I3a84db8e7c7e29f730ec0687aee4ed0a62b84f94
Reviewed-on: https://dart-review.googlesource.com/66280
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-07-24 21:30:50 +00:00
pq b32277988f analyzer 0.32.4
See: https://github.com/dart-lang/sdk/issues/33901

Change-Id: I0bb8bc029865f2b46b052f50e49a5d2d13c5c81e
Reviewed-on: https://dart-review.googlesource.com/65981
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2018-07-20 19:34:09 +00:00
Konstantin Shcheglov 4f4b0dd685 Set read annotations into VariableDeclaration.
Change-Id: Iaade004258cea8e01c523ed2f0f2bd0a2cfe0398
Reviewed-on: https://dart-review.googlesource.com/64922
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-07-13 22:14:19 +00:00
Leaf Petersen b5fe750007 Strong mode fixes to kernel and dart2js
Change-Id: Ic51e0bbc31cf993ffb7d2ec6909b96c7ace964ed
Reviewed-on: https://dart-review.googlesource.com/63342
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
2018-07-10 19:19:24 +00:00
Jens Johansen 3a1b09dc63 Fix for bug #33660
Fix for #33660 that doesn't try to use fewer temporaries.
This fix could be revisited and possibly improved later.

Bug: #33660
Change-Id: I966d2756d74e9f041d043e839487bee8a3cc5aa2
Reviewed-on: https://dart-review.googlesource.com/63823
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-07-09 12:20:54 +00:00
Jens Johansen d26dba1619 More positions in dart2 constant evaluator
Use positions already available in for instance AsExpressions,
also adds new offsets in the kernel format to
SuperInitializer and RedirectingInitializer.

Bug: #33216
Change-Id: I542967ddc6ec782e6513d62fce038a49239e1622
Reviewed-on: https://dart-review.googlesource.com/63883
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-07-09 07:31:44 +00:00
Martin Kustermann f5a3af4fcd [VM] A const bool.fromEnvironment() with an explicit defaultValue of null should default to null
Closes https://github.com/dart-lang/sdk/issues/33628

Change-Id: I89ab411df0e113776364485ec9e2b6f7177dc024
Reviewed-on: https://dart-review.googlesource.com/63947
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-07-06 16:26:06 +00:00
Peter von der Ahé 149c5a0e0e Improve formatting of errors in golden files
Change-Id: I72930f0785b4b451c23e9cd2ebed2fa8290df760
Reviewed-on: https://dart-review.googlesource.com/63840
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-07-05 13:42:42 +00:00
Alexander Aprelev dbd97fb8a5 Prep for analyzer 0.32.3, front_end 0.1.3, kernel 0.3.3
This is follow-up to https://dart-review.googlesource.com/c/sdk/+/63683.

Change-Id: I99ca6e596a98f253cd053bbee9a101c1def20d23
Reviewed-on: https://dart-review.googlesource.com/63703
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-07-04 04:30:09 +00:00
Alexander Aprelev c339846594 [kernel] Move util.dart from bin to lib.
bin/util.dart doesn't have main() entry point and that breaks snapshot generation that is
automatically invoked by pub for all dart sources in bin/ folder.

See https://github.com/flutter/flutter/pull/19044\#issuecomment-402241782

Change-Id: Ie91549173536740992ce61d830efdfdc603c5564
Reviewed-on: https://dart-review.googlesource.com/63683
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-07-04 00:50:16 +00:00
Jens Johansen 1467909921 Call _completeOnAsyncReturn instead of .complete directly
The VM debugger expects _completeOnAsyncReturn to be called when
returning from an async function for stepping out of the async function
to work.

This CL does just that.

Note that `_completeOnAsyncReturn` only exists in the VM, but as
the async transformation is only run for the VM target that shouldn't
be a problem.

Change-Id: Id71344310de918f743dcb1ad66e165fc649516ba
Reviewed-on: https://dart-review.googlesource.com/63383
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-07-03 06:24:49 +00:00
Devon Carew 11e001595a Update analysis options files.
Change-Id: I06b659b5ee7105d3f11343259f787194f1d2bd79
Reviewed-on: https://dart-review.googlesource.com/63501
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-07-03 00:20:06 +00:00
pq 05b19947a4 Prep for analyzer 0.32.2
See: https://github.com/dart-lang/linter/issues/1040

Change-Id: Iedc7c4f0b3c4a9543292e07c2fd738329d39406d
Reviewed-on: https://dart-review.googlesource.com/62324
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2018-06-26 19:59:49 +00:00
Jens Johansen d2d47acdce [kernel] Include urls even when we have no source
Previously, if we didn't include the source code, we wrote the url as
null. This for instance made it impossible to step through mixed in code
(at least when mixed in from the sdk).

This CL includes all used urls. If there's no source, the source is empty,
but the VM then tries to find the proper source to be able to display it
(e.g. the VM already has the sdk source).

This CL further more adds a service test that tests that we can actually
step into mixin in code from the sdk.

Change-Id: Ied9569723e23928769ebc980410aed60be6eaa22
Reviewed-on: https://dart-review.googlesource.com/51621
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-06-26 09:23:16 +00:00
Jens Johansen c9bd4df214 Document IntLiteral.value as holding a uint64 value
Bug: #33351
Change-Id: I0b84e66b56d0b0f07ebc9e1a3593b2cc8e983afa
Reviewed-on: https://dart-review.googlesource.com/62063
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-06-26 07:17:55 +00:00
Martin Kustermann e232ddd28c [VM] Handle [VariableGet]s for parameters/let variables differently than other const variables
Change-Id: I10e74b7535936a62964cc4f00aac2572552b31d7
Reviewed-on: https://dart-review.googlesource.com/62064
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-06-25 14:12:33 +00:00
Martin Kustermann 2ff5f8cfcb [VM] Report an error when accessing constructor parameters inside a constructor invocation
Closes https://github.com/dart-lang/sdk/issues/33604

Change-Id: I84034499de43ea300b278f2f922bc73c565e8bcc
Reviewed-on: https://dart-review.googlesource.com/61934
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-06-25 12:05:53 +00:00
Jens Johansen 8747da838f Bump kernel version after e2ce88d
e2ce88dfcc changed the kernel format
but forgot to bump the kernel version.
This CL is a folow-up that bumps the kernel version.

Change-Id: Ic3f150af4b022acd971e91aed3c602cd5b1782af
Reviewed-on: https://dart-review.googlesource.com/61880
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-06-25 08:19:33 +00:00
Kevin Moore 10dcad1dd2 pkg:kernel - cleanup pubspec file
Reference pkg:testing by path
Remove dependency on pkg:ansicolor - not used

Also removed outdated reference to fasta in .packages

Change-Id: Iaeaa4a868e376e6cfdd5dad35d87521a18b213f2
Reviewed-on: https://dart-review.googlesource.com/61908
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2018-06-22 15:43:04 +00:00
Jens Johansen 6888bc2824 Compile time error for web int literals that cannot be represented exactly
Bug: #33351
Change-Id: I2b99858dfc276dc70c3a36c289030e801145af86
Reviewed-on: https://dart-review.googlesource.com/61180
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-06-22 10:47:54 +00:00
Jens Johansen e2ce88dfcc Add startFileOffset on procedures et al, enable VMs GetSource
Prior to this change we only had fileOffset which points to the name.
This CL adds a field - startFileOffset - that points to the start
(e.g. 'static', 'factory', the return type or any presiding annotation
(including '@')), as well as fixing `Function::GetSource` in the VM to
fix a crash when using mirrors to ask for the source of a function or
constructor.

The field is added to procedures, constructors and classes.
The latter changes the location of classes with annotations to be
the position of the annotation. This is on-par with --no-preview-dart-2.
The change in regards to procedures and constructors mean, that both
the location and the source (from .location and .source on a
MethodMirror) will change to include any annotations. This is a
different behavior than --no-preview-dart-2.

Closes #33271.

Change-Id: I90f1232c5ec2d01e60e0bab070d44c37232b2730
Reviewed-on: https://dart-review.googlesource.com/60560
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-06-21 13:10:04 +00:00
Dmitry Stefantsov 71ac67aed1 [kernel] Recognize noSuchMethod forwarders in class hierarchy analysis
Fixes #33517

Bug: http://dartbug.com/33517
Change-Id: Icc357724d83197a630e9c6b4dad38b509343f0b1
Reviewed-on: https://dart-review.googlesource.com/61261
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-06-21 10:24:12 +00:00
Dmitry Stefantsov a3a8d8bbd5 [VM][kernel] Don't mix in noSuchMethod forwarders
Bug: http://dartbug.com/33380
Change-Id: I57f85e1e33105c4ffcb6a9c8a970cfbc42318936
Reviewed-on: https://dart-review.googlesource.com/60924
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2018-06-20 12:57:41 +00:00
Martin Kustermann b172a42881 [VM] Catch errors for integer operations in kernel2kernel constant evaluator
Issue https://github.com/dart-lang/sdk/issues/33481

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

Change-Id: I7ca9825a0aa5f062732a759b4dd116e716a0d1b3
Reviewed-on: https://dart-review.googlesource.com/60580
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-06-19 10:28:05 +00:00
Jens Johansen ac039abc83 Add option to check if a dill is self-contained
This CL adds an option to the dill loader (i.e. BinaryBuilder) to
enable performing a check of all canonical names. The theory is,
that if a dill is self-contained "every" (1) canonical name should
contain a reference to a node.

This check is (currently) disabled by default, but enabled
excplicitly in the incremental compiler when initializing from dill.
If the check fails a warning will be issued (and the dill wont be
used).

On my machine the check seems to take ~15 ms in all tested cases
(sdk, flutter test).

(1): Except for extra layer of URI of a library if the qualified
name is private.

Closes #32449.

Change-Id: I65c8fba647be3d5ba47f7ee16caef78cb2cfae07
Reviewed-on: https://dart-review.googlesource.com/51462
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2018-06-15 06:46:23 +00:00
Martin Kustermann c54a302495 [VM] Evaluate symbols in kernel2kernel constant evaluator in AOT (even in non-const contexts)
Closes https://github.com/dart-lang/sdk/issues/33185

Change-Id: Ifa6a3e34e6f1a517f0adce1593e4ff747fe5c2cb
Reviewed-on: https://dart-review.googlesource.com/60246
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-06-14 13:35:39 +00:00
Alexander Markov 828a168622 [vm/kernel/bytecode] Generate bytecode for native methods
Change-Id: If47ef9ef4ff5ac3cb3f4f6737590370b647fc9ff
Reviewed-on: https://dart-review.googlesource.com/59180
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2018-06-13 01:16:03 +00:00
Dmitry Stefantsov 05f11aa74c [kernel] Account for defaultType in some of the Kernel visitors
Fixes #33324

Bug: http://dartbug.com/33324
Change-Id: I6c6a503a1fe016d7a8743df1597660c979ce27ea
Reviewed-on: https://dart-review.googlesource.com/58720
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-06-06 12:44:51 +00:00
Kevin Millikin 6213303e65 Fix some runtime check failures in tests
Fix some Dart 2 runtime check failures due to inferred List<dynamic>.

Change-Id: I09215629d4d6c70cd56930b0d19de2a092a7facd
Reviewed-on: https://dart-review.googlesource.com/58208
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-06-06 08:09:58 +00:00
Alexander Markov b7266fa3b3 [vm/kernel/bytecode] Support async/async*/sync* in bytecode generator
Change-Id: If164289608322647c0ee5d1f1ed35eb2562b1a03
Reviewed-on: https://dart-review.googlesource.com/56627
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2018-06-01 21:57:44 +00:00
Dmitry Stefantsov 5ecd78222e [kernel] Add an option to the cloner for cloning annotations
Fixes #33099

Bug: http://dartbug.com/33099
Change-Id: I291e75fa49fb6bf62557cfeab0c874c5de9b618d
Reviewed-on: https://dart-review.googlesource.com/57264
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-05-31 10:11:52 +00:00
Alexander Markov 377eb52f5a [vm/kernel/bytecode] Add library reference and invocation kind to ConstantICData
Library reference is added for private names in order to resolve them correctly.
Invocation kind byte supersedes VM-specific name mangling and makes
ConstantICData more uniform with ConstantStaticICData.

Change-Id: I66542356209d98b3d0cf0e6b8eb19bda052c6b7e
Reviewed-on: https://dart-review.googlesource.com/57485
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2018-05-31 00:53:21 +00:00
Samir Jindel 3d2b66074c Reland "[vm] Support definition of entry-points via @pragma('vm.extern') annotations.""
When the constant transformation is enabled on annotations, we need to fix handling
of @ExternalName annotations in the kernel_loader to ensure that we are setting
is_external = false on native methods.

The original revision is in patchset 1.

# Test Plan

The only regression was on benchmarks, Golem results are pending.

Change-Id: Ib80bb9f532299056e770a3b378cc5ad9ee451f57
Reviewed-on: https://dart-review.googlesource.com/56960
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-05-30 20:06:40 +00:00
Alexander Markov fb4f887eff [vm/kernel/aot] Fix recognition of native methods after annotations are constant evaluated
This change fixes findNativeName() in package:kernel/transformations/treeshaker
to handle constant evaluated Dart annotations. This function is used from
TFA and kernel tree shaker.

This change is a prerequisite for enabling constant evaluation of annotations.

Change-Id: I40f91cce6b34f0e262db7ae6f0fd98303acbf133
Reviewed-on: https://dart-review.googlesource.com/57401
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2018-05-30 19:29:20 +00:00
Paul Berry ec47e524bc Switch to non-alpha versions for analyzer/front_end/kernel.
After some discussion, we decided that it's not necessary to publish
alpha versions when making non-breaking changes.  (The rationale for
publishing alpha versions is to minimize the number of breaking
changes, since breaking changes to a popular package can potentially
slow down pub's version solver, but this is not an issue for
non-breaking changes).

Change-Id: I3f4f975712af43b6b0475f2c68dc430c394454cb
Reviewed-on: https://dart-review.googlesource.com/57140
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-29 23:26:07 +00:00
Alexander Markov 1ca17b6d03 [vm/kernel] Recognize desugared mixin applications in dart:mirrors
Kernel mixin transformation desugars mixin applications into normal
classes. Mixed-in type is pulled into interfaces list.
However, dart:mirrors needs to know the original mixed-in type of
a mixin application.

This change solves this problem by propagating a 'isTransformedMixinApplication'
attribute of a class through kernel AST, kernel binary and VM objects
into dart:mirrors implementation.

Fixes: https://github.com/dart-lang/sdk/issues/33240
Change-Id: I98ca69294e1ad445402a5ca91d90c30447aabcb2
Reviewed-on: https://dart-review.googlesource.com/56721
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-05-29 18:12:26 +00:00
Paul Berry 84fcf42c25 Bump analyzer version in preparation for publishing.
Change-Id: I1d794db9f086f8fb8830d7974b79653d549423c6
Reviewed-on: https://dart-review.googlesource.com/56708
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-05-29 17:47:46 +00:00
Samir Jindel 58dc4e476d Revert "[vm] Support definition of entry-points via @pragma('vm.extern') annotations."
This reverts commit 3e50ea32b5.

Reason for revert: Severe performance regressions on many aot-v2 benchmarks.

Original change's description:
> [vm] Support definition of entry-points via @pragma('vm.extern') annotations.
> 
> The `@pragma` annotations are evaluated by the constants transformation and
> visible to TFA and the precompiler, which match on the "options" field of the
> annotation to determine whether to mark the class/procedure as a root.
> 
> This required enabling the transformation of annotation constants by default.
> 
> # Test Plan
> 
> The "vmservice_io.main" entry-point is removed from `main.cc` and annotated with
> `@pragma`. All precompiler tests will crash if "vmservice_io.main" is not
> available at runtime.
> 
> Debug/release precompiler bots are visible in "cl-linux" button.
> 
> Change-Id: I03c5d6ba7918672ed9905fcaee8dabe675a93a5d
> Reviewed-on: https://dart-review.googlesource.com/56660
> Commit-Queue: Samir Jindel <sjindel@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>

TBR=vegorov@google.com,alexmarkov@google.com,sjindel@google.com

Change-Id: I779c17d003659129a4b3fcf284423104948f60e2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/56820
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2018-05-28 19:23:16 +00:00
Samir Jindel 3e50ea32b5 [vm] Support definition of entry-points via @pragma('vm.extern') annotations.
The `@pragma` annotations are evaluated by the constants transformation and
visible to TFA and the precompiler, which match on the "options" field of the
annotation to determine whether to mark the class/procedure as a root.

This required enabling the transformation of annotation constants by default.

# Test Plan

The "vmservice_io.main" entry-point is removed from `main.cc` and annotated with
`@pragma`. All precompiler tests will crash if "vmservice_io.main" is not
available at runtime.

Debug/release precompiler bots are visible in "cl-linux" button.

Change-Id: I03c5d6ba7918672ed9905fcaee8dabe675a93a5d
Reviewed-on: https://dart-review.googlesource.com/56660
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-05-28 15:13:55 +00:00
Kevin Millikin e2597dfba7 Revert "Mark normal classes that were originally mixin applications"
This reverts commit 53cd0b4af1.

The commit causes failures in the VM's precompiler because its mixin
deduplication transformation apparently needs to distinguish between
anonymous and named mixins.

Change-Id: I3861a3bf90b10f627d5fc8f0e94f117c102422d7
Reviewed-on: https://dart-review.googlesource.com/56780
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-05-28 12:05:46 +00:00
Kevin Millikin 53cd0b4af1 Mark normal classes that were originally mixin applications
To implement dart:mirrors correctly, a backend like the VM needs to
know that a class was originally a mixin application.  Use the
`isSyntheticMixinImplementation` flag which was already there and
ignored by the VM.

Now the property is:

- if `isSyntheticMixinImplementation` is set on a class with a
  mixed-in type, then it was originally an anonymous mixin application

- if `isSyntheticMixinImplementation` is set on a normal class then it
  was originally a mixin application of some kind and the mixed-in
  type can be found as the last impelemented type

Bug: https://github.com/dart-lang/sdk/issues/33240
Change-Id: I004adc6bfe08e583efba8e511076a6c603c0c687
Reviewed-on: https://dart-review.googlesource.com/56760
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-05-28 09:17:34 +00:00
Alexander Aprelev f981f09760 Revert "Clone annotations when cloning nodes that have them"
This reverts commit 75a75263d3 as it breaks Flutter

Bug: https://github.com/dart-lang/sdk/issues/33242
Change-Id: I825b0da4757f1ff9a318f8203605761d61d25e01
Reviewed-on: https://dart-review.googlesource.com/56722
Reviewed-by: Todd Volkert <tvolkert@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-05-26 03:16:14 +00:00