Commit graph

58463 commits

Author SHA1 Message Date
Ryan Macnak 0c80630577 [vm] Fix ia32/x64 gcc build.
(The simulators are broken at runtime.)

Change-Id: I10089cad44fca57145cfdd598342279f07c6d7fd
Reviewed-on: https://dart-review.googlesource.com/75205
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-09-17 22:27:43 +00:00
Ryan Macnak c1ea77a3a0 [vm] Extend --trace_deoptimization to cover the lazy deopt causes.
Change-Id: I09843815297fe13ca2f6880e794cc26c76dc6267
Reviewed-on: https://dart-review.googlesource.com/75126
Reviewed-by: Aart Bik <ajcbik@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-09-17 22:18:12 +00:00
Paul Berry d68f685cab More minor fixes to the analyzer/FE comparison tool.
- The new mixin syntax is now handled.  It's a little kludgy since the
  front end lowers it to the old supermixin representation, so we have
  to do a similar lowering to the analyzer representation.  Once the
  front end has full support for the new mixin syntax, I'll clean this
  up.

- Synthetic '__loadLibrary_' functions (inserted by the front end to
  cover the corner case where the "loadLibrary" function is torn off)
  are ignored.

Drops the number of failing language_2 tests with `--compiler
compare_analyzer_cfe` from 22 to 11.  I believe the remaining failures
are genuine bugs in either the front end or the analyzer.

Change-Id: I452ee92c418c04661d35cda1ed129ee5715879cd
Reviewed-on: https://dart-review.googlesource.com/75207
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-17 21:25:40 +00:00
Zach Anderson 6d705d5d4a [dart:io,fuchsia] Fix edge-triggering emulation for read events
Read events should only be re-enabled when all available bytes have
been read, or there is an error.

related: FL-109
Change-Id: Iefd4ff3d7f4b79c08ee3d2bca7cdfef70de66ce9
Reviewed-on: https://dart-review.googlesource.com/75200
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2018-09-17 20:44:52 +00:00
Ryan Macnak 29d36dd8d0 [vm, kernel] Fast-path for reading non-generic types.
Change-Id: I24d598aa66efa414b04e364bf5dce10bdc917904
Reviewed-on: https://dart-review.googlesource.com/75122
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-09-17 20:28:23 +00:00
Paul Berry f8eeddbc5b Fix missing import in unlinked_api_signature_test
Change-Id: I4144df4b98af2c213641715be4fbb03ee20df6c8
Reviewed-on: https://dart-review.googlesource.com/75204
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-17 19:49:17 +00:00
Ryan Macnak 57df49576d [vm] Fix -O0 build.
Change-Id: I16a887a14838787a9f9fe15fd34d3ca6295a5d33
Reviewed-on: https://dart-review.googlesource.com/75203
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-09-17 18:09:14 +00:00
Ryan Macnak 1741448392 [vm] Skip Profiler_FunctionInline on Mac.
Bug: https://github.com/dart-lang/sdk/issues/34493
Change-Id: If06ef55201e57f1e5d19de15a94e260b7f09a075
Reviewed-on: https://dart-review.googlesource.com/75202
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-09-17 18:09:04 +00:00
Alexander Markov 050561fd82 [vm] Relax recently added assertion in Dart 1 mode
This CL relaxes assertion added recently in
c6c4748185 as it could fail in Dart 1
mode.

This should fix 'checked vm tests' step on debug bots which still runs
tests in Dart 1 mode.

Change-Id: Ifdd6e27087b44822ce9cd5be48750af1c7d45a8e
Reviewed-on: https://dart-review.googlesource.com/75201
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-09-17 17:36:00 +00:00
Brian Wilkerson 6c712f157b Add a fix to create a mixin
Change-Id: Id0f31949a5639a00e884abc61b2cfcb5bc552b44
Reviewed-on: https://dart-review.googlesource.com/75130
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-09-17 12:43:41 +00:00
Lasse R.H. Nielsen cc08d0e1da Add operators &, | and ^ to bool.
Change-Id: Idd6472f239445914c1ff1ab68fc7b38fa6b320ae
Reviewed-on: https://dart-review.googlesource.com/25240
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Florian Loitsch <floitsch@google.com>
2018-09-17 12:33:12 +00:00
Erik Ernst 5af9844382 Language specification reorganization.
---------------- NEW description (old description shown at end):

This CL is now a reorganization, problem fixing, clarifying update
to dartLangSpec.tex which was created as part of the work on the
rules for call method extraction. That is, all the call method
extraction specific elements have been _deleted_ from this CL
(they will reappear as a separate CL later). This CL is now only
performing "general clean-up work" which is needed in order to
perform many kinds of updates (including call method extraction,
but also anything else where the dynamic semantics depends on the
static analysis & desugaring).

------------------------------------------------ OLD description

Introduced rules for call method extraction.

The previous update to dartLangSpec.tex dealt with invocations, but
omitted the transformation whereby `e` becomes `e.call` when `e` has
a type which is a class with a `call` method and the context expects
a value of type `Function` or of a function type. This CL adds some
rules dealing with that and introduces a concept for the transformation
itself.

One part is missing for the initial patch set: There are no rules
specifying that call method extraction should be applied to actual
arguments. The problem is that static checking of actual arguments
to various invocations (function expression invocation, ordinary
method invocation, super invocation, etc.etc.) seems to be "delegated"
partially to section `Binding Actuals to Formals`, but that section
never defines the syntax for the function which is being invoked and
it is in general rather dynamic in nature. So I'm not quite sure
that the references to static checking at the end of that section
are located optimally.

Some adjustments may therefor be needed before we can specify this
particular feature for actual arguments.

Change-Id: Ia2ab6f16cd50e10a3c467722035f0dc4adb50587
Reviewed-on: https://dart-review.googlesource.com/51323
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-09-17 11:39:24 +00:00
Johnni Winther 2cb2ac401c Optimize ClassHierarchyBuilder.isInheritedInSubtypeOf.
This fixes the compile-time regression introduced by
https://dart-review.googlesource.com/c/sdk/+/72643

Change-Id: I55d441592cd710daeca980a3eb902284751575dc
Reviewed-on: https://dart-review.googlesource.com/75001
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-09-17 08:06:15 +00:00
Paul Berry e8880fdbc8 Fix handling of unary- in the analyzer/FE comparison tool.
Drops the number of failing language_2 tests with `--compiler
compare_analyzer_cfe` from 34 to 22.

Change-Id: I1d35d0ac11816d29a5f3044db81a5c24e1b25477
Reviewed-on: https://dart-review.googlesource.com/75129
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-16 18:19:22 +00:00
Konstantin Shcheglov bd103ebc50 Store unlinked data with unlinked salt.
Before this change we used the whole AnalysisOptions.signature as salt.
This means that if two packages have different set of lints, they have
different options signatures, and so we have to parse and compute
unlinked data for SDK and all shared packages separately. But unlinked
data depends only on very small set of options, practically only on
parser options.

This improves performance on workspaces with many modules and empty
cache:

Before:
<= --- Analyzing in 36122 ms.
<= Computed implemented in: 50138 ms.

<= --- Analyzing in 47905 ms.
<= Computed implemented in: 55339 ms.

<= --- Analyzing in 45141 ms.
<= Computed implemented in: 60169 ms.


After:
<= --- Analyzing in 27957 ms.
<= Computed implemented in: 11645 ms.

<= --- Analyzing in 21378 ms.
<= Computed implemented in: 9439 ms.

<= --- Analyzing in 21719 ms.
<= Computed implemented in: 10546 ms.


Here "computed implemented" is computing subtypes of classes in the
open file - it required unlinked data for all files in all available
packages.


It also helps for full cache:
  analysis: 6300 vs. 5700 ms.
  implemented: 5700 vs. 3700 ms.



R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I10dbc6d062617466ad5f35ae77bd1e58a6bb606c
Reviewed-on: https://dart-review.googlesource.com/75128
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-16 17:42:23 +00:00
Konstantin Shcheglov c5d77d1d8b Support mixins in more places in index and search.
R=brianwilkerson@google.com

Change-Id: I523726e1c7f5efa2d6e2f4b91204da3f14f181b6
Reviewed-on: https://dart-review.googlesource.com/75120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-16 17:40:16 +00:00
Paul Berry c3bdb6c9b7 Refactor summary resynthesis tests in preparation for using the one-phase summary API.
This CL refactors the summary resynthesis tests similar to how
05ab41c99b refactored the summary
generation tests.  It introduces the following classes:

- The interface `ResynthesizeTestStrategy`, defining the methods that
  can be invoked by tests of summary resynthesis.

- An implementation of that interface:
  `ResynthesizeTestStrategyTwoPhase`.  This drives the summary
  mechanism using the old two-phase summary API.

- Mixin classes `ExprBuilderTestCases` and `ResynthesizeTestCases`
  containing the test cases themselves.

- Mixin classes `ExprBuilderTestHelpers` and `ResynthesizeTestHelpers`
  containing helper methods used by the test cases.

There should be no functional change introduced by this CL, only code
motion.

Change-Id: Ifb84d4d2d8fa17bbc32b833b1f56af7e1217b5ae
Reviewed-on: https://dart-review.googlesource.com/75124
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-16 14:11:24 +00:00
Konstantin Shcheglov ddcb8b7bb3 Remove unused SubtypeManager.
R=brianwilkerson@google.com

Change-Id: I4ec2bec51912817621361bf170257c6dfe972189
Reviewed-on: https://dart-review.googlesource.com/75123
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-16 02:27:14 +00:00
Alexander Markov 76091c13db [vm/bytecode] Add PushNull, PushTrue, PushFalse and PushInt bytecodes
These bytecode instructions are added in order to shrink constant pools
and reduce time spent for reading constant pool entries.

Change-Id: I8522f73dc7a6236969ac0422c6cb89b945559b2d
Reviewed-on: https://dart-review.googlesource.com/75125
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-09-15 17:55:46 +00:00
Brian Wilkerson a80b13e2f9 Add an assist to convert from a class to a mixin
Change-Id: Id47de8ffe8c381973c5a4ca53f7459782e62d37f
Reviewed-on: https://dart-review.googlesource.com/74963
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-09-15 16:12:22 +00:00
Nate Bosch 0f45b2e5c9 Fix spelling hexidecimal -> hexadecimal
Fixes #34460

Change-Id: I43ce8bbad9bfcc6b14c3a537ada84107e7bfaffe
Reviewed-on: https://dart-review.googlesource.com/74940
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2018-09-15 01:19:06 +00:00
Vyacheslav Egorov 348ed30efd [vm/kernel] In async transformation check if strongMode is on.
It seems we are still using non-strong mode targets in few
places (e.g. when training front-end server we by accident
train it in legacy mode).

A separate bug is filed to clean that up https://github.com/dart-lang/sdk/issues/34468

For now to unbreak the build we simply check if we are in the
legacy mode and then avoid using getStaticType in async
transformation.

This is followup to eec96f9076.

Bug: https://github.com/dart-lang/sdk/issues/34463
Change-Id: Ib693fddfb9abbf89599ae646cb408d4a9c93f1b6
Reviewed-on: https://dart-review.googlesource.com/75061
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-09-14 22:11:30 +00:00
Alexander Markov c6c4748185 [vm/bytecode] Bytecode compilation
Change-Id: I09192e4e929a397920c217b605580f8c4880e7c2
Reviewed-on: https://dart-review.googlesource.com/74002
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2018-09-14 22:02:29 +00:00
Ryan Macnak 78d9a281d3 [vm, arm] Globally block LR for register allocation.
Flutter Gallery release:
Instructions(CodeSize): 5668368 -> 5670880 (+0.044%)

Fixes #34411

Bug: https://github.com/dart-lang/sdk/issues/34411
Change-Id: I5281ac9609ec5953cdaa881226f7034a5697d0ce
Reviewed-on: https://dart-review.googlesource.com/74923
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-09-14 21:58:29 +00:00
Alexander Aprelev 078be2cb61 [vm] Add library private key to the Class hash function for reload.
This reduces isolate reload time on a given sample from ~2 seconds to ~200 milliseconds.
Remove ASSERT - you can have replacement finalized when original was non-finalized

Bug: https://github.com/dart-lang/sdk/issues/34461
Change-Id: I39dc5d67e97bd7c0d654cd751b6829b00337e967
Reviewed-on: https://dart-review.googlesource.com/74961
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-09-14 20:45:45 +00:00
Paul Berry 4fab5650bc Several minor fixes to the analyzer/FE comparison tool.
- Mixin applications are now handled correctly.

- The front end's synthetic field "_exports#" is now ignored.

- Forwarding semi-stubs were erroneously being skipped; they are now
  included, as they should be (since they correspond to methods
  explictly declared in the source code).

- Named parameters in function types are now annotated properly (the
  annotation was previously missing a ": ").

Drops the number of failing language_2 tests with `--compiler
compare_analyzer_cfe` from 405 to 34.

Change-Id: I148269c967cc0fdf67bcfcd698cba36fc0b66368
Reviewed-on: https://dart-review.googlesource.com/75121
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-14 20:34:24 +00:00
Konstantin Shcheglov eb9687189d Compute unlinked API signatures without unlinked summaries.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I21c87f60d88716eb9c6b1d5e558bb17156daa598
Reviewed-on: https://dart-review.googlesource.com/74925
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-14 20:13:55 +00:00
Jenny Messerly 98d25ed34a fix #34450, implement boolean bitwise operators in dartdevc
These will be added in https://dart-review.googlesource.com/c/sdk/+/74664.

Change-Id: I9712d8f9df72e686dd49e0b5198aa37e17815eb5
Reviewed-on: https://dart-review.googlesource.com/71228
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-09-14 20:02:16 +00:00
Vyacheslav Egorov 229d793602 [vm/compiler] Support materializing unboxed variables when entering catch.
Previously we tried to rely on the assumption that all variables would be
boxed - so the machinery for setting correct catch-entry state only
supported tagged values and constants. However this both leads to worse code
and is not entirely correct assumption.

This also:

- renames various confusingly named classes: we move away from talking
about "catch entry state" to "catch entry moves" - because we only
record a subset of moves that needs to be performed and that does
not describe the whole state;
- refactors a bunch of associated code to be more readable and maintainable;
- adds documentation about catch implementation in optimized code
to runtime/docs/compiler;

Fixes https://github.com/flutter/flutter/issues/21685.

Change-Id: I03ae361a1bb7710acbd9f661ae014e663a163c59
Reviewed-on: https://dart-review.googlesource.com/74860
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-09-14 17:39:12 +00:00
Vyacheslav Egorov eec96f9076 [vm/kernel] Preserve strong mode types in async transformation
Async transformation uses dynamic variables in few places (e.g.
for temporaries and for incomming arguments) - which creates
not strongly typed AST with method invocations having dynamic
receivers and non-null interface targets at the same time.

To maintain strong typedness of the AST we insert unsafeCast
when accessing the temporaries.

Bug: https://github.com/dart-lang/sdk/issues/34463
Change-Id: I11e38c128645ebc8acb0c982a80fe4c5c4036673
Reviewed-on: https://dart-review.googlesource.com/75000
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-09-14 17:19:29 +00:00
Paul Berry bf4facdd66 Handle errors when comparing analyzer and front end behaviors.
For now, if the front end detects an error, we just consider the test
to have passed; we don't try to verify that the analyzer also detects
an error.  This will be improved in a future CL.

Drops the number of failing language_2 tests with `--compiler
compare_analyzer_cfe` from 2676 to 405.

Change-Id: Ib4f3c99710df4a0f0aac9a1c22a9a3279c6a6479
Reviewed-on: https://dart-review.googlesource.com/74968
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-14 17:12:43 +00:00
Stephen Adams 3e9f4e6792 dart2js: generate simple '==' in more cases
Change-Id: I9f8d674f8346b6c3ecf5232c369b3953053d261f
Reviewed-on: https://dart-review.googlesource.com/74964
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-09-14 17:11:23 +00:00
Johnni Winther bb56d4592f Fix receiver type for js-interop access
This includes the unknown potential targets of access to js-interop
members. Since we don't know actual classes implementing the js-interop
classes we just assume it could be any of them.

Change-Id: I4d91ab673fa8221eb701b34e9c32fd16e5a1c381
Reviewed-on: https://dart-review.googlesource.com/74980
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-09-14 16:56:44 +00:00
Johnni Winther 8dea9aa45e Share inlining cache between members
Change-Id: I7dde30abcd585016efad664d65911101a213288f
Reviewed-on: https://dart-review.googlesource.com/75060
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-09-14 16:55:45 +00:00
Paul Berry 272473b77e Remove getters allowing access to all enclosing type parameter types.
These getters are private to the analyzer and not used by it.

Change-Id: I203af68124668244dd204bff0cf7a3de4de8e9cd
Reviewed-on: https://dart-review.googlesource.com/74967
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-14 15:22:24 +00:00
Erik Ernst f5ec9b0554 This CL changes some status comments, but also points out an issue.
The point is that #32782 requests a fix such that
`typedef F1 = void Function(int)` and `typedef void F2(int)`
satisfy that `F1 == F2` evaluates to true. This is marked
'p3-low' for the common front end but 'p1-high' for DDC.

It seems likely to me that this could create the situation where
code is developed using DDC, is working, and then fails upon
deployment using the vm. Also, there is a single case where
`dart2js` fails in the associated `type_alias_equality_test.dart`,
so deployment on the web would also fail upon deployment, though
only in some of the cases.

However, with some input from Aske I concluded that the situation
might have arisen because there _is_ no work to do for this in the
common front end, because it will be handled by the backend (which
also explains why `dart2js` has it almost right).

This CL is just introducing a tiny change: It changes the issue
indicated for all VM related failures in said test to point to
#32783, which is presumably the right issue for backend work.

Apart from that, I've added you, the reviewers, in order to make
sure that the relevant people get this heads up. We may then decide
to land this CL, change the priority on #31359, do nothing, or
whatever turns out to be the right response. ;-)

Change-Id: I92672547d7fe795e877604c0da1e0e4579e4e04a
Reviewed-on: https://dart-review.googlesource.com/74403
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2018-09-14 08:56:22 +00:00
Bob Nystrom a16c7d899a Fix typo in mixin test.
Change-Id: I1c6300dfa250ef0b9ea84e9bd5fd233eb5827464
Reviewed-on: https://dart-review.googlesource.com/74960
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-09-14 05:18:39 +00:00
Konstantin Shcheglov cea39db6e2 Perform instance member inference for mixins.
The set of sets is not comprehensive, no tests for fields and accessors.

R=brianwilkerson@google.com

Change-Id: I105ed6b1d4b5836f61af9f8abe7fed7e7a6b8c59
Reviewed-on: https://dart-review.googlesource.com/74941
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-09-14 04:52:48 +00:00
Paul Berry 65b390ca83 Simplify summary resynthesis tests
By removing unnecessary flags isStrongMode and isSharedFrontEnd.

Change-Id: I18ebb15297cc7dde38d61369d9a18b9e3bce895a
Reviewed-on: https://dart-review.googlesource.com/74966
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-14 03:06:05 +00:00
Mike Fairhurst ca8e5baccd Fix #34443 fix tests that will fail with int2double
Bug: 34443
Change-Id: I2b0edb9f6f1e642c92a656301f9b8a85c3e4658c
Reviewed-on: https://dart-review.googlesource.com/74669
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-09-13 22:32:54 +00:00
Paul Berry 0e878dd6db Fix several inferred type summary tests.
These tests were relying on some details of the summary representation
that are no longer present, namely the fact that function elements
appearing within initializers (including the synthetic function
element for an initializer) used to have inferred types associated
with them.  The tests have been changed so that they exercise the same
functionality, but they use the inferred type of the variable directly
rather than going through the function elements.

Change-Id: I8e7733674bfa6f8e7f442ea04e7da702f3b11020
Reviewed-on: https://dart-review.googlesource.com/74922
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-09-13 22:17:13 +00:00
Paul Berry 1397fd9342 Fix test_variable_final_top_level_untyped.
This test was previously assuming that variables requiring top level
type inference would have their body expressions encoded in the
unlinked summary; with one-phase summary generation this is no longer
the case.

Change-Id: I47b4f81926eb4bc667a201ba83673e3e0db4c8cb
Reviewed-on: https://dart-review.googlesource.com/74924
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-13 21:44:08 +00:00
danrubel 61096acab3 Improve analyzer/fasta error code matching
This addresses a comment in https://dart-review.googlesource.com/c/sdk/+/74600,
updates the "run fasta generate first" exception message,
and converts more Analyzer errors to be auto generated.

Change-Id: I9c98184d1b9fe642dab4d66fbcd961dc27dfa6f9
Reviewed-on: https://dart-review.googlesource.com/74900
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-09-13 21:03:47 +00:00
Paul Berry 1a8b1bfd24 Fix test_bottom_reference_shared.
At some point this test regressed so that it no longer tested the
behavior it purported to test.  The underlying behavior is correct;
the test just had to be fixed.

Change-Id: Ia54cb205b8f1a6062f4078009d24d865d70a6bac
Reviewed-on: https://dart-review.googlesource.com/74921
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-13 20:38:56 +00:00
Paul Berry 7bc5c551cd Fix test test_implicit_dependencies_follow_other_dependencies.
The test was assuming that summaries stored relative paths, which they
haven't done for quite some time.

Change-Id: Iee08f1e95650107886df85750e29aaf4267c60bb
Reviewed-on: https://dart-review.googlesource.com/74920
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-13 20:36:16 +00:00
Dan Rubel 49da026e3e Report error for extends void type parameters
Change-Id: I634b836ea40199a1e7962b7d07ca9f5d1ef3f16a
Reviewed-on: https://dart-review.googlesource.com/74680
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-09-13 20:27:56 +00:00
Mike Fairhurst 3cf61aee33 Fix #34444, rounded doubles in double literals test
Bug: 34444
Change-Id: Ie818cde6ec1cbca38d50ace43336ae3e7ea2a750
Reviewed-on: https://dart-review.googlesource.com/74663
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2018-09-13 19:30:06 +00:00
Konstantin Shcheglov 260ea4b591 Add an option to use one-phase summaries.
When this flag is enabled, we fail:
  2 language_2/ tests;
  25 Analyzer tests (mostly by 2 reasons);
  0 Analysis Server tests.

There is a know problem: because unlinked summaries don't include
initializers for variables, we fail to recognize API changes related
to inferred types. I will fix this be computing API signatures from
pertinent tokens.

R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I61734e96ee26b3e04027a103ccf6850695815127
Reviewed-on: https://dart-review.googlesource.com/74700
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-13 19:26:16 +00:00
Samir Jindel 7c5b3dc485 [vm/tfa] Pass receiver type into field initializer summaries.
This is required for tracking type arguments, since field initializers can
reference type variables from the enclosing class.

Also a few drive-by spelling fixes.

Change-Id: I91e33f7d8c61e288ccb2d8e18b33f4e67ac22a1b
Cq-Include-Trybots: luci.dart.try:vm-kernel-win-release-x64-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-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/74666
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-09-13 19:17:26 +00:00
pq cd26b889e1 linter 0.1.62
* new lint: `prefer_mixin`
* new lint: `avoid_implementing_value_types`

Change-Id: Iaba2d1dd50511db935cf050ba49e7d10746be8cb
Reviewed-on: https://dart-review.googlesource.com/74880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2018-09-13 18:55:35 +00:00