env.h 938 B

1234567891011121314151617181920212223242526
  1. #ifndef AFUN__ENV_H_PUBLIV
  2. #define AFUN__ENV_H_PUBLIV
  3. typedef struct af_Environment af_Environment;
  4. typedef struct af_Message af_Message;
  5. #include "bytecode.h"
  6. #include "object.h"
  7. #include "var.h"
  8. af_Object *getBaseObject(char *name, af_Environment *env);
  9. af_Environment *makeEnvironment(void);
  10. bool enableEnvironment(af_ByteCode *bt, af_Environment *env);
  11. void freeEnvironment(af_Environment *env);
  12. void pushActivity(af_ByteCode *bt, bool new_vs, af_VarSpaceListNode *vsl, af_Object *belong,
  13. af_Environment *env);
  14. void popActivity(af_Environment *env);
  15. af_Message *makeMessage(char *type, size_t size);
  16. af_Message *freeMessage(af_Message *msg);
  17. void pushMessageUp(af_Message *msg, af_Environment *env);
  18. void pushMessageDown(af_Message *msg, af_Environment *env);
  19. af_Message *popMessageUp(char *type, af_Environment *env);
  20. af_Message *popMessageDown(char *type, af_Environment *env);
  21. #endif //AFUN__ENV_H_PUBLIV