;;; -*- mode: Lisp; Syntax: Common-Lisp; -*- ;;; ;;; Copyright (c) 2009 by the authors. ;;; ;;; See LICENCE for details. (in-package :hu.dwim.excosy) ;;;;;; ;;; Interpreter (def (function e) interpret-excosy (machine ast) #+nil (find-ast-node-for-memory-location (memory-location-map-of machine) (%interpret-excosy machine ast)) (%interpret-excosy machine ast)) (def function %interpret-excosy (machine ast) (set-current-special-form (runtime-state-of machine) ast) (iter (with runtime-state = (runtime-state-of machine)) (for current-special-form = (current-special-form-of runtime-state)) (while current-special-form) (catch :go-to-current-special-form (interpret-ast machine current-special-form)))) ;; KLUDGE: for partial eval (def function set-current-special-form (runtime-state new-value) (setf (current-special-form-of runtime-state) new-value)) (def function interpret-ast (machine ast) (funcall (interpreter-function-of ast) machine ast)) ;; TODO: (def layered-method hu.dwim.partial-eval:partial-eval-form ((form hu.dwim.walker:catch-form)) (hu.dwim.partial-eval::partial-eval-implicit-progn form))