quakeforge/ruamoko/scheme/BaseContinuation.r
Bill Currie 75ec6bf244 Clean out some unnecessary types from the progs engine and clean up the mess.
This is a nasty commit, sorry, but 99% of the commit is interdependent.
2011-01-10 12:25:31 +09:00

29 lines
485 B
R

#include "BaseContinuation.h"
#include "Cons.h"
instruction_t returninst;
BaseContinuation []base;
@implementation BaseContinuation
+ (void) initialize
{
returninst.opcode = RETURN;
base = [BaseContinuation new];
}
+ (id) baseContinuation
{
return base;
}
- (void) restoreOnMachine: (Machine []) m
{
[m state].program = &returninst;
}
- (void) invokeOnMachine: (Machine []) m
{
[m value: [(Cons []) [m stack] car]];
[m state].program = &returninst;
}
@end