Here is my modification, with original code commented out:
Function _Call:Object( p:Byte Ptr,typeId:TTypeId,obj:Object,args:Object[],argTypes:TTypeId[] )
'Local q[10],sp:Byte Ptr=q
Local q[13],sp:Byte Ptr=q
bbRefPushObject sp,obj
sp:+4
If typeId=LongTypeId sp:+8
For Local i=0 Until args.length
If Int Ptr(sp)>=Int Ptr(q)+8+3 Throw "ERROR"
sp=_Push( sp,argTypes[i],args[i] )
Next
If Int Ptr(sp)>Int Ptr(q)+8+3 Throw "ERROR"
Select typeId
Case ByteTypeId,ShortTypeId,IntTypeId
Local f(p0,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10)=p
Return String.FromInt( f( q[0],q[1],q[2],q[3],q[4],q[5],q[6],q[7],q[8],q[9],q[10] ) )
'Local f(p0,p1,p2,p3,p4,p5,p6,p7)=p
'Return String.FromInt( f( q[0],q[1],q[2],q[3],q[4],q[5],q[6],q[7] ) )
Case LongTypeId
Throw "TODO"
Case FloatTypeId
Local f:Float(p0,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10)=p
Return String.FromFloat( f( q[0],q[1],q[2],q[3],q[4],q[5],q[6],q[7],q[8],q[9],q[10] ) )
'Local f:Float(p0,p1,p2,p3,p4,p5,p6,p7)=p
'Return String.FromFloat( f( q[0],q[1],q[2],q[3],q[4],q[5],q[6],q[7] ) )
Case DoubleTypeId
Local f:Float(p0,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10)=p
Return String.FromDouble( f( q[0],q[1],q[2],q[3],q[4],q[5],q[6],q[7],q[8],q[9],q[10] ) )
'Local f:Double(p0,p1,p2,p3,p4,p5,p6,p7)=p
'Return String.FromDouble( f( q[0],q[1],q[2],q[3],q[4],q[5],q[6],q[7] ) )
Default
Local f:Object(p0,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10)=p
Return f( q[0],q[1],q[2],q[3],q[4],q[5],q[6],q[7],q[8],q[9],q[10] )
'Local f:Object(p0,p1,p2,p3,p4,p5,p6,p7)=p
'Return f( q[0],q[1],q[2],q[3],q[4],q[5],q[6],q[7] )
End Select
End Function
|