diff --git a/compiler.rkt b/compiler.rkt index f0ba626..778f752 100644 --- a/compiler.rkt +++ b/compiler.rkt @@ -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))]))) diff --git a/il-structs.rkt b/il-structs.rkt index 7279a85..b602608 100644 --- a/il-structs.rkt +++ b/il-structs.rkt @@ -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)]))