Files
sdk/pkg/cfg
Johnni Winther 6b693e00bc [kernel][Contexts] Add VariableDeclaration
This adds a VariableDeclaration node which is used in ForStatement instead of VariableStatement.

This is a step towards removing the initializer from Variable. Long term, VariableDeclaration will own the initializer expression for variables and function parameters will have a defaultValue property instead of using the initializer property for the default value.

TEST=existing

Change-Id: I4a663eeb6006a0f9f098fb2b3e3b502d2ae583b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/505681
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2026-05-27 00:41:34 -07:00
..

This package defines control flow graph (CFG) intermediate representation of Dart programs and optimization passes performed on CFG.

This package is intended to be used only by Dart compiler(s) in the Dart SDK.

Structure of the package:

  front_end/  # Translation from kernel AST to CFG.
  ir/         # CFG/SSA IR and computation of its properties.
  passes/     # Optimization passes.
  utils/      # General-purpose utilities.

Status: experimental

NOTE: This package is currently experimental and not published or included in the SDK.

Do not take dependency on this package unless you are prepared for breaking changes and possibly removal of this code at any point in time.