~ chicken-core (chicken-5) c7f5d92e6d91eb4075245ba9061f379632286d97


commit c7f5d92e6d91eb4075245ba9061f379632286d97
Author:     felix <felix@call-with-current-continuation.org>
AuthorDate: Tue Mar 12 08:34:55 2013 +0100
Commit:     Peter Bex <peter.bex@xs4all.nl>
CommitDate: Fri Mar 29 21:55:48 2013 +0100

    Declaring a procedure "inline" does not force inlining, as this may be lead to non-termination of the compiler. Declaring an identifier "inline" is now equivalent to declare it "local", which enables inlining for the given named procedures but does not force it. The decision as to inline or not is now done entirely by the compiler.
    
    Signed-off-by: Peter Bex <peter.bex@xs4all.nl>

diff --git a/NEWS b/NEWS
index a34fbe04..018d57ad 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,11 @@
   - chicken-install now also accepts full URI syntax for proxy environment
     variables (thanks to Michele La Monaca)
 
+- Compiler
+  - the "inline" declaration does not force inlining anymore as recursive
+    inlining could lead to non-termination of the compiler (thanks to
+    Andrei Barbu).
+
 - Core libraries
   - read-line no longer returns trailing CRs in rare cases on TCP ports (#568)
   - write and pp now correctly use escape sequences for control characters
diff --git a/compiler.scm b/compiler.scm
index ba6bb5ee..fdae8830 100644
--- a/compiler.scm
+++ b/compiler.scm
@@ -1446,7 +1446,7 @@
 	(if (null? (cdr spec))
 	    (set! inline-locally #t)
 	    (for-each
-	     (cut mark-variable <> '##compiler#inline 'yes)
+	     (cut mark-variable <> '##compiler#local)
 	     (globalize-all (cdr spec)))))
        ((inline-limit)
 	(check-decl spec 1 1)
diff --git a/optimizer.scm b/optimizer.scm
index 791e644a..c69b4192 100644
--- a/optimizer.scm
+++ b/optimizer.scm
@@ -366,7 +366,6 @@
 					    (not (test ifid 'inline-target)) ; inlinable procedure has changed
 					    (not (test ifid 'explicit-rest))
 					    (case (variable-mark var '##compiler#inline) 
-					      ((yes) #t)
 					      ((no) #f)
 					      (else 
 					       (or external (< (fourth lparams) inline-max-size)))))
Trap