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
241e50c3
Commit
241e50c3
authored
Feb 26, 2016
by
qinsoon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use Arc instead of Box for types, moving on to ir.rs
parent
a94f84c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
86 additions
and
0 deletions
+86
-0
src/ast/ir.rs
src/ast/ir.rs
+86
-0
No files found.
src/ast/ir.rs
0 → 100644
View file @
241e50c3
use
ast
::
types
::
*
;
pub
enum
MemoryOrder
{
NotAtomic
,
Relaxed
,
Consume
,
Acquire
,
Release
,
AcqRel
,
SeqCst
}
pub
enum
BinOp
{
// Int(n) BinOp Int(n) -> Int(n)
Add
,
Sub
,
Mul
,
Sdiv
,
Srem
,
Udiv
,
And
,
Or
,
Xor
,
// Int(n) BinOp Int(m) -> Int(n)
Shl
,
Lshr
,
AsHR
,
// FP BinOp FP -> FP
Fadd
,
FSub
,
FMul
,
FDiv
,
FRem
}
pub
enum
CmpOp
{
// for Int comparison
EQ
,
NE
,
SGE
,
SGT
,
SLE
,
SLT
,
UGE
,
UGT
,
ULE
,
ULT
,
// for FP comparison
FFALSE
,
FTRUE
,
FOEQ
,
FOGT
,
FOGE
,
FOLT
,
FOLE
,
FONE
,
FORD
,
FUEQ
,
FUGT
,
FUGE
,
FULT
,
FULE
,
FUNE
,
FUNO
}
pub
enum
Literal_
{
LitIntDec
(
usize
,
MuType_
),
LitIntHex
(
usize
,
MuType_
),
LitFP
(
f64
,
MuType_
),
LitFPNaN
(
MuType_
),
LitFPInfPos
(
MuType_
),
LitFPInfNeg
(
MuType_
),
LitNull
(
MuType_
)
}
pub
struct
SSAVar
{
id
:
MuID
,
tag
:
Option
<
MuTag
>
,
ty
:
MuType_
}
\ No newline at end of file
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