bug-kawa
[Top][All Lists]
Advanced

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

[Bug-kawa] [bug #15151] (slot-ref obj 'class) gives different result tha


From: Dean Ferreyra
Subject: [Bug-kawa] [bug #15151] (slot-ref obj 'class) gives different result than (invoke obj 'getClass)
Date: Mon, 5 Dec 2005 16:20:30 -0800
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5

URL:
  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=15151>

                 Summary: (slot-ref obj 'class) gives different result than
(invoke obj 'getClass)
                 Project: Kawa
            Submitted by: dferreyra
            Submitted on: Mon 12/05/05 at 16:20
                Category: Code generation
                Severity: 3 - Normal
              Item Group: Unexpected result
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open

    _______________________________________________________

Details:

Here's a snippet of code that demonstrates this:

  (module-static #t)
  
  (define o (make <java.util.Date>))
  
  (display (format "slot-ref class: ~A~%" (slot-ref o 'class)))
  (display (format "getClass(): ~A~%" (invoke o 'getClass)))

When I execute the resulting class, I get:

  slot-ref class: class java.lang.Object
  getClass(): class java.util.Date

Looking at the byte-code, it looks like the slot-ref is being optimized
directly to class java.lang.Object.

We were afraid that this might have larger implications, though I see now
that SlotGet.java treats 'class as a special case.






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=15151>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

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