quakeforge/ruamoko/scheme/Lambda.r
Brian Koropoff e8680d792e Added runtime error checking and line number tracking. Seems to catch most
Scheme program errors without making Rua abort now, although there are a
few things that still need to actually report errors instead of failing
in weird ways.
2005-05-08 06:38:01 +00:00

35 lines
605 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];
[m procedure: self];
}
- (void) markReachable
{
[env mark];
[code mark];
}
@end