summaryrefslogtreecommitdiff
path: root/module/srfi
diff options
context:
space:
mode:
authorAndreas Rottmann <a.rottmann@gmx.at>2011-04-07 01:12:26 +0200
committerAndreas Rottmann <a.rottmann@gmx.at>2011-04-07 01:12:26 +0200
commit165b10ddfaaa8ecc72d45a9be7d29e7537dc2379 (patch)
treedc840602fd32205fae57d16cb5808131f6143ca1 /module/srfi
parent6ebecdeb7da37a1ff0ab1d01e2f2fec225667a74 (diff)
downloadguile-165b10ddfaaa8ecc72d45a9be7d29e7537dc2379.tar.gz
Move `define-inlinable' into the default namespace
* module/ice-9/boot-9.scm (define-inlineable): Moved here from SRFI-9. * module/srfi/srfi-9 (define-inlinable): Removed here. * doc/ref/api-procedures.texi (Inlinable Procedures): Add subsection about `define-inlinable'.
Diffstat (limited to 'module/srfi')
-rw-r--r--module/srfi/srfi-9.scm32
1 files changed, 0 insertions, 32 deletions
diff --git a/module/srfi/srfi-9.scm b/module/srfi/srfi-9.scm
index f9449a66f..ad9e95de1 100644
--- a/module/srfi/srfi-9.scm
+++ b/module/srfi/srfi-9.scm
@@ -64,38 +64,6 @@
(cond-expand-provide (current-module) '(srfi-9))
-(define-syntax define-inlinable
- ;; Define a macro and a procedure such that direct calls are inlined, via
- ;; the macro expansion, whereas references in non-call contexts refer to
- ;; the procedure. Inspired by the `define-integrable' macro by Dybvig et al.
- (lambda (x)
- ;; Use a space in the prefix to avoid potential -Wunused-toplevel
- ;; warning
- (define prefix (string->symbol "% "))
- (define (make-procedure-name name)
- (datum->syntax name
- (symbol-append prefix (syntax->datum name)
- '-procedure)))
-
- (syntax-case x ()
- ((_ (name formals ...) body ...)
- (identifier? #'name)
- (with-syntax ((proc-name (make-procedure-name #'name))
- ((args ...) (generate-temporaries #'(formals ...))))
- #`(begin
- (define (proc-name formals ...)
- body ...)
- (define-syntax name
- (lambda (x)
- (syntax-case x ()
- ((_ args ...)
- #'((lambda (formals ...)
- body ...)
- args ...))
- (_
- (identifier? x)
- #'proc-name))))))))))
-
(define-syntax define-record-type
(lambda (x)
(define (field-identifiers field-specs)