diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-04-04 23:25:23 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-04-04 23:25:23 -0700 |
commit | 42de5a4346c5a796b836d8c8b49f2ecc7116b468 (patch) | |
tree | c4dd69b72c095cb83a12981740d627da0d328c30 | |
parent | f0613c4c83359a528adc4f5cf149372b160529f7 (diff) | |
download | txr-42de5a4346c5a796b836d8c8b49f2ecc7116b468.tar.gz txr-42de5a4346c5a796b836d8c8b49f2ecc7116b468.tar.bz2 txr-42de5a4346c5a796b836d8c8b49f2ecc7116b468.zip |
stdlib: remove macro-time.
These top-level macro-time forms are preventing code from
being compiled.
* share/txr/stdlib/ifa.tl: Remove macro-time around
sys:if-to-cond function.
* share/txr/stdlib/package.tl: Remove macro-time around
sys:name-str.
* share/txr/stdlib/struct.tl: Remove macro-time around
sys:bad-slot-syntax and sys:prune-missing-inits.
-rw-r--r-- | share/txr/stdlib/ifa.tl | 13 | ||||
-rw-r--r-- | share/txr/stdlib/package.tl | 13 | ||||
-rw-r--r-- | share/txr/stdlib/struct.tl | 15 |
3 files changed, 19 insertions, 22 deletions
diff --git a/share/txr/stdlib/ifa.tl b/share/txr/stdlib/ifa.tl index 36ae2ae7..253f2688 100644 --- a/share/txr/stdlib/ifa.tl +++ b/share/txr/stdlib/ifa.tl @@ -69,13 +69,12 @@ (defmacro whena (test . body) ^(ifa ,test (progn ,*body))) -(macro-time - (defun sys:if-to-cond (if-oper cond-oper pairs) - (tree-case pairs - (((test . forms) . rest) ^(,if-oper ,test (progn ,*forms) - (,cond-oper ,*rest))) - (() ()) - (else (throwf 'eval-error "~s: bad syntax: ~s" cond-oper pairs))))) +(defun sys:if-to-cond (if-oper cond-oper pairs) + (tree-case pairs + (((test . forms) . rest) ^(,if-oper ,test (progn ,*forms) + (,cond-oper ,*rest))) + (() ()) + (else (throwf 'eval-error "~s: bad syntax: ~s" cond-oper pairs)))) (defmacro conda (. pairs) (sys:if-to-cond 'ifa 'conda pairs)) diff --git a/share/txr/stdlib/package.tl b/share/txr/stdlib/package.tl index 7e744a66..1360cb29 100644 --- a/share/txr/stdlib/package.tl +++ b/share/txr/stdlib/package.tl @@ -24,13 +24,12 @@ ;; OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ;; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -(macro-time - (defun sys:name-str (kind sym-or-string) - (cond - ((symbolp sym-or-string) (symbol-name sym-or-string)) - ((stringp sym-or-string) sym-or-string) - (t (throw 'eval-error "~s: ~s isn't a valid ~a name" - 'defpackage sym-or-string kind))))) +(defun sys:name-str (kind sym-or-string) + (cond + ((symbolp sym-or-string) (symbol-name sym-or-string)) + ((stringp sym-or-string) sym-or-string) + (t (throw 'eval-error "~s: ~s isn't a valid ~a name" + 'defpackage sym-or-string kind)))) (defmacro defpackage (name . clauses) (let* ((pkg (gensym "pkg-")) diff --git a/share/txr/stdlib/struct.tl b/share/txr/stdlib/struct.tl index 1ad96d06..c02f3d30 100644 --- a/share/txr/stdlib/struct.tl +++ b/share/txr/stdlib/struct.tl @@ -24,15 +24,14 @@ ;; OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ;; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -(macro-time - (defun sys:bad-slot-syntax (form arg) - (compile-error form "bad slot syntax ~s" arg)) +(defun sys:bad-slot-syntax (form arg) + (compile-error form "bad slot syntax ~s" arg)) - (defun sys:prune-missing-inits (slot-init-forms) - (remove-if (tb ((kind name : (init-form nil init-form-present))) - (and (member kind '(:static :instance :function)) - (not init-form-present))) - slot-init-forms))) +(defun sys:prune-missing-inits (slot-init-forms) + (remove-if (tb ((kind name : (init-form nil init-form-present))) + (and (member kind '(:static :instance :function)) + (not init-form-present))) + slot-init-forms)) (defmacro defstruct (:form form name-spec super . slot-specs) (tree-bind (name args) (tree-case name-spec |