immunio 0.15.4 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +0 -27
- data/ext/immunio/Rakefile +9 -0
- data/lib/immunio/plugins/active_record.rb +1 -1
- data/lib/immunio/plugins/active_record_relation.rb +1 -1
- data/lib/immunio/plugins/environment_reporter.rb +20 -0
- data/lib/immunio/rufus_lua_ext/ref.rb +1 -3
- data/lib/immunio/version.rb +1 -1
- data/lib/immunio/vm.rb +1 -2
- data/lua-hooks/Makefile +97 -0
- data/lua-hooks/ext/all.c +41 -52
- data/lua-hooks/ext/all.o +0 -0
- data/lua-hooks/ext/libinjection/libinjection_html5.o +0 -0
- data/lua-hooks/ext/libinjection/libinjection_sqli.o +0 -0
- data/lua-hooks/ext/libinjection/libinjection_xss.o +0 -0
- data/lua-hooks/ext/libinjection/lualib.c +2 -2
- data/lua-hooks/ext/lpeg/lpcap.c +2 -2
- data/lua-hooks/ext/lpeg/lpcap.o +0 -0
- data/lua-hooks/ext/lpeg/lpcode.c +2 -2
- data/lua-hooks/ext/lpeg/lpcode.h +1 -1
- data/lua-hooks/ext/lpeg/lpcode.o +0 -0
- data/lua-hooks/ext/lpeg/lpprint.o +0 -0
- data/lua-hooks/ext/lpeg/lptree.c +2 -2
- data/lua-hooks/ext/lpeg/lptypes.h +1 -1
- data/lua-hooks/ext/lpeg/lpvm.c +2 -2
- data/lua-hooks/ext/lpeg/lpvm.o +0 -0
- data/lua-hooks/ext/lua-cmsgpack/lua_cmsgpack.c +16 -3
- data/lua-hooks/ext/lua-snapshot/snapshot.c +14 -7
- data/lua-hooks/ext/luajit/COPYRIGHT +56 -0
- data/lua-hooks/ext/luajit/Makefile +159 -0
- data/lua-hooks/ext/luajit/README +16 -0
- data/lua-hooks/ext/luajit/doc/bluequad-print.css +166 -0
- data/lua-hooks/ext/luajit/doc/bluequad.css +325 -0
- data/lua-hooks/ext/luajit/doc/changes.html +804 -0
- data/lua-hooks/ext/luajit/doc/contact.html +104 -0
- data/lua-hooks/ext/luajit/doc/ext_c_api.html +189 -0
- data/lua-hooks/ext/luajit/doc/ext_ffi.html +332 -0
- data/lua-hooks/ext/luajit/doc/ext_ffi_api.html +570 -0
- data/lua-hooks/ext/luajit/doc/ext_ffi_semantics.html +1261 -0
- data/lua-hooks/ext/luajit/doc/ext_ffi_tutorial.html +603 -0
- data/lua-hooks/ext/luajit/doc/ext_jit.html +201 -0
- data/lua-hooks/ext/luajit/doc/ext_profiler.html +365 -0
- data/lua-hooks/ext/luajit/doc/extensions.html +448 -0
- data/lua-hooks/ext/luajit/doc/faq.html +186 -0
- data/lua-hooks/ext/luajit/doc/img/contact.png +0 -0
- data/lua-hooks/ext/luajit/doc/install.html +659 -0
- data/lua-hooks/ext/luajit/doc/luajit.html +236 -0
- data/lua-hooks/ext/luajit/doc/running.html +309 -0
- data/lua-hooks/ext/luajit/doc/status.html +118 -0
- data/lua-hooks/ext/luajit/dynasm/dasm_arm.h +456 -0
- data/lua-hooks/ext/luajit/dynasm/dasm_arm.lua +1125 -0
- data/lua-hooks/ext/luajit/dynasm/dasm_arm64.h +518 -0
- data/lua-hooks/ext/luajit/dynasm/dasm_arm64.lua +1166 -0
- data/lua-hooks/ext/luajit/dynasm/dasm_mips.h +416 -0
- data/lua-hooks/ext/luajit/dynasm/dasm_mips.lua +953 -0
- data/lua-hooks/ext/luajit/dynasm/dasm_ppc.h +419 -0
- data/lua-hooks/ext/luajit/dynasm/dasm_ppc.lua +1919 -0
- data/lua-hooks/ext/luajit/dynasm/dasm_proto.h +83 -0
- data/lua-hooks/ext/luajit/dynasm/dasm_x64.lua +12 -0
- data/lua-hooks/ext/luajit/dynasm/dasm_x86.h +471 -0
- data/lua-hooks/ext/luajit/dynasm/dasm_x86.lua +1945 -0
- data/lua-hooks/ext/luajit/dynasm/dynasm.lua +1094 -0
- data/lua-hooks/ext/luajit/etc/luajit.1 +88 -0
- data/lua-hooks/ext/luajit/etc/luajit.pc +25 -0
- data/lua-hooks/ext/luajit/src/Makefile +697 -0
- data/lua-hooks/ext/luajit/src/Makefile.dep +244 -0
- data/lua-hooks/ext/luajit/src/host/README +4 -0
- data/lua-hooks/ext/luajit/src/host/buildvm +0 -0
- data/lua-hooks/ext/luajit/src/host/buildvm.c +518 -0
- data/lua-hooks/ext/luajit/src/host/buildvm.h +105 -0
- data/lua-hooks/ext/luajit/src/host/buildvm.o +0 -0
- data/lua-hooks/ext/luajit/src/host/buildvm_arch.h +7449 -0
- data/lua-hooks/ext/luajit/src/host/buildvm_asm.c +345 -0
- data/lua-hooks/ext/luajit/src/host/buildvm_asm.o +0 -0
- data/lua-hooks/ext/luajit/src/host/buildvm_fold.c +229 -0
- data/lua-hooks/ext/luajit/src/host/buildvm_fold.o +0 -0
- data/lua-hooks/ext/luajit/src/host/buildvm_lib.c +457 -0
- data/lua-hooks/ext/luajit/src/host/buildvm_lib.o +0 -0
- data/lua-hooks/ext/luajit/src/host/buildvm_libbc.h +45 -0
- data/lua-hooks/ext/luajit/src/host/buildvm_peobj.c +368 -0
- data/lua-hooks/ext/luajit/src/host/buildvm_peobj.o +0 -0
- data/lua-hooks/ext/luajit/src/host/genlibbc.lua +197 -0
- data/lua-hooks/ext/luajit/src/host/genminilua.lua +428 -0
- data/lua-hooks/ext/luajit/src/host/minilua +0 -0
- data/lua-hooks/ext/luajit/src/host/minilua.c +7770 -0
- data/lua-hooks/ext/luajit/src/host/minilua.o +0 -0
- data/lua-hooks/ext/luajit/src/jit/bc.lua +190 -0
- data/lua-hooks/ext/luajit/src/jit/bcsave.lua +661 -0
- data/lua-hooks/ext/luajit/src/jit/dis_arm.lua +689 -0
- data/lua-hooks/ext/luajit/src/jit/dis_mips.lua +428 -0
- data/lua-hooks/ext/luajit/src/jit/dis_mipsel.lua +17 -0
- data/lua-hooks/ext/luajit/src/jit/dis_ppc.lua +591 -0
- data/lua-hooks/ext/luajit/src/jit/dis_x64.lua +17 -0
- data/lua-hooks/ext/luajit/src/jit/dis_x86.lua +838 -0
- data/lua-hooks/ext/luajit/src/jit/dump.lua +706 -0
- data/lua-hooks/ext/luajit/src/jit/p.lua +310 -0
- data/lua-hooks/ext/luajit/src/jit/v.lua +170 -0
- data/lua-hooks/ext/luajit/src/jit/vmdef.lua +362 -0
- data/lua-hooks/ext/luajit/src/jit/zone.lua +45 -0
- data/lua-hooks/ext/{lua → luajit/src}/lauxlib.h +10 -17
- data/lua-hooks/ext/luajit/src/lib_aux.c +356 -0
- data/lua-hooks/ext/luajit/src/lib_aux.o +0 -0
- data/lua-hooks/ext/luajit/src/lib_aux_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lib_base.c +664 -0
- data/lua-hooks/ext/luajit/src/lib_base.o +0 -0
- data/lua-hooks/ext/luajit/src/lib_base_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lib_bit.c +180 -0
- data/lua-hooks/ext/luajit/src/lib_bit.o +0 -0
- data/lua-hooks/ext/luajit/src/lib_bit_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lib_debug.c +405 -0
- data/lua-hooks/ext/luajit/src/lib_debug.o +0 -0
- data/lua-hooks/ext/luajit/src/lib_debug_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lib_ffi.c +872 -0
- data/lua-hooks/ext/luajit/src/lib_ffi.o +0 -0
- data/lua-hooks/ext/luajit/src/lib_ffi_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lib_init.c +55 -0
- data/lua-hooks/ext/luajit/src/lib_init.o +0 -0
- data/lua-hooks/ext/luajit/src/lib_init_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lib_io.c +541 -0
- data/lua-hooks/ext/luajit/src/lib_io.o +0 -0
- data/lua-hooks/ext/luajit/src/lib_io_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lib_jit.c +767 -0
- data/lua-hooks/ext/luajit/src/lib_jit.o +0 -0
- data/lua-hooks/ext/luajit/src/lib_jit_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lib_math.c +230 -0
- data/lua-hooks/ext/luajit/src/lib_math.o +0 -0
- data/lua-hooks/ext/luajit/src/lib_math_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lib_os.c +292 -0
- data/lua-hooks/ext/luajit/src/lib_os.o +0 -0
- data/lua-hooks/ext/luajit/src/lib_os_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lib_package.c +610 -0
- data/lua-hooks/ext/luajit/src/lib_package.o +0 -0
- data/lua-hooks/ext/luajit/src/lib_package_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lib_string.c +752 -0
- data/lua-hooks/ext/luajit/src/lib_string.o +0 -0
- data/lua-hooks/ext/luajit/src/lib_string_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lib_table.c +307 -0
- data/lua-hooks/ext/luajit/src/lib_table.o +0 -0
- data/lua-hooks/ext/luajit/src/lib_table_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/libluajit.a +0 -0
- data/lua-hooks/ext/luajit/src/libluajit.so +0 -0
- data/lua-hooks/ext/luajit/src/lj.supp +26 -0
- data/lua-hooks/ext/luajit/src/lj_alloc.c +1398 -0
- data/lua-hooks/ext/luajit/src/lj_alloc.h +17 -0
- data/lua-hooks/ext/luajit/src/lj_alloc.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_alloc_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_api.c +1210 -0
- data/lua-hooks/ext/luajit/src/lj_api.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_api_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_arch.h +509 -0
- data/lua-hooks/ext/luajit/src/lj_asm.c +2278 -0
- data/lua-hooks/ext/luajit/src/lj_asm.h +17 -0
- data/lua-hooks/ext/luajit/src/lj_asm.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_asm_arm.h +2217 -0
- data/lua-hooks/ext/luajit/src/lj_asm_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_asm_mips.h +1833 -0
- data/lua-hooks/ext/luajit/src/lj_asm_ppc.h +2015 -0
- data/lua-hooks/ext/luajit/src/lj_asm_x86.h +2634 -0
- data/lua-hooks/ext/luajit/src/lj_bc.c +14 -0
- data/lua-hooks/ext/luajit/src/lj_bc.h +265 -0
- data/lua-hooks/ext/luajit/src/lj_bc.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_bc_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_bcdef.h +220 -0
- data/lua-hooks/ext/luajit/src/lj_bcdump.h +68 -0
- data/lua-hooks/ext/luajit/src/lj_bcread.c +457 -0
- data/lua-hooks/ext/luajit/src/lj_bcread.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_bcread_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_bcwrite.c +361 -0
- data/lua-hooks/ext/luajit/src/lj_bcwrite.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_bcwrite_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_buf.c +234 -0
- data/lua-hooks/ext/luajit/src/lj_buf.h +105 -0
- data/lua-hooks/ext/luajit/src/lj_buf.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_buf_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_carith.c +429 -0
- data/lua-hooks/ext/luajit/src/lj_carith.h +37 -0
- data/lua-hooks/ext/luajit/src/lj_carith.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_carith_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_ccall.c +984 -0
- data/lua-hooks/ext/luajit/src/lj_ccall.h +178 -0
- data/lua-hooks/ext/luajit/src/lj_ccall.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_ccall_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_ccallback.c +712 -0
- data/lua-hooks/ext/luajit/src/lj_ccallback.h +25 -0
- data/lua-hooks/ext/luajit/src/lj_ccallback.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_ccallback_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_cconv.c +752 -0
- data/lua-hooks/ext/luajit/src/lj_cconv.h +70 -0
- data/lua-hooks/ext/luajit/src/lj_cconv.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_cconv_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_cdata.c +288 -0
- data/lua-hooks/ext/luajit/src/lj_cdata.h +76 -0
- data/lua-hooks/ext/luajit/src/lj_cdata.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_cdata_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_char.c +43 -0
- data/lua-hooks/ext/luajit/src/lj_char.h +42 -0
- data/lua-hooks/ext/luajit/src/lj_char.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_char_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_clib.c +418 -0
- data/lua-hooks/ext/luajit/src/lj_clib.h +29 -0
- data/lua-hooks/ext/luajit/src/lj_clib.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_clib_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_cparse.c +1862 -0
- data/lua-hooks/ext/luajit/src/lj_cparse.h +65 -0
- data/lua-hooks/ext/luajit/src/lj_cparse.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_cparse_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_crecord.c +1834 -0
- data/lua-hooks/ext/luajit/src/lj_crecord.h +38 -0
- data/lua-hooks/ext/luajit/src/lj_crecord.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_crecord_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_ctype.c +635 -0
- data/lua-hooks/ext/luajit/src/lj_ctype.h +461 -0
- data/lua-hooks/ext/luajit/src/lj_ctype.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_ctype_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_debug.c +699 -0
- data/lua-hooks/ext/luajit/src/lj_debug.h +65 -0
- data/lua-hooks/ext/luajit/src/lj_debug.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_debug_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_def.h +365 -0
- data/lua-hooks/ext/luajit/src/lj_dispatch.c +557 -0
- data/lua-hooks/ext/luajit/src/lj_dispatch.h +138 -0
- data/lua-hooks/ext/luajit/src/lj_dispatch.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_dispatch_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_emit_arm.h +356 -0
- data/lua-hooks/ext/luajit/src/lj_emit_mips.h +211 -0
- data/lua-hooks/ext/luajit/src/lj_emit_ppc.h +238 -0
- data/lua-hooks/ext/luajit/src/lj_emit_x86.h +462 -0
- data/lua-hooks/ext/luajit/src/lj_err.c +794 -0
- data/lua-hooks/ext/luajit/src/lj_err.h +41 -0
- data/lua-hooks/ext/luajit/src/lj_err.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_err_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_errmsg.h +190 -0
- data/lua-hooks/ext/luajit/src/lj_ff.h +18 -0
- data/lua-hooks/ext/luajit/src/lj_ffdef.h +209 -0
- data/lua-hooks/ext/luajit/src/lj_ffrecord.c +1247 -0
- data/lua-hooks/ext/luajit/src/lj_ffrecord.h +24 -0
- data/lua-hooks/ext/luajit/src/lj_ffrecord.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_ffrecord_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_folddef.h +1138 -0
- data/lua-hooks/ext/luajit/src/lj_frame.h +259 -0
- data/lua-hooks/ext/luajit/src/lj_func.c +185 -0
- data/lua-hooks/ext/luajit/src/lj_func.h +24 -0
- data/lua-hooks/ext/luajit/src/lj_func.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_func_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_gc.c +845 -0
- data/lua-hooks/ext/luajit/src/lj_gc.h +134 -0
- data/lua-hooks/ext/luajit/src/lj_gc.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_gc_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_gdbjit.c +787 -0
- data/lua-hooks/ext/luajit/src/lj_gdbjit.h +22 -0
- data/lua-hooks/ext/luajit/src/lj_gdbjit.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_gdbjit_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_ir.c +505 -0
- data/lua-hooks/ext/luajit/src/lj_ir.h +577 -0
- data/lua-hooks/ext/luajit/src/lj_ir.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_ir_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_ircall.h +321 -0
- data/lua-hooks/ext/luajit/src/lj_iropt.h +161 -0
- data/lua-hooks/ext/luajit/src/lj_jit.h +440 -0
- data/lua-hooks/ext/luajit/src/lj_lex.c +482 -0
- data/lua-hooks/ext/luajit/src/lj_lex.h +86 -0
- data/lua-hooks/ext/luajit/src/lj_lex.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_lex_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_lib.c +303 -0
- data/lua-hooks/ext/luajit/src/lj_lib.h +115 -0
- data/lua-hooks/ext/luajit/src/lj_lib.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_lib_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_libdef.h +414 -0
- data/lua-hooks/ext/luajit/src/lj_load.c +168 -0
- data/lua-hooks/ext/luajit/src/lj_load.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_load_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_mcode.c +386 -0
- data/lua-hooks/ext/luajit/src/lj_mcode.h +30 -0
- data/lua-hooks/ext/luajit/src/lj_mcode.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_mcode_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_meta.c +477 -0
- data/lua-hooks/ext/luajit/src/lj_meta.h +38 -0
- data/lua-hooks/ext/luajit/src/lj_meta.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_meta_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_obj.c +50 -0
- data/lua-hooks/ext/luajit/src/lj_obj.h +976 -0
- data/lua-hooks/ext/luajit/src/lj_obj.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_obj_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_opt_dce.c +78 -0
- data/lua-hooks/ext/luajit/src/lj_opt_dce.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_opt_dce_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_opt_fold.c +2488 -0
- data/lua-hooks/ext/luajit/src/lj_opt_fold.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_opt_fold_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_opt_loop.c +449 -0
- data/lua-hooks/ext/luajit/src/lj_opt_loop.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_opt_loop_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_opt_mem.c +935 -0
- data/lua-hooks/ext/luajit/src/lj_opt_mem.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_opt_mem_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_opt_narrow.c +652 -0
- data/lua-hooks/ext/luajit/src/lj_opt_narrow.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_opt_narrow_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_opt_sink.c +245 -0
- data/lua-hooks/ext/luajit/src/lj_opt_sink.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_opt_sink_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_opt_split.c +856 -0
- data/lua-hooks/ext/luajit/src/lj_opt_split.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_opt_split_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_parse.c +2725 -0
- data/lua-hooks/ext/luajit/src/lj_parse.h +18 -0
- data/lua-hooks/ext/luajit/src/lj_parse.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_parse_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_profile.c +368 -0
- data/lua-hooks/ext/luajit/src/lj_profile.h +21 -0
- data/lua-hooks/ext/luajit/src/lj_profile.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_profile_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_recdef.h +270 -0
- data/lua-hooks/ext/luajit/src/lj_record.c +2554 -0
- data/lua-hooks/ext/luajit/src/lj_record.h +45 -0
- data/lua-hooks/ext/luajit/src/lj_record.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_record_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_snap.c +870 -0
- data/lua-hooks/ext/luajit/src/lj_snap.h +34 -0
- data/lua-hooks/ext/luajit/src/lj_snap.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_snap_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_state.c +300 -0
- data/lua-hooks/ext/luajit/src/lj_state.h +35 -0
- data/lua-hooks/ext/luajit/src/lj_state.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_state_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_str.c +197 -0
- data/lua-hooks/ext/luajit/src/lj_str.h +27 -0
- data/lua-hooks/ext/luajit/src/lj_str.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_str_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_strfmt.c +554 -0
- data/lua-hooks/ext/luajit/src/lj_strfmt.h +125 -0
- data/lua-hooks/ext/luajit/src/lj_strfmt.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_strfmt_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_strscan.c +547 -0
- data/lua-hooks/ext/luajit/src/lj_strscan.h +39 -0
- data/lua-hooks/ext/luajit/src/lj_strscan.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_strscan_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_tab.c +666 -0
- data/lua-hooks/ext/luajit/src/lj_tab.h +73 -0
- data/lua-hooks/ext/luajit/src/lj_tab.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_tab_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_target.h +164 -0
- data/lua-hooks/ext/luajit/src/lj_target_arm.h +270 -0
- data/lua-hooks/ext/luajit/src/lj_target_arm64.h +97 -0
- data/lua-hooks/ext/luajit/src/lj_target_mips.h +260 -0
- data/lua-hooks/ext/luajit/src/lj_target_ppc.h +280 -0
- data/lua-hooks/ext/luajit/src/lj_target_x86.h +345 -0
- data/lua-hooks/ext/luajit/src/lj_trace.c +859 -0
- data/lua-hooks/ext/luajit/src/lj_trace.h +54 -0
- data/lua-hooks/ext/luajit/src/lj_trace.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_trace_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_traceerr.h +63 -0
- data/lua-hooks/ext/luajit/src/lj_udata.c +34 -0
- data/lua-hooks/ext/luajit/src/lj_udata.h +14 -0
- data/lua-hooks/ext/luajit/src/lj_udata.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_udata_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_vm.S +2730 -0
- data/lua-hooks/ext/luajit/src/lj_vm.h +114 -0
- data/lua-hooks/ext/luajit/src/lj_vm.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_vm_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_vmevent.c +58 -0
- data/lua-hooks/ext/luajit/src/lj_vmevent.h +59 -0
- data/lua-hooks/ext/luajit/src/lj_vmevent.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_vmevent_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_vmmath.c +152 -0
- data/lua-hooks/ext/luajit/src/lj_vmmath.o +0 -0
- data/lua-hooks/ext/luajit/src/lj_vmmath_dyn.o +0 -0
- data/lua-hooks/ext/luajit/src/ljamalg.c +96 -0
- data/lua-hooks/ext/{lua → luajit/src}/lua.h +12 -7
- data/lua-hooks/ext/luajit/src/lua.hpp +9 -0
- data/lua-hooks/ext/luajit/src/luaconf.h +156 -0
- data/lua-hooks/ext/luajit/src/luajit +0 -0
- data/lua-hooks/ext/luajit/src/luajit.c +570 -0
- data/lua-hooks/ext/luajit/src/luajit.h +79 -0
- data/lua-hooks/ext/luajit/src/luajit.o +0 -0
- data/lua-hooks/ext/luajit/src/lualib.h +43 -0
- data/lua-hooks/ext/luajit/src/msvcbuild.bat +114 -0
- data/lua-hooks/ext/luajit/src/ps4build.bat +103 -0
- data/lua-hooks/ext/luajit/src/psvitabuild.bat +93 -0
- data/lua-hooks/ext/luajit/src/vm_arm.dasc +4585 -0
- data/lua-hooks/ext/luajit/src/vm_arm64.dasc +3764 -0
- data/lua-hooks/ext/luajit/src/vm_mips.dasc +4355 -0
- data/lua-hooks/ext/luajit/src/vm_ppc.dasc +5252 -0
- data/lua-hooks/ext/luajit/src/vm_x64.dasc +4902 -0
- data/lua-hooks/ext/luajit/src/vm_x86.dasc +5710 -0
- data/lua-hooks/ext/luajit/src/xb1build.bat +101 -0
- data/lua-hooks/ext/luajit/src/xedkbuild.bat +92 -0
- data/lua-hooks/ext/luautf8/lutf8lib.c +3 -3
- data/lua-hooks/lib/boot.lua +37 -2
- metadata +372 -69
- data/lua-hooks/ext/bitop/README +0 -22
- data/lua-hooks/ext/bitop/bit.c +0 -189
- data/lua-hooks/ext/extconf.rb +0 -38
- data/lua-hooks/ext/lua/COPYRIGHT +0 -34
- data/lua-hooks/ext/lua/lapi.c +0 -1087
- data/lua-hooks/ext/lua/lapi.h +0 -16
- data/lua-hooks/ext/lua/lauxlib.c +0 -652
- data/lua-hooks/ext/lua/lbaselib.c +0 -659
- data/lua-hooks/ext/lua/lcode.c +0 -831
- data/lua-hooks/ext/lua/lcode.h +0 -76
- data/lua-hooks/ext/lua/ldblib.c +0 -398
- data/lua-hooks/ext/lua/ldebug.c +0 -638
- data/lua-hooks/ext/lua/ldebug.h +0 -33
- data/lua-hooks/ext/lua/ldo.c +0 -519
- data/lua-hooks/ext/lua/ldo.h +0 -57
- data/lua-hooks/ext/lua/ldump.c +0 -164
- data/lua-hooks/ext/lua/lfunc.c +0 -174
- data/lua-hooks/ext/lua/lfunc.h +0 -34
- data/lua-hooks/ext/lua/lgc.c +0 -710
- data/lua-hooks/ext/lua/lgc.h +0 -110
- data/lua-hooks/ext/lua/linit.c +0 -38
- data/lua-hooks/ext/lua/liolib.c +0 -556
- data/lua-hooks/ext/lua/llex.c +0 -463
- data/lua-hooks/ext/lua/llex.h +0 -81
- data/lua-hooks/ext/lua/llimits.h +0 -128
- data/lua-hooks/ext/lua/lmathlib.c +0 -263
- data/lua-hooks/ext/lua/lmem.c +0 -86
- data/lua-hooks/ext/lua/lmem.h +0 -49
- data/lua-hooks/ext/lua/loadlib.c +0 -705
- data/lua-hooks/ext/lua/loadlib_rel.c +0 -760
- data/lua-hooks/ext/lua/lobject.c +0 -214
- data/lua-hooks/ext/lua/lobject.h +0 -381
- data/lua-hooks/ext/lua/lopcodes.c +0 -102
- data/lua-hooks/ext/lua/lopcodes.h +0 -268
- data/lua-hooks/ext/lua/loslib.c +0 -243
- data/lua-hooks/ext/lua/lparser.c +0 -1339
- data/lua-hooks/ext/lua/lparser.h +0 -82
- data/lua-hooks/ext/lua/lstate.c +0 -214
- data/lua-hooks/ext/lua/lstate.h +0 -169
- data/lua-hooks/ext/lua/lstring.c +0 -111
- data/lua-hooks/ext/lua/lstring.h +0 -31
- data/lua-hooks/ext/lua/lstrlib.c +0 -871
- data/lua-hooks/ext/lua/ltable.c +0 -588
- data/lua-hooks/ext/lua/ltable.h +0 -40
- data/lua-hooks/ext/lua/ltablib.c +0 -287
- data/lua-hooks/ext/lua/ltm.c +0 -75
- data/lua-hooks/ext/lua/ltm.h +0 -54
- data/lua-hooks/ext/lua/lua.c +0 -392
- data/lua-hooks/ext/lua/lua.def +0 -131
- data/lua-hooks/ext/lua/lua.rc +0 -28
- data/lua-hooks/ext/lua/lua_dll.rc +0 -26
- data/lua-hooks/ext/lua/luac.c +0 -200
- data/lua-hooks/ext/lua/luac.rc +0 -1
- data/lua-hooks/ext/lua/luaconf.h +0 -763
- data/lua-hooks/ext/lua/luaconf.h.in +0 -724
- data/lua-hooks/ext/lua/luaconf.h.orig +0 -763
- data/lua-hooks/ext/lua/lualib.h +0 -53
- data/lua-hooks/ext/lua/lundump.c +0 -227
- data/lua-hooks/ext/lua/lundump.h +0 -36
- data/lua-hooks/ext/lua/lvm.c +0 -767
- data/lua-hooks/ext/lua/lvm.h +0 -36
- data/lua-hooks/ext/lua/lzio.c +0 -82
- data/lua-hooks/ext/lua/lzio.h +0 -67
- data/lua-hooks/ext/lua/print.c +0 -227
Binary file
|
Binary file
|
@@ -0,0 +1,509 @@
|
|
1
|
+
/*
|
2
|
+
** Target architecture selection.
|
3
|
+
** Copyright (C) 2005-2015 Mike Pall. See Copyright Notice in luajit.h
|
4
|
+
*/
|
5
|
+
|
6
|
+
#ifndef _LJ_ARCH_H
|
7
|
+
#define _LJ_ARCH_H
|
8
|
+
|
9
|
+
#include "lua.h"
|
10
|
+
|
11
|
+
/* Target endianess. */
|
12
|
+
#define LUAJIT_LE 0
|
13
|
+
#define LUAJIT_BE 1
|
14
|
+
|
15
|
+
/* Target architectures. */
|
16
|
+
#define LUAJIT_ARCH_X86 1
|
17
|
+
#define LUAJIT_ARCH_x86 1
|
18
|
+
#define LUAJIT_ARCH_X64 2
|
19
|
+
#define LUAJIT_ARCH_x64 2
|
20
|
+
#define LUAJIT_ARCH_ARM 3
|
21
|
+
#define LUAJIT_ARCH_arm 3
|
22
|
+
#define LUAJIT_ARCH_ARM64 4
|
23
|
+
#define LUAJIT_ARCH_arm64 4
|
24
|
+
#define LUAJIT_ARCH_PPC 5
|
25
|
+
#define LUAJIT_ARCH_ppc 5
|
26
|
+
#define LUAJIT_ARCH_MIPS 6
|
27
|
+
#define LUAJIT_ARCH_mips 6
|
28
|
+
|
29
|
+
/* Target OS. */
|
30
|
+
#define LUAJIT_OS_OTHER 0
|
31
|
+
#define LUAJIT_OS_WINDOWS 1
|
32
|
+
#define LUAJIT_OS_LINUX 2
|
33
|
+
#define LUAJIT_OS_OSX 3
|
34
|
+
#define LUAJIT_OS_BSD 4
|
35
|
+
#define LUAJIT_OS_POSIX 5
|
36
|
+
|
37
|
+
/* Select native target if no target defined. */
|
38
|
+
#ifndef LUAJIT_TARGET
|
39
|
+
|
40
|
+
#if defined(__i386) || defined(__i386__) || defined(_M_IX86)
|
41
|
+
#define LUAJIT_TARGET LUAJIT_ARCH_X86
|
42
|
+
#elif defined(__x86_64__) || defined(__x86_64) || defined(_M_X64) || defined(_M_AMD64)
|
43
|
+
#define LUAJIT_TARGET LUAJIT_ARCH_X64
|
44
|
+
#elif defined(__arm__) || defined(__arm) || defined(__ARM__) || defined(__ARM)
|
45
|
+
#define LUAJIT_TARGET LUAJIT_ARCH_ARM
|
46
|
+
#elif defined(__aarch64__)
|
47
|
+
#define LUAJIT_TARGET LUAJIT_ARCH_ARM64
|
48
|
+
#elif defined(__ppc__) || defined(__ppc) || defined(__PPC__) || defined(__PPC) || defined(__powerpc__) || defined(__powerpc) || defined(__POWERPC__) || defined(__POWERPC) || defined(_M_PPC)
|
49
|
+
#define LUAJIT_TARGET LUAJIT_ARCH_PPC
|
50
|
+
#elif defined(__mips__) || defined(__mips) || defined(__MIPS__) || defined(__MIPS)
|
51
|
+
#define LUAJIT_TARGET LUAJIT_ARCH_MIPS
|
52
|
+
#else
|
53
|
+
#error "No support for this architecture (yet)"
|
54
|
+
#endif
|
55
|
+
|
56
|
+
#endif
|
57
|
+
|
58
|
+
/* Select native OS if no target OS defined. */
|
59
|
+
#ifndef LUAJIT_OS
|
60
|
+
|
61
|
+
#if defined(_WIN32) && !defined(_XBOX_VER)
|
62
|
+
#define LUAJIT_OS LUAJIT_OS_WINDOWS
|
63
|
+
#elif defined(__linux__)
|
64
|
+
#define LUAJIT_OS LUAJIT_OS_LINUX
|
65
|
+
#elif defined(__MACH__) && defined(__APPLE__)
|
66
|
+
#define LUAJIT_OS LUAJIT_OS_OSX
|
67
|
+
#elif (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \
|
68
|
+
defined(__NetBSD__) || defined(__OpenBSD__) || \
|
69
|
+
defined(__DragonFly__)) && !defined(__ORBIS__)
|
70
|
+
#define LUAJIT_OS LUAJIT_OS_BSD
|
71
|
+
#elif (defined(__sun__) && defined(__svr4__)) || defined(__CYGWIN__)
|
72
|
+
#define LUAJIT_OS LUAJIT_OS_POSIX
|
73
|
+
#else
|
74
|
+
#define LUAJIT_OS LUAJIT_OS_OTHER
|
75
|
+
#endif
|
76
|
+
|
77
|
+
#endif
|
78
|
+
|
79
|
+
/* Set target OS properties. */
|
80
|
+
#if LUAJIT_OS == LUAJIT_OS_WINDOWS
|
81
|
+
#define LJ_OS_NAME "Windows"
|
82
|
+
#elif LUAJIT_OS == LUAJIT_OS_LINUX
|
83
|
+
#define LJ_OS_NAME "Linux"
|
84
|
+
#elif LUAJIT_OS == LUAJIT_OS_OSX
|
85
|
+
#define LJ_OS_NAME "OSX"
|
86
|
+
#elif LUAJIT_OS == LUAJIT_OS_BSD
|
87
|
+
#define LJ_OS_NAME "BSD"
|
88
|
+
#elif LUAJIT_OS == LUAJIT_OS_POSIX
|
89
|
+
#define LJ_OS_NAME "POSIX"
|
90
|
+
#else
|
91
|
+
#define LJ_OS_NAME "Other"
|
92
|
+
#endif
|
93
|
+
|
94
|
+
#define LJ_TARGET_WINDOWS (LUAJIT_OS == LUAJIT_OS_WINDOWS)
|
95
|
+
#define LJ_TARGET_LINUX (LUAJIT_OS == LUAJIT_OS_LINUX)
|
96
|
+
#define LJ_TARGET_OSX (LUAJIT_OS == LUAJIT_OS_OSX)
|
97
|
+
#define LJ_TARGET_IOS (LJ_TARGET_OSX && (LUAJIT_TARGET == LUAJIT_ARCH_ARM || LUAJIT_TARGET == LUAJIT_ARCH_ARM64))
|
98
|
+
#define LJ_TARGET_POSIX (LUAJIT_OS > LUAJIT_OS_WINDOWS)
|
99
|
+
#define LJ_TARGET_DLOPEN LJ_TARGET_POSIX
|
100
|
+
|
101
|
+
#ifdef __CELLOS_LV2__
|
102
|
+
#define LJ_TARGET_PS3 1
|
103
|
+
#define LJ_TARGET_CONSOLE 1
|
104
|
+
#endif
|
105
|
+
|
106
|
+
#ifdef __ORBIS__
|
107
|
+
#define LJ_TARGET_PS4 1
|
108
|
+
#define LJ_TARGET_CONSOLE 1
|
109
|
+
#undef NULL
|
110
|
+
#define NULL ((void*)0)
|
111
|
+
#endif
|
112
|
+
|
113
|
+
#ifdef __psp2__
|
114
|
+
#define LJ_TARGET_PSVITA 1
|
115
|
+
#define LJ_TARGET_CONSOLE 1
|
116
|
+
#endif
|
117
|
+
|
118
|
+
#if _XBOX_VER >= 200
|
119
|
+
#define LJ_TARGET_XBOX360 1
|
120
|
+
#define LJ_TARGET_CONSOLE 1
|
121
|
+
#endif
|
122
|
+
|
123
|
+
#ifdef _DURANGO
|
124
|
+
#define LJ_TARGET_XBOXONE 1
|
125
|
+
#define LJ_TARGET_CONSOLE 1
|
126
|
+
#define LJ_TARGET_GC64 1
|
127
|
+
#endif
|
128
|
+
|
129
|
+
#define LJ_NUMMODE_SINGLE 0 /* Single-number mode only. */
|
130
|
+
#define LJ_NUMMODE_SINGLE_DUAL 1 /* Default to single-number mode. */
|
131
|
+
#define LJ_NUMMODE_DUAL 2 /* Dual-number mode only. */
|
132
|
+
#define LJ_NUMMODE_DUAL_SINGLE 3 /* Default to dual-number mode. */
|
133
|
+
|
134
|
+
/* Set target architecture properties. */
|
135
|
+
#if LUAJIT_TARGET == LUAJIT_ARCH_X86
|
136
|
+
|
137
|
+
#define LJ_ARCH_NAME "x86"
|
138
|
+
#define LJ_ARCH_BITS 32
|
139
|
+
#define LJ_ARCH_ENDIAN LUAJIT_LE
|
140
|
+
#if LJ_TARGET_WINDOWS || __CYGWIN__
|
141
|
+
#define LJ_ABI_WIN 1
|
142
|
+
#else
|
143
|
+
#define LJ_ABI_WIN 0
|
144
|
+
#endif
|
145
|
+
#define LJ_TARGET_X86 1
|
146
|
+
#define LJ_TARGET_X86ORX64 1
|
147
|
+
#define LJ_TARGET_EHRETREG 0
|
148
|
+
#define LJ_TARGET_MASKSHIFT 1
|
149
|
+
#define LJ_TARGET_MASKROT 1
|
150
|
+
#define LJ_TARGET_UNALIGNED 1
|
151
|
+
#define LJ_ARCH_NUMMODE LJ_NUMMODE_SINGLE_DUAL
|
152
|
+
|
153
|
+
#elif LUAJIT_TARGET == LUAJIT_ARCH_X64
|
154
|
+
|
155
|
+
#define LJ_ARCH_NAME "x64"
|
156
|
+
#define LJ_ARCH_BITS 64
|
157
|
+
#define LJ_ARCH_ENDIAN LUAJIT_LE
|
158
|
+
#define LJ_ABI_WIN LJ_TARGET_WINDOWS
|
159
|
+
#define LJ_TARGET_X64 1
|
160
|
+
#define LJ_TARGET_X86ORX64 1
|
161
|
+
#define LJ_TARGET_EHRETREG 0
|
162
|
+
#define LJ_TARGET_JUMPRANGE 31 /* +-2^31 = +-2GB */
|
163
|
+
#define LJ_TARGET_MASKSHIFT 1
|
164
|
+
#define LJ_TARGET_MASKROT 1
|
165
|
+
#define LJ_TARGET_UNALIGNED 1
|
166
|
+
#define LJ_ARCH_NUMMODE LJ_NUMMODE_SINGLE_DUAL
|
167
|
+
#ifdef LUAJIT_ENABLE_GC64
|
168
|
+
#define LJ_TARGET_GC64 1
|
169
|
+
#endif
|
170
|
+
|
171
|
+
#elif LUAJIT_TARGET == LUAJIT_ARCH_ARM
|
172
|
+
|
173
|
+
#define LJ_ARCH_NAME "arm"
|
174
|
+
#define LJ_ARCH_BITS 32
|
175
|
+
#define LJ_ARCH_ENDIAN LUAJIT_LE
|
176
|
+
#if !defined(LJ_ARCH_HASFPU) && __SOFTFP__
|
177
|
+
#define LJ_ARCH_HASFPU 0
|
178
|
+
#endif
|
179
|
+
#if !defined(LJ_ABI_SOFTFP) && !__ARM_PCS_VFP
|
180
|
+
#define LJ_ABI_SOFTFP 1
|
181
|
+
#endif
|
182
|
+
#define LJ_ABI_EABI 1
|
183
|
+
#define LJ_TARGET_ARM 1
|
184
|
+
#define LJ_TARGET_EHRETREG 0
|
185
|
+
#define LJ_TARGET_JUMPRANGE 25 /* +-2^25 = +-32MB */
|
186
|
+
#define LJ_TARGET_MASKSHIFT 0
|
187
|
+
#define LJ_TARGET_MASKROT 1
|
188
|
+
#define LJ_TARGET_UNIFYROT 2 /* Want only IR_BROR. */
|
189
|
+
#define LJ_ARCH_NUMMODE LJ_NUMMODE_DUAL
|
190
|
+
|
191
|
+
#if __ARM_ARCH____ARM_ARCH_8__ || __ARM_ARCH_8A__
|
192
|
+
#define LJ_ARCH_VERSION 80
|
193
|
+
#elif __ARM_ARCH_7__ || __ARM_ARCH_7A__ || __ARM_ARCH_7R__ || __ARM_ARCH_7S__ || __ARM_ARCH_7VE__
|
194
|
+
#define LJ_ARCH_VERSION 70
|
195
|
+
#elif __ARM_ARCH_6T2__
|
196
|
+
#define LJ_ARCH_VERSION 61
|
197
|
+
#elif __ARM_ARCH_6__ || __ARM_ARCH_6J__ || __ARM_ARCH_6K__ || __ARM_ARCH_6Z__ || __ARM_ARCH_6ZK__
|
198
|
+
#define LJ_ARCH_VERSION 60
|
199
|
+
#else
|
200
|
+
#define LJ_ARCH_VERSION 50
|
201
|
+
#endif
|
202
|
+
|
203
|
+
#elif LUAJIT_TARGET == LUAJIT_ARCH_ARM64
|
204
|
+
|
205
|
+
#define LJ_ARCH_NAME "arm64"
|
206
|
+
#define LJ_ARCH_BITS 64
|
207
|
+
#define LJ_ARCH_ENDIAN LUAJIT_LE
|
208
|
+
#define LJ_TARGET_ARM64 1
|
209
|
+
#define LJ_TARGET_EHRETREG 0
|
210
|
+
#define LJ_TARGET_JUMPRANGE 27 /* +-2^27 = +-128MB */
|
211
|
+
#define LJ_TARGET_MASKSHIFT 1
|
212
|
+
#define LJ_TARGET_MASKROT 1
|
213
|
+
#define LJ_TARGET_UNIFYROT 2 /* Want only IR_BROR. */
|
214
|
+
#define LJ_TARGET_GC64 1
|
215
|
+
#define LJ_ARCH_NUMMODE LJ_NUMMODE_DUAL
|
216
|
+
#define LJ_ARCH_NOJIT 1 /* NYI */
|
217
|
+
|
218
|
+
#define LJ_ARCH_VERSION 80
|
219
|
+
|
220
|
+
#elif LUAJIT_TARGET == LUAJIT_ARCH_PPC
|
221
|
+
|
222
|
+
#ifndef LJ_ARCH_ENDIAN
|
223
|
+
#if __BYTE_ORDER__ != __ORDER_BIG_ENDIAN__
|
224
|
+
#define LJ_ARCH_ENDIAN LUAJIT_LE
|
225
|
+
#else
|
226
|
+
#define LJ_ARCH_ENDIAN LUAJIT_BE
|
227
|
+
#endif
|
228
|
+
#endif
|
229
|
+
|
230
|
+
#if _LP64
|
231
|
+
#define LJ_ARCH_BITS 64
|
232
|
+
#if LJ_ARCH_ENDIAN == LUAJIT_LE
|
233
|
+
#define LJ_ARCH_NAME "ppc64le"
|
234
|
+
#else
|
235
|
+
#define LJ_ARCH_NAME "ppc64"
|
236
|
+
#endif
|
237
|
+
#else
|
238
|
+
#define LJ_ARCH_BITS 32
|
239
|
+
#define LJ_ARCH_NAME "ppc"
|
240
|
+
#endif
|
241
|
+
|
242
|
+
#define LJ_TARGET_PPC 1
|
243
|
+
#define LJ_TARGET_EHRETREG 3
|
244
|
+
#define LJ_TARGET_JUMPRANGE 25 /* +-2^25 = +-32MB */
|
245
|
+
#define LJ_TARGET_MASKSHIFT 0
|
246
|
+
#define LJ_TARGET_MASKROT 1
|
247
|
+
#define LJ_TARGET_UNIFYROT 1 /* Want only IR_BROL. */
|
248
|
+
#define LJ_ARCH_NUMMODE LJ_NUMMODE_DUAL_SINGLE
|
249
|
+
|
250
|
+
#if LJ_TARGET_CONSOLE
|
251
|
+
#define LJ_ARCH_PPC32ON64 1
|
252
|
+
#define LJ_ARCH_NOFFI 1
|
253
|
+
#elif LJ_ARCH_BITS == 64
|
254
|
+
#define LJ_ARCH_PPC64 1
|
255
|
+
#define LJ_TARGET_GC64 1
|
256
|
+
#define LJ_ARCH_NOJIT 1 /* NYI */
|
257
|
+
#endif
|
258
|
+
|
259
|
+
#if _ARCH_PWR7
|
260
|
+
#define LJ_ARCH_VERSION 70
|
261
|
+
#elif _ARCH_PWR6
|
262
|
+
#define LJ_ARCH_VERSION 60
|
263
|
+
#elif _ARCH_PWR5X
|
264
|
+
#define LJ_ARCH_VERSION 51
|
265
|
+
#elif _ARCH_PWR5
|
266
|
+
#define LJ_ARCH_VERSION 50
|
267
|
+
#elif _ARCH_PWR4
|
268
|
+
#define LJ_ARCH_VERSION 40
|
269
|
+
#else
|
270
|
+
#define LJ_ARCH_VERSION 0
|
271
|
+
#endif
|
272
|
+
#if _ARCH_PPCSQ
|
273
|
+
#define LJ_ARCH_SQRT 1
|
274
|
+
#endif
|
275
|
+
#if _ARCH_PWR5X
|
276
|
+
#define LJ_ARCH_ROUND 1
|
277
|
+
#endif
|
278
|
+
#if __PPU__
|
279
|
+
#define LJ_ARCH_CELL 1
|
280
|
+
#endif
|
281
|
+
#if LJ_TARGET_XBOX360
|
282
|
+
#define LJ_ARCH_XENON 1
|
283
|
+
#endif
|
284
|
+
|
285
|
+
#elif LUAJIT_TARGET == LUAJIT_ARCH_MIPS
|
286
|
+
|
287
|
+
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL)
|
288
|
+
#define LJ_ARCH_NAME "mipsel"
|
289
|
+
#define LJ_ARCH_ENDIAN LUAJIT_LE
|
290
|
+
#else
|
291
|
+
#define LJ_ARCH_NAME "mips"
|
292
|
+
#define LJ_ARCH_ENDIAN LUAJIT_BE
|
293
|
+
#endif
|
294
|
+
#define LJ_ARCH_BITS 32
|
295
|
+
#define LJ_TARGET_MIPS 1
|
296
|
+
#define LJ_TARGET_EHRETREG 4
|
297
|
+
#define LJ_TARGET_JUMPRANGE 27 /* 2*2^27 = 256MB-aligned region */
|
298
|
+
#define LJ_TARGET_MASKSHIFT 1
|
299
|
+
#define LJ_TARGET_MASKROT 1
|
300
|
+
#define LJ_TARGET_UNIFYROT 2 /* Want only IR_BROR. */
|
301
|
+
#define LJ_ARCH_NUMMODE LJ_NUMMODE_SINGLE
|
302
|
+
|
303
|
+
#if _MIPS_ARCH_MIPS32R2
|
304
|
+
#define LJ_ARCH_VERSION 20
|
305
|
+
#else
|
306
|
+
#define LJ_ARCH_VERSION 10
|
307
|
+
#endif
|
308
|
+
|
309
|
+
#else
|
310
|
+
#error "No target architecture defined"
|
311
|
+
#endif
|
312
|
+
|
313
|
+
#ifndef LJ_PAGESIZE
|
314
|
+
#define LJ_PAGESIZE 4096
|
315
|
+
#endif
|
316
|
+
|
317
|
+
/* Check for minimum required compiler versions. */
|
318
|
+
#if defined(__GNUC__)
|
319
|
+
#if LJ_TARGET_X86
|
320
|
+
#if (__GNUC__ < 3) || ((__GNUC__ == 3) && __GNUC_MINOR__ < 4)
|
321
|
+
#error "Need at least GCC 3.4 or newer"
|
322
|
+
#endif
|
323
|
+
#elif LJ_TARGET_X64
|
324
|
+
#if __GNUC__ < 4
|
325
|
+
#error "Need at least GCC 4.0 or newer"
|
326
|
+
#endif
|
327
|
+
#elif LJ_TARGET_ARM
|
328
|
+
#if (__GNUC__ < 4) || ((__GNUC__ == 4) && __GNUC_MINOR__ < 2)
|
329
|
+
#error "Need at least GCC 4.2 or newer"
|
330
|
+
#endif
|
331
|
+
#elif LJ_TARGET_ARM64
|
332
|
+
#if __clang__
|
333
|
+
#if (__clang_major__ < 3) || ((__clang_major__ == 3) && __clang_minor__ < 5)
|
334
|
+
#error "Need at least Clang 3.5 or newer"
|
335
|
+
#endif
|
336
|
+
#else
|
337
|
+
#if (__GNUC__ < 4) || ((__GNUC__ == 4) && __GNUC_MINOR__ < 8)
|
338
|
+
#error "Need at least GCC 4.8 or newer"
|
339
|
+
#endif
|
340
|
+
#endif
|
341
|
+
#elif !LJ_TARGET_PS3
|
342
|
+
#if (__GNUC__ < 4) || ((__GNUC__ == 4) && __GNUC_MINOR__ < 3)
|
343
|
+
#error "Need at least GCC 4.3 or newer"
|
344
|
+
#endif
|
345
|
+
#endif
|
346
|
+
#endif
|
347
|
+
|
348
|
+
/* Check target-specific constraints. */
|
349
|
+
#ifndef _BUILDVM_H
|
350
|
+
#if LJ_TARGET_X64
|
351
|
+
#if __USING_SJLJ_EXCEPTIONS__
|
352
|
+
#error "Need a C compiler with native exception handling on x64"
|
353
|
+
#endif
|
354
|
+
#elif LJ_TARGET_ARM
|
355
|
+
#if defined(__ARMEB__)
|
356
|
+
#error "No support for big-endian ARM"
|
357
|
+
#endif
|
358
|
+
#if __ARM_ARCH_6M__ || __ARM_ARCH_7M__ || __ARM_ARCH_7EM__
|
359
|
+
#error "No support for Cortex-M CPUs"
|
360
|
+
#endif
|
361
|
+
#if !(__ARM_EABI__ || LJ_TARGET_IOS)
|
362
|
+
#error "Only ARM EABI or iOS 3.0+ ABI is supported"
|
363
|
+
#endif
|
364
|
+
#elif LJ_TARGET_ARM64
|
365
|
+
#if defined(__AARCH64EB__)
|
366
|
+
#error "No support for big-endian ARM64"
|
367
|
+
#endif
|
368
|
+
#if defined(_ILP32)
|
369
|
+
#error "No support for ILP32 model on ARM64"
|
370
|
+
#endif
|
371
|
+
#elif LJ_TARGET_PPC
|
372
|
+
#if defined(_SOFT_FLOAT) || defined(_SOFT_DOUBLE)
|
373
|
+
#error "No support for PowerPC CPUs without double-precision FPU"
|
374
|
+
#endif
|
375
|
+
#if !LJ_ARCH_PPC64 && LJ_ARCH_ENDIAN == LUAJIT_LE
|
376
|
+
#error "No support for little-endian PPC32"
|
377
|
+
#endif
|
378
|
+
#if LJ_ARCH_PPC64
|
379
|
+
#error "No support for PowerPC 64 bit mode (yet)"
|
380
|
+
#endif
|
381
|
+
#ifdef __NO_FPRS__
|
382
|
+
#error "No support for PPC/e500 anymore (use LuaJIT 2.0)"
|
383
|
+
#endif
|
384
|
+
#elif LJ_TARGET_MIPS
|
385
|
+
#if defined(__mips_soft_float)
|
386
|
+
#error "No support for MIPS CPUs without FPU"
|
387
|
+
#endif
|
388
|
+
#if defined(_LP64)
|
389
|
+
#error "No support for MIPS64"
|
390
|
+
#endif
|
391
|
+
#endif
|
392
|
+
#endif
|
393
|
+
|
394
|
+
/* Enable or disable the dual-number mode for the VM. */
|
395
|
+
#if (LJ_ARCH_NUMMODE == LJ_NUMMODE_SINGLE && LUAJIT_NUMMODE == 2) || \
|
396
|
+
(LJ_ARCH_NUMMODE == LJ_NUMMODE_DUAL && LUAJIT_NUMMODE == 1)
|
397
|
+
#error "No support for this number mode on this architecture"
|
398
|
+
#endif
|
399
|
+
#if LJ_ARCH_NUMMODE == LJ_NUMMODE_DUAL || \
|
400
|
+
(LJ_ARCH_NUMMODE == LJ_NUMMODE_DUAL_SINGLE && LUAJIT_NUMMODE != 1) || \
|
401
|
+
(LJ_ARCH_NUMMODE == LJ_NUMMODE_SINGLE_DUAL && LUAJIT_NUMMODE == 2)
|
402
|
+
#define LJ_DUALNUM 1
|
403
|
+
#else
|
404
|
+
#define LJ_DUALNUM 0
|
405
|
+
#endif
|
406
|
+
|
407
|
+
#if LJ_TARGET_IOS || LJ_TARGET_CONSOLE
|
408
|
+
/* Runtime code generation is restricted on iOS. Complain to Apple, not me. */
|
409
|
+
/* Ditto for the consoles. Complain to Sony or MS, not me. */
|
410
|
+
#ifndef LUAJIT_ENABLE_JIT
|
411
|
+
#define LJ_OS_NOJIT 1
|
412
|
+
#endif
|
413
|
+
#endif
|
414
|
+
|
415
|
+
/* 64 bit GC references. */
|
416
|
+
#if LJ_TARGET_GC64
|
417
|
+
#define LJ_GC64 1
|
418
|
+
#else
|
419
|
+
#define LJ_GC64 0
|
420
|
+
#endif
|
421
|
+
|
422
|
+
/* 2-slot frame info. */
|
423
|
+
#if LJ_GC64
|
424
|
+
#define LJ_FR2 1
|
425
|
+
#else
|
426
|
+
#define LJ_FR2 0
|
427
|
+
#endif
|
428
|
+
|
429
|
+
/* Disable or enable the JIT compiler. */
|
430
|
+
#if defined(LUAJIT_DISABLE_JIT) || defined(LJ_ARCH_NOJIT) || defined(LJ_OS_NOJIT) || LJ_FR2 || LJ_GC64
|
431
|
+
#define LJ_HASJIT 0
|
432
|
+
#else
|
433
|
+
#define LJ_HASJIT 1
|
434
|
+
#endif
|
435
|
+
|
436
|
+
/* Disable or enable the FFI extension. */
|
437
|
+
#if defined(LUAJIT_DISABLE_FFI) || defined(LJ_ARCH_NOFFI)
|
438
|
+
#define LJ_HASFFI 0
|
439
|
+
#else
|
440
|
+
#define LJ_HASFFI 1
|
441
|
+
#endif
|
442
|
+
|
443
|
+
#if defined(LUAJIT_DISABLE_PROFILE)
|
444
|
+
#define LJ_HASPROFILE 0
|
445
|
+
#elif LJ_TARGET_POSIX
|
446
|
+
#define LJ_HASPROFILE 1
|
447
|
+
#define LJ_PROFILE_SIGPROF 1
|
448
|
+
#elif LJ_TARGET_PS3
|
449
|
+
#define LJ_HASPROFILE 1
|
450
|
+
#define LJ_PROFILE_PTHREAD 1
|
451
|
+
#elif LJ_TARGET_WINDOWS || LJ_TARGET_XBOX360
|
452
|
+
#define LJ_HASPROFILE 1
|
453
|
+
#define LJ_PROFILE_WTHREAD 1
|
454
|
+
#else
|
455
|
+
#define LJ_HASPROFILE 0
|
456
|
+
#endif
|
457
|
+
|
458
|
+
#ifndef LJ_ARCH_HASFPU
|
459
|
+
#define LJ_ARCH_HASFPU 1
|
460
|
+
#endif
|
461
|
+
#ifndef LJ_ABI_SOFTFP
|
462
|
+
#define LJ_ABI_SOFTFP 0
|
463
|
+
#endif
|
464
|
+
#define LJ_SOFTFP (!LJ_ARCH_HASFPU)
|
465
|
+
|
466
|
+
#if LJ_ARCH_ENDIAN == LUAJIT_BE
|
467
|
+
#define LJ_LE 0
|
468
|
+
#define LJ_BE 1
|
469
|
+
#define LJ_ENDIAN_SELECT(le, be) be
|
470
|
+
#define LJ_ENDIAN_LOHI(lo, hi) hi lo
|
471
|
+
#else
|
472
|
+
#define LJ_LE 1
|
473
|
+
#define LJ_BE 0
|
474
|
+
#define LJ_ENDIAN_SELECT(le, be) le
|
475
|
+
#define LJ_ENDIAN_LOHI(lo, hi) lo hi
|
476
|
+
#endif
|
477
|
+
|
478
|
+
#if LJ_ARCH_BITS == 32
|
479
|
+
#define LJ_32 1
|
480
|
+
#define LJ_64 0
|
481
|
+
#else
|
482
|
+
#define LJ_32 0
|
483
|
+
#define LJ_64 1
|
484
|
+
#endif
|
485
|
+
|
486
|
+
#ifndef LJ_TARGET_UNALIGNED
|
487
|
+
#define LJ_TARGET_UNALIGNED 0
|
488
|
+
#endif
|
489
|
+
|
490
|
+
/* Various workarounds for embedded operating systems or weak C runtimes. */
|
491
|
+
#if (defined(__ANDROID__) && !defined(LJ_TARGET_X86ORX64)) || defined(__symbian__) || LJ_TARGET_XBOX360 || LJ_TARGET_WINDOWS
|
492
|
+
#define LUAJIT_NO_LOG2
|
493
|
+
#endif
|
494
|
+
#if defined(__symbian__) || LJ_TARGET_WINDOWS
|
495
|
+
#define LUAJIT_NO_EXP2
|
496
|
+
#endif
|
497
|
+
|
498
|
+
#if defined(LUAJIT_NO_UNWIND) || defined(__symbian__) || LJ_TARGET_IOS || LJ_TARGET_PS3 || LJ_TARGET_PS4
|
499
|
+
#define LJ_NO_UNWIND 1
|
500
|
+
#endif
|
501
|
+
|
502
|
+
/* Compatibility with Lua 5.1 vs. 5.2. */
|
503
|
+
#ifdef LUAJIT_ENABLE_LUA52COMPAT
|
504
|
+
#define LJ_52 1
|
505
|
+
#else
|
506
|
+
#define LJ_52 0
|
507
|
+
#endif
|
508
|
+
|
509
|
+
#endif
|