src/wam/instructions.lisp @ 68ed4af71452
Fix flet/labels indentation before I lose my mind
author |
Steve Losh <steve@stevelosh.com> |
date |
Sat, 26 Mar 2016 12:02:43 +0000 |
parents |
765efa56a965 |
children |
859a6c1314d3 |
(in-package #:bones.wam)
(defun* put-structure ((wam wam)
(functor symbol)
(arity arity)
(register register-index))
(:returns :void)
(let ((structure-cell (make-cell-structure (1+ (wam-heap-pointer wam))))
(functor-cell (make-cell-functor
(wam-ensure-functor-index wam functor)
arity)))
(wam-heap-push! wam structure-cell)
(wam-heap-push! wam functor-cell)
(setf (wam-register wam register) structure-cell))
(values))
(defun* set-variable ((wam wam) (register register-index))
(:returns :void)
(let ((cell (make-cell-reference (wam-heap-pointer wam))))
(wam-heap-push! wam cell)
(setf (wam-register wam register) cell))
(values))
(defun* set-value ((wam wam) (register register-index))
(:returns :void)
(wam-heap-push! wam (wam-register wam register))
(values))