Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

conti,nuateの仕様変更

  • Loading branch information...
commit 4cca1193c44b343bb9c82aad181e6a8975011ce1 1 parent 4fad2ea
@sile authored
Showing with 8 additions and 2 deletions.
  1. +8 −2 vm/executor/instruction.lisp
View
10 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 ()
Please sign in to comment.
Something went wrong with that request. Please try again.