mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-12-20 17:41:06 +00:00
29 lines
481 B
R
29 lines
481 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
|