quakeforge/ruamoko/scheme/CompiledCode.h

37 lines
735 B
C
Raw Permalink Normal View History

#ifndef __CompiledCode_h
#define __CompiledCode_h
#include "SchemeObject.h"
#include "Array.h"
#include "Instruction.h"
#include "Frame.h"
#include "SchemeString.h"
struct lineinfo_s {
int linenumber;
2011-02-14 13:39:43 +00:00
String *sourcefile;
};
typedef struct lineinfo_s lineinfo_t;
@interface CompiledCode: SchemeObject
{
2011-02-14 13:39:43 +00:00
Frame *literals;
Array *instructions;
Array *constants;
instruction_t *code;
lineinfo_t *lineinfo;
int minargs, size;
}
2011-02-14 13:39:43 +00:00
- (void) addInstruction: (Instruction *) inst;
- (int) addConstant: (SchemeObject *) c;
- (void) compile;
2011-02-14 13:39:43 +00:00
- (instruction_t *) code;
- (lineinfo_t *) lineinfo;
- (Frame *) literals;
- (int) minimumArguments;
- (void) minimumArguments: (int) min;
@end
#endif //__CompiledCode_h