Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Haley Sapphie Owsianko
ACC-project
Commits
7906bafb
Commit
7906bafb
authored
Mar 20, 2021
by
Sapphie
Browse files
Implement bitwise primitives
parent
ed753853
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/src/l3/CPSValueRepresenter.scala
View file @
7906bafb
...
...
@@ -53,6 +53,17 @@ object CPSValueRepresenter extends (H.Tree => L.Tree) {
}
}
case
L3
.
IntBitwiseAnd
=>
L
.
LetP
(
n
,
CPS
.
And
,
Seq
(
rewrite
(
x
),
rewrite
(
y
)),
apply
(
body
))
case
L3
.
IntBitwiseOr
=>
L
.
LetP
(
n
,
CPS
.
Or
,
Seq
(
rewrite
(
x
),
rewrite
(
y
)),
apply
(
body
))
case
L3
.
IntBitwiseXOr
=>
tempLetP
(
CPS
.
XOr
,
Seq
(
Left
(
x
),
lAtomOne
))
{
x1
=>
L
.
LetP
(
n
,
CPS
.
XOr
,
Seq
(
x1
,
rewrite
(
y
)),
apply
(
body
))
}
}
}
...
...
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