Permalink
Browse files

conti,nuateの仕様変更

  • Loading branch information...
1 parent 4fad2ea commit 4cca1193c44b343bb9c82aad181e6a8975011ce1 @sile committed Apr 17, 2012
Showing with 8 additions and 2 deletions.
  1. +8 −2 vm/executor/instruction.lisp
@@ -116,17 +116,23 @@
(spush +stack+ value)))
(defstruct conti
+ (in t :type octets-stream)
(stack t :type stack))
(defun _conti ()
(let* ((s (make-stack :top (stack-top +stack+)
:base (stack-base +stack+)
:data (copy-seq (stack-data +stack+))))
- (c (make-conti :stack s)))
+ (c (make-conti :in (copy-octets-stream +in+)
+ :stack s)))
(spush +stack+ c)))
(defun _nuate ()
- (setf +stack+ (conti-stack (spop +stack+))))
+ (let ((c (spop +stack+))
+ (val (spop +stack+)))
+ (setf +stack+ (conti-stack c)
+ +in+ (conti-in c))
+ (spush +stack+ val)))
;; 15x
(defun _jump ()

0 comments on commit 4cca119

Please sign in to comment.