From 47b9d6028e4b6610fbf0367c1b3b849778ad5fd1 Mon Sep 17 00:00:00 2001 From: mainzelm Date: Mon, 9 Feb 2004 08:21:05 +0000 Subject: [PATCH] Use NAME->SYMBOL to generate formal arguments of lambda nodes that get inlined. Test case is: ,config (define-structure foo (export) (open scheme finite-types) (optimize auto-integrate) (begin (define-enumerated-type afs-permission :afs-permission afs-permission? the-afs-permissions afs-permission-name afs-permission-index (read)))) > ,config (define-structure foo (export) (open scheme finite-types) (optimize auto-integrate) (begin (define-enumerated-type afs-permission :afs-permission afs-permission? the-afs-permissions afs-permission-name afs-permission-index (read)))) > ,in foo the-afs-permissions Load structure foo (y/n)? y [foo Analyzing... Calls will be compiled in line: (#{Generated maker 1408} afs-permission-index afs-permission-name) ] '#(#{Afs-permission #{Generated name 1408}}) > ,inspect [0] '#{Afs-permission #{Generated name 1408}} inspect: 0 '#{Afs-permission #{Generated name 1408}} [0: name] '#{Generated name 1408} [1: index] '#{Generated index 1408} --- scheme/opt/inline.scm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scheme/opt/inline.scm b/scheme/opt/inline.scm index 5c7d0ed..dfd264d 100644 --- a/scheme/opt/inline.scm +++ b/scheme/opt/inline.scm @@ -87,9 +87,7 @@ ; I'm aware that this is pedantic. (define (unused-name env name) - (let ((sym (if (generated? name) - (generated-name name) - name))) + (let ((sym (name->symbol name))) (do ((i 0 (+ i 1)) (name sym (string->symbol (string-append (symbol->string sym)