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
5b6c4476
Commit
5b6c4476
authored
Apr 16, 2021
by
Luca Bataillard
Browse files
remove modifications to main and interp
parent
a3a52ceb
Changes
2
Hide whitespace changes
Inline
Side-by-side
compiler/src/l3/CPSInterpreter.scala
View file @
5b6c4476
...
...
@@ -221,8 +221,7 @@ class CPSInterpreterLow(log: SymbolicCPSTreeModuleLow.Tree => Unit)
allocBlock
(
t
,
Array
.
fill
(
s
)(
BitsV
(
0
)))
case
(
BlockTag
,
Seq
(
BlockV
(
_
,
t
,
_
)))
=>
BitsV
(
t
)
case
(
BlockLength
,
Seq
(
BlockV
(
_
,
_
,
c
)))
=>
BitsV
(
c
.
length
)
case
(
BlockGet
,
Seq
(
BlockV
(
_
,
_
,
c
),
BitsV
(
i
)))
=>
c
(
i
)
case
(
BlockGet
,
Seq
(
BlockV
(
_
,
_
,
c
),
BitsV
(
i
)))
=>
c
(
i
)
case
(
BlockSet
,
Seq
(
BlockV
(
_
,
_
,
c
),
BitsV
(
i
),
v
))
=>
c
(
i
)
=
v
;
BitsV
(
0
)
...
...
compiler/src/l3/Main.scala
View file @
5b6c4476
...
...
@@ -21,10 +21,9 @@ object Main {
andThen
CPSInterpreterLow
)
val
todoargs
=
Seq
(
"../tests/stmt-defrec.l3"
)
val
basePath
=
Paths
.
get
(
"."
).
toAbsolutePath
Either
.
cond
(!
todo
args
.
isEmpty
,
todo
args
.
toIndexedSeq
,
"no input file given"
)
Either
.
cond
(!
args
.
isEmpty
,
args
.
toIndexedSeq
,
"no input file given"
)
.
flatMap
(
L3FileReader
.
readFilesExpandingModules
(
basePath
,
_
))
.
flatMap
(
p
=>
L3Parser
.
parse
(
p
.
_1
,
p
.
_2
))
.
flatMap
(
CL3NameAnalyzer
)
...
...
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