Commit Graph

4770 Commits

Author SHA1 Message Date
Johnni Winther 2c6f779a76 [cfe] Remove legacyMode
Change-Id: I9384631af94feaf1a345958ff23e6d35c2ba4049
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116202
Reviewed-by: Jens Johansen <jensj@google.com>
2019-09-13 07:38:25 +00:00
Johnni Winther 392cd3b26f [cfe] Delete InferredTypeVisitor
and TypeInferrer.readInferredType/storeInferredType

Change-Id: Iea2a97649adc3097df8abb1cf0aeb6e89b7d7f62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116063
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-13 07:38:25 +00:00
Johnni Winther 71534fe18c [cfe] Make *Impl classes
Change Judgment classes that are 1-to-1 extensions of kernel nodes into
*Impl classes that do not implement *Judgment.

Change-Id: Ia49b131cfb30e7e5c0d5f26a8a43e6dd6d05d2ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116062
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-13 07:38:25 +00:00
Johnni Winther 15ccf4c703 [cfe] Remove unneeded Judgments
Removes StatementJudgment, ExpressionJudgment, and InitializerJudgment
classes that are identical to existing nodes.

Change-Id: If67c1972387bb158bfe775cdf091cae4eadd47c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116061
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-13 07:38:25 +00:00
Johnni Winther 7985b187ab [cfe] Remove ExpressionJudgment.inferredType
Change-Id: I16df27c4dc9616370c946ddb7d4027110df38c7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116060
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-13 07:38:25 +00:00
danrubel 3b1d3de988 update parser to report out of order "?.." operator
Change-Id: I2d90e458d5721d16142752e8ac6a522cc41c2051
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116920
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-09-12 14:38:31 +00:00
Dmitry Stefantsov 94b3a3f2ac [cfe] Don't reuse type parameters of FunctionNode in its functionType
Closes #37536.

Bug: http://dartbug.com/37536.
Change-Id: I7e5d2fc59a0cf53e67c43989cf806ca7dbcc307e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115368
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-12 11:12:52 +00:00
Jens Johansen ce5556ab36 [kernel] Load classes lazily
This CL gives the option to load classes lazily (on by default),
meaning that fields, procedures, constructors and redirecting
factory constructors of classes are not initially read,
but instead read when (or if) needed.

The idea being that many classes aren’t needed, and that
spending time on reading them is thus just a waste of time.

This is especially true in modular compilation where a lot
of modules needs to be given as input as the compilation at
hand might technically rely on it, but in practice only very
few of the classes are actually needed (or very few classes
actually need their members).

The below numbers are comparing a VM without this change and without
the lazy class hierarchy member lists change with
b31566b297 (the base change for those
two changes).

For running a simple hello-world script, on my machine 500 times
and doing statistics on it I can measure the following differences:

With verbose, from kernel_service startup to compile complete:
Difference at 95.0% confidence
        -17.8 +/- 0.555817
        -24.3455% +/- 0.760206%
        (Student's t, pooled s = 4.48379)

With verbose, total runtime measure by `time`
Difference at 95.0% confidence
        -19.346 +/- 0.905217
        -12.0333% +/- 0.563051%
        (Student's t, pooled s = 7.30242)

Without verbose, total runtime measure by `time`
Difference at 95.0% confidence
        -17.862 +/- 0.842905
        -12.0635% +/- 0.569276%
        (Student's t, pooled s = 6.79974)

For running a number of modular compilations I’ve recorded an
improvement in actual runtime in the order of 20-37% depending
on the circumstance. In a real build system, though, the
difference seems to be more in the order of around 5%.

Change-Id: Id329bcf2b01d12c12d7a49f2b8abacd9c2447f05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115703
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-12 08:08:33 +00:00
Dmitry Stefantsov a62289451d Update changelog to include the recent breaking change
Link to the breaking change request:
https://github.com/dart-lang/sdk/issues/37985

Change-Id: I0fcb058e953a43a20e7b663f63bb88100f376a6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116762
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-09-12 07:37:17 +00:00
Alexander Aprelev 0c481a196c Revert Reland '[vm/ffi] Implement FFI callbacks on AOT for ELF and Asm snapshots (excl. blobs).' as it breaks flutter profile execution on ios 32-bit platform.
Fixes https://github.com/flutter/flutter/issues/40114

Change-Id: If8d71e9c19c2e794d29f7ecbacb87457890a2fd5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116883
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2019-09-12 00:10:09 +00:00
danrubel 16c7ac92bf move const method error reporting into parser
Change-Id: Ibae4aeb0362138e742f80186ed98a20eb3469ba1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116661
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-09-11 14:48:47 +00:00
danrubel 30ea777c65 fix parsing of "?.." cascade operator
Fix https://github.com/dart-lang/sdk/issues/37859

Change-Id: Ie29f4fd000199f0099137308603335e36af6ae26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116089
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-10 20:36:04 +00:00
Dmitry Stefantsov ccb6ba948b [cfe] Gather constraints from both possibilities for FutureOr
Closes #37778.

Bug: http://dartbug.com/37778.
Change-Id: Ia8828c27ccc912831a0fea8a473c547184c99229
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115243
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-09-10 09:50:30 +00:00
Aske Simon Christensen 41c5b81818 [cfe] Special error message for illegal override of a setter by a field
This situation would produce an error referring to the erroneous type
as a return type instead of a paremeter/field type.

Change-Id: Ida72b0b85b448e3a05cadf38511e7e32d19986f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115702
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-09-09 09:57:26 +00:00
Johnni Winther ff0fda7732 [cfe] Handle UnknownType using defaultDartType
Change-Id: I4c3d805a4be6a6f95d08869325da077b654436d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114517
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-09-09 06:35:36 +00:00
danrubel 41bf7443d4 update parser to report static constructor
Change-Id: I95b07f5e85600a05c59b3107922ae663f242b0dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116246
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-09 05:26:16 +00:00
danrubel cb1efb8d27 update parser to allow "late var" in NNBD
Fix https://github.com/dart-lang/sdk/issues/38022
Fix https://github.com/dart-lang/sdk/issues/37857

Change-Id: I9ddfeddd424312e584b67bb1f42c73957ed7b05c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116243
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-09 05:26:16 +00:00
danrubel 99007f3a3e remove duplicate error generation in ClassBuilder
Now that the parser reports an error when a mixin declares a constructor
or a factory, the ClassBuilder no longer needs to do so.

Change-Id: I910d7cc2c697e9bd7a7df2708603a0e3badfc11e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116242
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-09 05:26:16 +00:00
danrubel fb73cb19e6 update parser to report MixinDeclaresConstructor error
Change-Id: I4750ff522046cbcc6bab561d189f578a8e8fd8d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116241
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-09 05:26:16 +00:00
danrubel 355df2a354 split AstBuilder endClassConstructor out of endClassMethod event
This CL moves the logic determining whether a declaration is a method
or constructor into the parser and splits the AstBuilder endClassMethod
event handler into simplified endClassConstructor and endClassMethod event handlers

Change-Id: I2d2124a2456f70d5511163cead25f6c586ea9c71
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116240
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-09 05:26:16 +00:00
danrubel 618b56d24d fix conditional expression parsing with NNBD enabled
Fix https://github.com/dart-lang/sdk/issues/38113

Change-Id: I06ebb5ee6260dfa97969a7d11b8c66c48d2ae766
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116054
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-09 05:26:16 +00:00
danrubel 152aa5a6ed fix calls following null-assertion operator
Fix https://github.com/dart-lang/sdk/issues/37708

Change-Id: I46ed01cef1eb426e7e28c481d98cb04ac0eed44c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116046
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-06 20:48:17 +00:00
danrubel 4e4047a52f fix extension abstract method error
This changes EXTENSION_DECLARES_ABSTRACT_MEMBER to be a parse error
and moves it into the parser so that it is generated for all of CFE.

Fix https://github.com/dart-lang/sdk/issues/37945

Change-Id: Iba2876eb2db83e96ec49adc49a7b6a0e7aff200b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116002
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-06 19:50:17 +00:00
Johnni Winther 8c13ecf443 [cfe] Handle nested on-types
Change-Id: Ib390f7939c487c59034bfcf1490f1ad40aebd031
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115980
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-09-06 15:49:50 +00:00
Aske Simon Christensen dc204ec879 [CFE] Preserve file URIs of expressions in unevaluated constants.
This fixes missing positions on error messages from dart2js arising
from errors in constants in connection with environment constants.

Change-Id: Icc0666b82d0f28add053fbc231d680c6fdeeeff1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114603
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-09-06 12:22:09 +00:00
Johnni Winther 7152fd06a5 [cfe] Handle [] and []= on extensions
Change-Id: Ic496d0da2f36be5701a30e0b394e6046240f7b2c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115700
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-06 09:55:29 +00:00
Johnni Winther deb2fcf818 [cfe] Handle extension operators
Change-Id: Ib63d7ab486dbe130cd2e37cc8a51abb2e64b7099
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115400
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-06 09:55:29 +00:00
Dmitry Stefantsov 7ca157dfd6 [cfe] Thread nullability modifiers for some InterfaceTypes in outline
Closes #38212.

Bug: http://dartbug.com/38212

Change-Id: I4127a1db46a932bd298f82053f58834b60fd4cbb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115370
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-06 09:29:49 +00:00
Samir Jindel c219a76652 Reland "[vm/ffi] Implement FFI callbacks on AOT for ELF and Asm snapshots (excl. blobs)."
The original change is in Patchset 1.
The dependency contains the fix for the non-bare-instructions bot.

Change-Id: Iab02ab0736a2ee9144b667d2777ca526341b2a36
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-android-release-arm-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-bare-linux-release-x64-try,vm-kernel-precomp-mac-debug-simarm_x64-try,vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115241
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-09-05 20:19:22 +00:00
Paul Berry aa34de3fe5 Flow analysis: adjust _variableInfosEqual to do a shallow comparison.
Previously we were doing a deep comparison, but this wasn't
sustainable.  The reason _variableInfosEqual exists is to verify the
logic used by FlowModel.restrict() to determine whether to re-use a
previous variableInfo structure.  Since that logic is based on a
shallow comparison, the logic in _variableInfosEqual needs to do a
shallow comparison as well.

Change-Id: Id0f48a3f450a9210d4f6e6d919bb7a3e311ad458
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115621
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-09-05 16:52:18 +00:00
Johnni Winther 34004f7f6b [cfe] Support modular compilation of extensions
Includes serialization/deserialization of Extension and
ExtensionMemberDescriptor.

Change-Id: I04df581355b0d6f9e6bfa638241c8b7f210d3ce5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115369
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-09-05 11:19:53 +00:00
Johnni Winther 28af740e83 [cfe] Follow-up fixes
Change-Id: I91d55176a0fbc48cdc0e0039d715a0b9fa2cbff3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115360
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-05 11:19:53 +00:00
Johnni Winther 06ae3402d7 [cfe] Support F-bounded extensions and type variable shadowing
Change-Id: I6fa5bf13ab8524e6262a67c6f9fe4d56c8ee5046
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115246
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-05 11:19:53 +00:00
Johnni Winther 4122034ada [kernel] Make accept methods generic
Change-Id: I50f3c2b5c09a1266811e1fe5a5b2042c77584e43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114514
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-09-05 07:46:10 +00:00
Paul Berry 39b60a636c Flow analysis: inline _removePromotedAll at the call site.
There was only one call site, and the logic is clearer if all the
logic is in one method.

Change-Id: I59a6e0ce1e3345039146525a9bcd0b72025cbb5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115006
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-04 13:33:52 +00:00
Paul Berry c73df64c94 Flow analysis: move tracking of definite assignment into VariableModel class.
Change-Id: I28cdc6f65aa3488da3538a7b920dc10f87ec1de0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115003
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-04 13:33:52 +00:00
Jens Johansen a01dd3655f [CFE] Let compile platform include more required libraries"
That should allow us to "implement"
6f85cb83cf again in two steps:
* first we remove the dart:profiler as a required library, but retain it in the platform
* (we wait for stuff to roll, both in flutter and in google3)
* we remove it completely (i.e. not retaining it in the platform, removing the source etc)

Change-Id: Ieb77c2ba909300c05f3923c2edba7cab7d34fae6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115244
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-04 06:57:10 +00:00
Paul Berry c9a75cbbc9 Flow analysis: fix crash in for_conditionBegin.
The crash occurred when:

- The body of the for-loop contained a write to a variable that was
  declared inside the body of the loop.

- At least one variable was declared outside the for-loop.

Fixes #37983.

Change-Id: I241312e1f1c9efb879bbff93fc0ca569d8ec8370
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115262
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-03 20:28:36 +00:00
Johnni Winther ab8e70addd [cfe] Handle implicit extension access inference
Change-Id: Ia46976af37b586a7b88e3ff8465894e6858a6759
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115210
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-03 20:10:26 +00:00
Johnni Winther c50621a560 [cfe] Infer type arguments for explicit extension application
Change-Id: I52d97abf85eadea679f2a48563f575eca1fd8436
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115140
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-03 13:17:56 +00:00
Aske Simon Christensen f5839de1ec [cfe] Set named mixin application flag on DillClassBuilder.
The flag is needed by the class hierarchy builder to properly handle
using named mixin application classes as mixins.

Exposed by this: https://dart-review.googlesource.com/c/sdk/+/114560

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

Change-Id: I38dd7129527bbdf12027233161b8939546a4968e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115218
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-09-03 12:38:23 +00:00
Samir Jindel 72e8bdc56b Revert "[vm/ffi] Implement FFI callbacks on AOT for ELF and Asm snapshots (excl. blobs)."
This reverts commit ecbea5a58e.

Reason for revert: broken with bare instructions and ABI bot

Original change's description:
> [vm/ffi] Implement FFI callbacks on AOT for ELF and Asm snapshots (excl. blobs).
> 
> To do this, we add writable data sections (currently uninitialzed) to ELF and Asm snapshots
> and allow Instructions to have patchable relocations against (the start of) these sections.
> 
> Issue https://github.com/dart-lang/sdk/issues/37295 (see also for design & discussion).
> 
> Change-Id: If20bfa55776f4044aaa6bb8ea2101d2ada41842c
> Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-android-release-arm-try
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110221
> Commit-Queue: Samir Jindel <sjindel@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

TBR=kustermann@google.com,rmacnak@google.com,alexmarkov@google.com,sjindel@google.com

Change-Id: I9787da6d42575ca4f5ae0a698052a19ac4275afd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try, vm-kernel-precomp-linux-product-x64-try, vm-kernel-precomp-linux-release-x64-try, vm-kernel-precomp-android-release-arm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115240
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2019-09-03 12:31:15 +00:00
Samir Jindel ecbea5a58e [vm/ffi] Implement FFI callbacks on AOT for ELF and Asm snapshots (excl. blobs).
To do this, we add writable data sections (currently uninitialzed) to ELF and Asm snapshots
and allow Instructions to have patchable relocations against (the start of) these sections.

Issue https://github.com/dart-lang/sdk/issues/37295 (see also for design & discussion).

Change-Id: If20bfa55776f4044aaa6bb8ea2101d2ada41842c
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-android-release-arm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110221
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-09-03 12:02:02 +00:00
Jens Johansen 00d14e7dd1 [CFE] Always start constant evaluation error where we are asked to evaluate
Fixes #38167

Change-Id: I57ded79835348a1e02b4949986a8b1668d3e425a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115206
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-03 06:16:37 +00:00
Jens Johansen 1400ab4136 [CFE] Language versioning max/default also setable via compiler options
* Max and default for language version controllable via language options
* Default (if not set) comes from kernel static fields
* Kernel static fields updated to 2.6
* (Also set version for debug expression library)
* Test added that checks that the kernel static fields aren't out-of-date
  (checked against python script "tools/make_version.py").

Change-Id: I65f26053081e4c55c215b677128f37fa970693c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114944
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-02 07:43:05 +00:00
Johnni Winther bfec168c1e [cfe] Use tearoff function for implicit extension method tearoff
Change-Id: I35ef1b15ced6bc7f29f248e35438c7e14c2a3754
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114942
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-08-30 17:08:14 +00:00
Johnni Winther c39cddf2be [cfe] Produce errors on invalid explicit extension application
Change-Id: I79fa8a58c8d46583ec5c7d980b4a8ac7005651b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114941
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-08-30 17:08:14 +00:00
Jens Johansen 8a670d773b [CFE/bazel/DDC] Match 'tags' to reuse compiler state
This CL introduces 'tags' as a way to distinguish different setups and
be able to throw away previous state when it cannot be used.
These tags are - for now - basically filled up with the roots used for
the multi root filesystem, the idea being, that if they have changed we
cannot reuse the old state.

Change-Id: I19e069513ce3836f5bc6abf047e4359836fc7e09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114945
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-08-30 12:06:41 +00:00
Dmitry Stefantsov b8cde9347a [cfe] If type variable is its own bound, set it to InvalidType
The motivation for this change is that we can't compute the nullability
for such type parameter types anyways.  Additionally, it stops the
cascading error in case the type variable is its own bound indirectly,
via a chain of other type variables.

Change-Id: I940f19bb47952108ac1e0d1a0ef197b373b6b8e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114946
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-08-30 10:11:40 +00:00
Dmitry Stefantsov d4342b9021 [cfe] Print Kernel's type-parameter types in more details in text
Change-Id: I10cb27cba22ce91eca4e5cceed53a2753c6d4573
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114943
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-30 10:11:40 +00:00