quakeforge/ruamoko/scheme/Lambda.r
Brian Koropoff adba6b26dc Scheme updates:
- Boolean type (no support in lexer yet)
	- Conditionals
	- Defines (only work correctly at top level)
	- More core builtins (apply, cons, car, cdr)
	- Variable-argument functions
	- Incremental garbage collection
	- Garbage collection fixes
	- Other misc bugs fixed
2005-05-06 23:25:06 +00:00

34 lines
580 B
R

#include "Lambda.h"
#include "Nil.h"
#include "Symbol.h"
#include "string.h"
#include "defs.h"
@implementation Lambda
+ (id) newWithCode: (CompiledCode) c environment: (Frame) e
{
return [[self alloc] initWithCode: c environment: e];
}
- (id) initWithCode: (CompiledCode) c environment: (Frame) e
{
self = [super init];
code = c;
env = e;
return self;
}
- (void) invokeOnMachine: (Machine) m
{
[super invokeOnMachine: m];
[m loadCode: code];
[m environment: env];
}
- (void) markReachable
{
[env mark];
[code mark];
}
@end