Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mu-impl-fast
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
40
Issues
40
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
mu
mu-impl-fast
Commits
5be79e86
Commit
5be79e86
authored
Nov 08, 2016
by
Kunshan Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IRBuilder: const extern, ExptCCall
parent
26de5491
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
10 deletions
+19
-10
muirbuilder.rs
src/vm/api/api_impl/muirbuilder.rs
+19
-10
No files found.
src/vm/api/api_impl/muirbuilder.rs
View file @
5be79e86
...
...
@@ -1031,26 +1031,31 @@ impl<'lb, 'lvm> BundleLoader<'lb, 'lvm> {
let
hdr
=
self
.make_mu_entity_header
(
id
);
let
(
impl_con
,
impl_ty
)
=
match
**
con
{
NodeConst
::
ConstInt
{
id
:
_
,
ty
:
ty
,
value
:
value
}
=>
{
NodeConst
::
ConstInt
{
id
:
_
,
ty
,
value
}
=>
{
let
t
=
self
.ensure_type_rec
(
ty
);
let
c
=
Constant
::
Int
(
value
);
(
c
,
t
)
},
NodeConst
::
ConstFloat
{
id
:
_
,
ty
:
ty
,
value
:
value
}
=>
{
NodeConst
::
ConstFloat
{
id
:
_
,
ty
,
value
}
=>
{
let
t
=
self
.ensure_type_rec
(
ty
);
let
c
=
Constant
::
Float
(
value
);
(
c
,
t
)
},
NodeConst
::
ConstDouble
{
id
:
_
,
ty
:
ty
,
value
:
value
}
=>
{
NodeConst
::
ConstDouble
{
id
:
_
,
ty
,
value
}
=>
{
let
t
=
self
.ensure_type_rec
(
ty
);
let
c
=
Constant
::
Double
(
value
);
(
c
,
t
)
},
NodeConst
::
ConstNull
{
id
:
_
,
ty
:
ty
}
=>
{
NodeConst
::
ConstNull
{
id
:
_
,
ty
}
=>
{
let
t
=
self
.ensure_type_rec
(
ty
);
let
c
=
Constant
::
NullRef
;
(
c
,
t
)
},
NodeConst
::
ConstExtern
{
id
:
_
,
ty
,
ref
symbol
}
=>
{
let
t
=
self
.ensure_type_rec
(
ty
);
let
c
=
Constant
::
ExternSym
(
symbol
.clone
());
(
c
,
t
)
},
ref
c
=>
panic!
(
"{:?} not implemented"
,
c
),
};
...
...
@@ -1766,16 +1771,20 @@ impl<'lb, 'lvm> BundleLoader<'lb, 'lvm> {
}
}
else
{
// non-terminating inst
if
is_ccall
{
warn!
(
"Using ExprCall for non-terminating C call"
)
}
Instruction
{
hdr
:
hdr
,
value
:
Some
(
rvs
),
ops
:
RwLock
::
new
(
ops
),
v
:
Instruction_
::
ExprCall
{
data
:
call_data
,
is_abort
:
false
,
v
:
if
is_ccall
{
Instruction_
::
ExprCCall
{
data
:
call_data
,
is_abort
:
false
,
}
}
else
{
Instruction_
::
ExprCall
{
data
:
call_data
,
is_abort
:
false
,
}
},
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment