Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Second State
SSVM
提交
9805e720
S
SSVM
项目概览
Second State
/
SSVM
通知
5
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SSVM
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
9805e720
编写于
2月 10, 2021
作者:
Y
YiYing He
提交者:
Yi-Ying He
2月 17, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[Common] Use copy of Configure for independent paritions.
上级
1631aad9
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
8 addition
and
8 deletion
+8
-8
include/interpreter/interpreter.h
include/interpreter/interpreter.h
+1
-1
include/loader/loader.h
include/loader/loader.h
+1
-1
include/validator/validator.h
include/validator/validator.h
+1
-1
include/vm/vm.h
include/vm/vm.h
+1
-1
lib/vm/vm.cpp
lib/vm/vm.cpp
+4
-4
未找到文件。
include/interpreter/interpreter.h
浏览文件 @
9805e720
...
...
@@ -540,7 +540,7 @@ private:
/// Instantiation mode enumeration class
enum
class
InstantiateMode
:
uint8_t
{
Instantiate
=
0
,
ImportWasm
};
/// SSVM configuration
const
Configure
&
Conf
;
const
Configure
Conf
;
/// Instantiation mode
InstantiateMode
InsMode
;
/// Stack
...
...
include/loader/loader.h
浏览文件 @
9805e720
...
...
@@ -40,7 +40,7 @@ public:
Expect
<
std
::
unique_ptr
<
AST
::
Module
>>
parseModule
(
Span
<
const
uint8_t
>
Code
);
private:
const
Configure
&
Conf
;
const
Configure
Conf
;
FileMgrFStream
FSMgr
;
FileMgrVector
FVMgr
;
LDMgr
LMgr
;
...
...
include/validator/validator.h
浏览文件 @
9805e720
...
...
@@ -67,7 +67,7 @@ private:
static
inline
const
uint32_t
LIMIT_MEMORYTYPE
=
1U
<<
16
;
/// Proposal configure
const
Configure
&
Conf
;
const
Configure
Conf
;
/// Formal checker
FormChecker
Checker
;
};
...
...
include/vm/vm.h
浏览文件 @
9805e720
...
...
@@ -105,7 +105,7 @@ private:
void
initVM
();
/// VM environment.
const
Configure
&
Config
;
const
Configure
Conf
;
Statistics
::
Statistics
Stat
;
VMStage
Stage
;
...
...
lib/vm/vm.cpp
浏览文件 @
9805e720
...
...
@@ -8,27 +8,27 @@ namespace SSVM {
namespace
VM
{
VM
::
VM
(
const
Configure
&
Conf
)
:
Conf
ig
(
Conf
),
Stage
(
VMStage
::
Inited
),
LoaderEngine
(
Conf
),
:
Conf
(
Conf
),
Stage
(
VMStage
::
Inited
),
LoaderEngine
(
Conf
),
ValidatorEngine
(
Conf
),
InterpreterEngine
(
Conf
,
&
Stat
),
Store
(
std
::
make_unique
<
Runtime
::
StoreManager
>
()),
StoreRef
(
*
Store
.
get
())
{
initVM
();
}
VM
::
VM
(
const
Configure
&
Conf
,
Runtime
::
StoreManager
&
S
)
:
Conf
ig
(
Conf
),
Stage
(
VMStage
::
Inited
),
LoaderEngine
(
Conf
),
:
Conf
(
Conf
),
Stage
(
VMStage
::
Inited
),
LoaderEngine
(
Conf
),
ValidatorEngine
(
Conf
),
InterpreterEngine
(
Conf
,
&
Stat
),
StoreRef
(
S
)
{
initVM
();
}
void
VM
::
initVM
()
{
/// Create import modules from configuration.
if
(
Conf
ig
.
hasHostRegistration
(
HostRegistration
::
Wasi
))
{
if
(
Conf
.
hasHostRegistration
(
HostRegistration
::
Wasi
))
{
std
::
unique_ptr
<
Runtime
::
ImportObject
>
WasiMod
=
std
::
make_unique
<
Host
::
WasiModule
>
();
InterpreterEngine
.
registerModule
(
StoreRef
,
*
WasiMod
.
get
());
ImpObjs
.
insert
({
HostRegistration
::
Wasi
,
std
::
move
(
WasiMod
)});
}
if
(
Conf
ig
.
hasHostRegistration
(
HostRegistration
::
SSVM_Process
))
{
if
(
Conf
.
hasHostRegistration
(
HostRegistration
::
SSVM_Process
))
{
std
::
unique_ptr
<
Runtime
::
ImportObject
>
ProcMod
=
std
::
make_unique
<
Host
::
SSVMProcessModule
>
();
InterpreterEngine
.
registerModule
(
StoreRef
,
*
ProcMod
.
get
());
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录