(loader '((title |mvalues.lo|))) (if (not (>= (version) 15.2)) (progn (error 'load 'erricf 'mvalues))) (setq #:sys-package:colon 'multiple-value) (defvar #:multiple-value:limit 21) (defvar #:multiple-value:values (makelist #:multiple-value:limit ())) (defvar #:multiple-value:number 0) (defvar #:multiple-value:bullshit) (loader'((fentry values nsubr) (entry values nsubr) (jcall #:llcp:nlist) (push a1) (mov '0 a3) (mov (cvalq #:multiple-value:values) a2) (call #:multiple-value:values-aux) (mov (& 0) a1) (mov (car a1) a1) (adjstk '1) (return) )) (loader'((fentry values-list subr1) (entry values-list subr1) (push a1) (mov '0 a3) (mov (cvalq #:multiple-value:values) a2) (call #:multiple-value:values-aux) (mov (& 0) a1) (mov (car a1) a1) (adjstk '1) (return) )) (loader'((entry #:multiple-value:values-aux subr3) (push a3) (push a2) (bfnil a1 101) 103 (btnil (& 0) 104) (mov (& 0) a4) (mov nil (car a4)) (mov (cdr a4) (& 0)) (bra 103) 104 (mov (& 1) (cvalq #:multiple-value:number)) (mov (& 1) a1) (adjstk '2) (return) 101 (bfnil a2 105) (mov a1 a3) (mov '"extra multiple values" a2) (mov 'values a1) (adjstk '2) (jmp error) 105 (mov (car a1) (car a2)) (plus '1 a3) (mov (cdr a2) a2) (mov (cdr a1) a1) (adjstk '2) (bra #:multiple-value:values-aux) )) (loader'((fentry multiple-value-list dmsubr) (entry multiple-value-list dmsubr) (mov (car a1) a1) (push (@ 101)) (push 'progn) (push '(setq #:multiple-value:number 0)) (push (@ 102)) (push 'let) (push (@ 103)) (push (@ 104)) (push '#:multiple-value:v) (push a1) (mov '2 a4) (jmp list) 104 (eval ()) (push a1) (mov '1 a4) (jmp list) 103 (eval ()) (push a1) (push '((if (= 0 #:multiple-value:number) (list #:multiple-value:v) (firstn #:multiple-value:number #:multiple-value:values)))) (mov '3 a4) (jmp mcons) 102 (eval ()) (push a1) (mov '3 a4) (jmp list) 101 (eval ()) (return) )) (loader'((fentry multiple-value-call fsubr) (entry multiple-value-call fsubr) (mov (cdr a1) a4) (mov (car a1) a1) (push a1) (push a4) (push nil) (push nil) (push (@ 101)) (push a1) (mov '1 a4) (jmp eval) 101 (eval ()) (mov a1 (& 3)) 102 (btnil (& 2) 103) (mov '0 (cvalq #:multiple-value:number)) (push (@ 104)) (mov (& 3) a4) (mov (cdr a4) (& 3)) (push (car a4)) (mov '1 a4) (jmp eval) 104 (eval ()) (mov a1 (& 0)) (push (@ 107)) (push '0) (push (cvalq #:multiple-value:number)) (mov '2 a4) (jmp =) 107 (eval ()) (btnil a1 105) (mov (& 1) a2) (mov (& 0) a1) (jcall cons) (mov a1 (& 1)) (bra 102) 105 (push (@ 108)) (mov (cvalq #:multiple-value:values) a2) (mov (cvalq #:multiple-value:number) a1) (jcall firstn) (jcall nreverse) (push a1) (push (& 3)) (mov '2 a4) (jmp nconc) 108 (eval ()) (mov a1 (& 1)) (bra 102) 103 (push (@ 109)) (push (& 4)) (mov (& 3) a1) (jcall nreverse) (push a1) (mov '2 a4) (jmp apply) 109 (eval ()) (adjstk '4) (return) )) (loader'((fentry multiple-value-prog1 fsubr) (entry multiple-value-prog1 fsubr) (mov (cdr a1) a4) (mov (car a1) a1) (push a4) (push (@ 101)) (push a1) (mov '1 a4) (jmp eval) 101 (eval ()) (push a1) (mov (cvalq #:multiple-value:values) a2) (mov (cvalq #:multiple-value:number) a1) (jcall firstn) (push a1) (push (@ 102)) (push 'progn) (push (& 4)) (mov '2 a4) (jmp apply) 102 (eval ()) (mov (& 0) a1) (jcall values-list) (adjstk '1) (pop a1) (adjstk '1) (return) )) (loader'((fentry multiple-value-bind dmsubr) (entry multiple-value-bind dmsubr) (mov (cdr a1) a4) (mov (car a1) a1) (mov (cdr a4) a3) (mov (car a4) a4) (push a3) (push (@ 101)) (push 'progn) (push a4) (push (@ 102)) (push 'letvq) (push (@ 103)) (push a1) (push '#:multiple-value:bullshit) (mov '2 a4) (jmp append) 103 (eval ()) (push a1) (push '#:multiple-value:values) (push (& 7)) (mov '4 a4) (jmp mcons) 102 (eval ()) (push a1) (mov '3 a4) (jmp list) 101 (eval ()) (adjstk '1) (return) )) (loader'((fentry multiple-value-setq dmsubr) (entry multiple-value-setq dmsubr) (mov (cdr a1) a4) (mov (car a1) a1) (mov (car a4) a4) (push (@ 101)) (push 'progn) (push a4) (push (@ 102)) (push 'desetq) (push (@ 103)) (push a1) (push '#:multiple-value:bullshit) (mov '2 a4) (jmp append) 103 (eval ()) (push a1) (push '(#:multiple-value:values)) (mov '3 a4) (jmp mcons) 102 (eval ()) (push a1) (mov '3 a4) (jmp list) 101 (eval ()) (return) )) (loader '((end)))