kernel 0.3.6+8

  • README.md
  • Installing
  • Versions
  • 66

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.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  kernel: ^0.3.6+8

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:kernel/kernel.dart';
  
Version Uploaded Documentation Archive
0.3.11 Feb 12, 2019 Go to the documentation of kernel 0.3.11 Download kernel 0.3.11 archive
0.3.10 Jan 29, 2019 Go to the documentation of kernel 0.3.10 Download kernel 0.3.10 archive
0.3.9+1 Feb 1, 2019 Go to the documentation of kernel 0.3.9+1 Download kernel 0.3.9+1 archive
0.3.9 Jan 16, 2019 Go to the documentation of kernel 0.3.9 Download kernel 0.3.9 archive
0.3.8 Dec 19, 2018 Go to the documentation of kernel 0.3.8 Download kernel 0.3.8 archive
0.3.7 Nov 29, 2018 Go to the documentation of kernel 0.3.7 Download kernel 0.3.7 archive
0.3.6+9 Dec 11, 2018 Go to the documentation of kernel 0.3.6+9 Download kernel 0.3.6+9 archive
0.3.6+8 Nov 29, 2018 Go to the documentation of kernel 0.3.6+8 Download kernel 0.3.6+8 archive
0.3.6+7 Nov 28, 2018 Go to the documentation of kernel 0.3.6+7 Download kernel 0.3.6+7 archive
0.3.6+6 Nov 21, 2018 Go to the documentation of kernel 0.3.6+6 Download kernel 0.3.6+6 archive

All 36 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
96
Health:
Code health derived from static analysis. [more]
27
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
50
Overall:
Weighted score of the above. [more]
66
Learn more about scoring.

We analyzed this package on Feb 14, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.13

Platforms

Detected platforms: Flutter, other

Primary library: package:kernel/kernel.dart with components: io.

Health suggestions

Fix lib/ast.dart. (-46.02 points)

Analysis of lib/ast.dart reported 123 hints, including:

line 315 col 22: Use = to separate a named parameter from its default value.

line 741 col 3: Avoid return types on setters.

line 748 col 3: Avoid return types on setters.

line 767 col 3: Avoid return types on setters.

line 777 col 3: Avoid return types on setters.

Fix lib/target/targets.dart. (-11.33 points)

Analysis of lib/target/targets.dart reported 24 hints, including:

line 23 col 23: Use = to separate a named parameter from its default value.

line 24 col 21: Use = to separate a named parameter from its default value.

line 25 col 21: Use = to separate a named parameter from its default value.

line 26 col 24: Use = to separate a named parameter from its default value.

line 168 col 21: Use = to separate a named parameter from its default value.

Fix lib/class_hierarchy.dart. (-10.44 points)

Analysis of lib/class_hierarchy.dart reported 22 hints, including:

line 34 col 3: Avoid return types on setters.

line 94 col 65: Use = to separate a named parameter from its default value.

line 106 col 62: Use = to separate a named parameter from its default value.

line 117 col 66: Use = to separate a named parameter from its default value.

line 127 col 63: Use = to separate a named parameter from its default value.

Fix additional 18 files with analysis or formatting issues. (-45.55 points)

Additional issues in the following files:

  • lib/transformations/constants.dart (16 hints)
  • lib/transformations/coq.dart (14 hints)
  • lib/binary/ast_from_binary.dart (10 hints)
  • lib/text/ast_to_text.dart (10 hints)
  • lib/binary/ast_to_binary.dart (9 hints)
  • lib/clone.dart (6 hints)
  • lib/transformations/treeshaker.dart (6 hints)
  • lib/transformations/mixin_full_resolution.dart (5 hints)
  • lib/kernel.dart (3 hints)
  • lib/src/bounds_checks.dart (3 hints)
  • lib/type_checker.dart (3 hints)
  • lib/type_algebra.dart (2 hints)
  • lib/error_formatter.dart (1 hint)
  • lib/naive_type_checker.dart (1 hint)
  • lib/src/tool/command_line_util.dart (1 hint)
  • lib/transformations/continuation.dart (1 hint)
  • lib/transformations/setup_builtin_library.dart (1 hint)
  • lib/type_environment.dart (1 hint)

Maintenance issues and suggestions

Provide a file named CHANGELOG.md. (-20 points)

Changelog entries help developers follow the progress of your package. See the example generated by stagehand.

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and kernel.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.48.0 <3.0.0
args >=0.13.4 <2.0.0 1.5.1
logging ^0.11.2 0.11.3+2
package_config ^1.0.0 1.0.5
path ^1.3.9 1.6.2
Transitive dependencies
charcode 1.1.2
Dev dependencies
front_end 0.1.6+8
stack_trace ^1.6.6
test ^1.3.4
test_reflective_loader ^0.1.0
testing