chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-hackers] [PATCH] allow -ot/-oi as aliases for -emit-type-file/-


From: Felix
Subject: [Chicken-hackers] [PATCH] allow -ot/-oi as aliases for -emit-type-file/-emit-inline-file
Date: Thu, 31 Jan 2013 22:48:33 +0100 (CET)

The attached patch introduces short options for the above
mentioned csc flags. Also, "-n" (previously used as alias
for -emit-inline-file) has been deprecated.


cheers,
felix
>From 203e782d24a0f86406d06912cb1a78545090ef39 Mon Sep 17 00:00:00 2001
From: felix <address@hidden>
Date: Mon, 28 Jan 2013 11:07:58 +0100
Subject: [PATCH] allow -ot/-oi as aliases for
 -emit-type-file/-emit-inline-file, deprecated -n

---
 NEWS    |  7 +++++++
 csc.scm | 14 +++++++++++---
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/NEWS b/NEWS
index 2269583..ad77c58 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,10 @@
+4.8.2
+
+- Tools
+  - csc: added "-oi"/"-ot" options as alternatives to "-emit-inline-file"
+    and "-emit-type-file", respectively; "-n" has been deprecated.
+
+
 4.8.1
 
 - Security fixes
diff --git a/csc.scm b/csc.scm
index 4217673..a54c14c 100644
--- a/csc.scm
+++ b/csc.scm
@@ -173,7 +173,7 @@
     (-x "-explicit-use")
     (-u "-unsafe")
     (-j "-emit-import-library")
-    (-n "-emit-inline-file")
+    (-n "-emit-inline-file")           ; DEPRECATED
     (-b "-block") ) )
 
 (define short-options
@@ -388,10 +388,10 @@ Usage: #{csc} FILENAME | OPTION ...
     -inline-limit LIMIT            set inlining threshold
     -inline-global                 enable cross-module inlining
     -specialize                    perform type-based specialization of 
primitive calls
-    -n -emit-inline-file FILENAME  generate file with globally inlinable
+    -oi -emit-inline-file FILENAME  generate file with globally inlinable
                                     procedures (implies -inline -local)
     -consult-inline-file FILENAME  explicitly load inline file
-    -emit-type-file FILENAME       write type-declaration information into file
+    -ot  -emit-type-file FILENAME  write type-declaration information into file
     -no-argc-checks                disable argument count checks
     -no-bound-checks               disable bound variable checks
     -no-procedure-checks           disable procedure call checks
@@ -728,6 +728,14 @@ EOF
                  (set! link-options (append link-options (list (string-append 
"-Wl,-R" rpath)))) )
                (set! rest (cdr rest)) ]
               [(-host) #f]
+              ((-oi) 
+               (check s rest)
+               (t-options "-emit-inline-file" (car rest))
+               (set! rest (cdr rest)))
+              ((-ot) 
+               (check s rest)
+               (t-options "-emit-type-file" (car rest))
+               (set! rest (cdr rest)))
               [(-) 
                (set! scheme-files (append scheme-files '("-")))
                (unless target-filename
-- 
1.8.0.msysgit.0


reply via email to

[Prev in Thread] Current Thread [Next in Thread]