From: <cod...@go...> - 2008-09-10 22:40:57
|
Issue 5: Use Objective-C 2.0 runtime interface http://code.google.com/p/hoc/issues/detail?id=5 New issue report by wolfgang...@gmx.net: ... while retaining compatibility with the old interface. The new interface is quite convenient and easy to use, so it shouldn't be too hard. It should be done sooner or later, because the old interface is already officially deprecated. It is also a prerequisite for 64-bit support. Issue attributes: Status: New Owner: wolfgang...@gmx.net Labels: Type-Enhancement Priority-Low Component-Core -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings |
From: <cod...@go...> - 2008-12-05 16:37:30
|
Comment #1 on issue 5 by james.c...@usma.edu: Use Objective-C 2.0 runtime interface http://code.google.com/p/hoc/issues/detail?id=5 I am interested in implementing at least a part of this in support of work I am doing. Specifically, I would like to be able to use "Cocoa Bindings" with Haskell- implemented subclasses of NSManagedObject and it appears to me that a necessary first step toward that working will be "proper" allocation and construction of the classes using the designated runtime functions. I have dug around a bit in the code to get my bearings, and I would like to do the following: - Refactor all "cbits" usage of structs objc_ivar, objc_ivar_list, objc_method, and obcj_method_list outside of newClass.m to a new set of structs named as hoc_ivar, etc. Additionally, I would like to include size and alignment information in the hoc_ivar struct in place of the offset currently used in objc_ivar. - Refactor all Haskell code's usage of IvarList to lists of a new opaque type Ivar, including wrapping HOC.NewClass.newClass to something that will marshall [Ivar] to struct hoc_ivar_list before calling the "cbits" newClass. - Change the 'instance size' parameter from newClass() in newClass.h/m to be an "extra bytes" parameter (or eliminate it entirely based on the assumption that it should always be zero). When dealing with the old runtime or the GNUStep runtime, the appropriate size would be calculated from the ivar list (plus the extra-bytes parameter). If the parameter is eliminated entirely, a flag on the ivar structure could be added indicating whether to add the ivar as an old-style "indexed" ivar or a new-style "managed" one, thus giving the flexibility to still provide the old style ivars if necessary for some reason. - Implement a build flag for "objective C 2.0 mode" - When in that mode, use the new objective C 2.0 runtime stuff to implement newClass. If anyone is currently working on this or has any input about an appropriate strategy or ways the strategy outlined here should be modified, please let me know. -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings |
From: <cod...@go...> - 2008-12-08 20:23:27
|
Updates: Status: Started Comment #2 on issue 5 by james.c...@usma.edu: Use Objective-C 2.0 runtime interface http://code.google.com/p/hoc/issues/detail?id=5 Woo hoo, I'm cocoa-binding away in my Xcode. The code is still a bit ugly, but as of r366 "branches/objc2" has working (for me at least) objective-C 2.0 class allocation and registration. -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings |
From: <cod...@go...> - 2008-12-09 20:37:05
|
Updates: Status: Fixed Comment #3 on issue 5 by james.c...@usma.edu: Use Objective-C 2.0 runtime interface http://code.google.com/p/hoc/issues/detail?id=5 I am more or less satisfied with what I have in the objc2 branch. I do not have a GNUstep machine on which to test my changes (especially the changes to the build system). If someone could test it out, as well as review my modifications for any style or organization issues, I would appreciate it. -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings |
From: <cod...@go...> - 2008-12-09 23:27:06
|
Comment #4 on issue 5 by wolfgang...@gmx.net: Use Objective-C 2.0 runtime interface http://code.google.com/p/hoc/issues/detail?id=5 Thanks a lot! I hope I will get around to looking at this more closely next weekend. -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings |