Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mu-impl-fast
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
40
Issues
40
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
mu
mu-impl-fast
Commits
ac942157
Commit
ac942157
authored
Mar 09, 2016
by
qinsoon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make changes based on formal spec changes
parent
87720ecb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
14 deletions
+26
-14
src/ast/ir.rs
src/ast/ir.rs
+16
-9
tests/test_ir.rs
tests/test_ir.rs
+10
-5
No files found.
src/ast/ir.rs
View file @
ac942157
...
...
@@ -72,9 +72,9 @@ pub struct BlockContent {
pub
keepalives
:
Option
<
Vec
<
P
<
SSAVar
>>>
}
pub
struct
Termina
tionData
{
normal_dest
:
Destination
,
exn_dest
:
Destination
pub
struct
Resump
tionData
{
pub
normal_dest
:
Destination
,
pub
exn_dest
:
Destination
}
pub
enum
DestArg
{
...
...
@@ -188,7 +188,15 @@ pub enum Terminal {
true_dest
:
Destination
,
false_dest
:
Destination
},
Watchpoint
,
// TODO: Watchpoint ((wpid # destination) option) termination_data
Watchpoint
{
// Watchpoint NONE ResumptionData
// serves as an unconditional trap. Trap to client, and resume with ResumptionData
// Watchpoint (WPID dest) ResumptionData
// when disabled, jump to dest
// when enabled, trap to client and resume
id
:
Option
<
WPID
>
,
disable_dest
:
Option
<
Destination
>
,
resume
:
ResumptionData
},
WPBranch
{
wp
:
WPID
,
disable_dest
:
Destination
,
...
...
@@ -196,14 +204,13 @@ pub enum Terminal {
},
Call
{
data
:
CallData
,
normal_dest
:
Destination
,
exn_dest
:
Option
<
Destination
>
resume
:
ResumptionData
},
SwapStack
{
stack
:
P
<
Value
>
,
is_exception
:
bool
,
args
:
Vec
<
P
<
Value
>>
,
normal_dest
:
Destination
,
exn_dest
:
Destination
resume
:
ResumptionData
},
Switch
{
cond
:
P
<
Value
>
,
...
...
@@ -212,7 +219,7 @@ pub enum Terminal {
},
ExnInstruction
{
inner
:
Expression
,
term
:
Termina
tionData
resume
:
Resump
tionData
}
}
...
...
tests/test_ir.rs
View file @
ac942157
...
...
@@ -111,11 +111,16 @@ mod test_ir {
args
:
vec!
[
blk_1_v50
.clone
()],
convention
:
CallConvention
::
Mu
},
normal_dest
:
Destination
{
target
:
"blk_1_cont"
,
args
:
vec!
[
DestArg
::
Normal
(
blk_1_n_3
.clone
()),
DestArg
::
Freshbound
(
0
)]
},
exn_dest
:
None
resume
:
ResumptionData
{
normal_dest
:
Destination
{
target
:
"blk_1_cont"
,
args
:
vec!
[
DestArg
::
Normal
(
blk_1_n_3
.clone
()),
DestArg
::
Freshbound
(
0
)]
},
exn_dest
:
Destination
{
target
:
"blk_1_cont"
,
args
:
vec!
[
DestArg
::
Normal
(
blk_1_n_3
.clone
()),
DestArg
::
Freshbound
(
0
)]
}
}
};
let
blk_1_content
=
BlockContent
{
...
...
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