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
28490c5f
Commit
28490c5f
authored
Sep 27, 2021
by
Matthieu Moy
Browse files
A few bugfixes in lab1
parent
96e59223
Changes
6
Hide whitespace changes
Inline
Side-by-side
TP01/python/type_unions.py
View file @
28490c5f
from
typing
import
Union
from
typing
import
List
from
typing
import
(
Union
,
List
)
# Union[int, float] means ``either an int or a float''.
NUMBER
=
Union
[
int
,
float
]
...
...
TP01/python/typecheck.py
View file @
28490c5f
...
...
@@ -6,9 +6,8 @@ int_variable = 4.2 # Static typing error, but no runtime error
float_variable
=
42.0
# OK
float_variable
=
int_variable
# OK
# Typing annotations for functions (-> means "returns")
# Typing annotations for functions (-> means "returns")
def
int_to_string
(
i
:
int
)
->
str
:
return
str
(
i
)
...
...
TP01/riscv/carres.s
View file @
28490c5f
...
...
@@ -8,7 +8,6 @@ main:
##
END
TODO
/
end
of
user
assembly
code
ld
ra
,
8
(
sp
)
addi
sp
,
sp
,
16
jr
ra
ret
#
Data
comes
here
...
...
TP01/riscv/minmax.s
View file @
28490c5f
...
...
@@ -7,7 +7,6 @@ main:
##
END
TODO
-
end
of
user
assembly
code
ld
ra
,
8
(
sp
)
addi
sp
,
sp
,
16
jr
ra
ret
#
Data
comes
here
...
...
TP01/riscv/test_print.s
View file @
28490c5f
...
...
@@ -4,8 +4,7 @@ main:
addi
sp
,
sp
,-
16
sd
ra
,
8
(
sp
)
##
Your
assembly
code
there
lui
a5
,%
hi
(
.
LC1
)
addi
a0
,
a5
,%
lo
(
.
LC1
)
la
a0
,
.
LC1
call
println_string
li
a0
,
42
call
print_int
...
...
@@ -18,7 +17,6 @@ main:
##
/
end
of
user
assembly
code
ld
ra
,
8
(
sp
)
addi
sp
,
sp
,
16
jr
ra
ret
#
Data
comes
here
...
...
TP01/riscv/triangles.s
View file @
28490c5f
...
...
@@ -7,7 +7,6 @@ main:
#
#
END
TODO
/
end
of
user
assembly
code
ld
ra
,
8
(
sp
)
addi
sp
,
sp
,
16
jr
ra
ret
#
Data
comes
here
.
section
.
data
...
...
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