Method and apparatus for continuation-passing in a virtual machine
First Claim
Patent Images
1. A method for providing continuation passing in a virtual machine having a stack memory, comprising:
- encountering a context-creating trigger;
responsive to said encountering of said context-creating trigger;
constructing a continuation block, said continuation block comprising a block header and a stack fragment, said stack fragment comprising a range of said stack memory between a current stack top address and a current stack base address; and
pushing said continuation block onto said stack memory;
encountering an evaluation instruction; and
responsive to said encountering of said evaluation instruction;
popping said continuation block from said stack memory;
pushing said stack fragment portion of said continuation block onto said stack memory;
setting said current stack top address to a start of said stack fragment of said stack memory; and
setting said current stack base to a end of said stack fragment of said stack memory.
1 Assignment
0 Petitions
Accused Products
Abstract
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.
-
Citations
12 Claims
-
1. A method for providing continuation passing in a virtual machine having a stack memory, comprising:
-
encountering a context-creating trigger; responsive to said encountering of said context-creating trigger; constructing a continuation block, said continuation block comprising a block header and a stack fragment, said stack fragment comprising a range of said stack memory between a current stack top address and a current stack base address; and pushing said continuation block onto said stack memory; encountering an evaluation instruction; and responsive to said encountering of said evaluation instruction; popping said continuation block from said stack memory; pushing said stack fragment portion of said continuation block onto said stack memory; setting said current stack top address to a start of said stack fragment of said stack memory; and setting said current stack base to a end of said stack fragment of said stack memory. - View Dependent Claims (2, 3, 4)
-
-
5. A virtual machine for use in a wireless device having an embedded processor, the virtual machine comprising:
-
a stack memory that comprises logic to push and pop information; a logic to encounter a context-creating trigger; a logic for responding to an encounter with said context-creating trigger by; constructing a continuation block, said continuation block comprising a block header and a stack fragment, said stack fragment comprising a range of said stack memory between a current stack top address and a current stack base address; and pushing said continuation block onto said stack memory; a logic to encounter an evaluation instruction; and a logic for responding to an encounter with said evaluation instruction by; popping said continuation block from said stack memory; pushing said stack fragment portion of said continuation block onto said stack memory; setting said current stack top to a start of said stack fragment; and setting said current stack base to an end of said stack fragment. - View Dependent Claims (6, 7, 8)
-
-
9. A computer readable media storing instructions that when executed by processing logic provides a virtual machine having a stack memory that performs continuation passing, said instructions comprising:
-
instructions for encountering a context-creating trigger; instructions for responding to an encounter with said context-creating trigger by; constructing a continuation block, said continuation block comprising a block header and a stack fragment comprising a range of said stack memory between a current stack top address and a current stack base address; and pushing said continuation block onto said stack memory; instructions for encountering an evaluation instruction; and instructions for responding to an encounter with said evaluation instruction by; popping said continuation block from said stack memory; pushing said stack fragment portion of said continuation block onto said stack memory; setting said current stack top to a start of said stack fragment; and setting said current stack base to an end of said stack fragment.
-
-
10. A virtual machine comprising:
-
a stack memory means; a means for encountering a context-creating trigger; a means for responding to an encounter with said context-creating trigger by; constructing a continuation block, said continuation block comprising a block header and a stack fragment, said stack fragment comprising a range of said stack memory means between a current stack top address and a current stack base address; and pushing said continuation block onto said stack memory; a means for encountering an evaluation instruction; and a means for responding to an encounter with said evaluation instruction, comprising; a means for popping said continuation block from said stack memory; a means for pushing said stack fragment portion of said continuation block onto said stack memory; a means for setting said current stack top to a start of said stack fragment; and a means for setting said current stack base to an end of said stack fragment. - View Dependent Claims (11)
-
-
12. A wireless device having an embedded processor, the wireless device comprising:
-
a stack memory that comprises logic to push and pop information; and a virtual machine that operates to perform continuation passing, the virtual machine comprising; a logic to encounter a context-creating trigger; a logic for responding to an encounter with said context-creating trigger by; constructing a continuation block, said continuation block comprising a block header and a stack fragment, said stack fragment comprising a range of said stack memory between a current stack top address and a current stack base address; and pushing said continuation block onto said memory; a logic to encounter an evaluation instruction; and a logic for responding to an encounter with said evaluation instruction by; popping said continuation block from said stack memory; pushing a stack fragment portion of said continuation block onto said stack memory; setting said current stack top to a start of said stack fragment; and setting said current stack base to an end of said stack fragment.
-
Specification