dschmenk / PLASMA

Proto Language AsSeMbler for All (formerly Apple)
MIT License
189 stars 26 forks source link

Use #0 to specify no return codes on cmdsys functions? #20

Closed ZornsLemma closed 6 years ago

ZornsLemma commented 7 years ago

I was looking at the bytecode output the other day to see if I could spot any optimisation opportunities and I noticed that CALL xxx:DROP is very common.

A lot - not all - of these were calls to cmdsys functions. Before you reach v1.0, could these maybe be declared to return no arguments using the new #0 syntax?

As well/instead, a new 'CALLDROP' opcode might be a net code size win, but it feels a little inelegant - I thought I'd mention it though.

dschmenk commented 7 years ago

That's absolutely what I intend to do. I'm just not emotionally ready to edit and test all those functions yet ;-)

ZornsLemma commented 7 years ago

Thanks Dave, I hope my e-mail didn't cause too much emotional strain by raising the thought of it. :-)

When you do this I'm happy to do some testing on it, if (for example) you want to do it on a branch so I can see it before you merge it to master. Just let me know...

dschmenk commented 7 years ago

Thanks Steve. I'm finishing up lambda (anonymous) functions before eating the rest of my vegetables. Once that is done, 1.0 should pretty much be ready to go, barring any new requests.

dschmenk commented 6 years ago

Should be all implemented now.