2005-05-01 11:48:36 +00:00
|
|
|
#ifndef __CompiledCode_h
|
|
|
|
#define __CompiledCode_h
|
|
|
|
#include "SchemeObject.h"
|
|
|
|
#include "Array.h"
|
|
|
|
#include "Instruction.h"
|
|
|
|
#include "Frame.h"
|
2005-05-08 10:43:56 +00:00
|
|
|
#include "SchemeString.h"
|
2005-05-08 06:38:01 +00:00
|
|
|
|
|
|
|
struct lineinfo_s {
|
|
|
|
integer linenumber;
|
|
|
|
String sourcefile;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct lineinfo_s lineinfo_t;
|
2005-05-01 11:48:36 +00:00
|
|
|
|
|
|
|
@interface CompiledCode: SchemeObject
|
|
|
|
{
|
|
|
|
Frame literals;
|
|
|
|
Array instructions;
|
|
|
|
Array constants;
|
|
|
|
instruction_t [] code;
|
2005-05-08 06:38:01 +00:00
|
|
|
lineinfo_t [] lineinfo;
|
2005-05-08 10:37:57 +00:00
|
|
|
integer minargs, size;
|
2005-05-01 11:48:36 +00:00
|
|
|
}
|
|
|
|
- (void) addInstruction: (Instruction) inst;
|
|
|
|
- (integer) addConstant: (SchemeObject) c;
|
|
|
|
- (void) compile;
|
|
|
|
- (instruction_t []) code;
|
2005-05-08 06:38:01 +00:00
|
|
|
- (lineinfo_t []) lineinfo;
|
2005-05-01 11:48:36 +00:00
|
|
|
- (Frame) literals;
|
2005-05-08 10:37:57 +00:00
|
|
|
- (integer) minimumArguments;
|
|
|
|
- (void) minimumArguments: (integer) min;
|
|
|
|
|
2005-05-01 11:48:36 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
#endif //__CompiledCode_h
|