The {$W} switch directive controls the generation of stackframes. In the ON state, the compiler will generate a stackframe for every procedure or function.
In the OFF state the compiler will omit the generation of a stackframe if the procedure or function satisfies the following conditions:
it has no parameters.
it has no local variables.
it is not an assembler procedure, i.e., it must not have a asm …end; block.
it is not a constructor or destructor.
The stack frame will be omitted only if all these conditions are satisfied.