This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Fluid-let not so fluid with java-typed variable


I java-type some variable to make their use with (invoke ..) is
efficiently compiled,
but I notice a feature with fluid-let that makes it not so fluid when
used with java-typed
variable

Consider the following code :
;;;;
(define z :: <java.awt.Point> (make <java.awt.Point>))

(define (Z) (invoke z 'getX))

(define (W)
   (fluid-let ((z (make <java.awt.Point> 52 52)))
      (Z)))

;;;;
When compiled and loaded with (require ...), (Z) return 0.0 (that's ok),
with (W) return 0.0 too (not fluid).
It is solved if you type (define z  (make ...)) instead of (define z ::
<java.awt.Point> (make ...)) or
if you type
(fluid-let ((z (make <java.awt.Point> 52 52))) ;; you loose (invoke...)
optimisation
instead of
(fluid-let ((z  :: <java.awt.Point> (make <java.awt.Point> 52 52)))

It seems that the later cannot be evaluated properly in non compiled
mode




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]