Calling convention "fastcall"

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User_Russian
Addict
Addict
Posts: 1519
Joined: Wed Nov 12, 2008 5:01 pm
Location: Russia

Calling convention "fastcall"

Post by User_Russian »

It would be great if PB kept calling convention fastcall (msfastcall). Need to add commands.

Code: Select all

ProcedureF
ProcedureFDLL
PrototypeF
CallFFunction()
CallFFunctionFast()
ImportF
Now accounts for to cause such functions using assembler, which is not very convenient.
Toni6
User
User
Posts: 45
Joined: Mon Apr 23, 2012 1:39 pm

Re: Calling convention "fastcall"

Post by Toni6 »

+1

would also be great if PB added __thiscall calling convention, making it easier to interface with c++ code.
Shouldn't be too hard to add it since it's the same has __stdcall + mov ecx, *this

Code: Select all

ProcedureThis
ProcedureThisDLL
PrototypeThis <- force & check for *this parameter
CallThisFunction()
CallThisFunctionFast()
ImportThis
InterfaceThis <- this would be really nice
Prototype example:

Code: Select all

PrototypeThis.l someMethod(*this, a.l)

Global pSomeMethod.someMethod

pSomeMethod(*someCPPClass, 123)
Aming
New User
New User
Posts: 3
Joined: Fri Nov 02, 2012 10:02 am

Re: Calling convention "fastcall"

Post by Aming »

User_Russian wrote:It would be great if PB kept calling convention fastcall (msfastcall). Need to add commands.

Code: Select all

ProcedureF
ProcedureFDLL
PrototypeF
CallFFunction()
CallFFunctionFast()
ImportF
Now accounts for to cause such functions using assembler, which is not very convenient.

Please see http://www.planet-source-code.com/vb/sc ... 5&lngWId=1
Post Reply