mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-05 20:50:43 +00:00
e8680d792e
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.
35 lines
605 B
R
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
|