mirror of
https://github.com/love2d/megasource.git
synced 2026-08-17 11:11:35 +02:00
Update LuaJIT to the latest 2.1.0 source (0bee44c)
This commit is contained in:
@@ -14,6 +14,22 @@
|
||||
|
||||
#if LJ_TARGET_MIPS
|
||||
/* Need our own global offset table for the dreaded MIPS calling conventions. */
|
||||
|
||||
#ifndef _LJ_VM_H
|
||||
LJ_ASMF int32_t LJ_FASTCALL lj_vm_modi(int32_t a, int32_t b);
|
||||
#endif
|
||||
|
||||
#if LJ_SOFTFP
|
||||
#ifndef _LJ_IRCALL_H
|
||||
extern double __adddf3(double a, double b);
|
||||
extern double __subdf3(double a, double b);
|
||||
extern double __muldf3(double a, double b);
|
||||
extern double __divdf3(double a, double b);
|
||||
#endif
|
||||
#define SFGOTDEF(_) _(sqrt) _(__adddf3) _(__subdf3) _(__muldf3) _(__divdf3)
|
||||
#else
|
||||
#define SFGOTDEF(_)
|
||||
#endif
|
||||
#if LJ_HASJIT
|
||||
#define JITGOTDEF(_) _(lj_trace_exit) _(lj_trace_hot)
|
||||
#else
|
||||
@@ -28,16 +44,19 @@
|
||||
#define GOTDEF(_) \
|
||||
_(floor) _(ceil) _(trunc) _(log) _(log10) _(exp) _(sin) _(cos) _(tan) \
|
||||
_(asin) _(acos) _(atan) _(sinh) _(cosh) _(tanh) _(frexp) _(modf) _(atan2) \
|
||||
_(pow) _(fmod) _(ldexp) \
|
||||
_(lj_dispatch_call) _(lj_dispatch_ins) _(lj_err_throw) \
|
||||
_(pow) _(fmod) _(ldexp) _(lj_vm_modi) \
|
||||
_(lj_dispatch_call) _(lj_dispatch_ins) _(lj_dispatch_stitch) \
|
||||
_(lj_dispatch_profile) _(lj_err_throw) \
|
||||
_(lj_ffh_coroutine_wrap_err) _(lj_func_closeuv) _(lj_func_newL_gc) \
|
||||
_(lj_gc_barrieruv) _(lj_gc_step) _(lj_gc_step_fixtop) _(lj_meta_arith) \
|
||||
_(lj_meta_call) _(lj_meta_cat) _(lj_meta_comp) _(lj_meta_equal) \
|
||||
_(lj_meta_for) _(lj_meta_len) _(lj_meta_tget) _(lj_meta_tset) \
|
||||
_(lj_state_growstack) _(lj_str_fromnum) _(lj_str_fromnumber) _(lj_str_new) \
|
||||
_(lj_tab_dup) _(lj_tab_get) _(lj_tab_getinth) _(lj_tab_len) _(lj_tab_new) \
|
||||
_(lj_tab_newkey) _(lj_tab_next) _(lj_tab_reasize) \
|
||||
JITGOTDEF(_) FFIGOTDEF(_)
|
||||
_(lj_meta_for) _(lj_meta_istype) _(lj_meta_len) _(lj_meta_tget) \
|
||||
_(lj_meta_tset) _(lj_state_growstack) _(lj_strfmt_number) \
|
||||
_(lj_str_new) _(lj_tab_dup) _(lj_tab_get) _(lj_tab_getinth) _(lj_tab_len) \
|
||||
_(lj_tab_new) _(lj_tab_newkey) _(lj_tab_next) _(lj_tab_reasize) \
|
||||
_(lj_tab_setinth) _(lj_buf_putstr_reverse) _(lj_buf_putstr_lower) \
|
||||
_(lj_buf_putstr_upper) _(lj_buf_tostr) \
|
||||
JITGOTDEF(_) FFIGOTDEF(_) SFGOTDEF(_)
|
||||
|
||||
enum {
|
||||
#define GOTENUM(name) LJ_GOT_##name,
|
||||
@@ -60,7 +79,7 @@ typedef uint16_t HotCount;
|
||||
#define HOTCOUNT_CALL 1
|
||||
|
||||
/* This solves a circular dependency problem -- bump as needed. Sigh. */
|
||||
#define GG_NUM_ASMFF 62
|
||||
#define GG_NUM_ASMFF 57
|
||||
|
||||
#define GG_LEN_DDISP (BC__MAX + GG_NUM_ASMFF)
|
||||
#define GG_LEN_SDISP BC_FUNCF
|
||||
@@ -88,6 +107,7 @@ typedef struct GG_State {
|
||||
#define J2G(J) (&J2GG(J)->g)
|
||||
#define G2J(gl) (&G2GG(gl)->J)
|
||||
#define L2J(L) (&L2GG(L)->J)
|
||||
#define GG_G2J (GG_OFS(J) - GG_OFS(g))
|
||||
#define GG_G2DISP (GG_OFS(dispatch) - GG_OFS(g))
|
||||
#define GG_DISP2G (GG_OFS(g) - GG_OFS(dispatch))
|
||||
#define GG_DISP2J (GG_OFS(J) - GG_OFS(dispatch))
|
||||
@@ -109,7 +129,12 @@ LJ_FUNC void lj_dispatch_update(global_State *g);
|
||||
/* Instruction dispatch callback for hooks or when recording. */
|
||||
LJ_FUNCA void LJ_FASTCALL lj_dispatch_ins(lua_State *L, const BCIns *pc);
|
||||
LJ_FUNCA ASMFunction LJ_FASTCALL lj_dispatch_call(lua_State *L, const BCIns*pc);
|
||||
LJ_FUNCA void LJ_FASTCALL lj_dispatch_return(lua_State *L, const BCIns *pc);
|
||||
#if LJ_HASJIT
|
||||
LJ_FUNCA void LJ_FASTCALL lj_dispatch_stitch(jit_State *J, const BCIns *pc);
|
||||
#endif
|
||||
#if LJ_HASPROFILE
|
||||
LJ_FUNCA void LJ_FASTCALL lj_dispatch_profile(lua_State *L, const BCIns *pc);
|
||||
#endif
|
||||
|
||||
#if LJ_HASFFI && !defined(_BUILDVM_H)
|
||||
/* Save/restore errno and GetLastError() around hooks, exits and recording. */
|
||||
|
||||
Reference in New Issue
Block a user