Skip to content

Commit 805f6d0

Browse files
committed
Merge recent summer changes.
2 parents 8fde63b + 15ffd39 commit 805f6d0

32 files changed

Lines changed: 276 additions & 245 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ University of Maryland, College Park.
66

77
The current instance of this course is:
88

9-
* http://www.cs.umd.edu/class/spring2023/cmsc430/
9+
* http://www.cs.umd.edu/class/summer2023/cmsc430/
1010

1111
Copyright © David Van Horn and José Manuel Calderón Trilla and Leonidas Lampropoulos
1212

langs/a86/ast.rkt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@
322322
(check-unique-label-decls p)
323323
(check-label-targets-declared p)
324324
(check-has-initial-label p)
325+
(check-initial-label-global p)
325326
;; anything else?
326327
p))
327328

@@ -388,6 +389,13 @@
388389
(unless (findf Label? asm)
389390
(error 'prog "no initial label found")))
390391

392+
;; Asm -> Void
393+
(define (check-initial-label-global asm)
394+
(match (findf Label? asm)
395+
[(Label init)
396+
(unless (member init (map (lambda (i) (match i [(Global l) l]))
397+
(filter Global? asm)))
398+
(error 'prog "initial label undeclared as global: ~v" init))]))
391399

392400
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
393401
;; Symbol to Label

langs/a86/test/errors.rkt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,12 @@
2020
(check-not-exn (thunk (Add 'rax (sub1 (expt 2 32)))))
2121
(check-exn exn:fail? (thunk (Sub 'rax (expt 2 32))))
2222
(check-not-exn (thunk (Sub 'rax (sub1 (expt 2 32)))))
23+
24+
;; Check prog
25+
(check-exn exn:fail? (thunk (prog (Ret))))
26+
(check-exn exn:fail? (thunk (prog (Label 'start) (Ret))))
27+
(check-exn exn:fail? (thunk (prog (Global 'foo) (Label 'start) (Label 'foo) (Ret))))
28+
(check-not-exn (thunk (prog (Global 'start) (Label 'start) (Ret))))
29+
(check-not-exn (thunk (prog (Label 'start) (Ret) (Global 'start))))
30+
31+

langs/abscond/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ default: submit.zip
1717
submit.zip:
1818
zip submit.zip -r * \
1919
-x \*.[os] -x \*~ -x \*zip \
20-
-x \*Zone.Identifier -x **compiled**
20+
-x \*Zone.Identifier -x \*\*compiled\*\*
2121

2222
runtime.o: $(objs)
2323
ld -r $(objs) -o runtime.o

langs/blackmail/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ default: submit.zip
1717
submit.zip:
1818
zip submit.zip -r * \
1919
-x \*.[os] -x \*~ -x \*zip \
20-
-x \*Zone.Identifier -x **compiled**
20+
-x \*Zone.Identifier -x \*\*compiled\*\*
2121

2222
runtime.o: $(objs)
2323
ld -r $(objs) -o runtime.o

langs/con/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ default: submit.zip
1717
submit.zip:
1818
zip submit.zip -r * \
1919
-x \*.[os] -x \*~ -x \*zip \
20-
-x \*Zone.Identifier -x **compiled**
20+
-x \*Zone.Identifier -x \*\*compiled\*\*
2121

2222
runtime.o: $(objs)
2323
ld -r $(objs) -o runtime.o

langs/dodger/Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ objs = \
1313
print.o \
1414
values.o
1515

16-
default: runtime.o
16+
default: submit.zip
17+
18+
submit.zip:
19+
zip submit.zip -r * \
20+
-x \*.[os] -x \*~ -x \*zip \
21+
-x \*Zone.Identifier -x \*\*compiled\*\*
1722

1823
runtime.o: $(objs)
1924
ld -r $(objs) -o runtime.o

langs/dupe/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ default: submit.zip
1818
submit.zip:
1919
zip submit.zip -r * \
2020
-x \*.[os] -x \*~ -x \*zip \
21-
-x \*Zone.Identifier -x **compiled**
21+
-x \*Zone.Identifier -x \*\*compiled\*\*
2222

2323
runtime.o: $(objs)
2424
ld -r $(objs) -o runtime.o

langs/evildoer/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ default: submit.zip
1919
submit.zip:
2020
zip submit.zip -r * \
2121
-x \*.[os] -x \*~ -x \*zip \
22-
-x \*Zone.Identifier -x **compiled**
22+
-x \*Zone.Identifier -x \*\*compiled\*\*
2323

2424
runtime.o: $(objs)
2525
ld -r $(objs) -o runtime.o

langs/fraud/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ default: submit.zip
1919
submit.zip:
2020
zip submit.zip -r * \
2121
-x \*.[os] -x \*~ -x \*zip \
22-
-x \*Zone.Identifier -x **compiled**
22+
-x \*Zone.Identifier -x \*\*compiled\*\*
2323

2424
runtime.o: $(objs)
2525
ld -r $(objs) -o runtime.o

0 commit comments

Comments
 (0)