Commit Graph

18 Commits

Author SHA1 Message Date
Johnni Winther 34fb48bb8a [kernel,front_end] Migrate first wave of pkg/kernel and pkg/front_end
Migrates libraries dependent only on already migrated libraries.

Change-Id: I0e85ee8dbc2afce031b92e0009e71c206a55af28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179502
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2021-01-18 15:40:21 +00:00
Johnni Winther 1d6eac5ebf [cfe] Only use experimental release version when flag is not on by default
Change-Id: I06267c6d3f0e5abb289e25fde8098aa0e3bead34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166844
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-10-12 12:57:41 +00:00
Johnni Winther 711da04fb4 [cfe] Associate package uris with bin/test files in packages
This CL adds a package uri to SourceLibraryBuilder based on the
package information computated by package:package_config. This uri is
used to determine whether experimental flags are enabled and thus using
allowed_experiments.json in bin/test folders as well as the lib folder.

Change-Id: I60e6e97139a4a24b8d4d27d314cfc0f7d7bfc816
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152151
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-06-24 14:33:31 +00:00
Jens Johansen 4084c4cc24 [kernel/CFE] Use kernel 'Version' class for versions
Define a "Version" class in kernel that allows easy comparison between
versions (e.g. a < b, a >= b etc).

Use this Version class in CFE.

Change-Id: I2f382e7bb3c2083258743b9b66a909a88d575dbc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144283
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-04-21 09:44:52 +00:00
Jens Johansen 7d4d26a013 [CFE] Add api to get language version for uri
Closes #41205

Change-Id: I9e55257341e7c53f4f68f9d636b04f8fd6bffb68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141250
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-03-30 09:14:25 +00:00
Jens Johansen a55fed2e5f [CFE] Get in line with update on which package description file to use
Fixes #40864

Change-Id: I681186660162c55e66c1deee68a4052de4cfcfe9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139201
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-03-12 11:33:52 +00:00
Johnni Winther 5829fc7829 [analyzer,cfe,dart2js] Add marker.options files to automate running id tests on all configurations
Change-Id: Ib5eb7f3967634721047f8dcc57b9e6c350b91a41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136226
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-02-21 08:34:26 +00:00
Jens Johansen 81d4ac07d4 [CFE] Use package config v2
Change-Id: I32da9e8b2c1040db1521af4345f8e952c22bd30d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130864
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-02-12 10:07:25 +00:00
Johnni Winther 5e389080a4 [cfe] Test supertypes computed from ClassHierarchyBuilder
Change-Id: Ia079754bd8272d7b5689a3bdab1e69d5188082be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132342
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-01-22 07:08:36 +00:00
Johnni Winther e3a20bf361 [analyzer,cfe,dart2js] Support annotated code generation
Add support for generating annotations from actual data using
option -g

Change-Id: I88d9cdb62a38d579234b15097c9e9bb3d81ebe8c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129708
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-01-03 13:57:39 +00:00
Paul Berry c4b6df5009 Move ID testing infrastructure into _fe_analyzer_shared.
Change-Id: I9f2692dbe750f3c31f8c86e86fe732f34e166517
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123860
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-11-01 12:39:00 +00:00
Johnni Winther dd028547ce [cfe] Support patching of extension methods
Change-Id: I453e17e63f97a0ca2477371541c6a9602bee2404
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119322
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-09-30 09:51:31 +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
Jens Johansen 10f8a00e9f [CFE] Update language versioning implementation to conform with specification v1.3
In the feature specification v1.2 libraries in a package with a default
version wasn't allowed to specify a language version higher than that.
In v1.3 thats allowed as long as its below the sdk limit.

Change-Id: I85f5c36a9c9c427da03fc540f9175195134ad47f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114604
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-08-28 09:30:12 +00:00
Johnni Winther 19654f30d0 [cfe+vm+ddc] Return ClassHierarchy and CoreTypes together with Component
Users of the CFE often need the ClassHierarchy and may CoreTypes after
invoking the CFE. This CL extends the result of `kernelForProgram` and
`kernelForComponent` to a `CompilerResult` that includes these objects.

Change-Id: I08491198fe876b6514e49993ad794388d6662c9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112259
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-08-09 13:02:12 +00:00
Jens Johansen 21b026dd88 [CFE] Issue error when langauge version is specified too high
Specifying a language version higher than the highest supported version
(aka the default version) is an error.

Specifying a language verison in code that is higher than the one
specified in .packages is an error.

Change-Id: I44e1c8c45cef715038786dbf248925b73bd6cd7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112240
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-08 06:55:38 +00:00
Jens Johansen 69ae29076a Default language version if nothing is specified
A kernel library will say it has the newest language version if no
language version is set.
This basically preserves the current semantics of always being on the
newest version (if nothing is explicitly done), e.g. if creating a kernel
library by hand and not setting it.
The front_end also utilize this and just doesn't set it, if it isn't set.

Change-Id: I033fef13626ee034030ba8fc9d141b182ba1a5ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111739
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-06 09:13:29 +00:00
Jens Johansen 6d1c9975d7 [CFE] Initial language versioning "support"
This CL sets up the bare minimum support for saving the language version
specified in a file on the kernel library, and adds simple support for
testing it.

The data is not serialized out, error checked or similar in this change.

Change-Id: I4b061ce617acae7964b85be105e0ad0e3e031aa4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111640
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-05 07:03:04 +00:00