9
3

ljumptab.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /*
  2. ** $Id: ljumptab.h $
  3. ** Jump Table for the Lua interpreter
  4. ** See Copyright Notice in lua.h
  5. */
  6. #undef vmdispatch
  7. #undef vmcase
  8. #undef vmbreak
  9. #define vmdispatch(x) goto *disptab[x];
  10. #define vmcase(l) L_##l:
  11. #define vmbreak vmfetch(); vmdispatch(GET_OPCODE(i));
  12. static const void *const disptab[NUM_OPCODES] = {
  13. #if 0
  14. ** you can update the following list with this command:
  15. **
  16. ** sed -n '/^OP_/\!d; s/OP_/\&\&L_OP_/ ; s/,.*/,/ ; s/\/.*// ; p' lopcodes.h
  17. **
  18. #endif
  19. &&L_OP_MOVE,
  20. &&L_OP_LOADI,
  21. &&L_OP_LOADF,
  22. &&L_OP_LOADK,
  23. &&L_OP_LOADKX,
  24. &&L_OP_LOADFALSE,
  25. &&L_OP_LFALSESKIP,
  26. &&L_OP_LOADTRUE,
  27. &&L_OP_LOADNIL,
  28. &&L_OP_GETUPVAL,
  29. &&L_OP_SETUPVAL,
  30. &&L_OP_GETTABUP,
  31. &&L_OP_GETTABLE,
  32. &&L_OP_GETI,
  33. &&L_OP_GETFIELD,
  34. &&L_OP_SETTABUP,
  35. &&L_OP_SETTABLE,
  36. &&L_OP_SETI,
  37. &&L_OP_SETFIELD,
  38. &&L_OP_NEWTABLE,
  39. &&L_OP_SELF,
  40. &&L_OP_ADDI,
  41. &&L_OP_ADDK,
  42. &&L_OP_SUBK,
  43. &&L_OP_MULK,
  44. &&L_OP_MODK,
  45. &&L_OP_POWK,
  46. &&L_OP_DIVK,
  47. &&L_OP_IDIVK,
  48. &&L_OP_BANDK,
  49. &&L_OP_BORK,
  50. &&L_OP_BXORK,
  51. &&L_OP_SHRI,
  52. &&L_OP_SHLI,
  53. &&L_OP_ADD,
  54. &&L_OP_SUB,
  55. &&L_OP_MUL,
  56. &&L_OP_MOD,
  57. &&L_OP_POW,
  58. &&L_OP_DIV,
  59. &&L_OP_IDIV,
  60. &&L_OP_BAND,
  61. &&L_OP_BOR,
  62. &&L_OP_BXOR,
  63. &&L_OP_SHL,
  64. &&L_OP_SHR,
  65. &&L_OP_MMBIN,
  66. &&L_OP_MMBINI,
  67. &&L_OP_MMBINK,
  68. &&L_OP_UNM,
  69. &&L_OP_BNOT,
  70. &&L_OP_NOT,
  71. &&L_OP_LEN,
  72. &&L_OP_CONCAT,
  73. &&L_OP_CLOSE,
  74. &&L_OP_TBC,
  75. &&L_OP_JMP,
  76. &&L_OP_EQ,
  77. &&L_OP_LT,
  78. &&L_OP_LE,
  79. &&L_OP_EQK,
  80. &&L_OP_EQI,
  81. &&L_OP_LTI,
  82. &&L_OP_LEI,
  83. &&L_OP_GTI,
  84. &&L_OP_GEI,
  85. &&L_OP_TEST,
  86. &&L_OP_TESTSET,
  87. &&L_OP_CALL,
  88. &&L_OP_TAILCALL,
  89. &&L_OP_RETURN,
  90. &&L_OP_RETURN0,
  91. &&L_OP_RETURN1,
  92. &&L_OP_FORLOOP,
  93. &&L_OP_FORPREP,
  94. &&L_OP_TFORPREP,
  95. &&L_OP_TFORCALL,
  96. &&L_OP_TFORLOOP,
  97. &&L_OP_SETLIST,
  98. &&L_OP_CLOSURE,
  99. &&L_OP_VARARG,
  100. &&L_OP_VARARGPREP,
  101. &&L_OP_EXTRAARG
  102. };