Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
liujiuri
engine
提交
2c611fda
E
engine
项目概览
liujiuri
/
engine
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2c611fda
编写于
6月 19, 2017
作者:
R
Ryan Macnak
提交者:
GitHub
6月 19, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[fuchsia] core-jit (#3753)
上级
105cc35a
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
4718 addition
and
4 deletion
+4718
-4
build/aot_snapshot.py
build/aot_snapshot.py
+7
-0
build/flutter_app.gni
build/flutter_app.gni
+6
-0
build/script_snapshot.py
build/script_snapshot.py
+11
-1
lib/snapshot/BUILD.gn
lib/snapshot/BUILD.gn
+72
-3
lib/snapshot/fuchsia_compilation_trace.txt
lib/snapshot/fuchsia_compilation_trace.txt
+4601
-0
lib/snapshot/snapshot_fuchsia.dart
lib/snapshot/snapshot_fuchsia.dart
+21
-0
未找到文件。
build/aot_snapshot.py
浏览文件 @
2c611fda
...
...
@@ -31,6 +31,8 @@ def main():
help
=
'Where to output dependency information'
)
parser
.
add_argument
(
'--root-build-dir'
,
type
=
str
,
required
=
True
,
help
=
'The root build dir for --depfile and --snapshot'
)
parser
.
add_argument
(
'--checked'
,
default
=
False
,
action
=
'store_true'
,
help
=
'Enable checked mode'
)
args
=
parser
.
parse_args
()
...
...
@@ -48,6 +50,11 @@ def main():
cmd
.
append
(
"--url_mapping="
+
url_mapping
)
for
entry_points_manifest
in
args
.
entry_points_manifest
:
cmd
.
append
(
"--embedder_entry_points_manifest="
+
entry_points_manifest
)
if
args
.
checked
:
cmd
.
append
(
'--enable_asserts'
)
cmd
.
append
(
'--enable_type_checks'
)
cmd
.
append
(
'--error_on_bad_type'
)
cmd
.
append
(
'--error_on_bad_override'
)
cmd
.
append
(
args
.
main_dart
)
result
=
subprocess
.
call
(
cmd
,
cwd
=
args
.
root_build_dir
)
...
...
build/flutter_app.gni
浏览文件 @
2c611fda
...
...
@@ -135,6 +135,9 @@ template("flutter_app") {
"--root-build-dir",
rebase_path(root_build_dir),
]
if (is_debug) {
args += [ "--checked" ]
}
deps = [
":$dart_package_name",
...
...
@@ -286,6 +289,9 @@ template("flutter_aot_app") {
"--root-build-dir",
rebase_path(root_build_dir),
]
if (is_debug) {
args += [ "--checked" ]
}
deps = [
":$dart_package_name",
...
...
build/script_snapshot.py
浏览文件 @
2c611fda
...
...
@@ -32,11 +32,16 @@ def main():
help
=
'Where to output dependency information'
)
parser
.
add_argument
(
'--root-build-dir'
,
type
=
str
,
required
=
True
,
help
=
'The root build dir for --depfile and --snapshot'
)
parser
.
add_argument
(
'--checked'
,
default
=
False
,
action
=
'store_true'
,
help
=
'Enable checked mode'
)
args
=
parser
.
parse_args
()
cmd
=
[
args
.
snapshotter_path
,
'--enable_mirrors=false'
,
'--await_is_keyword'
,
'--assert_initializer'
,
'--snapshot_kind=script'
,
'--vm_snapshot_data=%s'
%
args
.
vm_snapshot_data
,
'--vm_snapshot_instructions=%s'
%
args
.
vm_snapshot_instructions
,
...
...
@@ -45,8 +50,13 @@ def main():
'--packages=%s'
%
args
.
packages
,
'--script_snapshot=%s'
%
args
.
snapshot
,
'--dependencies=%s'
%
args
.
depfile
,
args
.
main_dart
]
if
args
.
checked
:
cmd
.
append
(
'--enable_asserts'
)
cmd
.
append
(
'--enable_type_checks'
)
cmd
.
append
(
'--error_on_bad_type'
)
cmd
.
append
(
'--error_on_bad_override'
)
cmd
.
append
(
args
.
main_dart
)
result
=
subprocess
.
call
(
cmd
,
cwd
=
args
.
root_build_dir
)
if
result
!=
0
:
...
...
lib/snapshot/BUILD.gn
浏览文件 @
2c611fda
...
...
@@ -22,11 +22,55 @@ copy("generate_dart_ui") {
]
}
if (target_is_fuchsia) {
action("generate_package_map") {
dart_deps = [
"//lib/fidl/dart:dart",
"//lib/flutter/packages/flutter:flutter",
"//lib/widgets/packages/widgets:lib.widgets",
"//application/lib/app/dart:dart",
]
dot_packages_file = "$target_gen_dir/snapshot.packages"
outputs = [
dot_packages_file
]
deps = dart_deps
depfile = "$dot_packages_file.d"
script = "//build/dart/gen_dot_packages.py"
args = [
"--out",
rebase_path(dot_packages_file, root_build_dir),
"--source-dir",
rebase_path("."),
"--root-build-dir",
rebase_path(root_build_dir),
"--root-gen-dir",
rebase_path(root_gen_dir),
"--package-name",
"snapshot_root",
"--depfile",
rebase_path(depfile),
"--deps",
] + dart_deps
}
}
action("generate_snapshot_bin") {
if (target_is_fuchsia) {
snapshot_dart = "snapshot_fuchsia.dart"
# TODO(rmacnak): Fuchsia cross builds use the wrong Dart target
# architecture, and have added steps that depend on this error for
# reasonable build times (e.g., invoking the analyzer).
if (target_cpu == host_cpu) {
snapshot_kind = "core-jit"
} else {
snapshot_kind = "core"
}
} else {
snapshot_dart = "snapshot.dart"
snapshot_kind = "core"
}
deps = [
...
...
@@ -37,6 +81,10 @@ action("generate_snapshot_bin") {
"//dart/runtime/tools/create_snapshot_bin.py",
snapshot_dart,
] + dart_ui_files
if (target_is_fuchsia) {
deps += [ ":generate_package_map" ]
inputs += [ "fuchsia_compilation_trace.txt" ]
}
vm_snapshot_data = "$target_gen_dir/vm_isolate_snapshot.bin"
vm_snapshot_instructions = "$target_gen_dir/vm_snapshot_instructions.bin"
...
...
@@ -60,12 +108,16 @@ action("generate_snapshot_bin") {
args = [
"--executable",
rebase_path("$gen_snapshot_dir/gen_snapshot"),
"--package_root",
rebase_path("$root_gen_dir"),
"--script",
rebase_path(snapshot_dart),
"--snapshot_kind",
"core",
snapshot_kind,
"--vm_flag",
"--await_is_keyword",
"--vm_flag",
"--assert_initializer",
"--vm_flag",
"--enable_mirrors=false",
"--vm_output_bin",
rebase_path(vm_snapshot_data, root_build_dir),
"--vm_instructions_output_bin",
...
...
@@ -77,6 +129,19 @@ action("generate_snapshot_bin") {
"--url_mapping=dart:ui,$rebased_dart_ui_path",
]
if (is_debug) {
args += [
"--vm_flag",
"--enable_asserts",
"--vm_flag",
"--enable_type_checks",
"--vm_flag",
"--error_on_bad_type",
"--vm_flag",
"--error_on_bad_override",
]
}
if (target_is_fuchsia) {
inputs += fidl_dart_sdk_ext_files + mozart_dart_sdk_ext_files
fidl_internal_path = rebase_path(fidl_dart_sdk_ext_lib)
...
...
@@ -84,6 +149,10 @@ action("generate_snapshot_bin") {
args += [
"--url_mapping=dart:fidl.internal,$fidl_internal_path",
"--url_mapping=dart:mozart.internal,$mozart_internal_path",
"--packages",
rebase_path("$target_gen_dir/snapshot.packages"),
"--load_compilation_trace",
rebase_path("fuchsia_compilation_trace.txt"),
]
}
}
...
...
lib/snapshot/fuchsia_compilation_trace.txt
0 → 100644
浏览文件 @
2c611fda
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
lib/snapshot/snapshot_fuchsia.dart
浏览文件 @
2c611fda
...
...
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// These libraries are required. Only the core snapshot knows how to resolve
// them.
import
'dart:async'
;
import
'dart:collection'
;
import
'dart:convert'
;
...
...
@@ -14,3 +16,22 @@ import 'dart:math';
import
'dart:mozart.internal'
;
import
'dart:typed_data'
;
import
'dart:ui'
;
// These libraries are optional. They are included in the core snapshot and
// partially compiled to avoid repeating them in each application and improve
// startup time.
import
'package:application.lib.app.dart/app.dart'
;
import
'package:flutter/animation.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/gestures.dart'
;
import
'package:flutter/painting.dart'
;
import
'package:flutter/physics.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter/scheduler.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter/widgets.dart'
;
import
'package:lib.fidl.dart/bindings.dart'
;
import
'package:lib.fidl.dart/core.dart'
;
import
'package:lib.widgets/model.dart'
;
import
'package:lib.widgets/modular.dart'
;
import
'package:lib.widgets/widgets.dart'
;
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录