summaryrefslogtreecommitdiff
path: root/module/srfi/srfi-9.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2010-01-30 22:54:20 +0100
committerLudovic Courtès <ludo@gnu.org>2010-02-01 00:25:51 +0100
commit30a700c8c12aeaefe3cd5fb85ea3c1b7059705bf (patch)
tree3007b0fa9187dc46f93660f16af2c303528c1189 /module/srfi/srfi-9.scm
parent61cbfff50979136f03ab161711edc5eb21145609 (diff)
downloadguile-30a700c8c12aeaefe3cd5fb85ea3c1b7059705bf.tar.gz
Inline SRFI-9 constructors too.
* module/srfi/srfi-9.scm (define-record-type)[constructor]: Use `define-inlinable' instead of `define'. * test-suite/lib.scm (exception:syntax-pattern-unmatched): New variable. * test-suite/tests/srfi-9.test ("constructor")["foo 0 args (inline)", "foo 2 args (inline)"]: New tests. ["foo 0 args", "foo 2 args"]: Adjust to constructor inlining. * testsuite/t-records.scm: Remove wrong-arg-count case.
Diffstat (limited to 'module/srfi/srfi-9.scm')
-rw-r--r--module/srfi/srfi-9.scm4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/srfi/srfi-9.scm b/module/srfi/srfi-9.scm
index ce8029395..39f4e34e5 100644
--- a/module/srfi/srfi-9.scm
+++ b/module/srfi/srfi-9.scm
@@ -1,6 +1,6 @@
;;; srfi-9.scm --- define-record-type
-;; Copyright (C) 2001, 2002, 2006, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2002, 2006, 2009, 2010 Free Software Foundation, Inc.
;;
;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public
@@ -119,7 +119,7 @@
(ctor-args (map (lambda (field)
(cons (syntax->datum field) field))
#'(field ...))))
- #`(define #,constructor-spec
+ #`(define-inlinable #,constructor-spec
(make-struct #,type-name 0
#,@(unfold
(lambda (field-num)