Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
liujiuri
engine
提交
9053b6c0
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,发现更多精彩内容 >>
提交
9053b6c0
编写于
2月 07, 2017
作者:
C
Chinmay Garde
提交者:
GitHub
2月 07, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Allow running in debug product mode with checked mode off. (#3398)
上级
0904cf3e
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
34 addition
and
16 deletion
+34
-16
common/settings.h
common/settings.h
+1
-0
runtime/dart_init.cc
runtime/dart_init.cc
+10
-8
shell/common/shell.cc
shell/common/shell.cc
+16
-8
shell/common/switches.h
shell/common/switches.h
+7
-0
未找到文件。
common/settings.h
浏览文件 @
9053b6c0
...
...
@@ -24,6 +24,7 @@ struct Settings {
bool
endless_trace_buffer
=
false
;
bool
enable_dart_profiling
=
false
;
bool
use_test_fonts
=
false
;
bool
dart_non_checked_mode
=
false
;
std
::
string
aot_snapshot_path
;
std
::
string
aot_vm_snapshot_data_filename
;
std
::
string
aot_vm_snapshot_instr_filename
;
...
...
runtime/dart_init.cc
浏览文件 @
9053b6c0
...
...
@@ -199,9 +199,9 @@ Dart_Isolate ServiceIsolateCreateCallback(const char* script_uri,
Dart_Isolate
isolate
=
Dart_CreateIsolate
(
script_uri
,
"main"
,
reinterpret_cast
<
const
uint8_t
*>
(
DART_SYMBOL
(
kDartIsolateSnapshotData
)),
reinterpret_cast
<
const
uint8_t
*>
(
DART_SYMBOL
(
kDartIsolateSnapshotInstructions
)),
nullptr
,
dart_state
,
error
);
reinterpret_cast
<
const
uint8_t
*>
(
DART_SYMBOL
(
kDartIsolateSnapshotInstructions
))
,
nullptr
,
dart_state
,
error
);
FTL_CHECK
(
isolate
)
<<
error
;
dart_state
->
SetIsolate
(
isolate
);
FTL_CHECK
(
Dart_IsServiceIsolate
(
isolate
));
...
...
@@ -280,8 +280,7 @@ Dart_Isolate IsolateCreateCallback(const char* script_uri,
script_uri
,
main
,
reinterpret_cast
<
uint8_t
*>
(
DART_SYMBOL
(
kDartIsolateSnapshotData
)),
reinterpret_cast
<
uint8_t
*>
(
DART_SYMBOL
(
kDartIsolateSnapshotInstructions
)),
nullptr
,
dart_state
,
error
);
nullptr
,
dart_state
,
error
);
FTL_CHECK
(
isolate
)
<<
error
;
dart_state
->
SetIsolate
(
isolate
);
FTL_CHECK
(
!
LogIfError
(
...
...
@@ -378,9 +377,11 @@ DartJniIsolateData* GetDartJniDataForCurrentIsolate() {
#if DART_ALLOW_DYNAMIC_RESOLUTION
constexpr
char
kDartVmSnapshotDataName
[]
=
"kDartVmSnapshotData"
;
constexpr
char
kDartVmSnapshotInstructionsName
[]
=
"kDartVmSnapshotInstructions"
;
constexpr
char
kDartVmSnapshotInstructionsName
[]
=
"kDartVmSnapshotInstructions"
;
constexpr
char
kDartIsolateSnapshotDataName
[]
=
"kDartIsolateSnapshotData"
;
constexpr
char
kDartIsolateSnapshotInstructionsName
[]
=
"kDartIsolateSnapshotInstructions"
;
constexpr
char
kDartIsolateSnapshotInstructionsName
[]
=
"kDartIsolateSnapshotInstructions"
;
#if OS(IOS)
...
...
@@ -623,7 +624,8 @@ void InitDartVM() {
#else
// Enable checked mode if we are not running precompiled code. We run non-
// precompiled code only in the debug product mode.
const
bool
use_checked_mode
=
!
IsRunningPrecompiledCode
();
const
bool
use_checked_mode
=
!
IsRunningPrecompiledCode
()
&&
!
settings
.
dart_non_checked_mode
;
#endif
#if FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DEBUG
...
...
shell/common/shell.cc
浏览文件 @
9053b6c0
...
...
@@ -42,8 +42,10 @@ bool IsViewInvalid(const ftl::WeakPtr<PlatformView>& platform_view) {
return
!
platform_view
;
}
template
<
typename
T
>
bool
GetSwitchValue
(
const
base
::
CommandLine
&
command_line
,
Switch
sw
,
T
*
result
)
{
template
<
typename
T
>
bool
GetSwitchValue
(
const
base
::
CommandLine
&
command_line
,
Switch
sw
,
T
*
result
)
{
auto
port_string
=
command_line
.
GetSwitchValueASCII
(
FlagForSwitch
(
sw
));
std
::
stringstream
stream
(
port_string
);
T
value
=
0
;
...
...
@@ -155,6 +157,10 @@ void Shell::InitStandalone(std::string icu_data_path,
}
}
// Checked mode overrides.
settings
.
dart_non_checked_mode
=
command_line
.
HasSwitch
(
FlagForSwitch
(
Switch
::
DartNonCheckedMode
));
settings
.
enable_diagnostic
=
!
command_line
.
HasSwitch
(
FlagForSwitch
(
Switch
::
DisableDiagnostic
));
...
...
@@ -185,10 +191,12 @@ void Shell::InitStandalone(std::string icu_data_path,
FlagForSwitch
(
Switch
::
AotVmSnapshotData
));
settings
.
aot_vm_snapshot_instr_filename
=
command_line
.
GetSwitchValueASCII
(
FlagForSwitch
(
Switch
::
AotVmSnapshotInstructions
));
settings
.
aot_isolate_snapshot_data_filename
=
command_line
.
GetSwitchValueASCII
(
FlagForSwitch
(
Switch
::
AotIsolateSnapshotData
));
settings
.
aot_isolate_snapshot_instr_filename
=
command_line
.
GetSwitchValueASCII
(
FlagForSwitch
(
Switch
::
AotIsolateSnapshotInstructions
));
settings
.
aot_isolate_snapshot_data_filename
=
command_line
.
GetSwitchValueASCII
(
FlagForSwitch
(
Switch
::
AotIsolateSnapshotData
));
settings
.
aot_isolate_snapshot_instr_filename
=
command_line
.
GetSwitchValueASCII
(
FlagForSwitch
(
Switch
::
AotIsolateSnapshotInstructions
));
settings
.
temp_directory_path
=
command_line
.
GetSwitchValueASCII
(
FlagForSwitch
(
Switch
::
CacheDirPath
));
...
...
@@ -205,8 +213,8 @@ void Shell::InitStandalone(std::string icu_data_path,
}
if
(
command_line
.
HasSwitch
(
FlagForSwitch
(
Switch
::
LogTag
)))
{
settings
.
log_tag
=
command_line
.
GetSwitchValueASCII
(
FlagForSwitch
(
Switch
::
LogTag
));
settings
.
log_tag
=
command_line
.
GetSwitchValueASCII
(
FlagForSwitch
(
Switch
::
LogTag
));
}
blink
::
Settings
::
Set
(
settings
);
...
...
shell/common/switches.h
浏览文件 @
9053b6c0
...
...
@@ -86,6 +86,13 @@ DEF_SWITCH(RunForever,
"run-forever"
,
"In non-interactive mode, keep the shell running after the Dart "
"script has completed."
)
DEF_SWITCH
(
DartNonCheckedMode
,
"dart-non-checked-mode"
,
"Dart code runs in checked mode when the runtime mode is debug. In "
"profile and release product modes, the application code is "
"precompiled and checked mode is unsupported. However, this flag "
"may be specified if the user wishes to run in the debug product "
"mode (i.e. with JIT or DBC) with checked mode off."
)
DEF_SWITCHES_END
void
PrintUsage
(
const
std
::
string
&
executable_name
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录