home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / smalltk / src / interp.h < prev    next >
Text File  |  1991-10-12  |  1KB  |  43 lines

  1. /*
  2.     Little Smalltalk, version 2
  3.     Written by Tim Budd, Oregon State University, July 1987
  4. */
  5. /*
  6.     symbolic definitions for the bytecodes
  7. */
  8.  
  9. # define Extended 0
  10. # define PushInstance 1
  11. # define PushArgument 2
  12. # define PushTemporary 3
  13. # define PushLiteral 4
  14. # define PushConstant 5
  15. # define AssignInstance 6
  16. # define AssignTemporary 7
  17. # define MarkArguments 8
  18. # define SendMessage 9
  19. # define SendUnary 10
  20. # define SendBinary 11
  21. # define DoPrimitive 13
  22. # define DoSpecial 15
  23.  
  24. /* a few constants that can be pushed by PushConstant */
  25. # define minusOne 3        /* the value -1 */
  26. # define contextConst 4        /* the current context */
  27. # define nilConst 5        /* the constant nil */
  28. # define trueConst 6        /* the constant true */
  29. # define falseConst 7        /* the constant false */
  30.  
  31. /* types of special instructions (opcode 15) */
  32.  
  33. # define SelfReturn 1
  34. # define StackReturn 2
  35. # define Duplicate 4
  36. # define PopTop 5
  37. # define Branch 6
  38. # define BranchIfTrue 7
  39. # define BranchIfFalse 8
  40. # define AndBranch 9
  41. # define OrBranch 10
  42. # define SendToSuper 11
  43.