Skip to content
Alexander Bernauer edited this page Jan 11, 2011 · 2 revisions
  1. 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.
  2. 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.

Clone this wiki locally