immunio 0.15.4 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (454) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +0 -27
  3. data/ext/immunio/Rakefile +9 -0
  4. data/lib/immunio/plugins/active_record.rb +1 -1
  5. data/lib/immunio/plugins/active_record_relation.rb +1 -1
  6. data/lib/immunio/plugins/environment_reporter.rb +20 -0
  7. data/lib/immunio/rufus_lua_ext/ref.rb +1 -3
  8. data/lib/immunio/version.rb +1 -1
  9. data/lib/immunio/vm.rb +1 -2
  10. data/lua-hooks/Makefile +97 -0
  11. data/lua-hooks/ext/all.c +41 -52
  12. data/lua-hooks/ext/all.o +0 -0
  13. data/lua-hooks/ext/libinjection/libinjection_html5.o +0 -0
  14. data/lua-hooks/ext/libinjection/libinjection_sqli.o +0 -0
  15. data/lua-hooks/ext/libinjection/libinjection_xss.o +0 -0
  16. data/lua-hooks/ext/libinjection/lualib.c +2 -2
  17. data/lua-hooks/ext/lpeg/lpcap.c +2 -2
  18. data/lua-hooks/ext/lpeg/lpcap.o +0 -0
  19. data/lua-hooks/ext/lpeg/lpcode.c +2 -2
  20. data/lua-hooks/ext/lpeg/lpcode.h +1 -1
  21. data/lua-hooks/ext/lpeg/lpcode.o +0 -0
  22. data/lua-hooks/ext/lpeg/lpprint.o +0 -0
  23. data/lua-hooks/ext/lpeg/lptree.c +2 -2
  24. data/lua-hooks/ext/lpeg/lptypes.h +1 -1
  25. data/lua-hooks/ext/lpeg/lpvm.c +2 -2
  26. data/lua-hooks/ext/lpeg/lpvm.o +0 -0
  27. data/lua-hooks/ext/lua-cmsgpack/lua_cmsgpack.c +16 -3
  28. data/lua-hooks/ext/lua-snapshot/snapshot.c +14 -7
  29. data/lua-hooks/ext/luajit/COPYRIGHT +56 -0
  30. data/lua-hooks/ext/luajit/Makefile +159 -0
  31. data/lua-hooks/ext/luajit/README +16 -0
  32. data/lua-hooks/ext/luajit/doc/bluequad-print.css +166 -0
  33. data/lua-hooks/ext/luajit/doc/bluequad.css +325 -0
  34. data/lua-hooks/ext/luajit/doc/changes.html +804 -0
  35. data/lua-hooks/ext/luajit/doc/contact.html +104 -0
  36. data/lua-hooks/ext/luajit/doc/ext_c_api.html +189 -0
  37. data/lua-hooks/ext/luajit/doc/ext_ffi.html +332 -0
  38. data/lua-hooks/ext/luajit/doc/ext_ffi_api.html +570 -0
  39. data/lua-hooks/ext/luajit/doc/ext_ffi_semantics.html +1261 -0
  40. data/lua-hooks/ext/luajit/doc/ext_ffi_tutorial.html +603 -0
  41. data/lua-hooks/ext/luajit/doc/ext_jit.html +201 -0
  42. data/lua-hooks/ext/luajit/doc/ext_profiler.html +365 -0
  43. data/lua-hooks/ext/luajit/doc/extensions.html +448 -0
  44. data/lua-hooks/ext/luajit/doc/faq.html +186 -0
  45. data/lua-hooks/ext/luajit/doc/img/contact.png +0 -0
  46. data/lua-hooks/ext/luajit/doc/install.html +659 -0
  47. data/lua-hooks/ext/luajit/doc/luajit.html +236 -0
  48. data/lua-hooks/ext/luajit/doc/running.html +309 -0
  49. data/lua-hooks/ext/luajit/doc/status.html +118 -0
  50. data/lua-hooks/ext/luajit/dynasm/dasm_arm.h +456 -0
  51. data/lua-hooks/ext/luajit/dynasm/dasm_arm.lua +1125 -0
  52. data/lua-hooks/ext/luajit/dynasm/dasm_arm64.h +518 -0
  53. data/lua-hooks/ext/luajit/dynasm/dasm_arm64.lua +1166 -0
  54. data/lua-hooks/ext/luajit/dynasm/dasm_mips.h +416 -0
  55. data/lua-hooks/ext/luajit/dynasm/dasm_mips.lua +953 -0
  56. data/lua-hooks/ext/luajit/dynasm/dasm_ppc.h +419 -0
  57. data/lua-hooks/ext/luajit/dynasm/dasm_ppc.lua +1919 -0
  58. data/lua-hooks/ext/luajit/dynasm/dasm_proto.h +83 -0
  59. data/lua-hooks/ext/luajit/dynasm/dasm_x64.lua +12 -0
  60. data/lua-hooks/ext/luajit/dynasm/dasm_x86.h +471 -0
  61. data/lua-hooks/ext/luajit/dynasm/dasm_x86.lua +1945 -0
  62. data/lua-hooks/ext/luajit/dynasm/dynasm.lua +1094 -0
  63. data/lua-hooks/ext/luajit/etc/luajit.1 +88 -0
  64. data/lua-hooks/ext/luajit/etc/luajit.pc +25 -0
  65. data/lua-hooks/ext/luajit/src/Makefile +697 -0
  66. data/lua-hooks/ext/luajit/src/Makefile.dep +244 -0
  67. data/lua-hooks/ext/luajit/src/host/README +4 -0
  68. data/lua-hooks/ext/luajit/src/host/buildvm +0 -0
  69. data/lua-hooks/ext/luajit/src/host/buildvm.c +518 -0
  70. data/lua-hooks/ext/luajit/src/host/buildvm.h +105 -0
  71. data/lua-hooks/ext/luajit/src/host/buildvm.o +0 -0
  72. data/lua-hooks/ext/luajit/src/host/buildvm_arch.h +7449 -0
  73. data/lua-hooks/ext/luajit/src/host/buildvm_asm.c +345 -0
  74. data/lua-hooks/ext/luajit/src/host/buildvm_asm.o +0 -0
  75. data/lua-hooks/ext/luajit/src/host/buildvm_fold.c +229 -0
  76. data/lua-hooks/ext/luajit/src/host/buildvm_fold.o +0 -0
  77. data/lua-hooks/ext/luajit/src/host/buildvm_lib.c +457 -0
  78. data/lua-hooks/ext/luajit/src/host/buildvm_lib.o +0 -0
  79. data/lua-hooks/ext/luajit/src/host/buildvm_libbc.h +45 -0
  80. data/lua-hooks/ext/luajit/src/host/buildvm_peobj.c +368 -0
  81. data/lua-hooks/ext/luajit/src/host/buildvm_peobj.o +0 -0
  82. data/lua-hooks/ext/luajit/src/host/genlibbc.lua +197 -0
  83. data/lua-hooks/ext/luajit/src/host/genminilua.lua +428 -0
  84. data/lua-hooks/ext/luajit/src/host/minilua +0 -0
  85. data/lua-hooks/ext/luajit/src/host/minilua.c +7770 -0
  86. data/lua-hooks/ext/luajit/src/host/minilua.o +0 -0
  87. data/lua-hooks/ext/luajit/src/jit/bc.lua +190 -0
  88. data/lua-hooks/ext/luajit/src/jit/bcsave.lua +661 -0
  89. data/lua-hooks/ext/luajit/src/jit/dis_arm.lua +689 -0
  90. data/lua-hooks/ext/luajit/src/jit/dis_mips.lua +428 -0
  91. data/lua-hooks/ext/luajit/src/jit/dis_mipsel.lua +17 -0
  92. data/lua-hooks/ext/luajit/src/jit/dis_ppc.lua +591 -0
  93. data/lua-hooks/ext/luajit/src/jit/dis_x64.lua +17 -0
  94. data/lua-hooks/ext/luajit/src/jit/dis_x86.lua +838 -0
  95. data/lua-hooks/ext/luajit/src/jit/dump.lua +706 -0
  96. data/lua-hooks/ext/luajit/src/jit/p.lua +310 -0
  97. data/lua-hooks/ext/luajit/src/jit/v.lua +170 -0
  98. data/lua-hooks/ext/luajit/src/jit/vmdef.lua +362 -0
  99. data/lua-hooks/ext/luajit/src/jit/zone.lua +45 -0
  100. data/lua-hooks/ext/{lua → luajit/src}/lauxlib.h +10 -17
  101. data/lua-hooks/ext/luajit/src/lib_aux.c +356 -0
  102. data/lua-hooks/ext/luajit/src/lib_aux.o +0 -0
  103. data/lua-hooks/ext/luajit/src/lib_aux_dyn.o +0 -0
  104. data/lua-hooks/ext/luajit/src/lib_base.c +664 -0
  105. data/lua-hooks/ext/luajit/src/lib_base.o +0 -0
  106. data/lua-hooks/ext/luajit/src/lib_base_dyn.o +0 -0
  107. data/lua-hooks/ext/luajit/src/lib_bit.c +180 -0
  108. data/lua-hooks/ext/luajit/src/lib_bit.o +0 -0
  109. data/lua-hooks/ext/luajit/src/lib_bit_dyn.o +0 -0
  110. data/lua-hooks/ext/luajit/src/lib_debug.c +405 -0
  111. data/lua-hooks/ext/luajit/src/lib_debug.o +0 -0
  112. data/lua-hooks/ext/luajit/src/lib_debug_dyn.o +0 -0
  113. data/lua-hooks/ext/luajit/src/lib_ffi.c +872 -0
  114. data/lua-hooks/ext/luajit/src/lib_ffi.o +0 -0
  115. data/lua-hooks/ext/luajit/src/lib_ffi_dyn.o +0 -0
  116. data/lua-hooks/ext/luajit/src/lib_init.c +55 -0
  117. data/lua-hooks/ext/luajit/src/lib_init.o +0 -0
  118. data/lua-hooks/ext/luajit/src/lib_init_dyn.o +0 -0
  119. data/lua-hooks/ext/luajit/src/lib_io.c +541 -0
  120. data/lua-hooks/ext/luajit/src/lib_io.o +0 -0
  121. data/lua-hooks/ext/luajit/src/lib_io_dyn.o +0 -0
  122. data/lua-hooks/ext/luajit/src/lib_jit.c +767 -0
  123. data/lua-hooks/ext/luajit/src/lib_jit.o +0 -0
  124. data/lua-hooks/ext/luajit/src/lib_jit_dyn.o +0 -0
  125. data/lua-hooks/ext/luajit/src/lib_math.c +230 -0
  126. data/lua-hooks/ext/luajit/src/lib_math.o +0 -0
  127. data/lua-hooks/ext/luajit/src/lib_math_dyn.o +0 -0
  128. data/lua-hooks/ext/luajit/src/lib_os.c +292 -0
  129. data/lua-hooks/ext/luajit/src/lib_os.o +0 -0
  130. data/lua-hooks/ext/luajit/src/lib_os_dyn.o +0 -0
  131. data/lua-hooks/ext/luajit/src/lib_package.c +610 -0
  132. data/lua-hooks/ext/luajit/src/lib_package.o +0 -0
  133. data/lua-hooks/ext/luajit/src/lib_package_dyn.o +0 -0
  134. data/lua-hooks/ext/luajit/src/lib_string.c +752 -0
  135. data/lua-hooks/ext/luajit/src/lib_string.o +0 -0
  136. data/lua-hooks/ext/luajit/src/lib_string_dyn.o +0 -0
  137. data/lua-hooks/ext/luajit/src/lib_table.c +307 -0
  138. data/lua-hooks/ext/luajit/src/lib_table.o +0 -0
  139. data/lua-hooks/ext/luajit/src/lib_table_dyn.o +0 -0
  140. data/lua-hooks/ext/luajit/src/libluajit.a +0 -0
  141. data/lua-hooks/ext/luajit/src/libluajit.so +0 -0
  142. data/lua-hooks/ext/luajit/src/lj.supp +26 -0
  143. data/lua-hooks/ext/luajit/src/lj_alloc.c +1398 -0
  144. data/lua-hooks/ext/luajit/src/lj_alloc.h +17 -0
  145. data/lua-hooks/ext/luajit/src/lj_alloc.o +0 -0
  146. data/lua-hooks/ext/luajit/src/lj_alloc_dyn.o +0 -0
  147. data/lua-hooks/ext/luajit/src/lj_api.c +1210 -0
  148. data/lua-hooks/ext/luajit/src/lj_api.o +0 -0
  149. data/lua-hooks/ext/luajit/src/lj_api_dyn.o +0 -0
  150. data/lua-hooks/ext/luajit/src/lj_arch.h +509 -0
  151. data/lua-hooks/ext/luajit/src/lj_asm.c +2278 -0
  152. data/lua-hooks/ext/luajit/src/lj_asm.h +17 -0
  153. data/lua-hooks/ext/luajit/src/lj_asm.o +0 -0
  154. data/lua-hooks/ext/luajit/src/lj_asm_arm.h +2217 -0
  155. data/lua-hooks/ext/luajit/src/lj_asm_dyn.o +0 -0
  156. data/lua-hooks/ext/luajit/src/lj_asm_mips.h +1833 -0
  157. data/lua-hooks/ext/luajit/src/lj_asm_ppc.h +2015 -0
  158. data/lua-hooks/ext/luajit/src/lj_asm_x86.h +2634 -0
  159. data/lua-hooks/ext/luajit/src/lj_bc.c +14 -0
  160. data/lua-hooks/ext/luajit/src/lj_bc.h +265 -0
  161. data/lua-hooks/ext/luajit/src/lj_bc.o +0 -0
  162. data/lua-hooks/ext/luajit/src/lj_bc_dyn.o +0 -0
  163. data/lua-hooks/ext/luajit/src/lj_bcdef.h +220 -0
  164. data/lua-hooks/ext/luajit/src/lj_bcdump.h +68 -0
  165. data/lua-hooks/ext/luajit/src/lj_bcread.c +457 -0
  166. data/lua-hooks/ext/luajit/src/lj_bcread.o +0 -0
  167. data/lua-hooks/ext/luajit/src/lj_bcread_dyn.o +0 -0
  168. data/lua-hooks/ext/luajit/src/lj_bcwrite.c +361 -0
  169. data/lua-hooks/ext/luajit/src/lj_bcwrite.o +0 -0
  170. data/lua-hooks/ext/luajit/src/lj_bcwrite_dyn.o +0 -0
  171. data/lua-hooks/ext/luajit/src/lj_buf.c +234 -0
  172. data/lua-hooks/ext/luajit/src/lj_buf.h +105 -0
  173. data/lua-hooks/ext/luajit/src/lj_buf.o +0 -0
  174. data/lua-hooks/ext/luajit/src/lj_buf_dyn.o +0 -0
  175. data/lua-hooks/ext/luajit/src/lj_carith.c +429 -0
  176. data/lua-hooks/ext/luajit/src/lj_carith.h +37 -0
  177. data/lua-hooks/ext/luajit/src/lj_carith.o +0 -0
  178. data/lua-hooks/ext/luajit/src/lj_carith_dyn.o +0 -0
  179. data/lua-hooks/ext/luajit/src/lj_ccall.c +984 -0
  180. data/lua-hooks/ext/luajit/src/lj_ccall.h +178 -0
  181. data/lua-hooks/ext/luajit/src/lj_ccall.o +0 -0
  182. data/lua-hooks/ext/luajit/src/lj_ccall_dyn.o +0 -0
  183. data/lua-hooks/ext/luajit/src/lj_ccallback.c +712 -0
  184. data/lua-hooks/ext/luajit/src/lj_ccallback.h +25 -0
  185. data/lua-hooks/ext/luajit/src/lj_ccallback.o +0 -0
  186. data/lua-hooks/ext/luajit/src/lj_ccallback_dyn.o +0 -0
  187. data/lua-hooks/ext/luajit/src/lj_cconv.c +752 -0
  188. data/lua-hooks/ext/luajit/src/lj_cconv.h +70 -0
  189. data/lua-hooks/ext/luajit/src/lj_cconv.o +0 -0
  190. data/lua-hooks/ext/luajit/src/lj_cconv_dyn.o +0 -0
  191. data/lua-hooks/ext/luajit/src/lj_cdata.c +288 -0
  192. data/lua-hooks/ext/luajit/src/lj_cdata.h +76 -0
  193. data/lua-hooks/ext/luajit/src/lj_cdata.o +0 -0
  194. data/lua-hooks/ext/luajit/src/lj_cdata_dyn.o +0 -0
  195. data/lua-hooks/ext/luajit/src/lj_char.c +43 -0
  196. data/lua-hooks/ext/luajit/src/lj_char.h +42 -0
  197. data/lua-hooks/ext/luajit/src/lj_char.o +0 -0
  198. data/lua-hooks/ext/luajit/src/lj_char_dyn.o +0 -0
  199. data/lua-hooks/ext/luajit/src/lj_clib.c +418 -0
  200. data/lua-hooks/ext/luajit/src/lj_clib.h +29 -0
  201. data/lua-hooks/ext/luajit/src/lj_clib.o +0 -0
  202. data/lua-hooks/ext/luajit/src/lj_clib_dyn.o +0 -0
  203. data/lua-hooks/ext/luajit/src/lj_cparse.c +1862 -0
  204. data/lua-hooks/ext/luajit/src/lj_cparse.h +65 -0
  205. data/lua-hooks/ext/luajit/src/lj_cparse.o +0 -0
  206. data/lua-hooks/ext/luajit/src/lj_cparse_dyn.o +0 -0
  207. data/lua-hooks/ext/luajit/src/lj_crecord.c +1834 -0
  208. data/lua-hooks/ext/luajit/src/lj_crecord.h +38 -0
  209. data/lua-hooks/ext/luajit/src/lj_crecord.o +0 -0
  210. data/lua-hooks/ext/luajit/src/lj_crecord_dyn.o +0 -0
  211. data/lua-hooks/ext/luajit/src/lj_ctype.c +635 -0
  212. data/lua-hooks/ext/luajit/src/lj_ctype.h +461 -0
  213. data/lua-hooks/ext/luajit/src/lj_ctype.o +0 -0
  214. data/lua-hooks/ext/luajit/src/lj_ctype_dyn.o +0 -0
  215. data/lua-hooks/ext/luajit/src/lj_debug.c +699 -0
  216. data/lua-hooks/ext/luajit/src/lj_debug.h +65 -0
  217. data/lua-hooks/ext/luajit/src/lj_debug.o +0 -0
  218. data/lua-hooks/ext/luajit/src/lj_debug_dyn.o +0 -0
  219. data/lua-hooks/ext/luajit/src/lj_def.h +365 -0
  220. data/lua-hooks/ext/luajit/src/lj_dispatch.c +557 -0
  221. data/lua-hooks/ext/luajit/src/lj_dispatch.h +138 -0
  222. data/lua-hooks/ext/luajit/src/lj_dispatch.o +0 -0
  223. data/lua-hooks/ext/luajit/src/lj_dispatch_dyn.o +0 -0
  224. data/lua-hooks/ext/luajit/src/lj_emit_arm.h +356 -0
  225. data/lua-hooks/ext/luajit/src/lj_emit_mips.h +211 -0
  226. data/lua-hooks/ext/luajit/src/lj_emit_ppc.h +238 -0
  227. data/lua-hooks/ext/luajit/src/lj_emit_x86.h +462 -0
  228. data/lua-hooks/ext/luajit/src/lj_err.c +794 -0
  229. data/lua-hooks/ext/luajit/src/lj_err.h +41 -0
  230. data/lua-hooks/ext/luajit/src/lj_err.o +0 -0
  231. data/lua-hooks/ext/luajit/src/lj_err_dyn.o +0 -0
  232. data/lua-hooks/ext/luajit/src/lj_errmsg.h +190 -0
  233. data/lua-hooks/ext/luajit/src/lj_ff.h +18 -0
  234. data/lua-hooks/ext/luajit/src/lj_ffdef.h +209 -0
  235. data/lua-hooks/ext/luajit/src/lj_ffrecord.c +1247 -0
  236. data/lua-hooks/ext/luajit/src/lj_ffrecord.h +24 -0
  237. data/lua-hooks/ext/luajit/src/lj_ffrecord.o +0 -0
  238. data/lua-hooks/ext/luajit/src/lj_ffrecord_dyn.o +0 -0
  239. data/lua-hooks/ext/luajit/src/lj_folddef.h +1138 -0
  240. data/lua-hooks/ext/luajit/src/lj_frame.h +259 -0
  241. data/lua-hooks/ext/luajit/src/lj_func.c +185 -0
  242. data/lua-hooks/ext/luajit/src/lj_func.h +24 -0
  243. data/lua-hooks/ext/luajit/src/lj_func.o +0 -0
  244. data/lua-hooks/ext/luajit/src/lj_func_dyn.o +0 -0
  245. data/lua-hooks/ext/luajit/src/lj_gc.c +845 -0
  246. data/lua-hooks/ext/luajit/src/lj_gc.h +134 -0
  247. data/lua-hooks/ext/luajit/src/lj_gc.o +0 -0
  248. data/lua-hooks/ext/luajit/src/lj_gc_dyn.o +0 -0
  249. data/lua-hooks/ext/luajit/src/lj_gdbjit.c +787 -0
  250. data/lua-hooks/ext/luajit/src/lj_gdbjit.h +22 -0
  251. data/lua-hooks/ext/luajit/src/lj_gdbjit.o +0 -0
  252. data/lua-hooks/ext/luajit/src/lj_gdbjit_dyn.o +0 -0
  253. data/lua-hooks/ext/luajit/src/lj_ir.c +505 -0
  254. data/lua-hooks/ext/luajit/src/lj_ir.h +577 -0
  255. data/lua-hooks/ext/luajit/src/lj_ir.o +0 -0
  256. data/lua-hooks/ext/luajit/src/lj_ir_dyn.o +0 -0
  257. data/lua-hooks/ext/luajit/src/lj_ircall.h +321 -0
  258. data/lua-hooks/ext/luajit/src/lj_iropt.h +161 -0
  259. data/lua-hooks/ext/luajit/src/lj_jit.h +440 -0
  260. data/lua-hooks/ext/luajit/src/lj_lex.c +482 -0
  261. data/lua-hooks/ext/luajit/src/lj_lex.h +86 -0
  262. data/lua-hooks/ext/luajit/src/lj_lex.o +0 -0
  263. data/lua-hooks/ext/luajit/src/lj_lex_dyn.o +0 -0
  264. data/lua-hooks/ext/luajit/src/lj_lib.c +303 -0
  265. data/lua-hooks/ext/luajit/src/lj_lib.h +115 -0
  266. data/lua-hooks/ext/luajit/src/lj_lib.o +0 -0
  267. data/lua-hooks/ext/luajit/src/lj_lib_dyn.o +0 -0
  268. data/lua-hooks/ext/luajit/src/lj_libdef.h +414 -0
  269. data/lua-hooks/ext/luajit/src/lj_load.c +168 -0
  270. data/lua-hooks/ext/luajit/src/lj_load.o +0 -0
  271. data/lua-hooks/ext/luajit/src/lj_load_dyn.o +0 -0
  272. data/lua-hooks/ext/luajit/src/lj_mcode.c +386 -0
  273. data/lua-hooks/ext/luajit/src/lj_mcode.h +30 -0
  274. data/lua-hooks/ext/luajit/src/lj_mcode.o +0 -0
  275. data/lua-hooks/ext/luajit/src/lj_mcode_dyn.o +0 -0
  276. data/lua-hooks/ext/luajit/src/lj_meta.c +477 -0
  277. data/lua-hooks/ext/luajit/src/lj_meta.h +38 -0
  278. data/lua-hooks/ext/luajit/src/lj_meta.o +0 -0
  279. data/lua-hooks/ext/luajit/src/lj_meta_dyn.o +0 -0
  280. data/lua-hooks/ext/luajit/src/lj_obj.c +50 -0
  281. data/lua-hooks/ext/luajit/src/lj_obj.h +976 -0
  282. data/lua-hooks/ext/luajit/src/lj_obj.o +0 -0
  283. data/lua-hooks/ext/luajit/src/lj_obj_dyn.o +0 -0
  284. data/lua-hooks/ext/luajit/src/lj_opt_dce.c +78 -0
  285. data/lua-hooks/ext/luajit/src/lj_opt_dce.o +0 -0
  286. data/lua-hooks/ext/luajit/src/lj_opt_dce_dyn.o +0 -0
  287. data/lua-hooks/ext/luajit/src/lj_opt_fold.c +2488 -0
  288. data/lua-hooks/ext/luajit/src/lj_opt_fold.o +0 -0
  289. data/lua-hooks/ext/luajit/src/lj_opt_fold_dyn.o +0 -0
  290. data/lua-hooks/ext/luajit/src/lj_opt_loop.c +449 -0
  291. data/lua-hooks/ext/luajit/src/lj_opt_loop.o +0 -0
  292. data/lua-hooks/ext/luajit/src/lj_opt_loop_dyn.o +0 -0
  293. data/lua-hooks/ext/luajit/src/lj_opt_mem.c +935 -0
  294. data/lua-hooks/ext/luajit/src/lj_opt_mem.o +0 -0
  295. data/lua-hooks/ext/luajit/src/lj_opt_mem_dyn.o +0 -0
  296. data/lua-hooks/ext/luajit/src/lj_opt_narrow.c +652 -0
  297. data/lua-hooks/ext/luajit/src/lj_opt_narrow.o +0 -0
  298. data/lua-hooks/ext/luajit/src/lj_opt_narrow_dyn.o +0 -0
  299. data/lua-hooks/ext/luajit/src/lj_opt_sink.c +245 -0
  300. data/lua-hooks/ext/luajit/src/lj_opt_sink.o +0 -0
  301. data/lua-hooks/ext/luajit/src/lj_opt_sink_dyn.o +0 -0
  302. data/lua-hooks/ext/luajit/src/lj_opt_split.c +856 -0
  303. data/lua-hooks/ext/luajit/src/lj_opt_split.o +0 -0
  304. data/lua-hooks/ext/luajit/src/lj_opt_split_dyn.o +0 -0
  305. data/lua-hooks/ext/luajit/src/lj_parse.c +2725 -0
  306. data/lua-hooks/ext/luajit/src/lj_parse.h +18 -0
  307. data/lua-hooks/ext/luajit/src/lj_parse.o +0 -0
  308. data/lua-hooks/ext/luajit/src/lj_parse_dyn.o +0 -0
  309. data/lua-hooks/ext/luajit/src/lj_profile.c +368 -0
  310. data/lua-hooks/ext/luajit/src/lj_profile.h +21 -0
  311. data/lua-hooks/ext/luajit/src/lj_profile.o +0 -0
  312. data/lua-hooks/ext/luajit/src/lj_profile_dyn.o +0 -0
  313. data/lua-hooks/ext/luajit/src/lj_recdef.h +270 -0
  314. data/lua-hooks/ext/luajit/src/lj_record.c +2554 -0
  315. data/lua-hooks/ext/luajit/src/lj_record.h +45 -0
  316. data/lua-hooks/ext/luajit/src/lj_record.o +0 -0
  317. data/lua-hooks/ext/luajit/src/lj_record_dyn.o +0 -0
  318. data/lua-hooks/ext/luajit/src/lj_snap.c +870 -0
  319. data/lua-hooks/ext/luajit/src/lj_snap.h +34 -0
  320. data/lua-hooks/ext/luajit/src/lj_snap.o +0 -0
  321. data/lua-hooks/ext/luajit/src/lj_snap_dyn.o +0 -0
  322. data/lua-hooks/ext/luajit/src/lj_state.c +300 -0
  323. data/lua-hooks/ext/luajit/src/lj_state.h +35 -0
  324. data/lua-hooks/ext/luajit/src/lj_state.o +0 -0
  325. data/lua-hooks/ext/luajit/src/lj_state_dyn.o +0 -0
  326. data/lua-hooks/ext/luajit/src/lj_str.c +197 -0
  327. data/lua-hooks/ext/luajit/src/lj_str.h +27 -0
  328. data/lua-hooks/ext/luajit/src/lj_str.o +0 -0
  329. data/lua-hooks/ext/luajit/src/lj_str_dyn.o +0 -0
  330. data/lua-hooks/ext/luajit/src/lj_strfmt.c +554 -0
  331. data/lua-hooks/ext/luajit/src/lj_strfmt.h +125 -0
  332. data/lua-hooks/ext/luajit/src/lj_strfmt.o +0 -0
  333. data/lua-hooks/ext/luajit/src/lj_strfmt_dyn.o +0 -0
  334. data/lua-hooks/ext/luajit/src/lj_strscan.c +547 -0
  335. data/lua-hooks/ext/luajit/src/lj_strscan.h +39 -0
  336. data/lua-hooks/ext/luajit/src/lj_strscan.o +0 -0
  337. data/lua-hooks/ext/luajit/src/lj_strscan_dyn.o +0 -0
  338. data/lua-hooks/ext/luajit/src/lj_tab.c +666 -0
  339. data/lua-hooks/ext/luajit/src/lj_tab.h +73 -0
  340. data/lua-hooks/ext/luajit/src/lj_tab.o +0 -0
  341. data/lua-hooks/ext/luajit/src/lj_tab_dyn.o +0 -0
  342. data/lua-hooks/ext/luajit/src/lj_target.h +164 -0
  343. data/lua-hooks/ext/luajit/src/lj_target_arm.h +270 -0
  344. data/lua-hooks/ext/luajit/src/lj_target_arm64.h +97 -0
  345. data/lua-hooks/ext/luajit/src/lj_target_mips.h +260 -0
  346. data/lua-hooks/ext/luajit/src/lj_target_ppc.h +280 -0
  347. data/lua-hooks/ext/luajit/src/lj_target_x86.h +345 -0
  348. data/lua-hooks/ext/luajit/src/lj_trace.c +859 -0
  349. data/lua-hooks/ext/luajit/src/lj_trace.h +54 -0
  350. data/lua-hooks/ext/luajit/src/lj_trace.o +0 -0
  351. data/lua-hooks/ext/luajit/src/lj_trace_dyn.o +0 -0
  352. data/lua-hooks/ext/luajit/src/lj_traceerr.h +63 -0
  353. data/lua-hooks/ext/luajit/src/lj_udata.c +34 -0
  354. data/lua-hooks/ext/luajit/src/lj_udata.h +14 -0
  355. data/lua-hooks/ext/luajit/src/lj_udata.o +0 -0
  356. data/lua-hooks/ext/luajit/src/lj_udata_dyn.o +0 -0
  357. data/lua-hooks/ext/luajit/src/lj_vm.S +2730 -0
  358. data/lua-hooks/ext/luajit/src/lj_vm.h +114 -0
  359. data/lua-hooks/ext/luajit/src/lj_vm.o +0 -0
  360. data/lua-hooks/ext/luajit/src/lj_vm_dyn.o +0 -0
  361. data/lua-hooks/ext/luajit/src/lj_vmevent.c +58 -0
  362. data/lua-hooks/ext/luajit/src/lj_vmevent.h +59 -0
  363. data/lua-hooks/ext/luajit/src/lj_vmevent.o +0 -0
  364. data/lua-hooks/ext/luajit/src/lj_vmevent_dyn.o +0 -0
  365. data/lua-hooks/ext/luajit/src/lj_vmmath.c +152 -0
  366. data/lua-hooks/ext/luajit/src/lj_vmmath.o +0 -0
  367. data/lua-hooks/ext/luajit/src/lj_vmmath_dyn.o +0 -0
  368. data/lua-hooks/ext/luajit/src/ljamalg.c +96 -0
  369. data/lua-hooks/ext/{lua → luajit/src}/lua.h +12 -7
  370. data/lua-hooks/ext/luajit/src/lua.hpp +9 -0
  371. data/lua-hooks/ext/luajit/src/luaconf.h +156 -0
  372. data/lua-hooks/ext/luajit/src/luajit +0 -0
  373. data/lua-hooks/ext/luajit/src/luajit.c +570 -0
  374. data/lua-hooks/ext/luajit/src/luajit.h +79 -0
  375. data/lua-hooks/ext/luajit/src/luajit.o +0 -0
  376. data/lua-hooks/ext/luajit/src/lualib.h +43 -0
  377. data/lua-hooks/ext/luajit/src/msvcbuild.bat +114 -0
  378. data/lua-hooks/ext/luajit/src/ps4build.bat +103 -0
  379. data/lua-hooks/ext/luajit/src/psvitabuild.bat +93 -0
  380. data/lua-hooks/ext/luajit/src/vm_arm.dasc +4585 -0
  381. data/lua-hooks/ext/luajit/src/vm_arm64.dasc +3764 -0
  382. data/lua-hooks/ext/luajit/src/vm_mips.dasc +4355 -0
  383. data/lua-hooks/ext/luajit/src/vm_ppc.dasc +5252 -0
  384. data/lua-hooks/ext/luajit/src/vm_x64.dasc +4902 -0
  385. data/lua-hooks/ext/luajit/src/vm_x86.dasc +5710 -0
  386. data/lua-hooks/ext/luajit/src/xb1build.bat +101 -0
  387. data/lua-hooks/ext/luajit/src/xedkbuild.bat +92 -0
  388. data/lua-hooks/ext/luautf8/lutf8lib.c +3 -3
  389. data/lua-hooks/lib/boot.lua +37 -2
  390. metadata +372 -69
  391. data/lua-hooks/ext/bitop/README +0 -22
  392. data/lua-hooks/ext/bitop/bit.c +0 -189
  393. data/lua-hooks/ext/extconf.rb +0 -38
  394. data/lua-hooks/ext/lua/COPYRIGHT +0 -34
  395. data/lua-hooks/ext/lua/lapi.c +0 -1087
  396. data/lua-hooks/ext/lua/lapi.h +0 -16
  397. data/lua-hooks/ext/lua/lauxlib.c +0 -652
  398. data/lua-hooks/ext/lua/lbaselib.c +0 -659
  399. data/lua-hooks/ext/lua/lcode.c +0 -831
  400. data/lua-hooks/ext/lua/lcode.h +0 -76
  401. data/lua-hooks/ext/lua/ldblib.c +0 -398
  402. data/lua-hooks/ext/lua/ldebug.c +0 -638
  403. data/lua-hooks/ext/lua/ldebug.h +0 -33
  404. data/lua-hooks/ext/lua/ldo.c +0 -519
  405. data/lua-hooks/ext/lua/ldo.h +0 -57
  406. data/lua-hooks/ext/lua/ldump.c +0 -164
  407. data/lua-hooks/ext/lua/lfunc.c +0 -174
  408. data/lua-hooks/ext/lua/lfunc.h +0 -34
  409. data/lua-hooks/ext/lua/lgc.c +0 -710
  410. data/lua-hooks/ext/lua/lgc.h +0 -110
  411. data/lua-hooks/ext/lua/linit.c +0 -38
  412. data/lua-hooks/ext/lua/liolib.c +0 -556
  413. data/lua-hooks/ext/lua/llex.c +0 -463
  414. data/lua-hooks/ext/lua/llex.h +0 -81
  415. data/lua-hooks/ext/lua/llimits.h +0 -128
  416. data/lua-hooks/ext/lua/lmathlib.c +0 -263
  417. data/lua-hooks/ext/lua/lmem.c +0 -86
  418. data/lua-hooks/ext/lua/lmem.h +0 -49
  419. data/lua-hooks/ext/lua/loadlib.c +0 -705
  420. data/lua-hooks/ext/lua/loadlib_rel.c +0 -760
  421. data/lua-hooks/ext/lua/lobject.c +0 -214
  422. data/lua-hooks/ext/lua/lobject.h +0 -381
  423. data/lua-hooks/ext/lua/lopcodes.c +0 -102
  424. data/lua-hooks/ext/lua/lopcodes.h +0 -268
  425. data/lua-hooks/ext/lua/loslib.c +0 -243
  426. data/lua-hooks/ext/lua/lparser.c +0 -1339
  427. data/lua-hooks/ext/lua/lparser.h +0 -82
  428. data/lua-hooks/ext/lua/lstate.c +0 -214
  429. data/lua-hooks/ext/lua/lstate.h +0 -169
  430. data/lua-hooks/ext/lua/lstring.c +0 -111
  431. data/lua-hooks/ext/lua/lstring.h +0 -31
  432. data/lua-hooks/ext/lua/lstrlib.c +0 -871
  433. data/lua-hooks/ext/lua/ltable.c +0 -588
  434. data/lua-hooks/ext/lua/ltable.h +0 -40
  435. data/lua-hooks/ext/lua/ltablib.c +0 -287
  436. data/lua-hooks/ext/lua/ltm.c +0 -75
  437. data/lua-hooks/ext/lua/ltm.h +0 -54
  438. data/lua-hooks/ext/lua/lua.c +0 -392
  439. data/lua-hooks/ext/lua/lua.def +0 -131
  440. data/lua-hooks/ext/lua/lua.rc +0 -28
  441. data/lua-hooks/ext/lua/lua_dll.rc +0 -26
  442. data/lua-hooks/ext/lua/luac.c +0 -200
  443. data/lua-hooks/ext/lua/luac.rc +0 -1
  444. data/lua-hooks/ext/lua/luaconf.h +0 -763
  445. data/lua-hooks/ext/lua/luaconf.h.in +0 -724
  446. data/lua-hooks/ext/lua/luaconf.h.orig +0 -763
  447. data/lua-hooks/ext/lua/lualib.h +0 -53
  448. data/lua-hooks/ext/lua/lundump.c +0 -227
  449. data/lua-hooks/ext/lua/lundump.h +0 -36
  450. data/lua-hooks/ext/lua/lvm.c +0 -767
  451. data/lua-hooks/ext/lua/lvm.h +0 -36
  452. data/lua-hooks/ext/lua/lzio.c +0 -82
  453. data/lua-hooks/ext/lua/lzio.h +0 -67
  454. data/lua-hooks/ext/lua/print.c +0 -227
@@ -0,0 +1,414 @@
1
+ /* This is a generated file. DO NOT EDIT! */
2
+
3
+ #ifdef LJLIB_MODULE_base
4
+ #undef LJLIB_MODULE_base
5
+ static const lua_CFunction lj_lib_cf_base[] = {
6
+ lj_ffh_assert,
7
+ lj_ffh_next,
8
+ lj_ffh_pairs,
9
+ lj_ffh_ipairs_aux,
10
+ lj_ffh_ipairs,
11
+ lj_ffh_setmetatable,
12
+ lj_cf_getfenv,
13
+ lj_cf_setfenv,
14
+ lj_ffh_rawget,
15
+ lj_cf_rawset,
16
+ lj_cf_rawequal,
17
+ lj_cf_unpack,
18
+ lj_cf_select,
19
+ lj_ffh_tonumber,
20
+ lj_ffh_tostring,
21
+ lj_cf_error,
22
+ lj_ffh_pcall,
23
+ lj_cf_loadfile,
24
+ lj_cf_load,
25
+ lj_cf_loadstring,
26
+ lj_cf_dofile,
27
+ lj_cf_gcinfo,
28
+ lj_cf_collectgarbage,
29
+ lj_cf_newproxy,
30
+ lj_cf_print
31
+ };
32
+ static const uint8_t lj_lib_init_base[] = {
33
+ 2,0,28,70,97,115,115,101,114,116,195,110,105,108,199,98,111,111,108,101,97,
34
+ 110,252,1,200,117,115,101,114,100,97,116,97,198,115,116,114,105,110,103,197,
35
+ 117,112,118,97,108,198,116,104,114,101,97,100,197,112,114,111,116,111,200,102,
36
+ 117,110,99,116,105,111,110,197,116,114,97,99,101,197,99,100,97,116,97,197,116,
37
+ 97,98,108,101,252,9,198,110,117,109,98,101,114,132,116,121,112,101,68,110,101,
38
+ 120,116,253,69,112,97,105,114,115,64,253,70,105,112,97,105,114,115,140,103,
39
+ 101,116,109,101,116,97,116,97,98,108,101,76,115,101,116,109,101,116,97,116,
40
+ 97,98,108,101,7,103,101,116,102,101,110,118,7,115,101,116,102,101,110,118,70,
41
+ 114,97,119,103,101,116,6,114,97,119,115,101,116,8,114,97,119,101,113,117,97,
42
+ 108,6,117,110,112,97,99,107,6,115,101,108,101,99,116,72,116,111,110,117,109,
43
+ 98,101,114,72,116,111,115,116,114,105,110,103,5,101,114,114,111,114,69,112,
44
+ 99,97,108,108,134,120,112,99,97,108,108,8,108,111,97,100,102,105,108,101,4,
45
+ 108,111,97,100,10,108,111,97,100,115,116,114,105,110,103,6,100,111,102,105,
46
+ 108,101,6,103,99,105,110,102,111,14,99,111,108,108,101,99,116,103,97,114,98,
47
+ 97,103,101,252,2,8,110,101,119,112,114,111,120,121,200,116,111,115,116,114,
48
+ 105,110,103,5,112,114,105,110,116,252,3,200,95,86,69,82,83,73,79,78,250,255
49
+ };
50
+ #endif
51
+
52
+ #ifdef LJLIB_MODULE_coroutine
53
+ #undef LJLIB_MODULE_coroutine
54
+ static const lua_CFunction lj_lib_cf_coroutine[] = {
55
+ lj_cf_coroutine_status,
56
+ lj_cf_coroutine_running,
57
+ lj_cf_coroutine_create,
58
+ lj_ffh_coroutine_yield,
59
+ lj_ffh_coroutine_resume,
60
+ lj_cf_coroutine_wrap
61
+ };
62
+ static const uint8_t lj_lib_init_coroutine[] = {
63
+ 30,13,6,6,115,116,97,116,117,115,7,114,117,110,110,105,110,103,6,99,114,101,
64
+ 97,116,101,69,121,105,101,108,100,70,114,101,115,117,109,101,254,4,119,114,
65
+ 97,112,255
66
+ };
67
+ #endif
68
+
69
+ #ifdef LJLIB_MODULE_math
70
+ #undef LJLIB_MODULE_math
71
+ static const lua_CFunction lj_lib_cf_math[] = {
72
+ lj_ffh_math_abs,
73
+ lj_ffh_math_sqrt,
74
+ lj_ffh_math_log,
75
+ lj_ffh_math_atan2,
76
+ lj_ffh_math_ldexp,
77
+ lj_ffh_math_min,
78
+ lj_cf_math_random,
79
+ lj_cf_math_randomseed
80
+ };
81
+ static const uint8_t lj_lib_init_math[] = {
82
+ 37,16,30,67,97,98,115,133,102,108,111,111,114,132,99,101,105,108,68,115,113,
83
+ 114,116,133,108,111,103,49,48,131,101,120,112,131,115,105,110,131,99,111,115,
84
+ 131,116,97,110,132,97,115,105,110,132,97,99,111,115,132,97,116,97,110,132,115,
85
+ 105,110,104,132,99,111,115,104,132,116,97,110,104,133,102,114,101,120,112,132,
86
+ 109,111,100,102,67,108,111,103,249,3,100,101,103,0,1,2,0,0,1,2,24,1,0,0,76,
87
+ 1,2,0,241,135,158,166,3,220,203,178,130,4,249,3,114,97,100,0,1,2,0,0,1,2,24,
88
+ 1,0,0,76,1,2,0,243,244,148,165,20,198,190,199,252,3,69,97,116,97,110,50,131,
89
+ 112,111,119,132,102,109,111,100,69,108,100,101,120,112,67,109,105,110,131,109,
90
+ 97,120,251,24,45,68,84,251,33,9,64,194,112,105,250,251,0,0,0,0,0,0,240,127,
91
+ 196,104,117,103,101,250,252,2,6,114,97,110,100,111,109,252,2,10,114,97,110,
92
+ 100,111,109,115,101,101,100,255
93
+ };
94
+ #endif
95
+
96
+ #ifdef LJLIB_MODULE_bit
97
+ #undef LJLIB_MODULE_bit
98
+ static const lua_CFunction lj_lib_cf_bit[] = {
99
+ lj_ffh_bit_tobit,
100
+ lj_ffh_bit_bnot,
101
+ lj_ffh_bit_bswap,
102
+ lj_ffh_bit_lshift,
103
+ lj_ffh_bit_band,
104
+ lj_cf_bit_tohex
105
+ };
106
+ static const uint8_t lj_lib_init_bit[] = {
107
+ 63,40,12,69,116,111,98,105,116,68,98,110,111,116,69,98,115,119,97,112,70,108,
108
+ 115,104,105,102,116,134,114,115,104,105,102,116,135,97,114,115,104,105,102,
109
+ 116,131,114,111,108,131,114,111,114,68,98,97,110,100,131,98,111,114,132,98,
110
+ 120,111,114,5,116,111,104,101,120,255
111
+ };
112
+ #endif
113
+
114
+ #ifdef LJLIB_MODULE_string
115
+ #undef LJLIB_MODULE_string
116
+ static const lua_CFunction lj_lib_cf_string[] = {
117
+ lj_ffh_string_byte,
118
+ lj_ffh_string_char,
119
+ lj_ffh_string_sub,
120
+ lj_cf_string_rep,
121
+ lj_ffh_string_reverse,
122
+ lj_cf_string_dump,
123
+ lj_cf_string_find,
124
+ lj_cf_string_match,
125
+ lj_cf_string_gmatch,
126
+ lj_cf_string_gsub,
127
+ lj_cf_string_format
128
+ };
129
+ static const uint8_t lj_lib_init_string[] = {
130
+ 75,51,14,249,3,108,101,110,0,1,2,0,0,0,3,16,0,5,0,21,1,0,0,76,1,2,0,68,98,121,
131
+ 116,101,68,99,104,97,114,67,115,117,98,3,114,101,112,71,114,101,118,101,114,
132
+ 115,101,133,108,111,119,101,114,133,117,112,112,101,114,4,100,117,109,112,4,
133
+ 102,105,110,100,5,109,97,116,99,104,254,6,103,109,97,116,99,104,4,103,115,117,
134
+ 98,6,102,111,114,109,97,116,255
135
+ };
136
+ #endif
137
+
138
+ #ifdef LJLIB_MODULE_table
139
+ #undef LJLIB_MODULE_table
140
+ static const lua_CFunction lj_lib_cf_table[] = {
141
+ lj_cf_table_maxn,
142
+ lj_cf_table_insert,
143
+ lj_cf_table_concat,
144
+ lj_cf_table_sort
145
+ };
146
+ static const uint8_t lj_lib_init_table[] = {
147
+ 89,57,8,249,8,102,111,114,101,97,99,104,105,0,2,9,0,0,0,15,16,0,12,0,16,1,9,
148
+ 0,41,2,1,0,21,3,0,0,41,4,1,0,77,2,8,128,18,6,1,0,18,7,5,0,59,8,5,0,66,6,3,2,
149
+ 10,6,0,0,88,7,1,128,76,6,2,0,79,2,248,127,75,0,1,0,249,7,102,111,114,101,97,
150
+ 99,104,0,2,10,0,0,0,16,16,0,12,0,16,1,9,0,43,2,0,0,18,3,0,0,41,4,0,0,88,5,7,
151
+ 128,18,7,1,0,18,8,5,0,18,9,6,0,66,7,3,2,10,7,0,0,88,8,1,128,76,7,2,0,70,5,3,
152
+ 3,82,5,247,127,75,0,1,0,249,4,103,101,116,110,0,1,2,0,0,0,3,16,0,12,0,21,1,
153
+ 0,0,76,1,2,0,4,109,97,120,110,6,105,110,115,101,114,116,249,6,114,101,109,111,
154
+ 118,101,0,2,10,0,0,2,30,16,0,12,0,21,2,0,0,11,1,0,0,88,3,7,128,8,2,0,0,88,3,
155
+ 23,128,59,3,2,0,43,4,0,0,64,4,2,0,76,3,2,0,88,3,18,128,17,1,15,0,41,3,1,0,3,
156
+ 3,1,0,88,3,14,128,3,1,2,0,88,3,12,128,59,3,1,0,22,4,1,1,18,5,2,0,41,6,1,0,77,
157
+ 4,4,128,23,8,1,7,59,9,7,0,64,9,8,0,79,4,252,127,43,4,0,0,64,4,2,0,76,3,2,0,
158
+ 75,0,1,0,0,2,6,99,111,110,99,97,116,4,115,111,114,116,254,254,255
159
+ };
160
+ #endif
161
+
162
+ #ifdef LJLIB_MODULE_io_method
163
+ #undef LJLIB_MODULE_io_method
164
+ static const lua_CFunction lj_lib_cf_io_method[] = {
165
+ lj_cf_io_method_close,
166
+ lj_cf_io_method_read,
167
+ lj_cf_io_method_write,
168
+ lj_cf_io_method_flush,
169
+ lj_cf_io_method_seek,
170
+ lj_cf_io_method_setvbuf,
171
+ lj_cf_io_method_lines,
172
+ lj_cf_io_method___gc,
173
+ lj_cf_io_method___tostring
174
+ };
175
+ static const uint8_t lj_lib_init_io_method[] = {
176
+ 95,57,10,5,99,108,111,115,101,4,114,101,97,100,5,119,114,105,116,101,5,102,
177
+ 108,117,115,104,4,115,101,101,107,7,115,101,116,118,98,117,102,5,108,105,110,
178
+ 101,115,4,95,95,103,99,10,95,95,116,111,115,116,114,105,110,103,252,1,199,95,
179
+ 95,105,110,100,101,120,250,255
180
+ };
181
+ #endif
182
+
183
+ #ifdef LJLIB_MODULE_io
184
+ #undef LJLIB_MODULE_io
185
+ static const lua_CFunction lj_lib_cf_io[] = {
186
+ lj_cf_io_open,
187
+ lj_cf_io_popen,
188
+ lj_cf_io_tmpfile,
189
+ lj_cf_io_close,
190
+ lj_cf_io_read,
191
+ lj_cf_io_write,
192
+ lj_cf_io_flush,
193
+ lj_cf_io_input,
194
+ lj_cf_io_output,
195
+ lj_cf_io_lines,
196
+ lj_cf_io_type
197
+ };
198
+ static const uint8_t lj_lib_init_io[] = {
199
+ 104,57,12,252,2,192,250,4,111,112,101,110,5,112,111,112,101,110,7,116,109,112,
200
+ 102,105,108,101,5,99,108,111,115,101,4,114,101,97,100,5,119,114,105,116,101,
201
+ 5,102,108,117,115,104,5,105,110,112,117,116,6,111,117,116,112,117,116,5,108,
202
+ 105,110,101,115,4,116,121,112,101,255
203
+ };
204
+ #endif
205
+
206
+ #ifdef LJLIB_MODULE_os
207
+ #undef LJLIB_MODULE_os
208
+ static const lua_CFunction lj_lib_cf_os[] = {
209
+ lj_cf_os_execute,
210
+ lj_cf_os_remove,
211
+ lj_cf_os_rename,
212
+ lj_cf_os_tmpname,
213
+ lj_cf_os_getenv,
214
+ lj_cf_os_exit,
215
+ lj_cf_os_clock,
216
+ lj_cf_os_date,
217
+ lj_cf_os_time,
218
+ lj_cf_os_difftime,
219
+ lj_cf_os_setlocale
220
+ };
221
+ static const uint8_t lj_lib_init_os[] = {
222
+ 115,57,11,7,101,120,101,99,117,116,101,6,114,101,109,111,118,101,6,114,101,
223
+ 110,97,109,101,7,116,109,112,110,97,109,101,6,103,101,116,101,110,118,4,101,
224
+ 120,105,116,5,99,108,111,99,107,4,100,97,116,101,4,116,105,109,101,8,100,105,
225
+ 102,102,116,105,109,101,9,115,101,116,108,111,99,97,108,101,255
226
+ };
227
+ #endif
228
+
229
+ #ifdef LJLIB_MODULE_debug
230
+ #undef LJLIB_MODULE_debug
231
+ static const lua_CFunction lj_lib_cf_debug[] = {
232
+ lj_cf_debug_getregistry,
233
+ lj_cf_debug_getmetatable,
234
+ lj_cf_debug_setmetatable,
235
+ lj_cf_debug_getfenv,
236
+ lj_cf_debug_setfenv,
237
+ lj_cf_debug_getinfo,
238
+ lj_cf_debug_getlocal,
239
+ lj_cf_debug_setlocal,
240
+ lj_cf_debug_getupvalue,
241
+ lj_cf_debug_setupvalue,
242
+ lj_cf_debug_upvalueid,
243
+ lj_cf_debug_upvaluejoin,
244
+ lj_cf_debug_sethook,
245
+ lj_cf_debug_gethook,
246
+ lj_cf_debug_debug,
247
+ lj_cf_debug_traceback
248
+ };
249
+ static const uint8_t lj_lib_init_debug[] = {
250
+ 126,57,16,11,103,101,116,114,101,103,105,115,116,114,121,12,103,101,116,109,
251
+ 101,116,97,116,97,98,108,101,12,115,101,116,109,101,116,97,116,97,98,108,101,
252
+ 7,103,101,116,102,101,110,118,7,115,101,116,102,101,110,118,7,103,101,116,105,
253
+ 110,102,111,8,103,101,116,108,111,99,97,108,8,115,101,116,108,111,99,97,108,
254
+ 10,103,101,116,117,112,118,97,108,117,101,10,115,101,116,117,112,118,97,108,
255
+ 117,101,9,117,112,118,97,108,117,101,105,100,11,117,112,118,97,108,117,101,
256
+ 106,111,105,110,7,115,101,116,104,111,111,107,7,103,101,116,104,111,111,107,
257
+ 5,100,101,98,117,103,9,116,114,97,99,101,98,97,99,107,255
258
+ };
259
+ #endif
260
+
261
+ #ifdef LJLIB_MODULE_jit
262
+ #undef LJLIB_MODULE_jit
263
+ static const lua_CFunction lj_lib_cf_jit[] = {
264
+ lj_cf_jit_on,
265
+ lj_cf_jit_off,
266
+ lj_cf_jit_flush,
267
+ lj_cf_jit_status,
268
+ lj_cf_jit_attach
269
+ };
270
+ static const uint8_t lj_lib_init_jit[] = {
271
+ 142,57,9,2,111,110,3,111,102,102,5,102,108,117,115,104,6,115,116,97,116,117,
272
+ 115,6,97,116,116,97,99,104,252,5,194,111,115,250,252,4,196,97,114,99,104,250,
273
+ 252,3,203,118,101,114,115,105,111,110,95,110,117,109,250,252,2,199,118,101,
274
+ 114,115,105,111,110,250,255
275
+ };
276
+ #endif
277
+
278
+ #ifdef LJLIB_MODULE_jit_util
279
+ #undef LJLIB_MODULE_jit_util
280
+ static const lua_CFunction lj_lib_cf_jit_util[] = {
281
+ lj_cf_jit_util_funcinfo,
282
+ lj_cf_jit_util_funcbc,
283
+ lj_cf_jit_util_funck,
284
+ lj_cf_jit_util_funcuvname,
285
+ lj_cf_jit_util_traceinfo,
286
+ lj_cf_jit_util_traceir,
287
+ lj_cf_jit_util_tracek,
288
+ lj_cf_jit_util_tracesnap,
289
+ lj_cf_jit_util_tracemc,
290
+ lj_cf_jit_util_traceexitstub,
291
+ lj_cf_jit_util_ircalladdr
292
+ };
293
+ static const uint8_t lj_lib_init_jit_util[] = {
294
+ 147,57,11,8,102,117,110,99,105,110,102,111,6,102,117,110,99,98,99,5,102,117,
295
+ 110,99,107,10,102,117,110,99,117,118,110,97,109,101,9,116,114,97,99,101,105,
296
+ 110,102,111,7,116,114,97,99,101,105,114,6,116,114,97,99,101,107,9,116,114,97,
297
+ 99,101,115,110,97,112,7,116,114,97,99,101,109,99,13,116,114,97,99,101,101,120,
298
+ 105,116,115,116,117,98,10,105,114,99,97,108,108,97,100,100,114,255
299
+ };
300
+ #endif
301
+
302
+ #ifdef LJLIB_MODULE_jit_opt
303
+ #undef LJLIB_MODULE_jit_opt
304
+ static const lua_CFunction lj_lib_cf_jit_opt[] = {
305
+ lj_cf_jit_opt_start
306
+ };
307
+ static const uint8_t lj_lib_init_jit_opt[] = {
308
+ 158,57,1,5,115,116,97,114,116,255
309
+ };
310
+ #endif
311
+
312
+ #ifdef LJLIB_MODULE_jit_profile
313
+ #undef LJLIB_MODULE_jit_profile
314
+ static const lua_CFunction lj_lib_cf_jit_profile[] = {
315
+ lj_cf_jit_profile_start,
316
+ lj_cf_jit_profile_stop,
317
+ lj_cf_jit_profile_dumpstack
318
+ };
319
+ static const uint8_t lj_lib_init_jit_profile[] = {
320
+ 159,57,3,5,115,116,97,114,116,4,115,116,111,112,9,100,117,109,112,115,116,97,
321
+ 99,107,255
322
+ };
323
+ #endif
324
+
325
+ #ifdef LJLIB_MODULE_ffi_meta
326
+ #undef LJLIB_MODULE_ffi_meta
327
+ static const lua_CFunction lj_lib_cf_ffi_meta[] = {
328
+ lj_cf_ffi_meta___index,
329
+ lj_cf_ffi_meta___newindex,
330
+ lj_cf_ffi_meta___eq,
331
+ lj_cf_ffi_meta___len,
332
+ lj_cf_ffi_meta___lt,
333
+ lj_cf_ffi_meta___le,
334
+ lj_cf_ffi_meta___concat,
335
+ lj_cf_ffi_meta___call,
336
+ lj_cf_ffi_meta___add,
337
+ lj_cf_ffi_meta___sub,
338
+ lj_cf_ffi_meta___mul,
339
+ lj_cf_ffi_meta___div,
340
+ lj_cf_ffi_meta___mod,
341
+ lj_cf_ffi_meta___pow,
342
+ lj_cf_ffi_meta___unm,
343
+ lj_cf_ffi_meta___tostring,
344
+ lj_cf_ffi_meta___pairs,
345
+ lj_cf_ffi_meta___ipairs
346
+ };
347
+ static const uint8_t lj_lib_init_ffi_meta[] = {
348
+ 162,57,19,7,95,95,105,110,100,101,120,10,95,95,110,101,119,105,110,100,101,
349
+ 120,4,95,95,101,113,5,95,95,108,101,110,4,95,95,108,116,4,95,95,108,101,8,95,
350
+ 95,99,111,110,99,97,116,6,95,95,99,97,108,108,5,95,95,97,100,100,5,95,95,115,
351
+ 117,98,5,95,95,109,117,108,5,95,95,100,105,118,5,95,95,109,111,100,5,95,95,
352
+ 112,111,119,5,95,95,117,110,109,10,95,95,116,111,115,116,114,105,110,103,7,
353
+ 95,95,112,97,105,114,115,8,95,95,105,112,97,105,114,115,195,102,102,105,203,
354
+ 95,95,109,101,116,97,116,97,98,108,101,250,255
355
+ };
356
+ #endif
357
+
358
+ #ifdef LJLIB_MODULE_ffi_clib
359
+ #undef LJLIB_MODULE_ffi_clib
360
+ static const lua_CFunction lj_lib_cf_ffi_clib[] = {
361
+ lj_cf_ffi_clib___index,
362
+ lj_cf_ffi_clib___newindex,
363
+ lj_cf_ffi_clib___gc
364
+ };
365
+ static const uint8_t lj_lib_init_ffi_clib[] = {
366
+ 180,57,3,7,95,95,105,110,100,101,120,10,95,95,110,101,119,105,110,100,101,120,
367
+ 4,95,95,103,99,255
368
+ };
369
+ #endif
370
+
371
+ #ifdef LJLIB_MODULE_ffi_callback
372
+ #undef LJLIB_MODULE_ffi_callback
373
+ static const lua_CFunction lj_lib_cf_ffi_callback[] = {
374
+ lj_cf_ffi_callback_free,
375
+ lj_cf_ffi_callback_set
376
+ };
377
+ static const uint8_t lj_lib_init_ffi_callback[] = {
378
+ 183,57,3,4,102,114,101,101,3,115,101,116,252,1,199,95,95,105,110,100,101,120,
379
+ 250,255
380
+ };
381
+ #endif
382
+
383
+ #ifdef LJLIB_MODULE_ffi
384
+ #undef LJLIB_MODULE_ffi
385
+ static const lua_CFunction lj_lib_cf_ffi[] = {
386
+ lj_cf_ffi_cdef,
387
+ lj_cf_ffi_new,
388
+ lj_cf_ffi_cast,
389
+ lj_cf_ffi_typeof,
390
+ lj_cf_ffi_typeinfo,
391
+ lj_cf_ffi_istype,
392
+ lj_cf_ffi_sizeof,
393
+ lj_cf_ffi_alignof,
394
+ lj_cf_ffi_offsetof,
395
+ lj_cf_ffi_errno,
396
+ lj_cf_ffi_string,
397
+ lj_cf_ffi_copy,
398
+ lj_cf_ffi_fill,
399
+ lj_cf_ffi_abi,
400
+ lj_cf_ffi_metatype,
401
+ lj_cf_ffi_gc,
402
+ lj_cf_ffi_load
403
+ };
404
+ static const uint8_t lj_lib_init_ffi[] = {
405
+ 185,57,23,4,99,100,101,102,3,110,101,119,4,99,97,115,116,6,116,121,112,101,
406
+ 111,102,8,116,121,112,101,105,110,102,111,6,105,115,116,121,112,101,6,115,105,
407
+ 122,101,111,102,7,97,108,105,103,110,111,102,8,111,102,102,115,101,116,111,
408
+ 102,5,101,114,114,110,111,6,115,116,114,105,110,103,4,99,111,112,121,4,102,
409
+ 105,108,108,3,97,98,105,252,8,192,250,8,109,101,116,97,116,121,112,101,252,
410
+ 7,192,250,2,103,99,252,5,192,250,4,108,111,97,100,252,4,193,67,250,252,3,194,
411
+ 111,115,250,252,2,196,97,114,99,104,250,255
412
+ };
413
+ #endif
414
+
@@ -0,0 +1,168 @@
1
+ /*
2
+ ** Load and dump code.
3
+ ** Copyright (C) 2005-2015 Mike Pall. See Copyright Notice in luajit.h
4
+ */
5
+
6
+ #include <errno.h>
7
+ #include <stdio.h>
8
+
9
+ #define lj_load_c
10
+ #define LUA_CORE
11
+
12
+ #include "lua.h"
13
+ #include "lauxlib.h"
14
+
15
+ #include "lj_obj.h"
16
+ #include "lj_gc.h"
17
+ #include "lj_err.h"
18
+ #include "lj_buf.h"
19
+ #include "lj_func.h"
20
+ #include "lj_frame.h"
21
+ #include "lj_vm.h"
22
+ #include "lj_lex.h"
23
+ #include "lj_bcdump.h"
24
+ #include "lj_parse.h"
25
+
26
+ /* -- Load Lua source code and bytecode ----------------------------------- */
27
+
28
+ static TValue *cpparser(lua_State *L, lua_CFunction dummy, void *ud)
29
+ {
30
+ LexState *ls = (LexState *)ud;
31
+ GCproto *pt;
32
+ GCfunc *fn;
33
+ int bc;
34
+ UNUSED(dummy);
35
+ cframe_errfunc(L->cframe) = -1; /* Inherit error function. */
36
+ bc = lj_lex_setup(L, ls);
37
+ if (ls->mode && !strchr(ls->mode, bc ? 'b' : 't')) {
38
+ setstrV(L, L->top++, lj_err_str(L, LJ_ERR_XMODE));
39
+ lj_err_throw(L, LUA_ERRSYNTAX);
40
+ }
41
+ pt = bc ? lj_bcread(ls) : lj_parse(ls);
42
+ fn = lj_func_newL_empty(L, pt, tabref(L->env));
43
+ /* Don't combine above/below into one statement. */
44
+ setfuncV(L, L->top++, fn);
45
+ return NULL;
46
+ }
47
+
48
+ LUA_API int lua_loadx(lua_State *L, lua_Reader reader, void *data,
49
+ const char *chunkname, const char *mode)
50
+ {
51
+ LexState ls;
52
+ int status;
53
+ ls.rfunc = reader;
54
+ ls.rdata = data;
55
+ ls.chunkarg = chunkname ? chunkname : "?";
56
+ ls.mode = mode;
57
+ lj_buf_init(L, &ls.sb);
58
+ status = lj_vm_cpcall(L, NULL, &ls, cpparser);
59
+ lj_lex_cleanup(L, &ls);
60
+ lj_gc_check(L);
61
+ return status;
62
+ }
63
+
64
+ LUA_API int lua_load(lua_State *L, lua_Reader reader, void *data,
65
+ const char *chunkname)
66
+ {
67
+ return lua_loadx(L, reader, data, chunkname, NULL);
68
+ }
69
+
70
+ typedef struct FileReaderCtx {
71
+ FILE *fp;
72
+ char buf[LUAL_BUFFERSIZE];
73
+ } FileReaderCtx;
74
+
75
+ static const char *reader_file(lua_State *L, void *ud, size_t *size)
76
+ {
77
+ FileReaderCtx *ctx = (FileReaderCtx *)ud;
78
+ UNUSED(L);
79
+ if (feof(ctx->fp)) return NULL;
80
+ *size = fread(ctx->buf, 1, sizeof(ctx->buf), ctx->fp);
81
+ return *size > 0 ? ctx->buf : NULL;
82
+ }
83
+
84
+ LUALIB_API int luaL_loadfilex(lua_State *L, const char *filename,
85
+ const char *mode)
86
+ {
87
+ FileReaderCtx ctx;
88
+ int status;
89
+ const char *chunkname;
90
+ if (filename) {
91
+ ctx.fp = fopen(filename, "rb");
92
+ if (ctx.fp == NULL) {
93
+ lua_pushfstring(L, "cannot open %s: %s", filename, strerror(errno));
94
+ return LUA_ERRFILE;
95
+ }
96
+ chunkname = lua_pushfstring(L, "@%s", filename);
97
+ } else {
98
+ ctx.fp = stdin;
99
+ chunkname = "=stdin";
100
+ }
101
+ status = lua_loadx(L, reader_file, &ctx, chunkname, mode);
102
+ if (ferror(ctx.fp)) {
103
+ L->top -= filename ? 2 : 1;
104
+ lua_pushfstring(L, "cannot read %s: %s", chunkname+1, strerror(errno));
105
+ if (filename)
106
+ fclose(ctx.fp);
107
+ return LUA_ERRFILE;
108
+ }
109
+ if (filename) {
110
+ L->top--;
111
+ copyTV(L, L->top-1, L->top);
112
+ fclose(ctx.fp);
113
+ }
114
+ return status;
115
+ }
116
+
117
+ LUALIB_API int luaL_loadfile(lua_State *L, const char *filename)
118
+ {
119
+ return luaL_loadfilex(L, filename, NULL);
120
+ }
121
+
122
+ typedef struct StringReaderCtx {
123
+ const char *str;
124
+ size_t size;
125
+ } StringReaderCtx;
126
+
127
+ static const char *reader_string(lua_State *L, void *ud, size_t *size)
128
+ {
129
+ StringReaderCtx *ctx = (StringReaderCtx *)ud;
130
+ UNUSED(L);
131
+ if (ctx->size == 0) return NULL;
132
+ *size = ctx->size;
133
+ ctx->size = 0;
134
+ return ctx->str;
135
+ }
136
+
137
+ LUALIB_API int luaL_loadbufferx(lua_State *L, const char *buf, size_t size,
138
+ const char *name, const char *mode)
139
+ {
140
+ StringReaderCtx ctx;
141
+ ctx.str = buf;
142
+ ctx.size = size;
143
+ return lua_loadx(L, reader_string, &ctx, name, mode);
144
+ }
145
+
146
+ LUALIB_API int luaL_loadbuffer(lua_State *L, const char *buf, size_t size,
147
+ const char *name)
148
+ {
149
+ return luaL_loadbufferx(L, buf, size, name, NULL);
150
+ }
151
+
152
+ LUALIB_API int luaL_loadstring(lua_State *L, const char *s)
153
+ {
154
+ return luaL_loadbuffer(L, s, strlen(s), s);
155
+ }
156
+
157
+ /* -- Dump bytecode ------------------------------------------------------- */
158
+
159
+ LUA_API int lua_dump(lua_State *L, lua_Writer writer, void *data)
160
+ {
161
+ cTValue *o = L->top-1;
162
+ api_check(L, L->top > L->base);
163
+ if (tvisfunc(o) && isluafunc(funcV(o)))
164
+ return lj_bcwrite(L, funcproto(funcV(o)), writer, data, 0);
165
+ else
166
+ return 1;
167
+ }
168
+