diff options
author | Robin Templeton <robin@terpri.org> | 2014-08-18 04:01:39 -0400 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2020-04-04 19:20:56 +0200 |
commit | 5d7faa88a2746a5cbbf031d7827810ebaa31473e (patch) | |
tree | 504386ffb2552a96f0ad66bddbc65e550be6db79 | |
parent | 2b5b8e5ff82fb228eb03e4b97215191dcc857822 (diff) |
use guile eval for elisp tree-il
(Best-ability ChangeLog annotation added by Christopher Allan Webber.)
* module/language/elisp/boot.el (eval): Update with simplified definition.
* module/language/elisp/compile-tree-il.scm: Import "(language tree-il eval)".
(eval-when-compile): Use eval-elisp.
(defmacro): Use eval-tree-il.
* module/language/elisp/runtime.scm: Import "(language tree-il eval)".
(eval-elisp): Use "eval" to evaluate compiled form within current-module.
-rw-r--r-- | module/language/elisp/boot.el | 7 | ||||
-rw-r--r-- | module/language/elisp/compile-tree-il.scm | 5 | ||||
-rw-r--r-- | module/language/elisp/runtime.scm | 3 |
3 files changed, 6 insertions, 9 deletions
diff --git a/module/language/elisp/boot.el b/module/language/elisp/boot.el index e6d3994fa..27af815ac 100644 --- a/module/language/elisp/boot.el +++ b/module/language/elisp/boot.el @@ -209,12 +209,7 @@ 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 diff --git a/module/language/elisp/compile-tree-il.scm b/module/language/elisp/compile-tree-il.scm index 0e5e535d8..8eaf7bc01 100644 --- a/module/language/elisp/compile-tree-il.scm +++ b/module/language/elisp/compile-tree-il.scm @@ -31,6 +31,7 @@ #: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 @@ -465,7 +466,7 @@ (defspecial eval-when-compile (loc args) (make-const loc (with-native-target (lambda () - (compile `(progn ,@args) #:from 'elisp #:to 'value))))) + (eval-elisp `(progn ,@args)))))) (define toplevel? (make-fluid)) @@ -791,7 +792,7 @@ (when (fluid-ref toplevel?) (with-native-target (lambda () - (compile tree-il #:from 'tree-il #:to 'value)))) + (eval-tree-il tree-il)))) tree-il))) (else (report-error loc "bad defmacro" args)))) diff --git a/module/language/elisp/runtime.scm b/module/language/elisp/runtime.scm index d6d4f701f..c8c39bf95 100644 --- a/module/language/elisp/runtime.scm +++ b/module/language/elisp/runtime.scm @@ -22,6 +22,7 @@ #: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 @@ -247,7 +248,7 @@ (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) |