pharo-project / pharo-vm

This is the VM used by Pharo
http://pharo.org
Other
115 stars 71 forks source link

functionPointerFor:inClass: has unused argument #822

Open guillep opened 5 months ago

guillep commented 5 months ago

functionPointerFor:inClass: has several implementations but the argument is not used. We should refactor the code to remove the extra argument.

functionPointerFor: primIdx inClass: theClass
    "Find an actual function pointer for this primitiveIndex.  This is an
    opportunity to specialise the prim for the relevant class (format for
    example).  Default for now is simply the entry in the base primitiveTable."
    <api>
    <returnTypeC: 'void (*functionPointerForinClass(sqInt primIdx,sqInt theClass))(void)'>
    ^primIdx > MaxPrimitiveIndex ifTrue: [0] ifFalse: [primitiveTable at: primIdx]