[Pharo-project] NativeBoost loader isReceiver and friends
Hi Igor, While looking through NB code I have found some things you might be interested in. The subjects are the #pushAsValue #pushAsPointer: methods in: NBExternalAddressType, NBExternalObjectType, NBExternalStructureType, NBExternalEnumerationType, NBFFICallbackType. Why some of them check if loader isReceiver, and some others don't? some also check even (loader isReceiver and: [ gen requestor includesBehavior: objectClass ]) is this intentional or just copy/paste incompletness? In my opinion all these methods have to check both conditions... Moreover, I think it might be a good idea for them to accept nil and passNULL (0) I think this makes sense since checking for nil should be cheaper than a memory allocation when calling function with output arguments that we do not want... well in the cases they don't crash... but anyways if they crash with NULL... that is not our problem, right? Secondly I have found that NBExternalType>>verifyClassOf: oop is: aClass generator: gen is sort of a reimplementation of NBInterpreterProxy>>verifyClassOf: oop is: aClass again is this intentional? -- Dr. Ciprian TEODOROV Ingénieur Développement CAO tél : 06 08 54 73 48 mail : ciprian.teodorov@gmail.com www.teodorov.ro
participants (1)
-
Ciprian Teodorov