pharo-project / pharo-vm

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

functionPointerFor:inClass: has unused argument #822

Open guillep opened 4 days ago

guillep commented 4 days 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]