home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / historic / v941.tgz / icon.v941src.tar / icon.v941src / ipl / mprocs / evnames.icn < prev    next >
Text File  |  2000-07-29  |  7KB  |  175 lines

  1. ############################################################################
  2. #
  3. #    File:     evnames.icn
  4. #
  5. #    Subject:  Procedures to map between event codes and names
  6. #
  7. #    Author:   Ralph E. Griswold
  8. #
  9. #    Date:     December 26, 1995
  10. #
  11. ############################################################################
  12. #
  13. #   This file is in the public domain.
  14. #
  15. ############################################################################
  16. #
  17. #  evnames(x) creates a two-way table. Indexed by an event code, it
  18. #  produces a descriptive phrase for the code. Indexed by the descriptive
  19. #  phrase it produces the event code. It returns the value for key x.
  20. #
  21. ############################################################################
  22. #
  23. #  Links:  tables
  24. #
  25. ############################################################################
  26. #
  27. #  Includes:  evdefs.icn
  28. #
  29. ############################################################################
  30.  
  31. link tables
  32.  
  33. $include "evdefs.icn"
  34.  
  35. procedure evnames(e)
  36.    static namemap
  37.  
  38.    initial {
  39.       namemap   := table("unknown event")
  40.    
  41.       namemap[E_Aconv] := "conversion attempt"
  42.       namemap[E_Alien] := "alien allocation"
  43.       namemap[E_Assign] := "assignment"
  44.       namemap[E_Base] := "base address of storage region"
  45.       namemap[E_BlkDeAlc] := "block deallocation"
  46.       namemap[E_Bsusp] := "suspension from operation"
  47.       namemap[E_Coact] := "co-expression activation"
  48.       namemap[E_Coexpr] := "co-expression allocation"
  49.       namemap[E_Cofail] := "co-expression failure"
  50.       namemap[E_Collect] := "garbage collection"
  51.       namemap[E_Comment] := "comment"
  52.       namemap[E_Coret] := "co-expression return"
  53.       namemap[E_Cset] := "cset allocation"
  54.       namemap[E_Ecall] := "call of operation"
  55.       namemap[E_Efail] := "failure from expression"
  56.       namemap[E_EndCollect] := "end of garbage collection"
  57.       namemap[E_Erem] := "removal of a suspended generator"
  58.       namemap[E_Eresum] := "resumption of expression"
  59.       namemap[E_Eret] := "return from expression"
  60.       namemap[E_Error] := "run-time error"
  61.       namemap[E_Esusp] := "suspension from alternation"
  62.       namemap[E_Exit] := "program exit"
  63.       namemap[E_External] := "external allocation"
  64.       namemap[E_Fcall] := "function call"
  65.       namemap[E_Fconv] := "conversion failure"
  66.       namemap[E_Ffail] := "function failure"
  67.       namemap[E_File] := "file allocation"
  68.       namemap[E_Free] := "free region"
  69.       namemap[E_Frem] := "function suspension removal"
  70.       namemap[E_Fresum] := "function resumption"
  71.       namemap[E_Fret] := "function return"
  72.       namemap[E_Fsusp] := "function suspension"
  73.       namemap[E_Highlight] := "allocation highlight"
  74.       namemap[E_Intcall] := "interpreter call"
  75.       namemap[E_Integer] := "integer value pseudo-event"
  76.       namemap[E_Intret] := "interpreter return"
  77.       namemap[E_Kywdint] := "integer keyword value pseudo-event"
  78.       namemap[E_Kywdpos] := "position value pseudo-event"
  79.       namemap[E_Kywdsubj] := "subject value pseudo-event"
  80.       namemap[E_Lbang] := "list generation"
  81.       namemap[E_Lcreate] := "list creation"
  82.       namemap[E_Lelem] := "list element allocation"
  83.       namemap[E_Lget] := "list get"
  84.       namemap[E_Line] := "line change"
  85.       namemap[E_List] := "list allocation"
  86.       namemap[E_Loc] := "location change"
  87.       namemap[E_Lpop] := "list pop"
  88.       namemap[E_Lpull] := "list pull"
  89.       namemap[E_Lpush] := "list push"
  90.       namemap[E_Lput] := "list put"
  91.       namemap[E_Lrand] := "list random reference"
  92.       namemap[E_Lref] := "list reference"
  93.       namemap[E_Lrgint] := "large integer allocation"
  94.       namemap[E_Lsub] := "list subscript"
  95.       namemap[E_Lsusp] := "suspension from limitation"
  96.       namemap[E_MXevent] := "monitor input event"
  97.       namemap[E_Nconv] := "conversion not needed"
  98.       namemap[E_Null] := "null value value pseudo-event"
  99.       namemap[E_Ocall] := "operator call"
  100.       namemap[E_Ofail] := "operator failure"
  101.       namemap[E_Offset] := "address offset"
  102.       namemap[E_Opcode] := "virtual-machine instruction"
  103.       namemap[E_Orem] := "operator suspension removal"
  104.       namemap[E_Oresum] := "operator resumption"
  105.       namemap[E_Oret] := "operator return"
  106.       namemap[E_Osusp] := "operator suspension"
  107.       namemap[E_Pause] := "memory monitoring comment"
  108.       namemap[E_Pcall] := "procedure call"
  109.       namemap[E_Pfail] := "procedure failure"
  110.       namemap[E_Pid] := "symbol name"
  111.       namemap[E_Prem] := "suspended procedure removal"
  112.       namemap[E_Presum] := "procedure resumption"
  113.       namemap[E_Pret] := "procedure return"
  114.       namemap[E_Proc] := "procedure value pseudo-event"
  115.       namemap[E_Psusp] := "procedure suspension"
  116.       namemap[E_Rbang] := "record generation"
  117.       namemap[E_Rcreate] := "record creation"
  118.       namemap[E_Real] := "real allocation"
  119.       namemap[E_Record] := "record allocation"
  120.       namemap[E_Refresh] := "refresh allocation"
  121.       namemap[E_Region] := "region"
  122.       namemap[E_Rrand] := "record random reference"
  123.       namemap[E_Rref] := "record reference"
  124.       namemap[E_Rsub] := "record subscript"
  125.       namemap[E_Sbang] := "set generation"
  126.       namemap[E_Sconv] := "conversion success"
  127.       namemap[E_Screate] := "set creation"
  128.       namemap[E_Sdelete] := "set deletion"
  129.       namemap[E_Selem] := "set element allocation"
  130.       namemap[E_Set] := "set allocation"
  131.       namemap[E_Sfail] := "scanning failure"
  132.       namemap[E_Sinsert] := "set insertion"
  133.       namemap[E_Size] := "region size"
  134.       namemap[E_Slots] := "hash header allocation"
  135.       namemap[E_Smember] := "set membership"
  136.       namemap[E_Snew] := "scanning environment creation"
  137.       namemap[E_Spos] := "scanning position"
  138.       namemap[E_Srand] := "set random reference"
  139.       namemap[E_Srem] := "scanning environment removal"
  140.       namemap[E_Sresum] := "scanning resumption"
  141.       namemap[E_Ssasgn] := "substring assignment"
  142.       namemap[E_Ssusp] := "scanning suspension"
  143.       namemap[E_Stack] := "stack depth"
  144.       namemap[E_StrDeAlc] := "string deallocation"
  145.       namemap[E_String] := "string allocation"
  146.       namemap[E_Sval] := "set value"
  147.       namemap[E_Sym] := "symbol table entry"
  148.       namemap[E_Table] := "table allocation"
  149.       namemap[E_Tbang] := "table generation"
  150.       namemap[E_Tconv] := "conversion target"
  151.       namemap[E_Tcreate] := "table creation"
  152.       namemap[E_Tdelete] := "table deletion"
  153.       namemap[E_Telem] := "table element allocation"
  154.       namemap[E_TenureBlock] := "tenure a block region"
  155.       namemap[E_TenureString] := "tenure a string region"
  156.       namemap[E_Tick] := "clock tick"
  157.       namemap[E_Tinsert] := "table insertion"
  158.       namemap[E_Tkey] := "table key generation"
  159.       namemap[E_Tmember] := "table membership"
  160.       namemap[E_Trand] := "table random reference"
  161.       namemap[E_Tref] := "table reference"
  162.       namemap[E_Tsub] := "table subscript"
  163.       namemap[E_Tval] := "table value"
  164.       namemap[E_Tvsubs] := "substring trapped variable allocation"
  165.       namemap[E_Tvtbl] := "table-element trapped variable allocation"
  166.       namemap[E_Used] := "space used"
  167.       namemap[E_Value] := "value assigned"
  168.  
  169.       twt(namemap)
  170.       }
  171.    
  172.    return namemap[e]
  173.  
  174. end
  175.