mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-13 08:27:39 +00:00
adba6b26dc
- 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
34 lines
580 B
R
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
|