Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MOY MATTHIEU
Mif08 2021
Commits
3b337f1b
Commit
3b337f1b
authored
Nov 10, 2021
by
Matthieu Moy
Browse files
Tweak skeleton
parent
a95f99cf
Changes
2
Hide whitespace changes
Inline
Side-by-side
MiniC/Makefile
View file @
3b337f1b
...
...
@@ -28,32 +28,32 @@ antlr MiniCLexer.py MiniCParser.py: $(PACKAGE).g4
main-deps
:
MiniCLexer.py MiniCParser.py TP03/MiniCInterpretVisitor.py TP03/MiniCTypingVisitor.py
.PHONY
:
tests tests-interpret tests-codegen tests-regalloc clean clean-tests tar
.PHONY
:
tests tests-interpret tests-codegen tests-regalloc clean clean-tests tar
antlr
tests
:
tests-pyright
tests-interpret tests-codegen tests-regalloc
tests
:
tests-interpret tests-codegen tests-regalloc
tests-pyright
:
antlr
pyright .
tests-interpret
:
test_interpreter.py main-deps
tests-interpret
:
tests-pyright
test_interpreter.py main-deps
python3
-m
pytest
$(PYTEST_BASE_OPTS)
$(PYTEST_OPTS)
test_interpreter.py
# Test for naive allocator (also runs test_expect to check // EXPECTED directives):
tests-naive
:
antlr
tests-naive
:
tests-pyright
antlr
python3
-m
pytest
$(PYTEST_BASE_OPTS)
$(PYTEST_OPTS)
./test_codegen.py
-k
'naive or expect'
# Test for all but the smart allocator, i.e. everything that lab4 should pass:
tests-notsmart
:
antlr
tests-notsmart
:
tests-pyright
antlr
python3
-m
pytest
$(PYTEST_BASE_OPTS)
$(PYTEST_OPTS)
./test_codegen.py
-k
'not smart'
# Test just the smart allocation (quicker than tests)
tests-smart
:
antlr
tests-smart
:
tests-pyright
antlr
python3
-m
pytest
$(PYTEST_BASE_OPTS)
$(PYTEST_OPTS)
./test_codegen.py
-k
'smart'
# Complete testsuite (should pass for lab5):
tests-codegen
:
antlr
tests-codegen
:
tests-pyright
antlr
python3
-m
pytest
$(PYTEST_BASE_OPTS)
$(PYTEST_OPTS)
./test_codegen.py
tar
:
clean
...
...
MiniC/TP04/SimpleAllocations.py
View file @
3b337f1b
...
...
@@ -7,10 +7,10 @@ class Allocator():
def
__init__
(
self
,
function
):
self
.
_function_code
=
function
def
prepare
(
self
):
def
prepare
(
self
):
# pragma: nocover
pass
def
rewriteCode
(
self
,
listcode
):
def
rewriteCode
(
self
,
listcode
):
# pragma: nocover
pass
def
run
(
self
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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