IdentType.h 1.3 KB

12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. #include "ast.h"
  3. #include "types.h"
  4. struct IDENTTYPE
  5. {
  6. condId idType;
  7. regType regiType; /* for REGISTER only */
  8. union _idNode {
  9. Int regiIdx; /* index into localId, REGISTER */
  10. Int globIdx; /* index into symtab for GLOB_VAR */
  11. Int localIdx; /* idx into localId, LOCAL_VAR */
  12. Int paramIdx; /* idx into args symtab, PARAMS */
  13. Int idxGlbIdx; /* idx into localId, GLOB_VAR_IDX */
  14. struct _kte
  15. { /* for CONSTANT only */
  16. dword kte; /* value of the constant */
  17. byte size; /* #bytes size constant */
  18. } kte;
  19. dword strIdx; /* idx into image, for STRING */
  20. Int longIdx; /* idx into LOCAL_ID table, LONG_VAR*/
  21. struct _call { /* for FUNCTION only */
  22. Function *proc;
  23. STKFRAME *args;
  24. } call;
  25. struct { /* for OTHER; tmp struct */
  26. byte seg; /* segment */
  27. byte regi; /* index mode */
  28. int16 off; /* offset */
  29. } other;
  30. } idNode;
  31. };