From 30a700c8c12aeaefe3cd5fb85ea3c1b7059705bf Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 30 Jan 2010 22:54:20 +0100 Subject: 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. --- module/srfi/srfi-9.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/srfi/srfi-9.scm') 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) -- cgit v1.2.3