Files
sdk/pkg/analyzer/pubspec.yaml
T
Paul Berry ba42706e66 Begin developing code for "Wolf analysis".
Wolf analysis is an experimental part of the analyzer that I intend to
use as the basis for new, more advanced, lint rules and other
analyses. Its first phase will consist of lowering the abstract syntax
of each function or method to a stream of instructions for a minimal
stack machine.

This code implements the first few instructions for the minimal stack
machine (`function`, `end`, `literal`, and `drop`). These are
sufficient to express a simple function like:

    int f() => 0;

Which maps to the following instruction stream:

    function(int Function(), 0)
    literal(0)
    end

This code includes a validator that verifies that an instruction
stream is well-formed. In follow-up CLs I will add logic to convert an
analyzer AST to an instruction stream.

The internal representation of an instruction stream is code
genreated, because:

- I intend to add additional instructions in follow-up CLs, and I
  don't want to have to remember all the boilerplate for adding an
  instruction each time.

- Once the implementation is far enough along to start consuming large
  amounts of real-world Dart code, I would like to be able to
  investigate the performance effects of changing the internal
  representation. Code generation will make this a lot easier.

Change-Id: I4bc299d31ed108f6eebf9cca913d1484dbc9a3cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/334644
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2023-11-08 17:50:43 +00:00

50 lines
1.2 KiB
YAML

name: analyzer
version: 6.3.0
description: >-
This package provides a library that performs static analysis of Dart code.
repository: https://github.com/dart-lang/sdk/tree/main/pkg/analyzer
environment:
sdk: '>=3.0.0 <4.0.0'
dependencies:
_fe_analyzer_shared: ^65.0.0
collection: ^1.17.0
convert: ^3.0.0
crypto: ^3.0.0
glob: ^2.0.0
meta: ^1.11.0
package_config: ^2.0.0
path: ^1.8.0
pub_semver: ^2.0.0
source_span: ^1.8.0
watcher: ^1.0.0
yaml: ^3.0.0
# We use 'any' version constraints here as we get our package versions from
# the dart-lang/sdk repo's DEPS file. Note that this is a special case; the
# best practice for packages is to specify their compatible version ranges.
# See also https://dart.dev/tools/pub/dependencies.
dev_dependencies:
analyzer_utilities: any
args: any
async: any
checks: any
heap_snapshot: any
linter: any
lints: any
matcher: any
test: any
test_reflective_loader: any
vm_service: any
dependency_overrides:
_fe_analyzer_shared:
path: ../_fe_analyzer_shared
analyzer_utilities:
path: ../analyzer_utilities
heap_snapshot:
path: ../heap_snapshot
vm_service:
path: ../vm_service