2005-05-01 11:48:36 +00:00
|
|
|
#ifndef __Machine_h
|
|
|
|
#define __Machine_h
|
|
|
|
#include "Symbol.h"
|
|
|
|
#include "CompiledCode.h"
|
|
|
|
#include "Frame.h"
|
|
|
|
#include "Continuation.h"
|
|
|
|
#include "hash.h"
|
|
|
|
#include "state.h"
|
|
|
|
|
|
|
|
@interface Machine: SchemeObject
|
|
|
|
{
|
|
|
|
state_t state;
|
2011-02-14 13:39:43 +00:00
|
|
|
SchemeObject *value;
|
2020-02-19 03:58:55 +00:00
|
|
|
hashtab_t *globals;
|
2011-02-14 13:39:43 +00:00
|
|
|
SchemeObject *all_globals;
|
2005-05-01 11:48:36 +00:00
|
|
|
}
|
2011-02-14 13:39:43 +00:00
|
|
|
- (void) loadCode: (CompiledCode *) code;
|
|
|
|
- (SchemeObject *) run;
|
|
|
|
- (void) addGlobal: (Symbol *) sym value: (SchemeObject *) val;
|
|
|
|
- (void) environment: (Frame *) e;
|
|
|
|
- (void) continuation: (Continuation *) c;
|
|
|
|
- (Continuation *) continuation;
|
|
|
|
- (void) value: (SchemeObject *) o;
|
|
|
|
- (SchemeObject *) stack;
|
|
|
|
- (void) stack: (SchemeObject *) o;
|
|
|
|
- (state_t *) state;
|
|
|
|
- (void) state: (state_t *) st;
|
2005-05-08 06:38:01 +00:00
|
|
|
- (void) reset;
|
2011-02-14 13:39:43 +00:00
|
|
|
- (void) procedure: (Procedure *) pr;
|
2005-05-01 11:48:36 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
#endif //__Machine_h
|