~ chicken-core (chicken-5) 15330594c51cec0dfecc1c2a6fe152f9bec14ec4


commit 15330594c51cec0dfecc1c2a6fe152f9bec14ec4
Author:     felix <felix@call-with-current-continuation.org>
AuthorDate: Sun Sep 23 01:14:58 2012 +0200
Commit:     Peter Bex <peter.bex@xs4all.nl>
CommitDate: Sun Sep 23 15:57:35 2012 +0200

    add type-declarations and rewrite rules for some internal port routines and record-instance? from the lolevel unit
    
    Signed-off-by: Peter Bex <peter.bex@xs4all.nl>

diff --git a/types.db b/types.db
index a9a8791c..0125b47f 100644
--- a/types.db
+++ b/types.db
@@ -1128,9 +1128,35 @@
 (##sys#check-closure (#(procedure #:clean #:enforce) ##sys#check-closure (procedure #!optional *) *)
 		     ((procedure) (let ((#(tmp) #(1))) '#t))
 		     ((procedure *) (let ((#(tmp) #(1))) '#t)))
+
+(##sys#check-port 
+ (#(procedure #:clean #:enforce) ##sys#check-port ((or input-port output-port) #!optional *)
+  *)
+ (((or input-port output-port)) (let ((#(tmp) #(1))) '#t))
+ (((or input-port output-port) *) (let ((#(tmp) #(1))) '#t)))
+
+(##sys#check-input-port
+ (#(procedure #:clean #:enforce) ##sys#check-input-port (input-port * #!optional *) *)
+ ((* *) (##core#inline "C_i_check_port" #(1) '#t #(2)))
+ ((* * *) (##core#inline "C_i_check_port_2" #(1) '#t #(2) #(3))))
+
+(##sys#check-output-port
+ (#(procedure #:clean #:enforce) ##sys#check-output-port (output-port * #!optional *) *)
+ ((* *) (##core#inline "C_i_check_port" #(1) '#f #(2)))
+ ((* * *) (##core#inline "C_i_check_port_2" #(1) '#f #(2) #(3))))
+
+(##sys#check-open-port
+ (#(procedure #:clean #:enforce) ##sys#check-open-port ((or input-port output-port) #!optional *) *)
+ ((*) (##core#inline "C_i_check_port" #(1) '0 '#t))
+ ((* *) (##core#inline "C_i_check_port_2" #(1) '0 '#t #(2))))
+
 (##sys#setslot (#(procedure #:enforce) ##sys#setslot (* fixnum *) *)
 	       #;((* fixnum immediate) (##sys#setislot #(1) #(2) #(3)))) ; too dangerous
 
+(##sys#standard-input input-port)
+(##sys#standard-output output-port)
+(##sys#standard-error output-port)
+
 
 ;; data-structures
 
Trap