~ chicken-core (master) 3bbdbf47f3888b56bd1fd76ea0071870502c6aa3
commit 3bbdbf47f3888b56bd1fd76ea0071870502c6aa3
Author: felix <felix@call-with-current-continuation.org>
AuthorDate: Sat May 7 12:48:07 2011 +0200
Commit: felix <felix@call-with-current-continuation.org>
CommitDate: Sat May 7 12:48:07 2011 +0200
added specialize declaration
diff --git a/batch-driver.scm b/batch-driver.scm
index dfb115cf..4905f15b 100644
--- a/batch-driver.scm
+++ b/batch-driver.scm
@@ -94,7 +94,6 @@
(dynamic (memq 'dynamic options))
(unbox (memq 'unboxing options))
(do-scrutinize (memq 'scrutinize options))
- (do-specialize (memq 'specialize options))
(dumpnodes #f)
(start-time #f)
(upap #f)
@@ -172,6 +171,7 @@
(when (memq 'ignore-repository options)
(set! ##sys#dload-disabled #t)
(repository-path #f))
+ (set! enable-specialization (memq 'specialize options))
(set! debugging-chicken
(append-map
(lambda (do)
@@ -534,7 +534,7 @@
(load-inline-file ilf) )
ifs)))
- (when (or strict-variable-types do-scrutinize do-specialize)
+ (when (or strict-variable-types do-scrutinize nablöe-)
;;XXX hardcoded database file name
(unless (memq 'ignore-repository options)
(load-type-database "types.db"))
@@ -550,9 +550,9 @@
(end-time "pre-analysis (scrutiny)")
(begin-time)
(debugging 'p "performing scrutiny")
- (scrutinize node0 db do-scrutinize do-specialize)
+ (scrutinize node0 db do-scrutinize enable-specialization)
(end-time "scrutiny")
- (when do-specialize
+ (when enable-specialization
(print-node "specialization" '|P| node0))
(set! first-analysis #t) ) )
diff --git a/compiler-namespace.scm b/compiler-namespace.scm
index 2af152bc..a8cacfa4 100644
--- a/compiler-namespace.scm
+++ b/compiler-namespace.scm
@@ -97,11 +97,6 @@
display-analysis-database
display-line-number-database
display-real-name-table
-<<<<<<< HEAD
- do-lambda-lifting
-=======
- do-scrutinize
->>>>>>> experimental
dump-defined-globals
dump-global-refs
dump-nodes
@@ -114,6 +109,7 @@
emit-trace-info
emit-type-file
enable-inline-files
+ enable-specialization
encode-literal
eq-inline-operator
error-is-extended-binding
diff --git a/compiler.scm b/compiler.scm
index 88a84f7e..c1e18837 100644
--- a/compiler.scm
+++ b/compiler.scm
@@ -72,6 +72,7 @@
; (unused <symbol> ...)
; (uses {<unitname>})
; (unsafe-specialized-arithmetic)
+; (specialize)
;
; <type> = fixnum | generic
@@ -336,6 +337,7 @@
(define unchecked-specialized-arithmetic #f)
(define bootstrap-mode #f)
(define struct-variable-types #f)
+(define enable-specialization #f)
;;; These are here so that the backend can access them:
@@ -1522,6 +1524,8 @@
(else
(warning "illegal `predicate' declaration" spec))))
(cdr spec)))
+ ((specialize)
+ (set! enable-specialization #t))
((unsafe-specialized-arithmetic)
(set! unchecked-specialized-arithmetic #t))
(else (warning "illegal declaration specifier" spec)) )
diff --git a/manual/Declarations b/manual/Declarations
index 489630cb..0bec4e45 100644
--- a/manual/Declarations
+++ b/manual/Declarations
@@ -264,6 +264,13 @@ procedures.
Enables scrutiny. This is equivalent to passing the {{-scrutinize}} option to the compiler.
+=== specializat
+
+ [declaration specifier] (specialize)
+
+Enables specialization. This is equivalent to passing the {{-specialize}} option to the compiler.
+
+
=== standard-bindings
[declaration specifier] (standard-bindings SYMBOL ...)
Trap