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 {
|
2011-03-25 07:46:32 +00:00
|
|
|
int linenumber;
|
2011-02-14 13:39:43 +00:00
|
|
|
String *sourcefile;
|
2005-05-08 06:38:01 +00:00
|
|
|
};
|
2012-05-21 23:23:22 +00:00
|
|
|
|
2005-05-08 06:38:01 +00:00
|
|
|
typedef struct lineinfo_s lineinfo_t;
|
2005-05-01 11:48:36 +00:00
|
|
|
|
|
|
|
@interface CompiledCode: SchemeObject
|
|
|
|
{
|
2011-02-14 13:39:43 +00:00
|
|
|
Frame *literals;
|
|
|
|
Array *instructions;
|
|
|
|
Array *constants;
|
|
|
|
instruction_t *code;
|
|
|
|
lineinfo_t *lineinfo;
|
2011-03-25 07:46:32 +00:00
|
|
|
int minargs, size;
|
2005-05-01 11:48:36 +00:00
|
|
|
}
|
2011-02-14 13:39:43 +00:00
|
|
|
- (void) addInstruction: (Instruction *) inst;
|
2011-03-25 07:46:32 +00:00
|
|
|
- (int) addConstant: (SchemeObject *) c;
|
2005-05-01 11:48:36 +00:00
|
|
|
- (void) compile;
|
2011-02-14 13:39:43 +00:00
|
|
|
- (instruction_t *) code;
|
|
|
|
- (lineinfo_t *) lineinfo;
|
|
|
|
- (Frame *) literals;
|
2011-03-25 07:46:32 +00:00
|
|
|
- (int) minimumArguments;
|
|
|
|
- (void) minimumArguments: (int) min;
|
2012-05-21 23:23:22 +00:00
|
|
|
|
2005-05-01 11:48:36 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
#endif //__CompiledCode_h
|