machine.c 662 B

12345678910111213141516171819202122232425262728293031
  1. #include <stdio.h>
  2. #include "machine.h"
  3. word machine_ret_register = 0;
  4. word machine_env_register = 0;
  5. word machine_stack[STACK_SIZE] = { 0 };
  6. word machine_globals[GLOBALS_SIZE] = { 0 };
  7. word machine_heap_a[HEAP_SIZE] = { 0 };
  8. word machine_heap_b[HEAP_SIZE] = { 0 };
  9. word *machine_from_heap = machine_heap_a;
  10. word *machine_to_heap = NULL;
  11. char *tag_name[] = {
  12. [tag_bool] = "bool",
  13. [tag_null] = "null",
  14. [tag_integer] = "integer",
  15. [tag_symbol] = "symbol",
  16. [tag_character] = "character",
  17. [tag_string] = "string",
  18. [tag_box] = "box",
  19. [tag_cons] = "cons",
  20. [tag_vector] = "vector",
  21. [tag_closure] = "closure",
  22. [tag_record] = "record",
  23. };