[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 28/36: use guile eval for elisp tree-il
From: |
Robin Templeton |
Subject: |
[Guile-commits] 28/36: use guile eval for elisp tree-il |
Date: |
Sun, 26 Jan 2025 17:49:17 -0500 (EST) |
bpt pushed a commit to branch wip-elisp-rebased
in repository guile.
commit 86030dc7f334c36f94b6d0a560f481b80016fe4a
Author: Robin Templeton <robin@terpri.org>
AuthorDate: Mon Aug 18 04:01:39 2014 -0400
use guile eval for elisp tree-il
(Best-ability ChangeLog annotation added by Christine Lemmer-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.
---
module/language/elisp/boot.el | 7 +------
module/language/elisp/compile-tree-il.scm | 5 +++--
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 ff49c3dd5..5525634fd 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
@@ -466,7 +467,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))
@@ -792,7 +793,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)
- [Guile-commits] 04/36: guile-private-ref, (continued)
- [Guile-commits] 04/36: guile-private-ref, Robin Templeton, 2025/01/26
- [Guile-commits] 11/36: constant-interning fix, Robin Templeton, 2025/01/26
- [Guile-commits] 23/36: degenerate let forms, Robin Templeton, 2025/01/26
- [Guile-commits] 01/36: intern arbitrary constants, Robin Templeton, 2025/01/26
- [Guile-commits] 05/36: allow arbitrary constants in cps, Robin Templeton, 2025/01/26
- [Guile-commits] 10/36: defvar affects default value, Robin Templeton, 2025/01/26
- [Guile-commits] 18/36: compiler macros, Robin Templeton, 2025/01/26
- [Guile-commits] 19/36: defsubst, Robin Templeton, 2025/01/26
- [Guile-commits] 14/36: fix symbol-function, Robin Templeton, 2025/01/26
- [Guile-commits] 21/36: fset macro, Robin Templeton, 2025/01/26
- [Guile-commits] 28/36: use guile eval for elisp tree-il,
Robin Templeton <=
- [Guile-commits] 30/36: use standard evaluator, Robin Templeton, 2025/01/26
- [Guile-commits] 08/36: read nil/t as #nil/#t, Robin Templeton, 2025/01/26
- [Guile-commits] 03/36: multiple obarrays, Robin Templeton, 2025/01/26
- [Guile-commits] 06/36: guile-snarf fix, Robin Templeton, 2025/01/26
- [Guile-commits] 22/36: eval-when, Robin Templeton, 2025/01/26
- [Guile-commits] 34/36: loader: Handle interned constants as well as plain bytevectors., Robin Templeton, 2025/01/26
- [Guile-commits] 26/36: execute top level require forms, Robin Templeton, 2025/01/26
- [Guile-commits] 32/36: ignore 'expect-fail' forms in elisp tests, Robin Templeton, 2025/01/26
- [Guile-commits] 16/36: elisp @@ macro, Robin Templeton, 2025/01/26
- [Guile-commits] 35/36: elisp: boot: Replace removed FRAME-PROCEDURE with FRAME-PROCEDURE-NAME., Robin Templeton, 2025/01/26