[Openmcl-devel] slot-value != struct-ref? (sometimes)

alex crain alexcrain at mail.widgetworks.com
Mon May 30 22:18:26 UTC 2005

Hi All -

The good news is that most of my hemlock package seems to work as  
advertised with bleeding_edge+G4+Tiger.
I do have a couple of issues, though, and I'm not sure who owns the  
cocoa bridge right now.

1) structure returns don't work - doing anything in the form (define- 
obj-method foo (((:struct :<NSR>ect bar) :argname argval) class- 
name) ....)
dies trying to load #<FOREIGN-RECORD-TYPE (:STRUCT :<NSR>ANGE)  
#x6D52626> from the database. Interestingly, (:struct :_<NSR>ect bar)
sucessfully loads, but things still break later on.

2) I've been working on POSTPROCESS-OBJC-METHOD-INFO to make the  
checking a little smarter - currently
the code sets the :ambiguous flag for a variety of cases where method  
signatures arn't necessarily supposed to

So - I want to add a check that ensures that class methods arn't  
compared against object methods. I've got some
debugging code that looks like this:

         (dolist (m methods)                   ; methods is a list of  
objc-method-info structures
           (format t "M=~A~%" m)
           (format t "(objc-message-info-flags m) = ~S~%" (objc- 
message-info-flags m))
           (format t "(slot-value m 'flags) = ~S~%" (slot-value m  

and the output looks like this:

M=#<OBJC-METHOD-INFO +[TypeoutWindowController show] #x6B8AD96>
(objc-message-info-flags m) = NIL
(slot-value m 'flags) = (:CLASS T)
 > Break in process listener(1):
 > Type :GO to continue, :POP to abort.
 > If continued: Return from BREAK.
Type :? for other options.
1 >

huh? If I examine the flags from the break loop, everything works as  
expected ....

1 > (:v 0 0)
INFO -[InspectorWindowController show] #x6CAE73E> #<OBJC-METHOD-INFO + 
[TypeoutWindowController show] #x6B8AD96> #<OBJC-METHOD-INFO - 
[TypeoutWindowController show] #x6B8677E> #<OBJC-METHOD-INFO + 
[PreferencesPanel show] #x69AA596> #<OBJC-METHOD-INFO - 
[PreferencesPanel show] #x69A8D9E>) :REQ-ARGS 0 :FLAGS (:AMBIGUOUS T))
1 > (objc-message-info-methods *)
(#<OBJC-METHOD-INFO -[InspectorWindowController show] #x6CAE73E>  
#<OBJC-METHOD-INFO +[TypeoutWindowController show] #x6B8AD96> #<OBJC- 
METHOD-INFO -[TypeoutWindowController show] #x6B8677E> #<OBJC-METHOD- 
INFO +[PreferencesPanel show] #x69AA596> #<OBJC-METHOD-INFO - 
[PreferencesPanel show] #x69A8D9E>)
1 > (elt * 1)
#<OBJC-METHOD-INFO +[TypeoutWindowController show] #x6B8AD96>
1 > (objc-method-info-flags *)

So I'm thinking compiler bug, which would break the code in all kinds  
of interesting ways since structure references are used all over the  
place in the bridge.


More information about the Openmcl-devel mailing list