faster JITted path to `equal?'
This commit is contained in:
parent
45d7635188
commit
f4303cbef8
|
@ -15,7 +15,8 @@
|
|||
(namespace-require 'racket/flonum)
|
||||
(namespace-require 'racket/fixnum)
|
||||
(let* ([check-error-message (lambda (name proc [fixnum? #f])
|
||||
(unless (memq name '(eq? eqv? not null? pair? list?
|
||||
(unless (memq name '(eq? eqv? equal?
|
||||
not null? pair? list?
|
||||
real? number? boolean?
|
||||
procedure? symbol?
|
||||
string? bytes?
|
||||
|
@ -190,6 +191,9 @@
|
|||
(bin-exact #t 'eqv? 1+2i 1+2i)
|
||||
(bin-exact #f 'eqv? 1+2i 1+3i)
|
||||
|
||||
(bin-exact #f 'equal? 0 10)
|
||||
(bin-exact #t 'equal? "apple" "apple")
|
||||
|
||||
(un #t 'zero? 0)
|
||||
(un #f 'zero? 1)
|
||||
(un #f 'zero? -1)
|
||||
|
|
|
@ -100,7 +100,9 @@ void scheme_init_bool (Scheme_Env *env)
|
|||
scheme_eqv_prim = p;
|
||||
scheme_add_global_constant("eqv?", scheme_eqv_prim, env);
|
||||
|
||||
scheme_equal_prim = scheme_make_prim_w_arity(equal_prim, "equal?", 2, 2);
|
||||
p = scheme_make_prim_w_arity(equal_prim, "equal?", 2, 2);
|
||||
SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_BINARY_INLINED;
|
||||
scheme_equal_prim = p;
|
||||
scheme_add_global_constant("equal?", scheme_equal_prim, env);
|
||||
|
||||
scheme_add_global_constant("equal?/recur",
|
||||
|
|
|
@ -111,6 +111,7 @@ typedef struct future_t {
|
|||
Scheme_Object *retval_s;
|
||||
void *retval_p; /* use only with conservative GC */
|
||||
MZ_MARK_STACK_TYPE retval_m;
|
||||
int retval_i;
|
||||
int no_retval, retval_is_rs_argv;
|
||||
|
||||
Scheme_Object **multiple_array;
|
||||
|
|
|
@ -191,7 +191,8 @@
|
|||
siS_v
|
||||
z_p
|
||||
si_s
|
||||
sis_v))
|
||||
sis_v
|
||||
ss_i))
|
||||
|
||||
(with-output-to-file "jit_ts_def.c"
|
||||
#:exists 'replace
|
||||
|
|
|
@ -104,6 +104,7 @@ define_ts_ss_s(scheme_jit_make_two_element_vector, FSRC_OTHER)
|
|||
define_ts_l_s(scheme_jit_make_ivector, FSRC_OTHER)
|
||||
define_ts_l_s(scheme_jit_make_vector, FSRC_OTHER)
|
||||
# endif
|
||||
define_ts_ss_i(scheme_equal, FSRC_OTHER)
|
||||
#endif
|
||||
|
||||
#ifdef JIT_APPLY_TS_PROCS
|
||||
|
@ -172,6 +173,7 @@ define_ts_s_s(scheme_box, FSRC_OTHER)
|
|||
# define ts_scheme_fxvector_length scheme_fxvector_length
|
||||
# define ts_scheme_struct_ref scheme_struct_ref
|
||||
# define ts_scheme_struct_set scheme_struct_set
|
||||
# define ts_scheme_equal scheme_equal
|
||||
# define ts_tail_call_with_values_from_multiple_result tail_call_with_values_from_multiple_result
|
||||
# define ts_raise_bad_call_with_values raise_bad_call_with_values
|
||||
# define ts_call_with_values_from_multiple_result_multi call_with_values_from_multiple_result_multi
|
||||
|
|
|
@ -205,3 +205,12 @@ static void ts_ ## id(Scheme_Object* g48, int g49, Scheme_Object* g50) \
|
|||
else \
|
||||
id(g48, g49, g50); \
|
||||
}
|
||||
#define define_ts_ss_i(id, src_type) \
|
||||
static int ts_ ## id(Scheme_Object* g51, Scheme_Object* g52) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
return scheme_rtcall_ss_i("[" #id "]", src_type, id, g51, g52); \
|
||||
else \
|
||||
return id(g51, g52); \
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Scheme_Object* scheme_rtcall_siS_s(const char *who, int src_type, prim_siS_s f, Scheme_Object* g51, int g52, Scheme_Object** g53)
|
||||
Scheme_Object* scheme_rtcall_siS_s(const char *who, int src_type, prim_siS_s f, Scheme_Object* g53, int g54, Scheme_Object** g55)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -13,9 +13,9 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_s0 = g51;
|
||||
future->arg_i1 = g52;
|
||||
future->arg_S2 = g53;
|
||||
future->arg_s0 = g53;
|
||||
future->arg_i1 = g54;
|
||||
future->arg_S2 = g55;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1);
|
||||
future = fts->thread->current_ft;
|
||||
|
@ -24,7 +24,7 @@
|
|||
receive_special_result(future, retval, 1);
|
||||
return retval;
|
||||
}
|
||||
Scheme_Object* scheme_rtcall_iSs_s(const char *who, int src_type, prim_iSs_s f, int g54, Scheme_Object** g55, Scheme_Object* g56)
|
||||
Scheme_Object* scheme_rtcall_iSs_s(const char *who, int src_type, prim_iSs_s f, int g56, Scheme_Object** g57, Scheme_Object* g58)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -39,9 +39,9 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_i0 = g54;
|
||||
future->arg_S1 = g55;
|
||||
future->arg_s2 = g56;
|
||||
future->arg_i0 = g56;
|
||||
future->arg_S1 = g57;
|
||||
future->arg_s2 = g58;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1);
|
||||
future = fts->thread->current_ft;
|
||||
|
@ -50,7 +50,7 @@
|
|||
receive_special_result(future, retval, 1);
|
||||
return retval;
|
||||
}
|
||||
Scheme_Object* scheme_rtcall_s_s(const char *who, int src_type, prim_s_s f, Scheme_Object* g57)
|
||||
Scheme_Object* scheme_rtcall_s_s(const char *who, int src_type, prim_s_s f, Scheme_Object* g59)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -65,8 +65,8 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_s0 = g57;
|
||||
send_special_result(future, g57);
|
||||
future->arg_s0 = g59;
|
||||
send_special_result(future, g59);
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1);
|
||||
future = fts->thread->current_ft;
|
||||
retval = future->retval_s;
|
||||
|
@ -74,7 +74,7 @@
|
|||
receive_special_result(future, retval, 1);
|
||||
return retval;
|
||||
}
|
||||
Scheme_Object* scheme_rtcall_n_s(const char *who, int src_type, prim_n_s f, Scheme_Native_Closure_Data* g58)
|
||||
Scheme_Object* scheme_rtcall_n_s(const char *who, int src_type, prim_n_s f, Scheme_Native_Closure_Data* g60)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -89,7 +89,7 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_n0 = g58;
|
||||
future->arg_n0 = g60;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1);
|
||||
future = fts->thread->current_ft;
|
||||
|
@ -122,7 +122,7 @@
|
|||
receive_special_result(future, retval, 1);
|
||||
return retval;
|
||||
}
|
||||
Scheme_Object* scheme_rtcall_ss_s(const char *who, int src_type, prim_ss_s f, Scheme_Object* g59, Scheme_Object* g60)
|
||||
Scheme_Object* scheme_rtcall_ss_s(const char *who, int src_type, prim_ss_s f, Scheme_Object* g61, Scheme_Object* g62)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -137,8 +137,8 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_s0 = g59;
|
||||
future->arg_s1 = g60;
|
||||
future->arg_s0 = g61;
|
||||
future->arg_s1 = g62;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1);
|
||||
future = fts->thread->current_ft;
|
||||
|
@ -147,7 +147,7 @@
|
|||
receive_special_result(future, retval, 1);
|
||||
return retval;
|
||||
}
|
||||
Scheme_Object* scheme_rtcall_tt_s(const char *who, int src_type, prim_tt_s f, const Scheme_Object* g61, const Scheme_Object* g62)
|
||||
Scheme_Object* scheme_rtcall_tt_s(const char *who, int src_type, prim_tt_s f, const Scheme_Object* g63, const Scheme_Object* g64)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -162,8 +162,8 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_t0 = g61;
|
||||
future->arg_t1 = g62;
|
||||
future->arg_t0 = g63;
|
||||
future->arg_t1 = g64;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1);
|
||||
future = fts->thread->current_ft;
|
||||
|
@ -172,7 +172,7 @@
|
|||
receive_special_result(future, retval, 1);
|
||||
return retval;
|
||||
}
|
||||
MZ_MARK_STACK_TYPE scheme_rtcall_ss_m(const char *who, int src_type, prim_ss_m f, Scheme_Object* g63, Scheme_Object* g64)
|
||||
MZ_MARK_STACK_TYPE scheme_rtcall_ss_m(const char *who, int src_type, prim_ss_m f, Scheme_Object* g65, Scheme_Object* g66)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -187,8 +187,8 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_s0 = g63;
|
||||
future->arg_s1 = g64;
|
||||
future->arg_s0 = g65;
|
||||
future->arg_s1 = g66;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1);
|
||||
future = fts->thread->current_ft;
|
||||
|
@ -197,7 +197,7 @@
|
|||
|
||||
return retval;
|
||||
}
|
||||
Scheme_Object* scheme_rtcall_Sl_s(const char *who, int src_type, prim_Sl_s f, Scheme_Object** g65, intptr_t g66)
|
||||
Scheme_Object* scheme_rtcall_Sl_s(const char *who, int src_type, prim_Sl_s f, Scheme_Object** g67, intptr_t g68)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -212,8 +212,8 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_S0 = g65;
|
||||
future->arg_l1 = g66;
|
||||
future->arg_S0 = g67;
|
||||
future->arg_l1 = g68;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1);
|
||||
future = fts->thread->current_ft;
|
||||
|
@ -222,7 +222,7 @@
|
|||
receive_special_result(future, retval, 1);
|
||||
return retval;
|
||||
}
|
||||
Scheme_Object* scheme_rtcall_l_s(const char *who, int src_type, prim_l_s f, intptr_t g67)
|
||||
Scheme_Object* scheme_rtcall_l_s(const char *who, int src_type, prim_l_s f, intptr_t g69)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -237,7 +237,7 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_l0 = g67;
|
||||
future->arg_l0 = g69;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1);
|
||||
future = fts->thread->current_ft;
|
||||
|
@ -246,7 +246,7 @@
|
|||
receive_special_result(future, retval, 1);
|
||||
return retval;
|
||||
}
|
||||
void scheme_rtcall_bsi_v(const char *who, int src_type, prim_bsi_v f, Scheme_Bucket* g68, Scheme_Object* g69, int g70)
|
||||
void scheme_rtcall_bsi_v(const char *who, int src_type, prim_bsi_v f, Scheme_Bucket* g70, Scheme_Object* g71, int g72)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -261,9 +261,9 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_b0 = g68;
|
||||
future->arg_s1 = g69;
|
||||
future->arg_i2 = g70;
|
||||
future->arg_b0 = g70;
|
||||
future->arg_s1 = g71;
|
||||
future->arg_i2 = g72;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1);
|
||||
future = fts->thread->current_ft;
|
||||
|
@ -272,7 +272,7 @@
|
|||
|
||||
|
||||
}
|
||||
void scheme_rtcall_iiS_v(const char *who, int src_type, prim_iiS_v f, int g71, int g72, Scheme_Object** g73)
|
||||
void scheme_rtcall_iiS_v(const char *who, int src_type, prim_iiS_v f, int g73, int g74, Scheme_Object** g75)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -287,9 +287,9 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_i0 = g71;
|
||||
future->arg_i1 = g72;
|
||||
future->arg_S2 = g73;
|
||||
future->arg_i0 = g73;
|
||||
future->arg_i1 = g74;
|
||||
future->arg_S2 = g75;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1);
|
||||
future = fts->thread->current_ft;
|
||||
|
@ -298,7 +298,7 @@
|
|||
|
||||
|
||||
}
|
||||
void scheme_rtcall_ss_v(const char *who, int src_type, prim_ss_v f, Scheme_Object* g74, Scheme_Object* g75)
|
||||
void scheme_rtcall_ss_v(const char *who, int src_type, prim_ss_v f, Scheme_Object* g76, Scheme_Object* g77)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -313,8 +313,8 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_s0 = g74;
|
||||
future->arg_s1 = g75;
|
||||
future->arg_s0 = g76;
|
||||
future->arg_s1 = g77;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1);
|
||||
future = fts->thread->current_ft;
|
||||
|
@ -323,7 +323,7 @@
|
|||
|
||||
|
||||
}
|
||||
void scheme_rtcall_b_v(const char *who, int src_type, prim_b_v f, Scheme_Bucket* g76)
|
||||
void scheme_rtcall_b_v(const char *who, int src_type, prim_b_v f, Scheme_Bucket* g78)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -338,7 +338,7 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_b0 = g76;
|
||||
future->arg_b0 = g78;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1);
|
||||
future = fts->thread->current_ft;
|
||||
|
@ -347,7 +347,7 @@
|
|||
|
||||
|
||||
}
|
||||
Scheme_Object* scheme_rtcall_sl_s(const char *who, int src_type, prim_sl_s f, Scheme_Object* g77, intptr_t g78)
|
||||
Scheme_Object* scheme_rtcall_sl_s(const char *who, int src_type, prim_sl_s f, Scheme_Object* g79, intptr_t g80)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -362,8 +362,8 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_s0 = g77;
|
||||
future->arg_l1 = g78;
|
||||
future->arg_s0 = g79;
|
||||
future->arg_l1 = g80;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1);
|
||||
future = fts->thread->current_ft;
|
||||
|
@ -372,7 +372,7 @@
|
|||
receive_special_result(future, retval, 1);
|
||||
return retval;
|
||||
}
|
||||
Scheme_Object* scheme_rtcall_iS_s(const char *who, int src_type, prim_iS_s f, int g79, Scheme_Object** g80)
|
||||
Scheme_Object* scheme_rtcall_iS_s(const char *who, int src_type, prim_iS_s f, int g81, Scheme_Object** g82)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -387,8 +387,8 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_i0 = g79;
|
||||
future->arg_S1 = g80;
|
||||
future->arg_i0 = g81;
|
||||
future->arg_S1 = g82;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1);
|
||||
future = fts->thread->current_ft;
|
||||
|
@ -397,7 +397,7 @@
|
|||
receive_special_result(future, retval, 1);
|
||||
return retval;
|
||||
}
|
||||
Scheme_Object* scheme_rtcall_S_s(const char *who, int src_type, prim_S_s f, Scheme_Object** g81)
|
||||
Scheme_Object* scheme_rtcall_S_s(const char *who, int src_type, prim_S_s f, Scheme_Object** g83)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -412,7 +412,7 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_S0 = g81;
|
||||
future->arg_S0 = g83;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1);
|
||||
future = fts->thread->current_ft;
|
||||
|
@ -421,7 +421,7 @@
|
|||
receive_special_result(future, retval, 1);
|
||||
return retval;
|
||||
}
|
||||
void scheme_rtcall_s_v(const char *who, int src_type, prim_s_v f, Scheme_Object* g82)
|
||||
void scheme_rtcall_s_v(const char *who, int src_type, prim_s_v f, Scheme_Object* g84)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -436,8 +436,8 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_s0 = g82;
|
||||
send_special_result(future, g82);
|
||||
future->arg_s0 = g84;
|
||||
send_special_result(future, g84);
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1);
|
||||
future = fts->thread->current_ft;
|
||||
|
||||
|
@ -445,7 +445,7 @@
|
|||
|
||||
|
||||
}
|
||||
Scheme_Object* scheme_rtcall_iSi_s(const char *who, int src_type, prim_iSi_s f, int g83, Scheme_Object** g84, int g85)
|
||||
Scheme_Object* scheme_rtcall_iSi_s(const char *who, int src_type, prim_iSi_s f, int g85, Scheme_Object** g86, int g87)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -460,9 +460,9 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_i0 = g83;
|
||||
future->arg_S1 = g84;
|
||||
future->arg_i2 = g85;
|
||||
future->arg_i0 = g85;
|
||||
future->arg_S1 = g86;
|
||||
future->arg_i2 = g87;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1);
|
||||
future = fts->thread->current_ft;
|
||||
|
@ -471,7 +471,7 @@
|
|||
receive_special_result(future, retval, 1);
|
||||
return retval;
|
||||
}
|
||||
void scheme_rtcall_siS_v(const char *who, int src_type, prim_siS_v f, Scheme_Object* g86, int g87, Scheme_Object** g88)
|
||||
void scheme_rtcall_siS_v(const char *who, int src_type, prim_siS_v f, Scheme_Object* g88, int g89, Scheme_Object** g90)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -486,9 +486,9 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_s0 = g86;
|
||||
future->arg_i1 = g87;
|
||||
future->arg_S2 = g88;
|
||||
future->arg_s0 = g88;
|
||||
future->arg_i1 = g89;
|
||||
future->arg_S2 = g90;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1);
|
||||
future = fts->thread->current_ft;
|
||||
|
@ -497,7 +497,7 @@
|
|||
|
||||
|
||||
}
|
||||
void* scheme_rtcall_z_p(const char *who, int src_type, prim_z_p f, size_t g89)
|
||||
void* scheme_rtcall_z_p(const char *who, int src_type, prim_z_p f, size_t g91)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -512,7 +512,7 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_z0 = g89;
|
||||
future->arg_z0 = g91;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1);
|
||||
future = fts->thread->current_ft;
|
||||
|
@ -521,7 +521,7 @@
|
|||
|
||||
return retval;
|
||||
}
|
||||
Scheme_Object* scheme_rtcall_si_s(const char *who, int src_type, prim_si_s f, Scheme_Object* g90, int g91)
|
||||
Scheme_Object* scheme_rtcall_si_s(const char *who, int src_type, prim_si_s f, Scheme_Object* g92, int g93)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -536,8 +536,8 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_s0 = g90;
|
||||
future->arg_i1 = g91;
|
||||
future->arg_s0 = g92;
|
||||
future->arg_i1 = g93;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1);
|
||||
future = fts->thread->current_ft;
|
||||
|
@ -546,7 +546,7 @@
|
|||
receive_special_result(future, retval, 1);
|
||||
return retval;
|
||||
}
|
||||
void scheme_rtcall_sis_v(const char *who, int src_type, prim_sis_v f, Scheme_Object* g92, int g93, Scheme_Object* g94)
|
||||
void scheme_rtcall_sis_v(const char *who, int src_type, prim_sis_v f, Scheme_Object* g94, int g95, Scheme_Object* g96)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -561,9 +561,9 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_s0 = g92;
|
||||
future->arg_i1 = g93;
|
||||
future->arg_s2 = g94;
|
||||
future->arg_s0 = g94;
|
||||
future->arg_i1 = g95;
|
||||
future->arg_s2 = g96;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1);
|
||||
future = fts->thread->current_ft;
|
||||
|
@ -571,4 +571,29 @@
|
|||
|
||||
|
||||
|
||||
}
|
||||
int scheme_rtcall_ss_i(const char *who, int src_type, prim_ss_i f, Scheme_Object* g97, Scheme_Object* g98)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
future_t *future;
|
||||
double tm;
|
||||
int retval;
|
||||
|
||||
future = fts->thread->current_ft;
|
||||
future->prim_protocol = SIG_ss_i;
|
||||
future->prim_func = f;
|
||||
tm = get_future_timestamp();
|
||||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_s0 = g97;
|
||||
future->arg_s1 = g98;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1);
|
||||
future = fts->thread->current_ft;
|
||||
retval = future->retval_i;
|
||||
future->retval_i = 0;
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
|
|
@ -1,69 +1,72 @@
|
|||
#define SIG_siS_s 10
|
||||
typedef Scheme_Object* (*prim_siS_s)(Scheme_Object*, int, Scheme_Object**);
|
||||
Scheme_Object* scheme_rtcall_siS_s(const char *who, int src_type, prim_siS_s f, Scheme_Object* g139, int g140, Scheme_Object** g141);
|
||||
Scheme_Object* scheme_rtcall_siS_s(const char *who, int src_type, prim_siS_s f, Scheme_Object* g145, int g146, Scheme_Object** g147);
|
||||
#define SIG_iSs_s 11
|
||||
typedef Scheme_Object* (*prim_iSs_s)(int, Scheme_Object**, Scheme_Object*);
|
||||
Scheme_Object* scheme_rtcall_iSs_s(const char *who, int src_type, prim_iSs_s f, int g142, Scheme_Object** g143, Scheme_Object* g144);
|
||||
Scheme_Object* scheme_rtcall_iSs_s(const char *who, int src_type, prim_iSs_s f, int g148, Scheme_Object** g149, Scheme_Object* g150);
|
||||
#define SIG_s_s 12
|
||||
typedef Scheme_Object* (*prim_s_s)(Scheme_Object*);
|
||||
Scheme_Object* scheme_rtcall_s_s(const char *who, int src_type, prim_s_s f, Scheme_Object* g145);
|
||||
Scheme_Object* scheme_rtcall_s_s(const char *who, int src_type, prim_s_s f, Scheme_Object* g151);
|
||||
#define SIG_n_s 13
|
||||
typedef Scheme_Object* (*prim_n_s)(Scheme_Native_Closure_Data*);
|
||||
Scheme_Object* scheme_rtcall_n_s(const char *who, int src_type, prim_n_s f, Scheme_Native_Closure_Data* g146);
|
||||
Scheme_Object* scheme_rtcall_n_s(const char *who, int src_type, prim_n_s f, Scheme_Native_Closure_Data* g152);
|
||||
#define SIG__s 14
|
||||
typedef Scheme_Object* (*prim__s)();
|
||||
Scheme_Object* scheme_rtcall__s(const char *who, int src_type, prim__s f );
|
||||
#define SIG_ss_s 15
|
||||
typedef Scheme_Object* (*prim_ss_s)(Scheme_Object*, Scheme_Object*);
|
||||
Scheme_Object* scheme_rtcall_ss_s(const char *who, int src_type, prim_ss_s f, Scheme_Object* g147, Scheme_Object* g148);
|
||||
Scheme_Object* scheme_rtcall_ss_s(const char *who, int src_type, prim_ss_s f, Scheme_Object* g153, Scheme_Object* g154);
|
||||
#define SIG_tt_s 16
|
||||
typedef Scheme_Object* (*prim_tt_s)(const Scheme_Object*, const Scheme_Object*);
|
||||
Scheme_Object* scheme_rtcall_tt_s(const char *who, int src_type, prim_tt_s f, const Scheme_Object* g149, const Scheme_Object* g150);
|
||||
Scheme_Object* scheme_rtcall_tt_s(const char *who, int src_type, prim_tt_s f, const Scheme_Object* g155, const Scheme_Object* g156);
|
||||
#define SIG_ss_m 17
|
||||
typedef MZ_MARK_STACK_TYPE (*prim_ss_m)(Scheme_Object*, Scheme_Object*);
|
||||
MZ_MARK_STACK_TYPE scheme_rtcall_ss_m(const char *who, int src_type, prim_ss_m f, Scheme_Object* g151, Scheme_Object* g152);
|
||||
MZ_MARK_STACK_TYPE scheme_rtcall_ss_m(const char *who, int src_type, prim_ss_m f, Scheme_Object* g157, Scheme_Object* g158);
|
||||
#define SIG_Sl_s 18
|
||||
typedef Scheme_Object* (*prim_Sl_s)(Scheme_Object**, intptr_t);
|
||||
Scheme_Object* scheme_rtcall_Sl_s(const char *who, int src_type, prim_Sl_s f, Scheme_Object** g153, intptr_t g154);
|
||||
Scheme_Object* scheme_rtcall_Sl_s(const char *who, int src_type, prim_Sl_s f, Scheme_Object** g159, intptr_t g160);
|
||||
#define SIG_l_s 19
|
||||
typedef Scheme_Object* (*prim_l_s)(intptr_t);
|
||||
Scheme_Object* scheme_rtcall_l_s(const char *who, int src_type, prim_l_s f, intptr_t g155);
|
||||
Scheme_Object* scheme_rtcall_l_s(const char *who, int src_type, prim_l_s f, intptr_t g161);
|
||||
#define SIG_bsi_v 20
|
||||
typedef void (*prim_bsi_v)(Scheme_Bucket*, Scheme_Object*, int);
|
||||
void scheme_rtcall_bsi_v(const char *who, int src_type, prim_bsi_v f, Scheme_Bucket* g156, Scheme_Object* g157, int g158);
|
||||
void scheme_rtcall_bsi_v(const char *who, int src_type, prim_bsi_v f, Scheme_Bucket* g162, Scheme_Object* g163, int g164);
|
||||
#define SIG_iiS_v 21
|
||||
typedef void (*prim_iiS_v)(int, int, Scheme_Object**);
|
||||
void scheme_rtcall_iiS_v(const char *who, int src_type, prim_iiS_v f, int g159, int g160, Scheme_Object** g161);
|
||||
void scheme_rtcall_iiS_v(const char *who, int src_type, prim_iiS_v f, int g165, int g166, Scheme_Object** g167);
|
||||
#define SIG_ss_v 22
|
||||
typedef void (*prim_ss_v)(Scheme_Object*, Scheme_Object*);
|
||||
void scheme_rtcall_ss_v(const char *who, int src_type, prim_ss_v f, Scheme_Object* g162, Scheme_Object* g163);
|
||||
void scheme_rtcall_ss_v(const char *who, int src_type, prim_ss_v f, Scheme_Object* g168, Scheme_Object* g169);
|
||||
#define SIG_b_v 23
|
||||
typedef void (*prim_b_v)(Scheme_Bucket*);
|
||||
void scheme_rtcall_b_v(const char *who, int src_type, prim_b_v f, Scheme_Bucket* g164);
|
||||
void scheme_rtcall_b_v(const char *who, int src_type, prim_b_v f, Scheme_Bucket* g170);
|
||||
#define SIG_sl_s 24
|
||||
typedef Scheme_Object* (*prim_sl_s)(Scheme_Object*, intptr_t);
|
||||
Scheme_Object* scheme_rtcall_sl_s(const char *who, int src_type, prim_sl_s f, Scheme_Object* g165, intptr_t g166);
|
||||
Scheme_Object* scheme_rtcall_sl_s(const char *who, int src_type, prim_sl_s f, Scheme_Object* g171, intptr_t g172);
|
||||
#define SIG_iS_s 25
|
||||
typedef Scheme_Object* (*prim_iS_s)(int, Scheme_Object**);
|
||||
Scheme_Object* scheme_rtcall_iS_s(const char *who, int src_type, prim_iS_s f, int g167, Scheme_Object** g168);
|
||||
Scheme_Object* scheme_rtcall_iS_s(const char *who, int src_type, prim_iS_s f, int g173, Scheme_Object** g174);
|
||||
#define SIG_S_s 26
|
||||
typedef Scheme_Object* (*prim_S_s)(Scheme_Object**);
|
||||
Scheme_Object* scheme_rtcall_S_s(const char *who, int src_type, prim_S_s f, Scheme_Object** g169);
|
||||
Scheme_Object* scheme_rtcall_S_s(const char *who, int src_type, prim_S_s f, Scheme_Object** g175);
|
||||
#define SIG_s_v 27
|
||||
typedef void (*prim_s_v)(Scheme_Object*);
|
||||
void scheme_rtcall_s_v(const char *who, int src_type, prim_s_v f, Scheme_Object* g170);
|
||||
void scheme_rtcall_s_v(const char *who, int src_type, prim_s_v f, Scheme_Object* g176);
|
||||
#define SIG_iSi_s 28
|
||||
typedef Scheme_Object* (*prim_iSi_s)(int, Scheme_Object**, int);
|
||||
Scheme_Object* scheme_rtcall_iSi_s(const char *who, int src_type, prim_iSi_s f, int g171, Scheme_Object** g172, int g173);
|
||||
Scheme_Object* scheme_rtcall_iSi_s(const char *who, int src_type, prim_iSi_s f, int g177, Scheme_Object** g178, int g179);
|
||||
#define SIG_siS_v 29
|
||||
typedef void (*prim_siS_v)(Scheme_Object*, int, Scheme_Object**);
|
||||
void scheme_rtcall_siS_v(const char *who, int src_type, prim_siS_v f, Scheme_Object* g174, int g175, Scheme_Object** g176);
|
||||
void scheme_rtcall_siS_v(const char *who, int src_type, prim_siS_v f, Scheme_Object* g180, int g181, Scheme_Object** g182);
|
||||
#define SIG_z_p 30
|
||||
typedef void* (*prim_z_p)(size_t);
|
||||
void* scheme_rtcall_z_p(const char *who, int src_type, prim_z_p f, size_t g177);
|
||||
void* scheme_rtcall_z_p(const char *who, int src_type, prim_z_p f, size_t g183);
|
||||
#define SIG_si_s 31
|
||||
typedef Scheme_Object* (*prim_si_s)(Scheme_Object*, int);
|
||||
Scheme_Object* scheme_rtcall_si_s(const char *who, int src_type, prim_si_s f, Scheme_Object* g178, int g179);
|
||||
Scheme_Object* scheme_rtcall_si_s(const char *who, int src_type, prim_si_s f, Scheme_Object* g184, int g185);
|
||||
#define SIG_sis_v 32
|
||||
typedef void (*prim_sis_v)(Scheme_Object*, int, Scheme_Object*);
|
||||
void scheme_rtcall_sis_v(const char *who, int src_type, prim_sis_v f, Scheme_Object* g180, int g181, Scheme_Object* g182);
|
||||
void scheme_rtcall_sis_v(const char *who, int src_type, prim_sis_v f, Scheme_Object* g186, int g187, Scheme_Object* g188);
|
||||
#define SIG_ss_i 33
|
||||
typedef int (*prim_ss_i)(Scheme_Object*, Scheme_Object*);
|
||||
int scheme_rtcall_ss_i(const char *who, int src_type, prim_ss_i f, Scheme_Object* g189, Scheme_Object* g190);
|
||||
|
|
|
@ -318,5 +318,19 @@ case SIG_sis_v:
|
|||
f(arg_s0, arg_i1, arg_s2);
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
case SIG_ss_i:
|
||||
{
|
||||
prim_ss_i f = (prim_ss_i)future->prim_func;
|
||||
GC_CAN_IGNORE int retval;
|
||||
JIT_TS_LOCALIZE(Scheme_Object*, arg_s0); JIT_TS_LOCALIZE(Scheme_Object*, arg_s1);
|
||||
|
||||
future->arg_s0 = NULL; future->arg_s1 = NULL;
|
||||
|
||||
retval =
|
||||
f(arg_s0, arg_s1);
|
||||
future->retval_i = retval;
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1710,6 +1710,47 @@ int scheme_generate_inlined_binary(mz_jit_state *jitter, Scheme_App3_Rec *app, i
|
|||
__END_SHORT_JUMPS__(branch_short);
|
||||
}
|
||||
|
||||
return 1;
|
||||
} else if (IS_NAMED_PRIM(rator, "equal?")) {
|
||||
GC_CAN_IGNORE jit_insn *ref_f, *ref_d, *refr;
|
||||
|
||||
generate_two_args(app->rand1, app->rand2, jitter, 0, 2);
|
||||
CHECK_LIMIT();
|
||||
|
||||
mz_rs_sync();
|
||||
JIT_UPDATE_THREAD_RSPTR_IF_NEEDED();
|
||||
|
||||
jit_prepare(2);
|
||||
jit_pusharg_p(JIT_R0);
|
||||
jit_pusharg_p(JIT_R1);
|
||||
(void)mz_finish_lwe(ts_scheme_equal, refr);
|
||||
jit_retval(JIT_R0);
|
||||
CHECK_LIMIT();
|
||||
|
||||
__START_SHORT_JUMPS__(branch_short);
|
||||
|
||||
if (for_branch) {
|
||||
scheme_prepare_branch_jump(jitter, for_branch);
|
||||
CHECK_LIMIT();
|
||||
}
|
||||
|
||||
ref_f = jit_beqi_p(jit_forward(), JIT_R0, 0);
|
||||
|
||||
if (for_branch) {
|
||||
scheme_add_branch_false(for_branch, ref_f);
|
||||
scheme_branch_for_true(jitter, for_branch);
|
||||
} else {
|
||||
jit_movi_p(JIT_R0, scheme_true);
|
||||
ref_d = jit_jmpi(jit_forward());
|
||||
|
||||
mz_patch_branch(ref_f);
|
||||
jit_movi_p(JIT_R0, scheme_false);
|
||||
|
||||
mz_patch_ucbranch(ref_d);
|
||||
}
|
||||
|
||||
__END_SHORT_JUMPS__(branch_short);
|
||||
|
||||
return 1;
|
||||
} else if (IS_NAMED_PRIM(rator, "eqv?")) {
|
||||
GC_CAN_IGNORE jit_insn *ref_f1, *ref_f2, *ref_f3, *ref_f4, *ref_f5;
|
||||
|
|
Loading…
Reference in New Issue
Block a user