-
Notifications
You must be signed in to change notification settings - Fork 0
Optimizations
Alexander Bernauer edited this page Jan 11, 2011
·
2 revisions
- If a function is called only once in the whole program, then the callback information must not be stored on the T-stack but can be hard-wired in the E-code.
- Move function parameters to the e-stack if possible. If function parameters live on the e-stack, pushing the parameters before a function call overwrites the current stack frame because all e-stack frames share the same memory. As parameter values might be computed from current local variables this could corrupt the parameter values. Thus function parameters live on the t-stack. But if corrupted parameter values can be excluded, i.e. because they are constants, the function parameters could very well live on the e-stack thus saving memory and access time.