Commit Graph

21367 Commits

Author SHA1 Message Date
Daniel Hillerström 0db6545b51 Illegal return type check for functions marked async* or sync*.
Extends the illegal return type check for async functions to cover
illegal return types for functions marked async* or sync* as well.

Adds new error messages for illegal return types of functions marked
async, async*, and sync*. These error messages conform with those
produced by the analyzer.

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

Bug: www.dartbug.com/33068
Change-Id: I6d8690537139d3d094a4e295fcac9de4f4a7f0af
Reviewed-on: https://dart-review.googlesource.com/69581
Commit-Queue: Daniel Hillerström <hillerstrom@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2018-08-16 07:07:40 +00:00
Dan Rubel ad6029c608 Update fasta parser to split ">>=" when parsing type var
Change-Id: Id60da00165ef1c7d9128985ccadef06f62637a24
Reviewed-on: https://dart-review.googlesource.com/70181
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-16 01:04:46 +00:00
Dan Rubel 4eb4d75270 Remove unused event parameter
Change-Id: I097886cae93204d671a3aca4caaafea8d117989d
Reviewed-on: https://dart-review.googlesource.com/70180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-16 01:04:46 +00:00
Brian Wilkerson f92043c3c8 Get some code completion tests passing under CFE
Change-Id: I0b15fd09ae8c1b8bb7d648066edf7a89cfb398a9
Reviewed-on: https://dart-review.googlesource.com/70164
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-08-16 00:58:44 +00:00
Dan Rubel 825df975a0 Revise fasta type arg/param parsing to ignore "<".endGroup
The scanner associates '<' with '>' and '>>',
but the parser cannot use '<'.endToken/endGroup reliably
and wastes time updating that token's endToken/endGroup field.

This CL updates type info parsing to ignore '<'.endGroup
and step through the token stream (which it has to do anyway),
for improved parsing.

This CL causes a handful of existing tests to fail (marked as @failingTest)
and test failures will be addressed in a subsequent CL.

Change-Id: I788e9a74cd2891f98f44bba15d5669febfec6c64
Reviewed-on: https://dart-review.googlesource.com/70001
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-15 22:16:40 +00:00
Alexander Markov 2b8b955641 [vm/kernel/bytecode] Fix field initializers in constructors
Fix for failing test language_2/final_field_initialization_order_test.
Bytecode generator was incorrectly omitting field initializer if
constructor also has initializer for that field.

Change-Id: I046231865677e1e59122d4d61b238e52b88003b7
Reviewed-on: https://dart-review.googlesource.com/70140
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-08-15 15:40:54 +00:00
Brian Wilkerson 0bcf767d4d Clean up more preview-dart-2 related code
Change-Id: Id1f81a635727f0f2fafb5dea4178f303c6ca4659
Reviewed-on: https://dart-review.googlesource.com/70143
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-08-15 14:43:12 +00:00
Brian Wilkerson 964a2fb9bb Produce fix when super constructor does not exist
Change-Id: I8186b42a938a3ad814e624ba5b378c130422209f
Reviewed-on: https://dart-review.googlesource.com/70080
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-08-15 13:24:32 +00:00
Brian Wilkerson 49437e3bae Split TooManyArguments to support quick fixes
Change-Id: I31511f619cafbce01f68d6e182328567a2bc3523
Reviewed-on: https://dart-review.googlesource.com/70021
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-08-15 13:24:22 +00:00
Daniel Hillerström b13c4e4c9f Updates status file to expect MissingCompileTimeError for illegal
async function return type check whenever running in 'legacy mode'.

Adapts language_2_kernel.status such that a MissingCompileTimeError is
expected for illegal return types of async functions when running in
'legacy mode'. Updates the commentary in finishFunction in
body_builder.dart.

Some legacy tests* have revealed that it may not always be correct to
check whether [strongMode] is enabled before checking the return type of
async functions. The reason behind the strongMode check was to ensure
that [_typeInferrer.typeSchemaEnvironment] would be instantiated as
per ahe's suggestion.

There seems to be some inconsistency in the code base as to when
[_typeInferrer.typeSchemaEnvironment] is non-null. For example, during
the fasta perf benchmarks one may observe a null value, whilst it
seems that the member is always non-null when running `dart
--no-preview-dart-2 <script.dart>`.

* test log: https://ci.chromium.org/p/dart/builders/luci.dart.ci.sandbox/front-end-legacy-linux-release-x64/621

Change-Id: I2211bfe0ae75a7aa35e2d698ff5cba27af484d07
Bug: 33425
Reviewed-on: https://dart-review.googlesource.com/69920
Commit-Queue: Daniel Hillerström <hillerstrom@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2018-08-15 06:52:48 +00:00
Devon Carew a517d19788 Change how we calculate memory usage for the analysis server benchmarks.
Change-Id: I22ce228bd6bbd9fface6ebc19b4bb80d601b9893
Reviewed-on: https://dart-review.googlesource.com/70100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-08-15 02:04:42 +00:00
Alexander Markov feff33b892 [vm/kernel/bytecode] Implement overlapping of type arguments in bytecode
Instantiator type arguments are sometimes reused instead of doing
instantiation at run time. VM has a bunch of assertions to verify
that this optimization happened. In case of bytecode pipeline, decision
to reuse instantiator type arguments is done while generating bytecode.

For this optimization to correctly happen, bytecode generator
should be able to construct instantiator type arguments the same way
as VM does at run time. Besides flattening of type arguments of
superclasses, VM shrinks them by overlapping type parameters with
type arguments of a superclass (if they match). This CL implements
such overlapping in bytecode generator.

Also, --overlap_type_arguments VM option is removed, as disabling
of type arguments overlapping would break bytecode pipeline.

Change-Id: Ib276c0e688e0e86b44278d88a5c0af09dd342798
Reviewed-on: https://dart-review.googlesource.com/70060
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-08-14 21:51:17 +00:00
Keerti Parthasarathy b99e41ac6f Revert "fix #28233, add hint for missing returns to function expressions"
This reverts commit 058510eeab.

This causes a lot of missing_return failures internally and requires time to fix.

Change-Id: I2c7a79c6e838bbd9f101f53919b1db2c0d4a2594
Reviewed-on: https://dart-review.googlesource.com/70024
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2018-08-14 21:10:27 +00:00
Alexander Aprelev 2c7e6df9d3 [frontend-server] Fix frontend-server test on Windows.
Change-Id: Ib659b28555f2be0f05decdc7be41c6982e2d4804
Reviewed-on: https://dart-review.googlesource.com/70023
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-08-14 20:21:21 +00:00
Paul Berry 75af21c363 Add wrapped versions of element classes.
These new classes are in lib/src to discourage them from being widely
used.  The intention is to use them in angular_analyzer_plugin, so
that it can extend the wrapper classes rather than implement the
element classes directly.  This will ensure that
angular_analyzer_plugin doesn't break when new methods are added to
element classes.

Change-Id: I33d82e4534691f546fcabc7b9d6c1da0258a5fc0
Reviewed-on: https://dart-review.googlesource.com/70020
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-08-14 19:07:56 +00:00
Brian Wilkerson 817e2cacb5 Base fixes on UNDEFINED_GETTER rather than UNDEFINED_IDENTIFIER
Change-Id: Icf951cbb8b046985df4f6cae6e7e7e1cfab7766a
Reviewed-on: https://dart-review.googlesource.com/69980
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-08-14 17:50:48 +00:00
Brian Wilkerson ecad8d67b3 Add fix for getters on parameters
Change-Id: I42b34534d9a83dd6802e5a79ea1d69bd4bbef887
Reviewed-on: https://dart-review.googlesource.com/69981
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-08-14 17:50:14 +00:00
Leaf Petersen 5a8afa76b1 Triage language tests for void in DDC and analyzer
Change-Id: Ib72fa4515ac29b66d90b237739f97219b98acda2
Reviewed-on: https://dart-review.googlesource.com/67282
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2018-08-14 17:42:43 +00:00
Dan Rubel 0aeaef23e2 Remove parser reliance on "<".endGroup/endToken
This replaces calls to lt.endGroup when parsing type arg/param
with calls to computeTypeParamOrArg. This is a step towards
removing lt.endGroup everywhere and making type arg/param
parsing more resiliant and streamlined.

Change-Id: I5b3374769367f601c8910afa18116a2edd3f80c0
Reviewed-on: https://dart-review.googlesource.com/70000
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-08-14 17:04:34 +00:00
Sam Rawlins 57918dad37 Fix some new 'missing_return' errors in kernel
Change-Id: I561ca47e698f51c01d998c7b347436f2993a6cae
Reviewed-on: https://dart-review.googlesource.com/69540
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-08-14 16:14:15 +00:00
Devon Carew 6a4f1b76ac Remove the --preview-dart-2 option from dartanalyzer and the analysis server.
Change-Id: I268b9d5f79b30d0e4a0f8e6bb81a7738c98e5eea
Reviewed-on: https://dart-review.googlesource.com/69802
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-14 04:24:47 +00:00
Alexander Markov 8c16c4daaf [vm/kernel/bytecode] Constant evaluate Symbol literals in bytecode
Now, instead of generating Symbol constant pool entries, bytecode generator
uses kernel-to-kernel constant evaluator to evaluate symbol literals.

Change-Id: I8dae4e388b6c1e8158ce39da792bb2e1cea2687a
Reviewed-on: https://dart-review.googlesource.com/69900
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-08-14 01:38:42 +00:00
Alexander Markov 0d1abc535b [vm/kernel/bytecode] Initialize _Closure._delayed_type_arguments to Object::empty_type_arguments()
As TypeArguments == null means 'vector of all dynamic', VM uses special
object (Object::empty_type_arguments()) to indicate absence of
_Closure._delayed_type_arguments.

This CL corrects bytecode to use Object::empty_type_arguments() (via new
constant pool entry EmptyTypeArguments) to initialize
_Closure._delayed_type_arguments when allocating a closure.

Change-Id: I9b00bc0606de85c02350c8eef08d8952c3e224ee
Reviewed-on: https://dart-review.googlesource.com/69840
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-08-13 22:46:59 +00:00
Brian Wilkerson 5f4343f864 Remove the analyzer code from DuplicatedNamePreviouslyUsedCause
Change-Id: Ia605421652a045b282b856be1ecfe7bd086876d9
Reviewed-on: https://dart-review.googlesource.com/69801
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-08-13 22:37:27 +00:00
Devon Carew e2164fb292 Update the analyzer_cfe_progress.dart scrip to measure language_2 failures.
Change-Id: Iaf9a10b28a1d8b7d5313cef8ea8a2f414bae2ab7
Reviewed-on: https://dart-review.googlesource.com/69820
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-08-13 22:15:41 +00:00
Alexander Markov a8155f25fc [vm/aot/tfa] Infer int type, devirtualize dynamic calls
This change improves type flow analysis to infer int types, in addition
to concrete classes (int type is abstract and has 2 concrete subclasses,
_Smi and _Mint).

Also, this CL enables devirtualization of dynamic calls (previously, only
calls with known interface target were devirtualized).

DartMicroBench.PrimeNumber:
x64: +221%
armv8: +461%
armv7h: +47.98%

No measurable impact on Flutter gallery build time in release mode.

Issue: https://github.com/flutter/flutter/issues/19677

Change-Id: I34db195f52f2a434218ee11eee7f308d4661738b
Reviewed-on: https://dart-review.googlesource.com/69520
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-08-13 20:48:33 +00:00
Sigmund Cherem 8a05c944cd Remove JsInvocationMirror._invokeOn
I believe this was code only used via dart:mirrors

Soon we might want to rename JSInvocationMirror to just JsInvocation (so it's
clear that it is only used for nsm)

Change-Id: I0e0f836b18e6f290311c7173cfafedfcccab5c6f
Reviewed-on: https://dart-review.googlesource.com/69246
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-08-13 18:09:14 +00:00
Alexander Markov 741f662a60 [vm/kernel/bytecode] Fix number of checked arguments in bytecode calls
Number of checked arguments is corrected in ICData objects created when
reading bytecode, both for instance and static calls.

InstanceCall1 and InstanceCall2 bytecode instructions are replaced with
InstanceCall which works for any number of checked arguments. This makes
decision on number of checked arguments internal to VM and it is no longer
exposed to bytecode.

Change-Id: I0bba01eca6347336f3832de863b2ce4715fda04a
Reviewed-on: https://dart-review.googlesource.com/69421
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-08-13 17:50:21 +00:00
Brian Wilkerson 8f768e7305 Fix an NPE when creating a fix to add a method for an undefined identifier that is not in a class context
Change-Id: Id7989b1dc0dc80b820aaf57a746247ac7525ed56
Reviewed-on: https://dart-review.googlesource.com/69660
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-08-13 17:32:59 +00:00
Brian Wilkerson d72334e6a2 Prevent NPEs in the fix processor
Change-Id: I2a5c12bf6f3aec4c8a504590f39b666c9934e4e4
Reviewed-on: https://dart-review.googlesource.com/68435
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-08-13 17:30:10 +00:00
Dan Rubel 9619e2cd77 Remove unused fasta parser methods and event parameter
Change-Id: I0bf050a475ad3548342307027d14aba4badf468e
Reviewed-on: https://dart-review.googlesource.com/69620
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-08-13 16:42:12 +00:00
Brian Wilkerson 978f12c17f Use void in place of Null in analysis_server
Change-Id: Ifef805cb3c0111e237a6147f71a968958d5651e5
Reviewed-on: https://dart-review.googlesource.com/69560
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-08-13 13:16:53 +00:00
Daniel Hillerström b244c0805d Extends the type checking of async functions to check whether the
declared return type of an async function is a super type of Future<T>
for any T.  In case the check is not successful an error message is
produced. The location of the name of the offending function
declaration is used as location information for message. Ideally we
would use the location of the type, so until types get annotated with
location information the error message remains suboptimal.

This closes #33425 and closes #34057.

Thanks to dmitryas and jensj for their helpful guidance.

Bug: dartbug.com/33425 dartbug.com/34057
Change-Id: I3b3dadc25b574422ea1f38671fe8cba3ffdd494c
Reviewed-on: https://dart-review.googlesource.com/69307
Commit-Queue: Daniel Hillerström <hillerstrom@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-08-13 12:22:47 +00:00
Vyacheslav Egorov 1354c9bde0 [vm] Fix frontend_server after VmTarget move.
frontend_server uses getTarget - which means we need to call
installAdditionalTargets to ensure that flutter & vm targets are
properly installed.

Change-Id: I00a3d06f76c3bd31fe4e27e3947abea4c7883c44
Reviewed-on: https://dart-review.googlesource.com/69464
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-08-13 09:47:37 +00:00
Alexander Thomas ba10df6611 [infra] Switch pkg bots to Dart 2
* Update named configs for unit tests to Dart 2.
* Bump json_rpc_2 in front_end package.
* Use named configurations in unit tests.
* Fix typing issues.

Change-Id: Id3b393a0d2abe92c8eaec10fa8057fb35d18a4c6
Reviewed-on: https://dart-review.googlesource.com/67341
Reviewed-by: Jens Johansen <jensj@google.com>
2018-08-13 07:04:06 +00:00
Brian Wilkerson 0bb8cbd9cb Use void in place of Null in analyzer_plugin
Change-Id: I21a3d3646c5906256e21fb8d7d71f8433b1b39e9
Reviewed-on: https://dart-review.googlesource.com/69500
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-08-11 15:30:28 +00:00
Mike Fairhurst 010828ada4 Fix issue with pub upgrade not running on existing plugins.
Code trying to run "pub upgrade" was blocked behind "runPub" being
false. Instead, expect the pub command to run. If the folder exists, run
"pub upgrade," and if it doesn't, run 'pub get'.

Change-Id: Ia37bf11d08e921e31d2ed4410210d03b8dbe1b00
Reviewed-on: https://dart-review.googlesource.com/69440
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2018-08-10 23:24:43 +00:00
Konstantin Shcheglov 5a2a13c8bf Store and resynthesize codeOffset/codeLength for functions and methods.
R=brianwilkerson@google.com

Change-Id: I2106fb407b7488eede8c06112f1ac582b92d6af5
Reviewed-on: https://dart-review.googlesource.com/69400
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-08-10 21:37:02 +00:00
Alexander Markov 98d07dd8bf [vm/kernel/bytecode] Minor fixes in bytecode generator
This CL contains 2 fixes:

* Instantiator type arguments for factory constructors are calculated
  using factory's type parameters and not class type parameters
  (as factory's body uses factory's type parameters in kernel AST)
  This improves reuse of instantiator type arguments in factory
  constructors (optimization).

* Result of _AssertionError::_throwNew call is dropped off the stack.
  Although control never returns from _throwNew, this fix is needed
  to maintain correct stack balance while compiling bytecode.

Change-Id: Ib781b0d790a89576ef62b768513663e7e509749c
Reviewed-on: https://dart-review.googlesource.com/69384
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-08-10 21:07:06 +00:00
Konstantin Shcheglov fe0640e3b1 Refactor way of providing file info, set codeRange for units.
This fixes a lot of search/refactoring tests, about 200.

R=brianwilkerson@google.com

Change-Id: I6ce5f61a08b8effa73ffde3861ff68eadd1f4e04
Reviewed-on: https://dart-review.googlesource.com/69383
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-10 20:43:54 +00:00
Sam Rawlins 761178e471 Fix DEAD_CODE issue when break label is found inside a for-each.
Fixes #31714.

Bug: https://github.com/dart-lang/sdk/issues/31714
Change-Id: I36580a16604765497ee117625cb0b035603a69f3
Reviewed-on: https://dart-review.googlesource.com/69281
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-10 19:39:13 +00:00
danrubel c3f5c07a47 Simple type argument parsing fixes and more tests
This fixes some of the event tokens when parsing simple type arguments
with '>>' or '>=', and organizes and adds more tests.
In addition, this addresses a comment in
https://dart-review.googlesource.com/c/sdk/+/69261

Change-Id: I16e3a5360ac2e62dd1853df946b88611ff099d94
Reviewed-on: https://dart-review.googlesource.com/69360
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-08-10 18:58:32 +00:00
Brian Wilkerson ea9b594230 Added some quality measures to the completion stress test
Change-Id: I6d1a90fdabda2db33cc96f84fe8ee1b8aba98d34
Reviewed-on: https://dart-review.googlesource.com/69282
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-08-10 18:38:13 +00:00
Devon Carew 4c659e9f83 Have --use-cfe contribute to the driver signature.
Change-Id: Ica21f166bde60e41e19c3e6ab49e05a29540b0b0
Reviewed-on: https://dart-review.googlesource.com/69320
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-08-10 18:11:41 +00:00
Konstantin Shcheglov 0aa8f2d5cb Fix for some Quick Fix tests by adding CFE generated error codes.
R=brianwilkerson@google.com

Change-Id: I2b06dc388a00aa0c8e5ab3db045b3fe8ec02ed5e
Reviewed-on: https://dart-review.googlesource.com/69283
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-10 18:00:46 +00:00
Konstantin Shcheglov 28583df3ee Store codeOffset / codeLength for classes.
Change-Id: Ief9d529df814d9b4f33f98c485de6b91c6bd2f69
Reviewed-on: https://dart-review.googlesource.com/69280
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-10 16:25:22 +00:00
Konstantin Shcheglov ac973e5ba7 Return SourceSpan with actual length from _CompilationMessage.
Change-Id: I883a4ce1b6fc63643db259a0d22e0719b460c109
Reviewed-on: https://dart-review.googlesource.com/69005
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-08-10 16:03:42 +00:00
Konstantin Shcheglov d69a354026 Put fileEndOffset into ArgumentsJudgment and use to report argument errors.
Change-Id: Id79bd71e7147be379e93024591134c12aa598a38
Reviewed-on: https://dart-review.googlesource.com/69221
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-08-10 15:40:37 +00:00
danrubel 8e2141f1cf Fix parsing typedefs with <T>=
This is the first CL of several needed to fix typedef parsing
when there is no space between the type parameters and the `=`.

  typedef F<T>= T Function(T);

* Fix some typedef parsing failures
* Add new consts for simple type var ending with ">>" and ">="
* Update computeType and computeTypeParamOrArg to return new consts
* Extract splitGtEq/GtGt/GtGtEq from splitEndGroup
* Hide internal TypeInfo and TypeParamOrArgInfo consts

Change-Id: Ice550f5b15df1f3cad616a2a342644974f14d8ee
Reviewed-on: https://dart-review.googlesource.com/69261
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-08-10 15:09:21 +00:00
William Hesse be7022f6d9 Remove named configuration template expansion code from test.py.
Named configuration templates are expanded by the recipe before being
passed to test.py.

Change-Id: I164df7acf0a0aff76f050b871101590efae51954
Reviewed-on: https://dart-review.googlesource.com/69300
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2018-08-10 13:12:49 +00:00