f)))
(defun eval (form)
- (%funcall (@ (system base compile) compile)
- form
- (%funcall (@ (guile) symbol->keyword) 'from)
- 'elisp
- (%funcall (@ (guile) symbol->keyword) 'to)
- 'value))
+ (%funcall (@ (language elisp runtime) eval-elisp) form))
(defun %indirect-function (object)
(cond
#:use-module (srfi srfi-11)
#:use-module (srfi srfi-26)
#:use-module (ice-9 format)
+ #:use-module (language tree-il eval)
#:export (compile-tree-il
compile-progn
compile-eval-when-compile
(map compile-expr-1 args))))
(defspecial eval-when-compile (loc args)
- (make-const loc (compile `(progn ,@args) #:from 'elisp #:to 'value)))
+ (make-const loc (eval-elisp `(progn ,@args))))
(define toplevel? (make-fluid))
body))))
(make-const loc name))))
(when (fluid-ref toplevel?)
- (compile tree-il #:from 'tree-il #:to 'value))
+ (eval-tree-il tree-il))
tree-il)))
(else (report-error loc "bad defmacro" args))))
#:use-module (ice-9 format)
#:use-module ((system base compile)
#:select (compile))
+ #:use-module (language tree-il eval)
#:export (nil-value
t-value
value-slot-module
(set! set-lexical-binding-mode (lambda (x) (set-symbol-value! 'lexical-binding x))))
(define (eval-elisp form)
- (compile form #:from 'elisp #:to 'value))
+ (eval (compile form #:from 'elisp #:to 'tree-il) (current-module)))
(define (compile-elisp form)
(compile (compile form #:from 'elisp #:to 'bytecode)