~ chicken-core (chicken-5) ec693515dc6be72d6b3aaba0632c0e69a57d7235
commit ec693515dc6be72d6b3aaba0632c0e69a57d7235 Author: felix <felix@call-with-current-continuation.org> AuthorDate: Tue Jun 1 08:52:32 2010 +0200 Commit: felix <felix@call-with-current-continuation.org> CommitDate: Tue Jun 1 08:52:32 2010 +0200 use tinyclos-style api for instance-of type-conversion diff --git a/support.scm b/support.scm index ac6c8a05..057386ce 100644 --- a/support.scm +++ b/support.scm @@ -974,10 +974,10 @@ (let ([tmp (gensym)]) `(let ([,tmp ,param]) (if ,tmp - (slot-value ,param 'this) + (slot-ref ,param 'this) '#f) ) ) ] [(nonnull-instance) - `(slot-value ,param 'this) ] + `(slot-ref ,param 'this) ] [(const) (repeat (cadr t))] [(enum) (if unsafe param `(##sys#foreign-integer-argument ,param))] @@ -1091,9 +1091,9 @@ `(let ((,tmp ,body)) (and ,tmp (not (##sys#null-pointer? ,tmp)) - (make-instance ,(caddr type) 'this ,tmp) ) ) ) ] + (make ,(caddr type) 'this ,tmp) ) ) ) ] [(and (list? type) (= 3 (length type)) (eq? 'nonnull-instance (car type))) - `(make-instance ,(caddr type) 'this ,body) ] + `(make ,(caddr type) 'this ,body) ] [else body] ) ] ) )Trap