mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-06 05:01:26 +00:00
bc73af37f2
collector a bit.
28 lines
449 B
R
28 lines
449 B
R
#include "BaseContinuation.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: [[m stack] car]];
|
|
[m state].program = &returninst;
|
|
}
|
|
|
|
@end
|