Methods and apparatus for continuation passing in a virtual machine (VM).
A method is provided for operating a virtual machine to provide
continuation passing in a wireless device. The virtual machine comprises
a stack memory. The method comprises encountering a context-creating
trigger, constructing a continuation block in response to the trigger
that comprises a stack fragment derived from the stack memory,
encountering an evaluation instruction, and storing the stack fragment
from the continuation block on the stack memory in response to the
evaluation instruction.