Page 1 of 1
Posted: Sun Apr 06, 2003 6:37 pm
by BackupUser
Restored from previous forum. Originally posted by tinman.
A couple of options that could be applied on a per-procedure basis:
No zero initialisation - does not initialise all the local variables to ero before the user code starts. String variables might still need to be zeroed.
No stack frame - PureBasic does not do any manipulation of the stack for storing local variables (might be useful for ASM coders?)
--
I used to be a nihilist but I don't believe in that any more.
(Win98first ed. + all updates, PB3.62, external editor)
Posted: Sun Apr 06, 2003 8:58 pm
by BackupUser
Restored from previous forum. Originally posted by Amiga5k.
Optional parameters would be nice too
Russell
***Commodore 64 - Over one million cycles per second, 16 vibrant colors, 3 incredible audio channels and 38,911 Basic Bytes Free! Who could ask for anything more?***
Posted: Sun Apr 06, 2003 10:57 pm
by BackupUser
Restored from previous forum. Originally posted by El_Choni.
No stack frame - PureBasic does not do any manipulation of the stack for storing local variables (might be useful for ASM coders?)
Not a bad idea, but, where would locals be then?
El_Choni
Posted: Sun Apr 06, 2003 11:13 pm
by BackupUser
Restored from previous forum. Originally posted by tinman.
Originally posted by El_Choni
No stack frame - PureBasic does not do any manipulation of the stack for storing local variables (might be useful for ASM coders?)
Not a bad idea, but, where would locals be then?
I was specifically thinking of the assembler heads when I suggested that (they might prefer to create it their own way, or not at all if not required), so it might be fairly useless for basic programmers. The parameters (which are local variables) could still be accessable from the stack I suppose.
The only reason I thought of this was when I was looking at the created assembly. If you take the small example of a procedure to perform the MOD operation, then there are about 4 lines of asm code which do the work and 22 + 4 * (number of local variables/parameters) which fiddle the stack.
It might only be useful for small procedures of assembly, but that is not an insignificant number of instructions if you are calling something a lot of times.
--
I used to be a nihilist but I don't believe in that any more.
(Win98first ed. + all updates, PB3.62, external editor)
Posted: Mon Apr 07, 2003 1:50 am
by BackupUser
Restored from previous forum. Originally posted by El_Choni.
I get the idea. Some people are using CallFunctionFast()+Return for that, but I guess it would be cleaner if you could do that.
El_Choni