loosening instruction sequences to allow for statements as well.
This commit is contained in:
parent
45d8ec3330
commit
749253d8c4
|
@ -2021,13 +2021,11 @@
|
|||
(end-with-linkage linkage
|
||||
cenv
|
||||
(append-instruction-sequences
|
||||
(make-instruction-sequence
|
||||
`(,(make-AssignImmediateStatement target exp)
|
||||
singular-context-check)))))]
|
||||
(make-AssignImmediateStatement target exp)
|
||||
singular-context-check)))]
|
||||
[else
|
||||
((current-warn-unimplemented-kernel-primitive) id)
|
||||
(make-instruction-sequence
|
||||
`(,(make-PerformStatement (make-RaiseUnimplementedPrimitiveError! id))))])))
|
||||
(make-PerformStatement (make-RaiseUnimplementedPrimitiveError! id))])))
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -442,12 +442,14 @@
|
|||
|
||||
|
||||
|
||||
(define-type InstructionSequence (U Symbol LinkedLabel instruction-sequence))
|
||||
(define-type InstructionSequence (U Symbol LinkedLabel Statement instruction-sequence))
|
||||
(define-struct: instruction-sequence ([statements : (Listof Statement)])
|
||||
#:transparent)
|
||||
(define empty-instruction-sequence (make-instruction-sequence '()))
|
||||
|
||||
|
||||
(define-predicate Statement? Statement)
|
||||
|
||||
|
||||
(: statements (InstructionSequence -> (Listof Statement)))
|
||||
(define (statements s)
|
||||
|
@ -455,6 +457,8 @@
|
|||
(list s)]
|
||||
[(LinkedLabel? s)
|
||||
(list s)]
|
||||
[(Statement? s)
|
||||
(list s)]
|
||||
[else
|
||||
(instruction-sequence-statements s)]))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user