~ chicken-core (chicken-5) 8383d275069aa254fa6324e214dfbee0dcf2c790


commit 8383d275069aa254fa6324e214dfbee0dcf2c790
Author:     felix <felix@call-with-current-continuation.org>
AuthorDate: Sun Jul 24 23:33:51 2011 +0200
Commit:     felix <felix@call-with-current-continuation.org>
CommitDate: Sun Jul 24 23:33:51 2011 +0200

    don't gp when declared not-inline

diff --git a/optimizer.scm b/optimizer.scm
index ee2edb0a..34b2418b 100644
--- a/optimizer.scm
+++ b/optimizer.scm
@@ -228,10 +228,12 @@
 		    (varnode var))
 		   ((assq var gae) =>
 		    (lambda (a)
-		      (cond ((cdr a)
-			     (debugging 'x "propagated global variable" var (cdr a))
-			     (varnode (cdr a)))
-			    (else (varnode var)))))
+		      (let ((gvar (cdr a)))
+			(cond ((and gvar
+				    (not (eq? 'no (variable-mark gvar '##compiler#inline))))
+			       (debugging 'x "propagated global variable" var gvar)
+			       (varnode gvar))
+			      (else (varnode var))))))
 		   (else (varnode var)))))
 
 	  ((let)
Trap