dart-sdk/pkg/kernel
Aske Simon Christensen 50efd7f187 [Kernel] Add list of unused arguments to InstanceCreation nodes.
During constant evaluation, unused arguments to a const constructor are
thrown away after evaluation, since their values do not affect the
resulting instance constant. If such an unused argument ends up
unevaluated, any errors that would arise in the final evaluation are
not reported.

This CL adds space in the Kernel AST for saving these unevaluated
expressions so they can be checked during final constant evaluation.

Even though this is an incompatible change, no update is needed to the
VM code (except for the version bump), since the VM does not support
InstanceCreation nodes in the first place.

Change-Id: I4752562c1164efbba79eb018c15b07ed8354ce5f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105761
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-06-13 09:42:26 +00:00
..
bin [CFE] Produce InstanceCreation from unevaluated constructor invocation. 2019-04-04 12:22:50 +00:00
coq [kernel-f11n] Prove that valid configuration is well-formed 2017-10-12 14:13:58 +00:00
doc/semantics [kernel-f11n] Add the opertional semantics spec for Kernel 2017-09-28 12:04:25 +00:00
lib [Kernel] Add list of unused arguments to InstanceCreation nodes. 2019-06-13 09:42:26 +00:00
runtime/reify pkg:kernel - Fix three bugs identified by lints 2019-01-08 14:54:05 +00:00
test Fix relative import from pkg/kernel/test to pkg/kernel/lib. 2019-04-12 07:17:47 +00:00
.gitignore [kernel] Initial implementation of Dart Kernel. 2016-04-26 10:39:15 +02:00
analysis_options.yaml More options files cleanup. 2018-10-26 23:05:44 +00:00
AUTHORS [kernel] Initial implementation of Dart Kernel. 2016-04-26 10:39:15 +02:00
binary.md [Kernel] Add list of unused arguments to InstanceCreation nodes. 2019-06-13 09:42:26 +00:00
codereview.settings [kernel] Use public review server. 2016-10-18 11:37:37 +02:00
LICENSE Making license files consistent across all packages 2017-09-28 19:33:08 +00:00
problems.md (Some) DiagnosticMessages can be serialized to/from json. 2019-02-01 11:07:27 +00:00
pubspec.yaml Prepare to publish analyzer 0.36.3 2019-05-03 16:57:54 +00:00
README.md Remove outdated information from pkg/kernel/README.md 2018-10-09 11:09:27 +00:00

Dart Kernel

Dart Kernel is a small high-level language derived from Dart. It is designed for use as an intermediate format for whole-program analysis and transformations, and to be consumed by codegen and execution backends.

The kernel language has an in-memory representation in Dart and can be serialized as binary or text.

Both the kernel language and its implementations are unstable and are under development.

This package contains the Dart part of the implementation and contains:

  • A transformable IR for the kernel language
  • Serialization of kernel code

Note: The APIs in this package are in an early state; developers should be careful about depending on this package. In particular, there is no semver contract for release versions of this package. Please depend directly on individual versions.

See ast.dart for the in-memory IR, or binary.md for a description of the binary format. For now, the textual format is very ad-hoc and cannot be parsed back in.