graph.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
  3. * See the copyright notice in the ACK home directory, in the file "Copyright".
  4. */
  5. #ifndef NORCSID
  6. # define RCS_GRAPH "$Id$"
  7. #endif
  8. /*
  9. ** The control graph is represented by a multi-list structure.
  10. ** The em code is stored on the em intermediate file already
  11. ** The offset and length is saved only.
  12. ** Although this makes code generation mode involved, it allows
  13. ** rather large BASIC programs to be processed.
  14. */
  15. typedef struct LIST {
  16. int emlabel; /* em label used with forwards */
  17. int linenr; /* BASIC line number */
  18. struct LIST *nextlist;
  19. } List;
  20. typedef struct LINERECORD{
  21. int emlabel; /* target label */
  22. int linenr; /* BASIC line number */
  23. List *callers; /* used from where ? */
  24. List *gotos; /* fanout labels */
  25. struct LINERECORD *nextline, *prevline;
  26. int fixed; /* fixation of block */
  27. } Linerecord;
  28. extern Linerecord *firstline,
  29. *currline,
  30. *lastline;
  31. extern List *forwardlabel;
  32. extern List *gosublabel();