<!--
Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
for details. All rights reserved. Use of this source code is governed by a
BSD-style license that can be found in the LICENSE file.
-->
# Fasta -- Fully-resolved AST, Accelerated.
Fasta is a compiler framework for compiling Dart sources to Kernel IR. When Fasta works well, you won't even know you're using it, as it will be transparently integrated in tools like *dart*, *dartanalyzer*, *dart2js*, etc.
Hopefully, you'll notice that Fasta-based tools are fast, with good error messages. If not, please let us [know](https://github.com/dart-lang/sdk/issues/new).
Fasta sounds like faster, and that's a promise we intend to keep.
## Getting Started
1. [Build](https://github.com/dart-lang/sdk/wiki/Building#building) the VM and patched SDK. Note: you only need to build the targets `runtime_kernel`, and `dart_precompiled_runtime`, so you only need to run this command:
```bash
./tools/build.py --mode release --arch x64 runtime_kernel dart_precompiled_runtime
```
## Create an Outline File
1. Run `./pkg/front_end/tool/fasta outline pkg/compiler/lib/src/dart2js.dart`
2. Optionally, run `./pkg/front_end/tool/fasta dump-ir pkg/kernel/bin/dump.dart pkg/compiler/lib/src/dart2js.dart.dill` to view the generated outline.
This will generate a file named `pkg/compiler/lib/src/dart2js.dart.dill` which contains a serialized representation of the input program excluding method bodies. This is similar to an analyzer summary.
## Compiling a Program
```bash
./pkg/front_end/tool/fasta compile pkg/front_end/test/fasta/hello.dart
```
This will generate `pkg/front_end/test/fasta/hello.dart.dill` which can be run this way:
```bash
./sdk/bin/dart pkg/front_end/test/fasta/hello.dart.dill
```
### Using dartk and the Analyzer AST
```bash
./pkg/front_end/tool/fasta analyzer-compile pkg/front_end/test/fasta/hello.dart
```
This will generate `pkg/front_end/test/fasta/hello.dart.dill` which can be run this way:
```bash
./sdk/bin/dart pkg/front_end/test/fasta/hello.dart.dill
```
## Running Tests
See [How to test Fasta](TESTING.md)
## Running dart2js
```bash
./pkg/front_end/tool/fasta compile pkg/compiler/lib/src/dart2js.dart
./sdk/bin/dart pkg/compiler/lib/src/dart2js.dart.dill pkg/front_end/test/fasta/hello.dart
```
The output of dart2js will be `out.js`, and it can be run on any Javascript engine, for example, d8 which is included with the Dart SDK sources:
```
./third_party/d8/<OS>/d8 out.js
```
Where `<OS>` is one of `linux`, `macos`, or `windows`.
没有合适的资源?快使用搜索试试~ 我知道了~
flutterwebdemo基于FlutterDart开发响应式Web应用的示例
共312个文件
json:232个
js:23个
md:15个
需积分: 50 4 下载量 178 浏览量
2019-08-10
04:51:00
上传
评论
收藏 19.51MB ZIP 举报
温馨提示
flutter-web-demo :基于 Flutter/Dart 开发响应式 Web 应用的示例
资源推荐
资源详情
资源评论
收起资源包目录
flutterwebdemo基于FlutterDart开发响应式Web应用的示例 (312个子文件)
photo.g.dart 6KB
home.dart 3KB
photo.dart 1KB
photos_provider.dart 1KB
photo_details.dart 1KB
photos_repository.dart 1KB
serializers.g.dart 697B
serializers.dart 654B
photo_item.dart 645B
main.dart 399B
main.dart 336B
free_functions.dart 136B
models.dart 112B
photo_error.dart 94B
format.fbs 96KB
flutter_wep_app.gif 9.18MB
.gitignore 650B
graph_viz.html 2KB
index.html 189B
index.html 189B
dart_sdk.js 4.83MB
dart_sdk.js 4.83MB
dart_sdk.js 4.7MB
dart_sdk.js 4.7MB
dart_sdk.js 4.59MB
dart_sdk.js 4.59MB
dart_sdk.js 4.47MB
dart_sdk.js 4.47MB
ddc_web_compiler.js 2.23MB
main.dart.js 1.29MB
dart_stack_trace_mapper.js 150KB
stack_trace_mapper.dart.js 146KB
graph_viz_main.dart.js 118KB
hot_reload_client.dart.js 106KB
require.js 84KB
require.js 84KB
houdini_painter.js 28KB
dart_library.js 10KB
dart_library.js 10KB
graph_viz.js 1012B
run.js 616B
run.js 616B
live_reload_client.js 208B
ne.json 3KB
ml.json 3KB
bn.json 3KB
th.json 3KB
or.json 3KB
si.json 3KB
my.json 3KB
ta.json 3KB
kn.json 3KB
te.json 3KB
mr.json 3KB
km.json 3KB
gu.json 3KB
ka.json 3KB
pa.json 2KB
hi.json 2KB
lo.json 2KB
mn.json 2KB
ar_EG.json 2KB
ar.json 2KB
fa.json 2KB
ar_DZ.json 2KB
hy.json 2KB
mk.json 2KB
chr.json 2KB
el.json 2KB
be.json 2KB
ru.json 2KB
ln.json 2KB
ky.json 2KB
ps.json 2KB
uk.json 2KB
he.json 2KB
iw.json 2KB
am.json 2KB
bg.json 2KB
kk.json 2KB
ur.json 2KB
sr.json 2KB
lv.json 2KB
fi.json 2KB
lt.json 2KB
ca.json 2KB
zh_CN.json 2KB
zh.json 2KB
ga.json 2KB
pt_PT.json 2KB
ko.json 2KB
is.json 2KB
vi.json 2KB
hu.json 2KB
fr_CA.json 2KB
ro.json 2KB
sq.json 2KB
es_MX.json 2KB
zh_TW.json 2KB
gl.json 2KB
共 312 条
- 1
- 2
- 3
- 4
资源评论
weixin_39841882
- 粉丝: 443
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功