Created
April 9, 2011 00:11
-
-
Save cotto/910962 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=head2 Continuation-Passing Style in M0 | |
=head3 CPS Basics | |
CPS, in the simplest possible terms, means that no function ever returns to its | |
caller. Instead of returning, a function invokes a continuation passed to it | |
as one of its arguments. | |
better intro: L<http://matt.might.net/articles/by-example-continuation-passing-style/> | |
=head3 Implementation | |
Note: this section is more a brain dump than an implementable spec. Nothing in | |
here should be taken more seriously than the rantings of a deranged hobo. | |
stuff in the vartable gets inherited by child contexts | |
register values get passed unmodified and should follow recommended calling conventions | |
calling conventions need to be defined | |
all this should be as simple as possible. implementing cow might be a bit much for an m0 implementation | |
q; what's a sane way to determine which variables are and aren't cow'd? there can be a lot of them | |
q; I shouldn't dictate mechanism as much as policy. I can say "vartables are inherited", but cow is an implementation detail. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment