Commit Graph

673 Commits

Author SHA1 Message Date
Vyacheslav Egorov f460586505 [kernel] Implement naive type checker based on pkg/kernel/lib/type_checker.dart
This type checker can be used to find strong mode violations in the
Kernel files.

This will be used to work on cleaning strong mode violations in VM's patch files
in the absence of any other way to type-check them.

Bug:
Change-Id: Id7005f6312dafe04eb0e7b33d008934b62a1b726
Reviewed-on: https://dart-review.googlesource.com/11883
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2017-10-10 06:42:02 +00:00
Alexander Markov 0be57ec442 Fix analyzer warning (unused import)
Change-Id: Ief1b570a311bf3a7e0c78744b845f7fff9c5fe20
Reviewed-on: https://dart-review.googlesource.com/12480
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2017-10-10 01:50:20 +00:00
Alexander Markov 14f6276945 [Kernel, VM] Add null checking to devirtualization
Devirtualization optimization now adds metadata to kernel AST instead
of transforming nodes to Direct* ones. The direct call metadata
provides information about checking receiver for null, while
Direct* kernel nodes do not support null checking.

VM's kernel binary loader is extended to extract arbitrary metadata
from kernel binaries and keep it for flow graph builder.
Kernel flow graph builder is extended to take direct call metadata
into account and generate CheckNull/StaticCall instructions
for devirtualized PropertyGet, PropertySet and MethodInvocation nodes.

Issue: https://github.com/dart-lang/sdk/issues/30480
Change-Id: I57f56fbf4a8981d33b1571c0d93105cf8ca71d76
Reviewed-on: https://dart-review.googlesource.com/12260
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-10-10 00:50:31 +00:00
Peter von der Ahé 16aa720d27 Remove compiling platform.dill from patch_sdk.dart
This separates compiling platform.dill files from the patch_sdk.dart
script. The motivation for that is that I'm working on reading patch
files directly from Fasta, so we can completely remove the build step
for generating patched_sdk and dart2js_patched_sdk.

Short-term this should allow Paul to add a strong-mode version of
platform.dill without causing to many conflicts with my work on
patches.

Change-Id: I1150845b2986348d4fffe27092701d8a9b57ea54
Reviewed-on: https://dart-review.googlesource.com/11506
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-10-06 15:34:37 +00:00
Vyacheslav Egorov 8ee26d8a19 [kernel] Make TypeEnvironment.strongMode into a field instead of getter.
This allows creating strong mode TypeEnvironments without actually subclassing
it.

Make SubtypeTester.isBottom treat Null as Bottom in strong mode.

Bug:
Change-Id: Icdd1a4b736ce0fe839a6ef30cf24487111f32d25
Reviewed-on: https://dart-review.googlesource.com/11882
Reviewed-by: Paul Berry <paulberry@google.com>
2017-10-06 15:14:36 +00:00
Paul Berry 039f82f7ed Include generic covariance annotations for type parameters in kernel output.
This was inadvertently left out of f94d3950ad.

Change-Id: Ifc3bbd8358322e112bf6b57fc751570d6101c9b6
Reviewed-on: https://dart-review.googlesource.com/11561
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-10-05 21:40:53 +00:00
Samir Jindel 3b347f94bc [kernel] Don't erase captured type parameters.
- We no longer erase type parameters of generic non-closures in the body of closures.
- We implement support for captured type parameters in the VM.

Bug:
Change-Id: I4f2f19301df1b44108ab2073332934d5d083e219
Reviewed-on: https://dart-review.googlesource.com/10942
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2017-10-05 12:45:36 +00:00
Dmitry Stefantsov e3efa299b7 [kernel] Fix addAnnotation method for variables and type parameters
Change-Id: Icd34608da45b9a3ddbf7df1d8aae1868fd01bb87
Reviewed-on: https://dart-review.googlesource.com/11321
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2017-10-05 09:14:20 +00:00
Paul Berry f94d3950ad Include generic covariance annotations in kernel text output.
Change-Id: I81a7b3ea692e94d7e9bbd8562f1771a7626e0715
Reviewed-on: https://dart-review.googlesource.com/10803
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-10-05 05:23:43 +00:00
Alexander Markov 9ee73fe322 [Kernel] Remove outdated and duplicated front-end Targets
This CL replaces outdated VmTarget and FlutterTarget with VmFastaTarget
and FlutterFastaTarget. 'Fasta' suffix is droped from target names.

The new FlutterTarget extends VmTarget, so they share more code.

Change-Id: Id79956698a889c9a49b8a67914f1f96a731407ab
Reviewed-on: https://dart-review.googlesource.com/9423
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-10-04 18:02:49 +00:00
Vyacheslav Egorov a52d4b0f75 [kernel] Extend Kernel with backend specific metadata section
This section contains a linear mapping between offsets of serialized nodes
and associated opaque binary metadata.

Note: this CL does not yet update C++ reader and only implements metadata in Kernel package. 

C++ implementation will be updated if we agree that format seems flexible enough.

Bug:
Change-Id: Id433458afc6c2ea76c72f6a1901b9dc55b8f1696
Reviewed-on: https://dart-review.googlesource.com/9340
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2017-10-04 15:14:02 +00:00
Dmitry Stefantsov e7a29d8dfb [kernel] Add annotations for type parameters and variable declarations
Bug: http://dartbug.com/30035
Change-Id: Id122c2d6596bfa3505418ac2f65369a16965bce5
Reviewed-on: https://dart-review.googlesource.com/10300
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2017-10-04 10:29:23 +00:00
Peter von der Ahé 086f389959 Implementation options with expiration date.
Change-Id: Ie71ca21fb37a036f32fe8ee3348e95ee02089ac7
Reviewed-on: https://dart-review.googlesource.com/9542
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-10-04 07:47:52 +00:00
Paul Berry eb7fc7d158 Tag forwarding stubs with a boolean flag in the kernel representation.
Change-Id: I5cdd05acd79f149b3702f982b1289930078d4e1b
Reviewed-on: https://dart-review.googlesource.com/10620
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-10-03 17:17:09 +00:00
Samir Jindel 6aa6f43815 [kernel] Pass type arguments to method calls.
Bug:
Change-Id: Ic9a29d7c0fc361a3ce9bff6a6ba648fc5a54c86c
Reviewed-on: https://dart-review.googlesource.com/10140
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2017-10-03 15:20:30 +00:00
Samir Jindel 195c62ff0c [kernel] Begin reducing type erasure.
1. We no longer remove type parameters on functions.
2. We no longer remove type arguments at call sites.
3. We allow non-captured function type parameters to be used outside closures. 

Bug:
Change-Id: I116ec54c90b04be90e1157042c22797e57a7c51c
Reviewed-on: https://dart-review.googlesource.com/9342
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2017-10-03 14:33:30 +00:00
Dmitry Stefantsov 005f998de0 [kernel-f11n] Add skeleton for soundness properties and theorems
Change-Id: I7230398d576f922ef150ec6678fcfda6b9cbfc40
Reviewed-on: https://dart-review.googlesource.com/8620
Reviewed-by: Samir Jindel <sjindel@google.com>
2017-10-03 11:21:57 +00:00
Alexander Markov 1969314cde Avoid devirtualization of invocations of Object members
This CL fixes incorrect devirtualization of invocations of methods and
getters from Object, as null also implements Object members.

Issue: https://github.com/dart-lang/sdk/issues/30480
Change-Id: I39b2e1dd6147482b1331527d61b76841ae401343
Reviewed-on: https://dart-review.googlesource.com/9742
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2017-10-02 16:35:56 +00:00
Dmitry Stefantsov 172aecaac8 [kernel-f11n] Move another helper theorem about maps to Common.v
Change-Id: Ice6d0c2c6fec6a9ae525d300799892ca4bb563bc
Reviewed-on: https://dart-review.googlesource.com/9480
Reviewed-by: Samir Jindel <sjindel@google.com>
2017-10-02 15:15:40 +00:00
Dmitry Stefantsov fbf3c4f8f1 [kernel-f11n] Fix operational semantics w.r.t. changes in object model
Recently `member_env` was simplified in the object model, and the
corresponding changes should be done in the operational semantics.
Additionally, the existence theorem now can be fully proven.

Change-Id: I30f86bd5d7e9b89eefc02fd51d928a9af139eee1
Reviewed-on: https://dart-review.googlesource.com/9341
Reviewed-by: Samir Jindel <sjindel@google.com>
2017-09-29 08:15:03 +00:00
Kevin Moore b7a9f2ae7c Fix SDK constraints on analyzer, front_end, kernel, meta
Prepare to publish meta

Change-Id: I1bc564c68315fb2f27469deda76e75495e42c23b
Reviewed-on: https://dart-review.googlesource.com/9364
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2017-09-28 19:33:27 +00:00
Kevin Moore 6b91739cec Making license files consistent across all packages
Helps with internal license concatenation

Change-Id: I3042ba2ec0ef5fcd35937254827560f8a97c2f8a
Reviewed-on: https://dart-review.googlesource.com/9363
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2017-09-28 19:33:08 +00:00
Samir Jindel ed0590b532 [kernel-f11n] Cleanup to object model.
- Fix force_options so it doesn't take so long to run
- Fix property get typechecking so it forces getters to be synchronized with
  methods.
- Simplify member_env.

Bug:
Change-Id: I3e2a0710c7fde950e7573ba6216820907b9ae374
Reviewed-on: https://dart-review.googlesource.com/9040
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2017-09-28 14:20:01 +00:00
Dmitry Stefantsov 1c882d8958 [kernel-f11n] Use getters in operational semantics and update hypotheses
The changes in the object model that introduce getters are reflected in
`value_of_type`, `step`, and `configuration_wf` relationships.  Additionally,
the program well-formedness hypothesis is updated, so that it uses `lib_to_env`
function defined in the object model.  A few other well-formedness hypotheses
are added.  The existence proof for the next configuration is adjusted.

Change-Id: I14ca8aac5830a6ea0fc96f3f37818fdda3fa2c07
Reviewed-on: https://dart-review.googlesource.com/8880
Reviewed-by: Samir Jindel <sjindel@google.com>
2017-09-28 13:44:10 +00:00
Samir Jindel 77736e83f2 [kernel-f11n] Fix statement typing and complete proof of statement typing consistency.
Previously, we inferred the return type of statements in a way that made it
impossible to prove the statement typing consistency. Now, we use just the
stated return type for checking statements.

The proofs of statement typing are complete, except for one result generalizing
the expression typing consistency result to multiple variables changing; this
result is obvious to see directly from the provided lemmas but very tedious to
prove in Coq.

Bug:
Change-Id: I0bbcfb613df7510015f278fa85021ba0b3e57503
Reviewed-on: https://dart-review.googlesource.com/9020
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2017-09-28 13:20:00 +00:00
Dmitry Stefantsov 49996eeb88 [kernel-f11n] Add the opertional semantics spec for Kernel
Change-Id: Ic5780eaf5743e525b8ae646867bc0a60f5bfbbbb
Reviewed-on: https://dart-review.googlesource.com/9260
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2017-09-28 12:04:25 +00:00
Régis Crelier db8b20107b Revert "Revert "Dart Core Lib change to support generic functions in class NoSuchMethodError.""
This reverts commit 8cf9ef22c4.

The expectations in Dart2js and Kernel tests have now been updated.

Change-Id: I9d65ff207490cfc783849b1b726db81cf56ecfc2
Reviewed-on: https://dart-review.googlesource.com/9124
Reviewed-by: Régis Crelier <regis@google.com>
2017-09-28 00:27:24 +00:00
Régis Crelier 8cf9ef22c4 Revert "Dart Core Lib change to support generic functions in class NoSuchMethodError."
This reverts commit db15f5d73b.

Dart2js and Kernel tests are comparing text that has changed because of
the core lib change.

Change-Id: I1d33716a3d6e6a077aa1f1a9ad7cc37825d31fa6
Reviewed-on: https://dart-review.googlesource.com/9082
Reviewed-by: Siva Chandra <sivachandra@google.com>
2017-09-27 21:08:20 +00:00
Régis Crelier db15f5d73b Dart Core Lib change to support generic functions in class NoSuchMethodError.
Change-Id: If7d1a8c07e4bee7ec68fede80a9d17cae0044d31
Reviewed-on: https://dart-review.googlesource.com/5329
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-09-27 17:57:41 +00:00
Paul Berry 240fd56709 Change main function in erasure_test to take optional args.
This will allow the test to be run inside google3, where the test
framework calls main with no arguments.

Change-Id: Ia3135b634b4752be816b53209c39d24d72edb6b3
Reviewed-on: https://dart-review.googlesource.com/8960
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-09-27 16:24:44 +00:00
Samir Jindel cf0d17df57 [kernel-coq] Correct statement of subtyping consistency, extend to statements.
Bug:
Change-Id: I48f073fa592ccdac56fb63b33b7d9961be5fc3fe
Reviewed-on: https://dart-review.googlesource.com/8220
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2017-09-27 13:39:05 +00:00
Jens Johansen dc5df933e4 Use kernel indexes to jump past procedure bodies.
Before this CL we skipped procedure bodies in kernel_loader.cc by
parsing the body (but not storing anything).
With this CL we now skip them directly (i.e. don't read them at all)
in kernel_loader.cc by using the newly available extra indexes in kernel.

Change-Id: I48cf0599b2a85102c9008ff7c455785151ef3c9c
Reviewed-on: https://dart-review.googlesource.com/5764
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
2017-09-27 06:19:35 +00:00
Samir Jindel 1cac4c7924 [kernel-coq] Extend interfaces to contain getters.
Bug:
Change-Id: If8411f356496017cf371349b3edfae3972725662
Reviewed-on: https://dart-review.googlesource.com/8121
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2017-09-26 17:39:15 +00:00
Jens Johansen 6982d1d517 [kernel] Make binary.md up to date
0a76d327e3 updated the binary without
updating binary.md.

Bug:
Change-Id: Ia7ba1cec4b45ebf3dca2a1c1db0a1709a881483e
Reviewed-on: https://dart-review.googlesource.com/8521
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2017-09-26 13:27:52 +00:00
Jens Johansen 308a1af6ab [kernel] Add more random access; don't read procedure bodies up front
This adds more indexes to the kernel format so we know where classes
and procedures starts and stops. This allows for more random access.
E.g. one could now read the program index and jump directly to
library $i_1$, then read the library index and jump directly to class $i_2$,
read the class index and jump directly to procedure $i_3$.

The utilization (in this CL) is to not (always) read the procedure body
up front when loading kernel code on the dart side (ast_from_binary).
The observation is that - when running through the VM - almost none
of the bodies from the platform file are actually used.

This lowers the start-up cost which is noticeable for small programs
(e.g. hello world, or tests).
In this CL this is only done on the dart side and not on the C++ side,
that's for another CL.

Startup time:
dart2js: -1.84253% +/- 1.22157%
hello world: -11.1188% +/- 5.57892%

Running "time python tools/test.py -m release -cdartk language -j6":
real: -11.72% +/- 0.35%
user: -14.59% +/- 0.24%
sys: -12.71% +/- 0.61%

File size change (compiling with fasta to dill file incl. platform):
hello world: 0.88% (35,934 bytes).
dart2js: 0.97% (200,967 bytes).

Change-Id: I1f0ec121bc75bb17f11d3fade03da9815037d0bb
Reviewed-on: https://dart-review.googlesource.com/5262
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2017-09-26 08:14:17 +00:00
Paul Berry d9ca760992 Start writing the infrastructure for creating forwarding stubs.
This CL adds the ability to create a list of "forwarding nodes" for a
source class.  A forwarding node is a data structure that will later
be resolved to either an explicitly declared member in the class or a
superclass, or to a forwarding stub.  The idea is that we will create
the forwarding nodes at the time of outline building, and later,
during type inference, we will resolve each forwarding node as it is
encountered.

The reason we need to defer resolution of the forwarding nodes until
inference is because we may need to use the results of type inference
to determine which member a given forwarding node resolves to.  For
example:

num f() => 1;
class A {
  final x = 1; // Inferred type: int
}
class B {
  final x = f(); // Inferred type: num
}
abstract class C implements A, B {}

We cannot determine at the time of building the outline for C whether
it inherits its x from A or B, because we need the results of type
inference to determine which of the two x's has a more specific type.

Note that some refactoring of ClassHierarchy was necessary in order to
allow the front end to maintain member lists in the same order used
internally by ClassHierarchy.  This will let us avoid unnecessary
redundant sorting of methods.

Change-Id: Iee754957e0ad3b16c4b60608e17a4a7b0006dfb4
Reviewed-on: https://dart-review.googlesource.com/7851
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-09-25 20:59:49 +00:00
Konstantin Shcheglov 04ba26d638 Write/read fileOffset for LibraryDependency.
This should take care of some or all flaky tests like:
TypePropagationTest_Kernel | test_forEach_async_inheritedStream

What was happening is that every tests adds /test.dart to AnalysisDriver,
which means that this file is scheduled for analysis at some point,
and then it also calls getResult() to get the resolved unit. When we
resolve the file for the first time, the ByteStore is empty, so we
build the corresponding Kernel file from scratch, and it has the offset.
But the second time we read the Kernel file from ByteStore. So, if we
manage to process the file as added first, and then as getResult(),
we fail because we cannot resolve the import directive. But if we
were not able to process the file as added, and just do getResult()
first (which also marks the file as added as ready), we succeed.

So, it was flaky.


R=ahe@google.com, kmillikin@google.com, paulberry@google.com, sigmund@google.com

Bug: https://github.com/dart-lang/sdk/issues/30863
Change-Id: I96151e3ebefcd212f2a7a1b2b22abb7d87ed4781
Reviewed-on: https://dart-review.googlesource.com/7782
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-09-22 19:47:07 +00:00
Paul Berry f1665714a5 Move batch_util.dart into pkg/kernel/lib/.
This will allow tests that use batch_util.dart to be run inside
google3, where package layout conventions are more strictly enforced
(files in test/ cannot import files in bin/ or vice versa).

Change-Id: I046b864bc3b1c4e78b984b0047b7567873146c52
Reviewed-on: https://dart-review.googlesource.com/7340
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-09-22 16:52:07 +00:00
Paul Berry 5dd63f9fdc Implement proper subtype check for promoted bounds in kernel.
Note that the parser used for unit tests in kernel didn't have a
notation for promoted bounds.  I chose `T & A` to mean "type parameter
T with promoted bound A", following Leaf's convention (the rationale
is that semantically, a promoted bound functions like an intersection
type).

It was also necessary to change the test infrastructure so that we
could specify the (non-promoted) bounds of type parameters when
running a subtype test.

Fixes #30833.

Change-Id: Ic62722df63c5ed5288b23560745a1cd0869b63fb
Reviewed-on: https://dart-review.googlesource.com/7628
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-09-22 15:37:19 +00:00
Samir Jindel b75f1baaf2 [kernel-coq] Cleaning up and exposing program well-formedness proof.
Bug:
Change-Id: If55a527f439a7bec39f2d286a582cb606efdabfb
Reviewed-on: https://dart-review.googlesource.com/7554
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2017-09-22 11:55:53 +00:00
Dmitry Stefantsov 5daf3c6d9d [kernel] Add the theorem about existence of next configuration
* The definition of the well-formedness property for
  configurations is added.
* The theorem that states that the abstract CESK-machine can
  make one transition step from any well-formed configuration
  is defined and proven.
* Execution of a variable declaration statement is added to
  the operational semantics formalization with all necessary
  changes (one new eval configuration, three new transition
  rules).
* Some auxiliary theorems are added. One of them states that
  any runtime value has its method bodies in the function
  environment.

Change-Id: I95f233a4db498ce0df76983d9e605c3c263100bb
Reviewed-on: https://dart-review.googlesource.com/7266
Reviewed-by: Samir Jindel <sjindel@google.com>
2017-09-22 08:55:43 +00:00
Kevin Millikin 785ae4a9e0 [Kernel] when transferring libraries, keep their canonical names
Before: ownership of some or all of the libraries from one Kernel
program (P1) would be transferred to another program (P2).  All the
canonical names in P1 would be unbound from their references and the
canonical names would eventually be recreated for the libraries that
were transferred.

After: when ownership of a library is transferred, the ownership of
the canonical name subtree rooted at the library's name is also
transferred.  This allows the 1:1 relationship between Canonicalname
and Reference to be maintained which will enable lazy deserialization
of procedure bodies (because the mapping from CanonicalNames to
References in the corresponding link table will be persistent).
Change-Id: I98f975d6ba5804f975c30528a484756b39f09d2a
Reviewed-on: https://dart-review.googlesource.com/7549
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2017-09-22 08:19:27 +00:00
Samir Jindel 4087297d4a [kernel-coq] Proof for program well-formedness.
Bug:
Change-Id: I614d967fc0386c2c4cb0c56586f7f7c2e50b033a
Reviewed-on: https://dart-review.googlesource.com/7362
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2017-09-21 14:00:43 +00:00
Peter von der Ahé 9baee97ea2 Revert "Add NamedNode.nameOffset, fill it for constructors, and use in Analyzer."
This reverts commit 9a8621b60a.

Revert "Rework getElement() in resynthesizer."

This reverts commit e4fa080f69.

Revert "Create (empty) initializers for parameters resynthesized from Kernel."

This reverts commit 8df6c79b9d.

Revert "Run NonErrorResolverTest in strong mode. Extract not strong tests."

This reverts commit 9bdda4b1d3.

Revert "Move TypeProvider creation into KernelResynthesizer and create loadLibrary functions."

This reverts commit c59eaf1788.

Revert "Return SimpleIdentifier or PrefixedIdentifier from _buildIdentifier()."

This reverts commit 6d0515f9ca.

Change-Id: I1099ca715ce6287ab56808b7cc3abe0589e939c1
Reviewed-on: https://dart-review.googlesource.com/7550
Reviewed-by: Peter von der Ahé <ahe@google.com>
2017-09-21 12:19:47 +00:00
Konstantin Shcheglov 9a8621b60a Add NamedNode.nameOffset, fill it for constructors, and use in Analyzer.
R=ahe@google.com, kmillikin@google.com, paulberry@google.com, sigmund@google.com

Bug:
Change-Id: If0f815e86049381e9db3386f243789e9b4f9f5ce
Reviewed-on: https://dart-review.googlesource.com/6780
Reviewed-by: Paul Berry <paulberry@google.com>
2017-09-20 17:54:30 +00:00
Paul Berry a8afd3ab16 Remove reified_dart.dart, batch_consistency.dart, and dartk.dart.
These files all have to do with the old "dartk" front end, which is no
longer used.

Change-Id: I67041bf0a3a8a9213153123d9f79ac1632cc4d24
Reviewed-on: https://dart-review.googlesource.com/7101
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-09-20 15:33:16 +00:00
Samir Jindel 8ebdd7662f [kernel-coq] Build class and function table, allow mutually recursive functions and classes.
Bug:
Change-Id: I0d1fb82bccdf8174e4ab5ffdd38301600ecf4dd2
Reviewed-on: https://dart-review.googlesource.com/6620
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2017-09-20 12:51:34 +00:00
Paul Berry 2d74043f3a Implement type promotion of type parameter bounds.
Fixes #30804.

Change-Id: I16094e54514b2109fda4b388083d2467a0b11bc7
Reviewed-on: https://dart-review.googlesource.com/7105
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-09-19 23:19:46 +00:00
Paul Berry a811daca97 Add serialization/deserialization for parameter type check annotations.
Change-Id: I8a156de8f0b73606172f8a4ab48c595b92116aeb
Reviewed-on: https://dart-review.googlesource.com/4604
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2017-09-19 02:07:29 +00:00
Dmitry Stefantsov 2aef206f3f [kernel] Add the first draft of Kernel operational semantics in Coq
The semantics is defined for a small subset of Kernel.

Change-Id: I39b72c5671e9ca0dee86a5a6068fe745ad1728f1
Reviewed-on: https://dart-review.googlesource.com/5860
Reviewed-by: Samir Jindel <sjindel@google.com>
2017-09-18 15:16:23 +00:00