Skip to main content

dart-aot-development

Instructions on building and testing changes using Dart AOT mode. Use when working on Dart runtime, Dart AOT compiler or other related components.

소스 정보

저장소
dart-lang/sdk
최근 소스 활동
2026년 10월 5일 22:08
감지된 SKILL.md 언어
영어
스타
11,303
포크
1,907

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
dart-aot-development
description
Instructions on building and testing changes using Dart AOT mode. Use when working on Dart runtime, Dart AOT compiler or other related components.
# Testing changes to Dart SDK in AOT mode If you are making changes to Dart SDK (including but not limited to modifying Dart VM runtime, Dart VM compiler pipeline, Dart common front-end, Dart type flow analysis, etc) and you want to test the changes in AOT mode, you should use the following instructions. 1. Build `gen_snapshot`, `vm_platform.dill` and `dartaotruntime` targets using the following command `tools/build.py -m $MODE -a $ARCH --rbe gen_snapshot vm_platform.dill dartaotruntime`. Here `$MODE` specifies preferred compilation mode (`debug` or `release`), `$ARCH` specifies target architecture (e.g. `x64`, `arm64`). Prefer building using `release` mode and prefer using `$ARCH` that matches the host unless something else is requested. A combination of `$MODE` and `$ARCH` is called `DART_CONFIGURATION` (e.g. `ReleaseX64` is `release` build targeting `x64`). 2. Use helper script `pkg/vm/tool/precompiler2 test.dart test.aot` to compile test script `test.dart` to AOT snapshot `test.aot`. To check commands executed by the script you can pass `-v` to the script. 3. Use `out/${DART_CONFIGURATION}/dartaotruntime test.aot` to execute AOT snapshot. 4. Use `perf record -g out/${DART_CONFIGURATION}/dartaotruntime test.aot` to profile the code and `perf report` and `perf annotate` to explore performance of different parts of code. 5. Use `--print-flow-graph` flag to get IL generated by optimizing compiler, `--print-flow-graph-filter=$NAME_STR` allows to filter out only methods which contain $NAME_STR in their fully qualified names. You can also use `--disassemble --code-comments` to dump disassembly annotated with IL instructions. The output produced by all these flags is written to stderr. You can pass these flags to `precompiler2` script. 6. When making changes to runtime system, AOT compiler or core libraries - always make sure to rebuild Dart SDK components given in the first item of this list before recompiling and rerunning test or benchmark code.
GitHub에서 보기