Konstantin Shcheglov
031cfcf993
Fix for combining outlines when we first see the external version of a library (so, without exports).
...
Bug:
Change-Id: I4aeef7f2ae85ce4e5ac8b997aa43d120304aee6b
Reviewed-on: https://dart-review.googlesource.com/19061
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2017-11-07 19:30:10 +00:00
Konstantin Shcheglov
f9c1b896f4
Add test that shows that we don't include additional exports for external libraries into shaken outlines.
...
As promised in https://dart-review.googlesource.com/c/sdk/+/18960
Bug:
Change-Id: I33970364e04a28a174aa036456ccdc1ce3fa965b
Reviewed-on: https://dart-review.googlesource.com/19060
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2017-11-07 19:23:31 +00:00
Paul Berry
bf81915170
Get rid of TypeInferenceEngine.isTopLevelInferenceComplete.
...
TypeInferrer.isTopLevel carries the same information.
Change-Id: I8a572bb24bc0c0410ab8210629a4e6478a26efd4
Reviewed-on: https://dart-review.googlesource.com/19062
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2017-11-07 18:55:00 +00:00
Brian Wilkerson
a18207d61d
Rework parseTopLevelDeclaration so that the last consumed can be passed into several additional methods
...
Change-Id: I7bca690eaa4d6ba9b743544d81ad5bd68986c4b2
Reviewed-on: https://dart-review.googlesource.com/19021
Reviewed-by: Dan Rubel <danrubel@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2017-11-07 18:21:10 +00:00
Dan Rubel
cf3ced607e
Update scanner to gracefully degrade given invalid UTF-8
...
Fix https://github.com/dart-lang/sdk/issues/31193
Change-Id: I8ede0268ebff9c7e3dab003eff93a263a5d0b6ef
Reviewed-on: https://dart-review.googlesource.com/18740
Reviewed-by: Florian Loitsch <floitsch@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2017-11-07 18:19:29 +00:00
Brian Wilkerson
723f8bca05
Convert parseMetadataStar and partially convert parseMetadata
...
Change-Id: I546206f1b7de042827a519f4ac9c721b98a3038e
Reviewed-on: https://dart-review.googlesource.com/19020
Reviewed-by: Dan Rubel <danrubel@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2017-11-07 16:14:50 +00:00
Vyacheslav Egorov
d755f87781
[kernel] Improve performance of the BinaryPrinter.
...
In order of importance:
* manually inline putIfAbsent invocation in StringIndexer.put;
* manually inline writeList into writeNodeList;
* don't create Switch/Label indexers eagerly. Most functions don't need them.
Before this change:
AstToBinary(RunTimeRaw): 83019.54 us.
AstToBinaryP50(RunTimeRaw): 80010 us.
AstToBinaryP90(RunTimeRaw): 96234 us.
After this change:
AstToBinary(RunTimeRaw): 57031.02 us.
AstToBinaryP50(RunTimeRaw): 56251 us.
AstToBinaryP90(RunTimeRaw): 60861 us.
Bug:
Change-Id: Ida2365088a51a5095c2ce8aef5f1582bc0b5b99e
Reviewed-on: https://dart-review.googlesource.com/19005
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Vyacheslav Egorov <vegorov@google.com >
2017-11-07 15:04:09 +00:00
Dan Rubel
c18275f6c2
Fix type argument comment parsing
...
Change-Id: Ia8ca73131471af1c36f13d50a6b30fe63e607bb2
Reviewed-on: https://dart-review.googlesource.com/18980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2017-11-07 14:32:29 +00:00
Brian Wilkerson
276ce36c3c
Convert most of the variable declaration parsing
...
Change-Id: I0f967af1d006cbc0ecec54846a8600b912f81a7d
Reviewed-on: https://dart-review.googlesource.com/18961
Reviewed-by: Dan Rubel <danrubel@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2017-11-07 14:20:40 +00:00
Vyacheslav Egorov
9ccc2877eb
[kernel] Update binary_bench to use a single name for each benchmark.
...
Previously we used one name for command line argument and one name for
output.
Bug:
Change-Id: Idc422f077e77cd932a27380d49e2c0b061a6b716
Reviewed-on: https://dart-review.googlesource.com/19001
Reviewed-by: Martin Kustermann <kustermann@google.com >
2017-11-07 09:21:49 +00:00
Johnni Winther
0cb8876756
Extract a NoSuchMethodData object from NoSuchMethodRegistry
...
Change-Id: Ie20797a25f61be4222278b26dcec9c31370c31b2
Reviewed-on: https://dart-review.googlesource.com/18821
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-11-07 09:03:38 +00:00
Konstantin Shcheglov
11543a9540
Update Library.additionalExports during combining.
...
Bug:
Change-Id: Ia99a9f64834acb62ee6ffb95836b957b85f90731
Reviewed-on: https://dart-review.googlesource.com/18960
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2017-11-07 04:08:29 +00:00
Dan Rubel
599bbd4269
Cleanup AnalyzerDietListener buildFields
...
Change-Id: Ifb29a2ca1fa2ee6eb0adffbcd2896ffeea7083ba
Reviewed-on: https://dart-review.googlesource.com/18901
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2017-11-07 02:42:59 +00:00
Konstantin Shcheglov
9755cf6de8
Include public static members of classes in included libraries.
...
Bug:
Change-Id: I03dc21402b5298621086891f82d93fb37f1c0ed4
Reviewed-on: https://dart-review.googlesource.com/18903
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2017-11-07 01:45:29 +00:00
Harry Terkelsen
12baebc768
Set outer closure needs 'this' if inner needs 'this' for rti
...
Change-Id: I46850f2a28abb499fa64266480fc108b38ecbfb9
Reviewed-on: https://dart-review.googlesource.com/18904
Commit-Queue: Harry Terkelsen <het@google.com >
Reviewed-by: Emily Fortuna <efortuna@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-11-07 00:17:21 +00:00
Sigmund Cherem
14843eb067
Create deferred-load-task from the front-end strategy.
...
This CL also moves code around a bit to prepare for the kernel implementation.
There are minimal changes, most of the code is the same. The refactor will make
the diff on the next CL much simpler
Change-Id: I4fff9c6511a5c19264c5573c4e2a0fffa2d61bfd
Reviewed-on: https://dart-review.googlesource.com/18681
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2017-11-06 23:34:00 +00:00
Brian Wilkerson
758a671fee
Convert for statements
...
Change-Id: I9ccf1adbca7c3a78578e57446c1cd21249e10c00
Reviewed-on: https://dart-review.googlesource.com/18863
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Dan Rubel <danrubel@google.com >
2017-11-06 23:07:32 +00:00
Konstantin Shcheglov
c055c64e0f
Only accessible constructors should be copied into mixins.
...
R=brianwilkerson@google.com , paulberry@google.com
Bug:
Change-Id: I6143dd084192880ce59e8aa95566e9bd74a2a81f
Reviewed-on: https://dart-review.googlesource.com/18900
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-11-06 20:43:58 +00:00
Konstantin Shcheglov
00d9c180c3
Fix for combining private members.
...
Bug:
Change-Id: If623420777c13a2d6e56dfcc33be4f2d4ae69f34
Reviewed-on: https://dart-review.googlesource.com/18686
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-11-06 18:25:44 +00:00
Brian Wilkerson
e4e82643b9
Add highlight ranges to a few more tests
...
Change-Id: I00ad76d7c16eb34d2ba9c4778478ca5faa8b9036
Reviewed-on: https://dart-review.googlesource.com/18860
Reviewed-by: Dan Rubel <danrubel@google.com >
2017-11-06 17:40:25 +00:00
Brian Wilkerson
167b529da7
Convert most of the statement parsing methods
...
Change-Id: I1c7fa1abda6cd3d45ec83d32c864b4e23700b837
Reviewed-on: https://dart-review.googlesource.com/18861
Reviewed-by: Dan Rubel <danrubel@google.com >
2017-11-06 17:33:35 +00:00
Sigmund Cherem
46c859152a
Add output unit data: an intermediate representation of the resuls of deferred loading
...
Change-Id: I54fb3eb49338f137c127113fd884ce54a1187a64
Reviewed-on: https://dart-review.googlesource.com/18508
Reviewed-by: Stephen Adams <sra@google.com >
2017-11-06 17:15:40 +00:00
Samir Jindel
bc9645509e
Revert "Revert "[kernel] Fix NoSuchMethod errors for generic functions.""
...
This un-revert fixes the issues revealed in https://logs.chromium.org/v/?s=chromium%2Fbb%2Fclient.dart%2Fvm-kernel-mac-release-x64-be%2F2217%2F%2B%2Frecipes%2Fsteps%2Fvm_tests%2F0%2Fstdout .
Patchset 1 contains the original revision unmodified.
This reverts commit 9029ee09c5 .
Bug:
Change-Id: I109c011c2688144b00293ce50b3aad53e018a2f2
Reviewed-on: https://dart-review.googlesource.com/18340
Reviewed-by: Régis Crelier <regis@google.com >
2017-11-06 17:07:38 +00:00
Dan Rubel
d79c68ea01
fix external factory errors
...
Change-Id: Id94d0fe355a3ad78cdd66bfbcb2ccc2bb72dc28b
Reviewed-on: https://dart-review.googlesource.com/17301
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-11-06 16:21:44 +00:00
Brian Wilkerson
c89b566bd1
Convert the parsing of switch statements
...
Change-Id: I8c3014674929b2822685756edeafb34185437551
Reviewed-on: https://dart-review.googlesource.com/18761
Reviewed-by: Dan Rubel <danrubel@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2017-11-06 14:58:50 +00:00
Brian Wilkerson
b5ba13202d
Add a description of the packages used to implement a plugin
...
Change-Id: Ibb5207e93e7c12560cd9be6845c63a3d50e23df5
Reviewed-on: https://dart-review.googlesource.com/18780
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Devon Carew <devoncarew@google.com >
2017-11-06 14:11:59 +00:00
Aske Simon Christensen
306668bf0a
Support syntax error outcome in sdk test suite.
...
Also updated test expectations.
Change-Id: I25fe9f47904beb89b9e18cfafd2e889c6a8106a2
Reviewed-on: https://dart-review.googlesource.com/18800
Reviewed-by: Erik Ernst <eernst@google.com >
Commit-Queue: Aske Simon Christensen <askesc@google.com >
2017-11-06 12:22:51 +00:00
Erik Ernst
40b6741778
Adds support for syntax error in tests to test.py.
...
This CL modifies the Dart source used from test.py such that it takes
`syntax error` into account as an expected outcome in test files (so
that we can have `//# 01: syntax error` with a similar meaning as
`//# 01: compile-time error`).
For all tools except the spec_parser, `syntax error` is the same
outcome as `compile-time error`; that is, nobody else will see the
difference.
For the spec_parser, `syntax error` is the outcome where parsing has
failed; `compile-time error` is taken to mean some other compile-time
error, i.e., the spec_parser is expected to _succeed_ when the
expected outcome is `compile-time error`.
Test files in language and language_2 have been adjusted to use the
outcome `syntax error` where appropriate.
The status files in language and language_2 for the spec_parser have
been adjusted such that they fit all the new `syntax error` outcomes
in test files.
Other status files have been adjusted in a few cases where tests were
corrected (because a compile-time error which was clearly not intended
to be a syntax error turned out to be caused by a typo, which means
that the actual compile-time error has never been tested).
The spec grammar Dart.g was adjusted in a few cases, when some bugs
were discovered. In particular, the treatment of Function has been
changed: It is now known by the parser that Function does not take
any type arguments. This makes no difference for developers, because
they cannot declare a type named Function anyway, but it means that
a number of tricky parsing issues were resolved.
Dart.g was also adjusted to allow `qualified` to contain three
identifiers, which is an old bug (preventing things like metadata on
the form `@p.C.myConst`).
Change-Id: Ie420887d45c882ef97c84143365219f8aa0d2933
Reviewed-on: https://dart-review.googlesource.com/18262
Commit-Queue: Erik Ernst <eernst@google.com >
Reviewed-by: Bob Nystrom <rnystrom@google.com >
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com >
2017-11-06 08:56:09 +00:00
Johnni Winther
29f3cc0db1
Various fixes for erroneous cases
...
Change-Id: I1c370dd220ff5e27196dcc8294d3c8eeda80462c
Reviewed-on: https://dart-review.googlesource.com/18483
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-11-06 08:42:46 +00:00
Brian Wilkerson
c6c7580c92
Add error detection and reporting for errors related to plugins
...
Change-Id: If17e88b64022fe71c992c5867c80263c0e6b953b
Reviewed-on: https://dart-review.googlesource.com/18781
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2017-11-05 19:21:07 +00:00
Jenny Messerly
384678e4b3
port DDC's code_generator to Kernel
...
Change-Id: I2b6a5f56a69f5d3a965aefc3f8d4550d5940ac5a
Reviewed-on: https://dart-review.googlesource.com/17980
Reviewed-by: Vijay Menon <vsm@google.com >
Reviewed-by: Bob Nystrom <rnystrom@google.com >
Reviewed-by: Leaf Petersen <leafp@google.com >
2017-11-04 22:17:56 +00:00
Brian Wilkerson
454088ae28
Fix a typo in the status pages
...
Change-Id: I516a70537d850b94de60dcf63f832518753e5b11
Reviewed-on: https://dart-review.googlesource.com/18760
Reviewed-by: Devon Carew <devoncarew@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2017-11-04 21:57:37 +00:00
Jenny Messerly
f2478e5526
fix SDK for fuzzy arrows change to main function
...
Change-Id: I7b7d5b64c1694b0cd4d5b6d8b13231db236617cc
Reviewed-on: https://dart-review.googlesource.com/18688
Reviewed-by: Jenny Messerly <jmesserly@google.com >
Commit-Queue: Jenny Messerly <jmesserly@google.com >
2017-11-04 08:20:24 +00:00
Stephen Adams
c566db6227
Use full name for more elements in DUMP_IR output
...
Names now match old version.
TBR=sigmund@google.com
Change-Id: Ieecceef3fc66f18c926ed2eb8e8f234e18678efb
Reviewed-on: https://dart-review.googlesource.com/18684
Reviewed-by: Stephen Adams <sra@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2017-11-04 00:23:24 +00:00
Paul Berry
cd49cf1201
Insert implicit downcasts for compound assignments.
...
Change-Id: I090594e16fa890864775b2ebc58842d861c134a4
Reviewed-on: https://dart-review.googlesource.com/18517
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2017-11-03 22:07:10 +00:00
Konstantin Shcheglov
cfe6812abd
Native classes are fixed, update the tests.
...
R=brianwilkerson@google.com , danrubel@google.com
Bug:
Change-Id: I2423c938adb4d5e39e3fd3613a73108b91018e77
Reviewed-on: https://dart-review.googlesource.com/18513
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2017-11-03 20:28:40 +00:00
Konstantin Shcheglov
5ea30b4e3d
Rename performace_logger.dart to performance_logger.dart
...
R=paulberry@google.com , sigmund@google.com
Bug:
Change-Id: Ib7b6d122dff3ddabde3db2270daa777a269e04ed
Reviewed-on: https://dart-review.googlesource.com/18512
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2017-11-03 20:24:00 +00:00
Konstantin Shcheglov
c5722c682b
Don't propose the 'Remove Type' Quick Assist when there is no initializer.
...
R=brianwilkerson@google.com
Bug:
Change-Id: If87a9b171ac0672772ee971051687a171c0bcd06
Reviewed-on: https://dart-review.googlesource.com/18510
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2017-11-03 20:13:00 +00:00
Konstantin Shcheglov
611475aaaa
Separate KernelDriver.getKernel() and getKernelSequence().
...
The reason to have both is that IKG needs kernels for all libraries,
potentially not even deserialized from bytes, if we eventually get this
optimization.
OTOH, Analyzer always needs just one library, with enough outlines
to make sense of the dependencies. For now, getKernel() is implemented
using getKernelSequence(), this will change with switching to
outline based compilation.
R=paulberry@google.com , sigmund@google.com
Bug:
Change-Id: Iba02bc3a4cdb67a896c4faa2f809c7cb8069aa9e
Reviewed-on: https://dart-review.googlesource.com/18509
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2017-11-03 20:00:01 +00:00
Stephen Adams
4babd94282
Update dart2js.noInline docs
...
Change-Id: Id6870b405d2a379c221a3fc493adc547c84c450b
Reviewed-on: https://dart-review.googlesource.com/18506
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
Reviewed-by: Kevin Moore <kevmoo@google.com >
2017-11-03 19:04:20 +00:00
Sigmund Cherem
24e4d3bb39
Define a location of the synthetic __loadLibrary_foo method
...
Change-Id: I8fd950cf7a6e6aed79240daed085f2a02e16666e
Reviewed-on: https://dart-review.googlesource.com/18430
Commit-Queue: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Peter von der Ahé <ahe@google.com >
2017-11-03 18:59:40 +00:00
Konstantin Shcheglov
cd2f4a1e44
Update references to Class and TypeParameter, updates for tests.
...
R=ahe@google.com , kmillikin@google.com , paulberry@google.com , sigmund@google.com
Bug:
Change-Id: I8a922df8c21fe2ff54c60da989f87524b0cff56c
Reviewed-on: https://dart-review.googlesource.com/17340
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2017-11-03 18:55:11 +00:00
Paul Berry
9ac19f0122
Pass --strong to vm when running front_end testcases in strong mode.
...
Also, stop passing "Hello, World!" as a command line argument when
executing front_end testcases.
Change-Id: I7c3ec6a301537a84bd14e232b5a0d6b8a7bd1914
Reviewed-on: https://dart-review.googlesource.com/18503
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-11-03 18:28:51 +00:00
Sigmund Cherem
c53c2f948d
Support caching impacts with the kernel frontend. This is needed by deferred
...
loading.
To make this possible, this CL explicitly models the impact cache and deleter.
Change-Id: I444625a7a14155d9c530a390854a42d277055aaa
Reviewed-on: https://dart-review.googlesource.com/18463
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2017-11-03 17:52:21 +00:00
Brian Wilkerson
cfa3a809f0
Rework Parser.parseFunctionBody
...
Change-Id: Ie19d902ad9d456d3c05ecbf04d9a0f1ebecf7d18
Reviewed-on: https://dart-review.googlesource.com/18620
Reviewed-by: Dan Rubel <danrubel@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2017-11-03 17:47:01 +00:00
Konstantin Shcheglov
b2b813a37a
Update ProtectedFileByteStore in IKG on acceptLastDelta().
...
So, we don't leak result keys to IKG clients.
Bug:
Change-Id: Ib3002aad690bf98884816a3978f759acd88b12ec
Reviewed-on: https://dart-review.googlesource.com/17342
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Alexander Aprelev <aam@google.com >
2017-11-03 17:31:23 +00:00
Dan Rubel
15a0abf956
Fix OutlineBuilder native class and AnalyzerDietListener tests
...
Update the OutlineBuilder and AstBuilder to fix native handling,
and in the process, fix several AnalyzerDietListener tests.
Fix https://github.com/dart-lang/sdk/issues/30836
Change-Id: I7e3b6c4c7d241f1325a5fce1e117e277c6166e49
Reviewed-on: https://dart-review.googlesource.com/18500
Reviewed-by: Paul Berry <paulberry@google.com >
2017-11-03 17:16:51 +00:00
Samir Jindel
7b6b716071
[kernel] Don't cancel completed streams in the Async transformation.
...
Bug:
Change-Id: I40742b13f1b47f2817c480bfc257deaf6f1028ca
Reviewed-on: https://dart-review.googlesource.com/17820
Commit-Queue: Samir Jindel <sjindel@google.com >
Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
2017-11-03 17:03:01 +00:00
Lasse R.H. Nielsen
adcb6a7399
Make main invocation not fail strong-mode type checking.
...
Bug: http://dartbug.com/31270
Change-Id: Id6ad2a429d5dc44b437a0fdd8fb4889d3dccf194
Reviewed-on: https://dart-review.googlesource.com/18480
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com >
Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
2017-11-03 16:06:00 +00:00
Konstantin Shcheglov
223a78d7bf
Listen for watch events and notify AnalysisServer.
...
So, AnalysisServer can serve a broadcast Stream and let EditDomain
reset a pending refactoring.
R=brianwilkerson@google.com , devoncarew@google.com
Bug: https://github.com/flutter/flutter-intellij/issues/1465
Change-Id: I9462ad623ef261a658655a7445ee0ad9b0029a18
Reviewed-on: https://dart-review.googlesource.com/18426
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-11-03 15:59:45 +00:00