JIT-inline structure allocation
For simple structure types (no guards, no auto fields, no procedure property). Inlined allocation makes structure allocation a little faster; more significantly, it make structure allocation future-safe.
This commit is contained in:
parent
79ada3b16e
commit
2c56ace436
|
@ -679,6 +679,7 @@ typedef struct Scheme_Offset_Cptr
|
|||
/* Values with SCHEME_PRIM_OTHER_TYPE_MASK */
|
||||
#define SCHEME_PRIM_STRUCT_TYPE_INDEXLESS_GETTER (32 | 256)
|
||||
#define SCHEME_PRIM_STRUCT_TYPE_CONSTR 128
|
||||
#define SCHEME_PRIM_STRUCT_TYPE_SIMPLE_CONSTR (32 | 64 | 128)
|
||||
#define SCHEME_PRIM_STRUCT_TYPE_INDEXLESS_SETTER 256
|
||||
#define SCHEME_PRIM_STRUCT_TYPE_INDEXED_SETTER (128 | 256)
|
||||
#define SCHEME_PRIM_STRUCT_TYPE_BROKEN_INDEXED_SETTER (32 | 128)
|
||||
|
|
|
@ -3096,6 +3096,36 @@ void scheme_rtcall_allocate_values(int count, Scheme_Thread *t)
|
|||
future->arg_s0 = NULL;
|
||||
}
|
||||
|
||||
Scheme_Structure *scheme_rtcall_allocate_structure(int count, Scheme_Struct_Type *t)
|
||||
XFORM_SKIP_PROC
|
||||
/* Called in future thread */
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
future_t *future = fts->thread->current_ft;
|
||||
Scheme_Object *retval;
|
||||
|
||||
future->prim_protocol = SIG_ALLOC_STRUCT;
|
||||
|
||||
future->arg_i0 = count;
|
||||
future->arg_s0 = (Scheme_Object *)t;
|
||||
|
||||
future->time_of_request = get_future_timestamp();
|
||||
future->source_of_request = "[allocate_structure]";
|
||||
future->source_type = FSRC_OTHER;
|
||||
|
||||
future_do_runtimecall(fts, NULL, 1, 0, 0);
|
||||
|
||||
/* Fetch the future again, in case moved by a GC */
|
||||
future = fts->thread->current_ft;
|
||||
|
||||
future->arg_s0 = NULL;
|
||||
|
||||
retval = future->retval_s;
|
||||
future->retval_s = NULL;
|
||||
|
||||
return (Scheme_Structure *)retval;
|
||||
}
|
||||
|
||||
Scheme_Object *scheme_rtcall_tail_apply(Scheme_Object *rator, int argc, Scheme_Object **argv)
|
||||
XFORM_SKIP_PROC
|
||||
/* Called in future thread */
|
||||
|
@ -3459,7 +3489,7 @@ static void do_invoke_rtcall(Scheme_Future_State *fs, future_t *future)
|
|||
}
|
||||
case SIG_FUTURE:
|
||||
{
|
||||
Scheme_Object *s = future->arg_s1;
|
||||
GC_CAN_IGNORE Scheme_Object *s = future->arg_s1;
|
||||
future->arg_s1 = NULL;
|
||||
s = make_future(s, 1, future);
|
||||
future->retval_s = s;
|
||||
|
@ -3473,6 +3503,19 @@ static void do_invoke_rtcall(Scheme_Future_State *fs, future_t *future)
|
|||
|
||||
scheme_jit_allocate_values(future->arg_i0, (Scheme_Thread *)arg_s0);
|
||||
|
||||
break;
|
||||
}
|
||||
case SIG_ALLOC_STRUCT:
|
||||
{
|
||||
GC_CAN_IGNORE Scheme_Object *arg_s0 = future->arg_s0;
|
||||
GC_CAN_IGNORE Scheme_Structure *res;
|
||||
|
||||
future->arg_s0 = NULL;
|
||||
|
||||
res = scheme_jit_allocate_structure(future->arg_i0, (Scheme_Struct_Type *)arg_s0);
|
||||
|
||||
future->retval_s = (Scheme_Object *)res;
|
||||
|
||||
break;
|
||||
}
|
||||
case SIG_TAIL_APPLY:
|
||||
|
|
|
@ -240,11 +240,12 @@ typedef struct fsemaphore_t {
|
|||
#define SIG_ALLOC 2
|
||||
#define SIG_ALLOC_MARK_SEGMENT 3
|
||||
#define SIG_ALLOC_VALUES 4
|
||||
#define SIG_MAKE_FSEMAPHORE 5
|
||||
#define SIG_FUTURE 6
|
||||
#define SIG_WRONG_TYPE_EXN 7
|
||||
#define SIG_TAIL_APPLY 8
|
||||
#define SIG_APPLY_AFRESH 9
|
||||
#define SIG_ALLOC_STRUCT 5
|
||||
#define SIG_MAKE_FSEMAPHORE 6
|
||||
#define SIG_FUTURE 7
|
||||
#define SIG_WRONG_TYPE_EXN 8
|
||||
#define SIG_TAIL_APPLY 9
|
||||
#define SIG_APPLY_AFRESH 10
|
||||
|
||||
# include "jit_ts_protos.h"
|
||||
|
||||
|
@ -254,6 +255,7 @@ extern Scheme_Object **scheme_rtcall_on_demand(Scheme_Object **argv);
|
|||
extern uintptr_t scheme_rtcall_alloc(void);
|
||||
extern void scheme_rtcall_new_mark_segment(Scheme_Thread *p);
|
||||
extern void scheme_rtcall_allocate_values(int count, Scheme_Thread *t);
|
||||
extern Scheme_Structure *scheme_rtcall_allocate_structure(int argc, Scheme_Struct_Type *stype);
|
||||
extern Scheme_Object *scheme_rtcall_make_fsemaphore(Scheme_Object *ready);
|
||||
extern Scheme_Object *scheme_rtcall_make_future(Scheme_Object *proc);
|
||||
extern Scheme_Object *scheme_rtcall_tail_apply(Scheme_Object *rator, int argc, Scheme_Object **argv);
|
||||
|
|
|
@ -153,7 +153,7 @@
|
|||
})
|
||||
(newline))
|
||||
|
||||
(define proto-counter 10)
|
||||
(define proto-counter 11)
|
||||
|
||||
(define (gen-protos t)
|
||||
(define-values (arg-types result-type) (parse-type t))
|
||||
|
|
|
@ -258,6 +258,9 @@ struct scheme_jit_common_record {
|
|||
void *struct_prop_get_defl_code, *struct_prop_get_defl_tail_code, *struct_prop_get_defl_multi_code;
|
||||
void *struct_prop_pred_code, *struct_prop_pred_tail_code, *struct_prop_pred_multi_code;
|
||||
void *struct_proc_extract_code;
|
||||
void *struct_constr_unary_code, *struct_constr_unary_tail_code, *struct_constr_unary_multi_code;
|
||||
void *struct_constr_binary_code, *struct_constr_binary_tail_code, *struct_constr_binary_multi_code;
|
||||
void *struct_constr_nary_code, *struct_constr_nary_tail_code, *struct_constr_nary_multi_code;
|
||||
void *bad_app_vals_target;
|
||||
void *app_values_slow_code, *app_values_multi_slow_code, *app_values_tail_slow_code;
|
||||
void *values_code;
|
||||
|
@ -1180,6 +1183,9 @@ int scheme_generate_inlined_nary(mz_jit_state *jitter, Scheme_App_Rec *app, int
|
|||
int scheme_generate_inlined_test(mz_jit_state *jitter, Scheme_Object *obj, int branch_short,
|
||||
Branch_Info *for_branch, int need_sync);
|
||||
int scheme_generate_cons_alloc(mz_jit_state *jitter, int rev, int inline_retry);
|
||||
int scheme_generate_struct_alloc(mz_jit_state *jitter, int num_args,
|
||||
int inline_slow, int pop_and_jump,
|
||||
int is_tail, int multi_ok);
|
||||
|
||||
/**********************************************************************/
|
||||
/* jitalloc */
|
||||
|
@ -1232,6 +1238,8 @@ int scheme_generate_tail_call(mz_jit_state *jitter, int num_rands, int direct_na
|
|||
int scheme_generate_non_tail_call(mz_jit_state *jitter, int num_rands, int direct_native, int need_set_rs,
|
||||
int multi_ok, int nontail_self, int pop_and_jump, int is_inlined, int unboxed_args);
|
||||
int scheme_generate_finish_tail_call(mz_jit_state *jitter, int direct_native);
|
||||
int scheme_generate_finish_apply(mz_jit_state *jitter);
|
||||
int scheme_generate_finish_multi_apply(mz_jit_state *jitter);
|
||||
int scheme_generate_finish_tail_apply(mz_jit_state *jitter);
|
||||
void scheme_jit_register_sub_func(mz_jit_state *jitter, void *code, Scheme_Object *protocol);
|
||||
void scheme_jit_register_helper_func(mz_jit_state *jitter, void *code);
|
||||
|
@ -1281,6 +1289,7 @@ Scheme_Object **scheme_on_demand(Scheme_Object **argv);
|
|||
Scheme_Object **scheme_on_demand_with_args(Scheme_Object **in_argv, Scheme_Object **argv, int argv_delta);
|
||||
|
||||
void scheme_jit_allocate_values(int count, Scheme_Thread *p);
|
||||
Scheme_Structure *scheme_jit_allocate_structure(int argc, Scheme_Struct_Type *stype);
|
||||
|
||||
void scheme_prepare_branch_jump(mz_jit_state *jitter, Branch_Info *for_branch);
|
||||
void scheme_branch_for_true(mz_jit_state *jitter, Branch_Info *for_branch);
|
||||
|
|
|
@ -1,39 +1,39 @@
|
|||
#define define_ts_siS_s(id, src_type) \
|
||||
static Scheme_Object* ts_ ## id(Scheme_Object* g7, int g8, Scheme_Object** g9) \
|
||||
static Scheme_Object* ts_ ## id(Scheme_Object* g8, int g9, Scheme_Object** g10) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
return scheme_rtcall_siS_s("[" #id "]", src_type, id, g7, g8, g9); \
|
||||
return scheme_rtcall_siS_s("[" #id "]", src_type, id, g8, g9, g10); \
|
||||
else \
|
||||
return id(g7, g8, g9); \
|
||||
return id(g8, g9, g10); \
|
||||
}
|
||||
#define define_ts_iSs_s(id, src_type) \
|
||||
static Scheme_Object* ts_ ## id(int g10, Scheme_Object** g11, Scheme_Object* g12) \
|
||||
static Scheme_Object* ts_ ## id(int g11, Scheme_Object** g12, Scheme_Object* g13) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
return scheme_rtcall_iSs_s("[" #id "]", src_type, id, g10, g11, g12); \
|
||||
return scheme_rtcall_iSs_s("[" #id "]", src_type, id, g11, g12, g13); \
|
||||
else \
|
||||
return id(g10, g11, g12); \
|
||||
return id(g11, g12, g13); \
|
||||
}
|
||||
#define define_ts_s_s(id, src_type) \
|
||||
static Scheme_Object* ts_ ## id(Scheme_Object* g13) \
|
||||
static Scheme_Object* ts_ ## id(Scheme_Object* g14) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
return scheme_rtcall_s_s("[" #id "]", src_type, id, g13); \
|
||||
else \
|
||||
return id(g13); \
|
||||
}
|
||||
#define define_ts_n_s(id, src_type) \
|
||||
static Scheme_Object* ts_ ## id(Scheme_Native_Closure_Data* g14) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
return scheme_rtcall_n_s("[" #id "]", src_type, id, g14); \
|
||||
return scheme_rtcall_s_s("[" #id "]", src_type, id, g14); \
|
||||
else \
|
||||
return id(g14); \
|
||||
}
|
||||
#define define_ts_n_s(id, src_type) \
|
||||
static Scheme_Object* ts_ ## id(Scheme_Native_Closure_Data* g15) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
return scheme_rtcall_n_s("[" #id "]", src_type, id, g15); \
|
||||
else \
|
||||
return id(g15); \
|
||||
}
|
||||
#define define_ts__s(id, src_type) \
|
||||
static Scheme_Object* ts_ ## id() \
|
||||
XFORM_SKIP_PROC \
|
||||
|
@ -44,202 +44,202 @@ static Scheme_Object* ts_ ## id() \
|
|||
return id(); \
|
||||
}
|
||||
#define define_ts_ss_s(id, src_type) \
|
||||
static Scheme_Object* ts_ ## id(Scheme_Object* g15, Scheme_Object* g16) \
|
||||
static Scheme_Object* ts_ ## id(Scheme_Object* g16, Scheme_Object* g17) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
return scheme_rtcall_ss_s("[" #id "]", src_type, id, g15, g16); \
|
||||
return scheme_rtcall_ss_s("[" #id "]", src_type, id, g16, g17); \
|
||||
else \
|
||||
return id(g15, g16); \
|
||||
return id(g16, g17); \
|
||||
}
|
||||
#define define_ts_ssi_s(id, src_type) \
|
||||
static Scheme_Object* ts_ ## id(Scheme_Object* g17, Scheme_Object* g18, int g19) \
|
||||
static Scheme_Object* ts_ ## id(Scheme_Object* g18, Scheme_Object* g19, int g20) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
return scheme_rtcall_ssi_s("[" #id "]", src_type, id, g17, g18, g19); \
|
||||
return scheme_rtcall_ssi_s("[" #id "]", src_type, id, g18, g19, g20); \
|
||||
else \
|
||||
return id(g17, g18, g19); \
|
||||
return id(g18, g19, g20); \
|
||||
}
|
||||
#define define_ts_tt_s(id, src_type) \
|
||||
static Scheme_Object* ts_ ## id(const Scheme_Object* g20, const Scheme_Object* g21) \
|
||||
static Scheme_Object* ts_ ## id(const Scheme_Object* g21, const Scheme_Object* g22) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
return scheme_rtcall_tt_s("[" #id "]", src_type, id, g20, g21); \
|
||||
return scheme_rtcall_tt_s("[" #id "]", src_type, id, g21, g22); \
|
||||
else \
|
||||
return id(g20, g21); \
|
||||
return id(g21, g22); \
|
||||
}
|
||||
#define define_ts_ss_m(id, src_type) \
|
||||
static MZ_MARK_STACK_TYPE ts_ ## id(Scheme_Object* g22, Scheme_Object* g23) \
|
||||
static MZ_MARK_STACK_TYPE ts_ ## id(Scheme_Object* g23, Scheme_Object* g24) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
return scheme_rtcall_ss_m("[" #id "]", src_type, id, g22, g23); \
|
||||
return scheme_rtcall_ss_m("[" #id "]", src_type, id, g23, g24); \
|
||||
else \
|
||||
return id(g22, g23); \
|
||||
return id(g23, g24); \
|
||||
}
|
||||
#define define_ts_Sl_s(id, src_type) \
|
||||
static Scheme_Object* ts_ ## id(Scheme_Object** g24, intptr_t g25) \
|
||||
static Scheme_Object* ts_ ## id(Scheme_Object** g25, intptr_t g26) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
return scheme_rtcall_Sl_s("[" #id "]", src_type, id, g24, g25); \
|
||||
return scheme_rtcall_Sl_s("[" #id "]", src_type, id, g25, g26); \
|
||||
else \
|
||||
return id(g24, g25); \
|
||||
return id(g25, g26); \
|
||||
}
|
||||
#define define_ts_l_s(id, src_type) \
|
||||
static Scheme_Object* ts_ ## id(intptr_t g26) \
|
||||
static Scheme_Object* ts_ ## id(intptr_t g27) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
return scheme_rtcall_l_s("[" #id "]", src_type, id, g26); \
|
||||
return scheme_rtcall_l_s("[" #id "]", src_type, id, g27); \
|
||||
else \
|
||||
return id(g26); \
|
||||
return id(g27); \
|
||||
}
|
||||
#define define_ts_bsi_v(id, src_type) \
|
||||
static void ts_ ## id(Scheme_Bucket* g27, Scheme_Object* g28, int g29) \
|
||||
static void ts_ ## id(Scheme_Bucket* g28, Scheme_Object* g29, int g30) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
scheme_rtcall_bsi_v("[" #id "]", src_type, id, g27, g28, g29); \
|
||||
scheme_rtcall_bsi_v("[" #id "]", src_type, id, g28, g29, g30); \
|
||||
else \
|
||||
id(g27, g28, g29); \
|
||||
id(g28, g29, g30); \
|
||||
}
|
||||
#define define_ts_iiS_v(id, src_type) \
|
||||
static void ts_ ## id(int g30, int g31, Scheme_Object** g32) \
|
||||
static void ts_ ## id(int g31, int g32, Scheme_Object** g33) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
scheme_rtcall_iiS_v("[" #id "]", src_type, id, g30, g31, g32); \
|
||||
scheme_rtcall_iiS_v("[" #id "]", src_type, id, g31, g32, g33); \
|
||||
else \
|
||||
id(g30, g31, g32); \
|
||||
id(g31, g32, g33); \
|
||||
}
|
||||
#define define_ts_ss_v(id, src_type) \
|
||||
static void ts_ ## id(Scheme_Object* g33, Scheme_Object* g34) \
|
||||
static void ts_ ## id(Scheme_Object* g34, Scheme_Object* g35) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
scheme_rtcall_ss_v("[" #id "]", src_type, id, g33, g34); \
|
||||
scheme_rtcall_ss_v("[" #id "]", src_type, id, g34, g35); \
|
||||
else \
|
||||
id(g33, g34); \
|
||||
id(g34, g35); \
|
||||
}
|
||||
#define define_ts_b_v(id, src_type) \
|
||||
static void ts_ ## id(Scheme_Bucket* g35) \
|
||||
static void ts_ ## id(Scheme_Bucket* g36) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
scheme_rtcall_b_v("[" #id "]", src_type, id, g35); \
|
||||
scheme_rtcall_b_v("[" #id "]", src_type, id, g36); \
|
||||
else \
|
||||
id(g35); \
|
||||
id(g36); \
|
||||
}
|
||||
#define define_ts_sl_s(id, src_type) \
|
||||
static Scheme_Object* ts_ ## id(Scheme_Object* g36, intptr_t g37) \
|
||||
static Scheme_Object* ts_ ## id(Scheme_Object* g37, intptr_t g38) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
return scheme_rtcall_sl_s("[" #id "]", src_type, id, g36, g37); \
|
||||
return scheme_rtcall_sl_s("[" #id "]", src_type, id, g37, g38); \
|
||||
else \
|
||||
return id(g36, g37); \
|
||||
return id(g37, g38); \
|
||||
}
|
||||
#define define_ts_iS_s(id, src_type) \
|
||||
static Scheme_Object* ts_ ## id(int g38, Scheme_Object** g39) \
|
||||
static Scheme_Object* ts_ ## id(int g39, Scheme_Object** g40) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
return scheme_rtcall_iS_s("[" #id "]", src_type, id, g38, g39); \
|
||||
return scheme_rtcall_iS_s("[" #id "]", src_type, id, g39, g40); \
|
||||
else \
|
||||
return id(g38, g39); \
|
||||
return id(g39, g40); \
|
||||
}
|
||||
#define define_ts_S_s(id, src_type) \
|
||||
static Scheme_Object* ts_ ## id(Scheme_Object** g40) \
|
||||
static Scheme_Object* ts_ ## id(Scheme_Object** g41) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
return scheme_rtcall_S_s("[" #id "]", src_type, id, g40); \
|
||||
return scheme_rtcall_S_s("[" #id "]", src_type, id, g41); \
|
||||
else \
|
||||
return id(g40); \
|
||||
return id(g41); \
|
||||
}
|
||||
#define define_ts_s_v(id, src_type) \
|
||||
static void ts_ ## id(Scheme_Object* g41) \
|
||||
static void ts_ ## id(Scheme_Object* g42) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
scheme_rtcall_s_v("[" #id "]", src_type, id, g41); \
|
||||
scheme_rtcall_s_v("[" #id "]", src_type, id, g42); \
|
||||
else \
|
||||
id(g41); \
|
||||
id(g42); \
|
||||
}
|
||||
#define define_ts_iSi_s(id, src_type) \
|
||||
static Scheme_Object* ts_ ## id(int g42, Scheme_Object** g43, int g44) \
|
||||
static Scheme_Object* ts_ ## id(int g43, Scheme_Object** g44, int g45) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
return scheme_rtcall_iSi_s("[" #id "]", src_type, id, g42, g43, g44); \
|
||||
return scheme_rtcall_iSi_s("[" #id "]", src_type, id, g43, g44, g45); \
|
||||
else \
|
||||
return id(g42, g43, g44); \
|
||||
return id(g43, g44, g45); \
|
||||
}
|
||||
#define define_ts_siS_v(id, src_type) \
|
||||
static void ts_ ## id(Scheme_Object* g45, int g46, Scheme_Object** g47) \
|
||||
static void ts_ ## id(Scheme_Object* g46, int g47, Scheme_Object** g48) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
scheme_rtcall_siS_v("[" #id "]", src_type, id, g45, g46, g47); \
|
||||
scheme_rtcall_siS_v("[" #id "]", src_type, id, g46, g47, g48); \
|
||||
else \
|
||||
id(g45, g46, g47); \
|
||||
id(g46, g47, g48); \
|
||||
}
|
||||
#define define_ts_z_p(id, src_type) \
|
||||
static void* ts_ ## id(size_t g48) \
|
||||
static void* ts_ ## id(size_t g49) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
return scheme_rtcall_z_p("[" #id "]", src_type, id, g48); \
|
||||
return scheme_rtcall_z_p("[" #id "]", src_type, id, g49); \
|
||||
else \
|
||||
return id(g48); \
|
||||
return id(g49); \
|
||||
}
|
||||
#define define_ts_si_s(id, src_type) \
|
||||
static Scheme_Object* ts_ ## id(Scheme_Object* g49, int g50) \
|
||||
static Scheme_Object* ts_ ## id(Scheme_Object* g50, int g51) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
return scheme_rtcall_si_s("[" #id "]", src_type, id, g49, g50); \
|
||||
return scheme_rtcall_si_s("[" #id "]", src_type, id, g50, g51); \
|
||||
else \
|
||||
return id(g49, g50); \
|
||||
return id(g50, g51); \
|
||||
}
|
||||
#define define_ts_sis_v(id, src_type) \
|
||||
static void ts_ ## id(Scheme_Object* g51, int g52, Scheme_Object* g53) \
|
||||
static void ts_ ## id(Scheme_Object* g52, int g53, Scheme_Object* g54) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
scheme_rtcall_sis_v("[" #id "]", src_type, id, g51, g52, g53); \
|
||||
scheme_rtcall_sis_v("[" #id "]", src_type, id, g52, g53, g54); \
|
||||
else \
|
||||
id(g51, g52, g53); \
|
||||
id(g52, g53, g54); \
|
||||
}
|
||||
#define define_ts_ss_i(id, src_type) \
|
||||
static int ts_ ## id(Scheme_Object* g54, Scheme_Object* g55) \
|
||||
static int ts_ ## id(Scheme_Object* g55, Scheme_Object* g56) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
return scheme_rtcall_ss_i("[" #id "]", src_type, id, g54, g55); \
|
||||
return scheme_rtcall_ss_i("[" #id "]", src_type, id, g55, g56); \
|
||||
else \
|
||||
return id(g54, g55); \
|
||||
return id(g55, g56); \
|
||||
}
|
||||
#define define_ts_iSp_v(id, src_type) \
|
||||
static void ts_ ## id(int g56, Scheme_Object** g57, void* g58) \
|
||||
static void ts_ ## id(int g57, Scheme_Object** g58, void* g59) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
scheme_rtcall_iSp_v("[" #id "]", src_type, id, g56, g57, g58); \
|
||||
scheme_rtcall_iSp_v("[" #id "]", src_type, id, g57, g58, g59); \
|
||||
else \
|
||||
id(g56, g57, g58); \
|
||||
id(g57, g58, g59); \
|
||||
}
|
||||
#define define_ts_sss_s(id, src_type) \
|
||||
static Scheme_Object* ts_ ## id(Scheme_Object* g59, Scheme_Object* g60, Scheme_Object* g61) \
|
||||
static Scheme_Object* ts_ ## id(Scheme_Object* g60, Scheme_Object* g61, Scheme_Object* g62) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
return scheme_rtcall_sss_s("[" #id "]", src_type, id, g59, g60, g61); \
|
||||
return scheme_rtcall_sss_s("[" #id "]", src_type, id, g60, g61, g62); \
|
||||
else \
|
||||
return id(g59, g60, g61); \
|
||||
return id(g60, g61, g62); \
|
||||
}
|
||||
#define define_ts__v(id, src_type) \
|
||||
static void ts_ ## id() \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Scheme_Object* scheme_rtcall_siS_s(const char *who, int src_type, prim_siS_s f, Scheme_Object* g62, int g63, Scheme_Object** g64)
|
||||
Scheme_Object* scheme_rtcall_siS_s(const char *who, int src_type, prim_siS_s f, Scheme_Object* g63, int g64, Scheme_Object** g65)
|
||||
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 = g62;
|
||||
future->arg_i1 = g63;
|
||||
future->arg_S2 = g64;
|
||||
future->arg_s0 = g63;
|
||||
future->arg_i1 = g64;
|
||||
future->arg_S2 = g65;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1, 0);
|
||||
fts->thread = scheme_current_thread;
|
||||
|
@ -25,7 +25,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 g65, Scheme_Object** g66, Scheme_Object* g67)
|
||||
Scheme_Object* scheme_rtcall_iSs_s(const char *who, int src_type, prim_iSs_s f, int g66, Scheme_Object** g67, Scheme_Object* g68)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -40,9 +40,9 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_i0 = g65;
|
||||
future->arg_S1 = g66;
|
||||
future->arg_s2 = g67;
|
||||
future->arg_i0 = g66;
|
||||
future->arg_S1 = g67;
|
||||
future->arg_s2 = g68;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1, 0);
|
||||
fts->thread = scheme_current_thread;
|
||||
|
@ -52,7 +52,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* g68)
|
||||
Scheme_Object* scheme_rtcall_s_s(const char *who, int src_type, prim_s_s f, Scheme_Object* g69)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -67,8 +67,8 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_s0 = g68;
|
||||
send_special_result(future, g68);
|
||||
future->arg_s0 = g69;
|
||||
send_special_result(future, g69);
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1, 0);
|
||||
fts->thread = scheme_current_thread;
|
||||
future = fts->thread->current_ft;
|
||||
|
@ -77,7 +77,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* g69)
|
||||
Scheme_Object* scheme_rtcall_n_s(const char *who, int src_type, prim_n_s f, Scheme_Native_Closure_Data* g70)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -92,7 +92,7 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_n0 = g69;
|
||||
future->arg_n0 = g70;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1, 0);
|
||||
fts->thread = scheme_current_thread;
|
||||
|
@ -127,7 +127,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* g70, Scheme_Object* g71)
|
||||
Scheme_Object* scheme_rtcall_ss_s(const char *who, int src_type, prim_ss_s f, Scheme_Object* g71, Scheme_Object* g72)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -142,8 +142,8 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_s0 = g70;
|
||||
future->arg_s1 = g71;
|
||||
future->arg_s0 = g71;
|
||||
future->arg_s1 = g72;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1, 0);
|
||||
fts->thread = scheme_current_thread;
|
||||
|
@ -153,7 +153,7 @@
|
|||
receive_special_result(future, retval, 1);
|
||||
return retval;
|
||||
}
|
||||
Scheme_Object* scheme_rtcall_ssi_s(const char *who, int src_type, prim_ssi_s f, Scheme_Object* g72, Scheme_Object* g73, int g74)
|
||||
Scheme_Object* scheme_rtcall_ssi_s(const char *who, int src_type, prim_ssi_s f, Scheme_Object* g73, Scheme_Object* g74, int g75)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -168,9 +168,9 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_s0 = g72;
|
||||
future->arg_s1 = g73;
|
||||
future->arg_i2 = g74;
|
||||
future->arg_s0 = g73;
|
||||
future->arg_s1 = g74;
|
||||
future->arg_i2 = g75;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1, 0);
|
||||
fts->thread = scheme_current_thread;
|
||||
|
@ -180,7 +180,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* g75, const Scheme_Object* g76)
|
||||
Scheme_Object* scheme_rtcall_tt_s(const char *who, int src_type, prim_tt_s f, const Scheme_Object* g76, const Scheme_Object* g77)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -195,8 +195,8 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_t0 = g75;
|
||||
future->arg_t1 = g76;
|
||||
future->arg_t0 = g76;
|
||||
future->arg_t1 = g77;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1, 0);
|
||||
fts->thread = scheme_current_thread;
|
||||
|
@ -206,7 +206,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* g77, Scheme_Object* g78)
|
||||
MZ_MARK_STACK_TYPE scheme_rtcall_ss_m(const char *who, int src_type, prim_ss_m f, Scheme_Object* g78, Scheme_Object* g79)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -221,8 +221,8 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_s0 = g77;
|
||||
future->arg_s1 = g78;
|
||||
future->arg_s0 = g78;
|
||||
future->arg_s1 = g79;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1, 0);
|
||||
fts->thread = scheme_current_thread;
|
||||
|
@ -232,7 +232,7 @@
|
|||
|
||||
return retval;
|
||||
}
|
||||
Scheme_Object* scheme_rtcall_Sl_s(const char *who, int src_type, prim_Sl_s f, Scheme_Object** g79, intptr_t g80)
|
||||
Scheme_Object* scheme_rtcall_Sl_s(const char *who, int src_type, prim_Sl_s f, Scheme_Object** g80, intptr_t g81)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -247,8 +247,8 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_S0 = g79;
|
||||
future->arg_l1 = g80;
|
||||
future->arg_S0 = g80;
|
||||
future->arg_l1 = g81;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1, 0);
|
||||
fts->thread = scheme_current_thread;
|
||||
|
@ -258,7 +258,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 g81)
|
||||
Scheme_Object* scheme_rtcall_l_s(const char *who, int src_type, prim_l_s f, intptr_t g82)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -273,7 +273,7 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_l0 = g81;
|
||||
future->arg_l0 = g82;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1, 0);
|
||||
fts->thread = scheme_current_thread;
|
||||
|
@ -283,7 +283,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* g82, Scheme_Object* g83, int g84)
|
||||
void scheme_rtcall_bsi_v(const char *who, int src_type, prim_bsi_v f, Scheme_Bucket* g83, Scheme_Object* g84, int g85)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -298,9 +298,9 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_b0 = g82;
|
||||
future->arg_s1 = g83;
|
||||
future->arg_i2 = g84;
|
||||
future->arg_b0 = g83;
|
||||
future->arg_s1 = g84;
|
||||
future->arg_i2 = g85;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1, 0);
|
||||
fts->thread = scheme_current_thread;
|
||||
|
@ -310,7 +310,7 @@
|
|||
|
||||
|
||||
}
|
||||
void scheme_rtcall_iiS_v(const char *who, int src_type, prim_iiS_v f, int g85, int g86, Scheme_Object** g87)
|
||||
void scheme_rtcall_iiS_v(const char *who, int src_type, prim_iiS_v f, int g86, int g87, Scheme_Object** g88)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -325,9 +325,9 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_i0 = g85;
|
||||
future->arg_i1 = g86;
|
||||
future->arg_S2 = g87;
|
||||
future->arg_i0 = g86;
|
||||
future->arg_i1 = g87;
|
||||
future->arg_S2 = g88;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1, 0);
|
||||
fts->thread = scheme_current_thread;
|
||||
|
@ -337,7 +337,7 @@
|
|||
|
||||
|
||||
}
|
||||
void scheme_rtcall_ss_v(const char *who, int src_type, prim_ss_v f, Scheme_Object* g88, Scheme_Object* g89)
|
||||
void scheme_rtcall_ss_v(const char *who, int src_type, prim_ss_v f, Scheme_Object* g89, Scheme_Object* g90)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -352,8 +352,8 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_s0 = g88;
|
||||
future->arg_s1 = g89;
|
||||
future->arg_s0 = g89;
|
||||
future->arg_s1 = g90;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1, 0);
|
||||
fts->thread = scheme_current_thread;
|
||||
|
@ -363,7 +363,7 @@
|
|||
|
||||
|
||||
}
|
||||
void scheme_rtcall_b_v(const char *who, int src_type, prim_b_v f, Scheme_Bucket* g90)
|
||||
void scheme_rtcall_b_v(const char *who, int src_type, prim_b_v f, Scheme_Bucket* g91)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -378,7 +378,7 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_b0 = g90;
|
||||
future->arg_b0 = g91;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1, 0);
|
||||
fts->thread = scheme_current_thread;
|
||||
|
@ -388,7 +388,7 @@
|
|||
|
||||
|
||||
}
|
||||
Scheme_Object* scheme_rtcall_sl_s(const char *who, int src_type, prim_sl_s f, Scheme_Object* g91, intptr_t g92)
|
||||
Scheme_Object* scheme_rtcall_sl_s(const char *who, int src_type, prim_sl_s f, Scheme_Object* g92, intptr_t g93)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -403,8 +403,8 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_s0 = g91;
|
||||
future->arg_l1 = g92;
|
||||
future->arg_s0 = g92;
|
||||
future->arg_l1 = g93;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1, 0);
|
||||
fts->thread = scheme_current_thread;
|
||||
|
@ -414,7 +414,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 g93, Scheme_Object** g94)
|
||||
Scheme_Object* scheme_rtcall_iS_s(const char *who, int src_type, prim_iS_s f, int g94, Scheme_Object** g95)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -429,8 +429,8 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_i0 = g93;
|
||||
future->arg_S1 = g94;
|
||||
future->arg_i0 = g94;
|
||||
future->arg_S1 = g95;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1, 0);
|
||||
fts->thread = scheme_current_thread;
|
||||
|
@ -440,7 +440,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** g95)
|
||||
Scheme_Object* scheme_rtcall_S_s(const char *who, int src_type, prim_S_s f, Scheme_Object** g96)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -455,7 +455,7 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_S0 = g95;
|
||||
future->arg_S0 = g96;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1, 0);
|
||||
fts->thread = scheme_current_thread;
|
||||
|
@ -465,7 +465,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* g96)
|
||||
void scheme_rtcall_s_v(const char *who, int src_type, prim_s_v f, Scheme_Object* g97)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -480,8 +480,8 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_s0 = g96;
|
||||
send_special_result(future, g96);
|
||||
future->arg_s0 = g97;
|
||||
send_special_result(future, g97);
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1, 0);
|
||||
fts->thread = scheme_current_thread;
|
||||
future = fts->thread->current_ft;
|
||||
|
@ -490,7 +490,7 @@
|
|||
|
||||
|
||||
}
|
||||
Scheme_Object* scheme_rtcall_iSi_s(const char *who, int src_type, prim_iSi_s f, int g97, Scheme_Object** g98, int g99)
|
||||
Scheme_Object* scheme_rtcall_iSi_s(const char *who, int src_type, prim_iSi_s f, int g98, Scheme_Object** g99, int g100)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -505,9 +505,9 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_i0 = g97;
|
||||
future->arg_S1 = g98;
|
||||
future->arg_i2 = g99;
|
||||
future->arg_i0 = g98;
|
||||
future->arg_S1 = g99;
|
||||
future->arg_i2 = g100;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1, 0);
|
||||
fts->thread = scheme_current_thread;
|
||||
|
@ -517,7 +517,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* g100, int g101, Scheme_Object** g102)
|
||||
void scheme_rtcall_siS_v(const char *who, int src_type, prim_siS_v f, Scheme_Object* g101, int g102, Scheme_Object** g103)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -532,9 +532,9 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_s0 = g100;
|
||||
future->arg_i1 = g101;
|
||||
future->arg_S2 = g102;
|
||||
future->arg_s0 = g101;
|
||||
future->arg_i1 = g102;
|
||||
future->arg_S2 = g103;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1, 0);
|
||||
fts->thread = scheme_current_thread;
|
||||
|
@ -544,7 +544,7 @@
|
|||
|
||||
|
||||
}
|
||||
void* scheme_rtcall_z_p(const char *who, int src_type, prim_z_p f, size_t g103)
|
||||
void* scheme_rtcall_z_p(const char *who, int src_type, prim_z_p f, size_t g104)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -559,7 +559,7 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_z0 = g103;
|
||||
future->arg_z0 = g104;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1, 0);
|
||||
fts->thread = scheme_current_thread;
|
||||
|
@ -569,7 +569,7 @@
|
|||
|
||||
return retval;
|
||||
}
|
||||
Scheme_Object* scheme_rtcall_si_s(const char *who, int src_type, prim_si_s f, Scheme_Object* g104, int g105)
|
||||
Scheme_Object* scheme_rtcall_si_s(const char *who, int src_type, prim_si_s f, Scheme_Object* g105, int g106)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -584,8 +584,8 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_s0 = g104;
|
||||
future->arg_i1 = g105;
|
||||
future->arg_s0 = g105;
|
||||
future->arg_i1 = g106;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1, 0);
|
||||
fts->thread = scheme_current_thread;
|
||||
|
@ -595,7 +595,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* g106, int g107, Scheme_Object* g108)
|
||||
void scheme_rtcall_sis_v(const char *who, int src_type, prim_sis_v f, Scheme_Object* g107, int g108, Scheme_Object* g109)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -610,9 +610,9 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_s0 = g106;
|
||||
future->arg_i1 = g107;
|
||||
future->arg_s2 = g108;
|
||||
future->arg_s0 = g107;
|
||||
future->arg_i1 = g108;
|
||||
future->arg_s2 = g109;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1, 0);
|
||||
fts->thread = scheme_current_thread;
|
||||
|
@ -622,7 +622,7 @@
|
|||
|
||||
|
||||
}
|
||||
int scheme_rtcall_ss_i(const char *who, int src_type, prim_ss_i f, Scheme_Object* g109, Scheme_Object* g110)
|
||||
int scheme_rtcall_ss_i(const char *who, int src_type, prim_ss_i f, Scheme_Object* g110, Scheme_Object* g111)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -637,8 +637,8 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_s0 = g109;
|
||||
future->arg_s1 = g110;
|
||||
future->arg_s0 = g110;
|
||||
future->arg_s1 = g111;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1, 0);
|
||||
fts->thread = scheme_current_thread;
|
||||
|
@ -648,7 +648,7 @@
|
|||
|
||||
return retval;
|
||||
}
|
||||
void scheme_rtcall_iSp_v(const char *who, int src_type, prim_iSp_v f, int g111, Scheme_Object** g112, void* g113)
|
||||
void scheme_rtcall_iSp_v(const char *who, int src_type, prim_iSp_v f, int g112, Scheme_Object** g113, void* g114)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -663,9 +663,9 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_i0 = g111;
|
||||
future->arg_S1 = g112;
|
||||
future->arg_p2 = g113;
|
||||
future->arg_i0 = g112;
|
||||
future->arg_S1 = g113;
|
||||
future->arg_p2 = g114;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1, 0);
|
||||
fts->thread = scheme_current_thread;
|
||||
|
@ -675,7 +675,7 @@
|
|||
|
||||
|
||||
}
|
||||
Scheme_Object* scheme_rtcall_sss_s(const char *who, int src_type, prim_sss_s f, Scheme_Object* g114, Scheme_Object* g115, Scheme_Object* g116)
|
||||
Scheme_Object* scheme_rtcall_sss_s(const char *who, int src_type, prim_sss_s f, Scheme_Object* g115, Scheme_Object* g116, Scheme_Object* g117)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -690,9 +690,9 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_s0 = g114;
|
||||
future->arg_s1 = g115;
|
||||
future->arg_s2 = g116;
|
||||
future->arg_s0 = g115;
|
||||
future->arg_s1 = g116;
|
||||
future->arg_s2 = g117;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0, 1, 0);
|
||||
fts->thread = scheme_current_thread;
|
||||
|
|
|
@ -1,84 +1,84 @@
|
|||
#define SIG_siS_s 10
|
||||
#define SIG_siS_s 11
|
||||
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* g172, int g173, Scheme_Object** g174);
|
||||
#define SIG_iSs_s 11
|
||||
Scheme_Object* scheme_rtcall_siS_s(const char *who, int src_type, prim_siS_s f, Scheme_Object* g173, int g174, Scheme_Object** g175);
|
||||
#define SIG_iSs_s 12
|
||||
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 g175, Scheme_Object** g176, Scheme_Object* g177);
|
||||
#define SIG_s_s 12
|
||||
Scheme_Object* scheme_rtcall_iSs_s(const char *who, int src_type, prim_iSs_s f, int g176, Scheme_Object** g177, Scheme_Object* g178);
|
||||
#define SIG_s_s 13
|
||||
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* g178);
|
||||
#define SIG_n_s 13
|
||||
Scheme_Object* scheme_rtcall_s_s(const char *who, int src_type, prim_s_s f, Scheme_Object* g179);
|
||||
#define SIG_n_s 14
|
||||
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* g179);
|
||||
#define SIG__s 14
|
||||
Scheme_Object* scheme_rtcall_n_s(const char *who, int src_type, prim_n_s f, Scheme_Native_Closure_Data* g180);
|
||||
#define SIG__s 15
|
||||
typedef Scheme_Object* (*prim__s)();
|
||||
Scheme_Object* scheme_rtcall__s(const char *who, int src_type, prim__s f );
|
||||
#define SIG_ss_s 15
|
||||
#define SIG_ss_s 16
|
||||
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* g180, Scheme_Object* g181);
|
||||
#define SIG_ssi_s 16
|
||||
Scheme_Object* scheme_rtcall_ss_s(const char *who, int src_type, prim_ss_s f, Scheme_Object* g181, Scheme_Object* g182);
|
||||
#define SIG_ssi_s 17
|
||||
typedef Scheme_Object* (*prim_ssi_s)(Scheme_Object*, Scheme_Object*, int);
|
||||
Scheme_Object* scheme_rtcall_ssi_s(const char *who, int src_type, prim_ssi_s f, Scheme_Object* g182, Scheme_Object* g183, int g184);
|
||||
#define SIG_tt_s 17
|
||||
Scheme_Object* scheme_rtcall_ssi_s(const char *who, int src_type, prim_ssi_s f, Scheme_Object* g183, Scheme_Object* g184, int g185);
|
||||
#define SIG_tt_s 18
|
||||
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* g185, const Scheme_Object* g186);
|
||||
#define SIG_ss_m 18
|
||||
Scheme_Object* scheme_rtcall_tt_s(const char *who, int src_type, prim_tt_s f, const Scheme_Object* g186, const Scheme_Object* g187);
|
||||
#define SIG_ss_m 19
|
||||
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* g187, Scheme_Object* g188);
|
||||
#define SIG_Sl_s 19
|
||||
MZ_MARK_STACK_TYPE scheme_rtcall_ss_m(const char *who, int src_type, prim_ss_m f, Scheme_Object* g188, Scheme_Object* g189);
|
||||
#define SIG_Sl_s 20
|
||||
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** g189, intptr_t g190);
|
||||
#define SIG_l_s 20
|
||||
Scheme_Object* scheme_rtcall_Sl_s(const char *who, int src_type, prim_Sl_s f, Scheme_Object** g190, intptr_t g191);
|
||||
#define SIG_l_s 21
|
||||
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 g191);
|
||||
#define SIG_bsi_v 21
|
||||
Scheme_Object* scheme_rtcall_l_s(const char *who, int src_type, prim_l_s f, intptr_t g192);
|
||||
#define SIG_bsi_v 22
|
||||
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* g192, Scheme_Object* g193, int g194);
|
||||
#define SIG_iiS_v 22
|
||||
void scheme_rtcall_bsi_v(const char *who, int src_type, prim_bsi_v f, Scheme_Bucket* g193, Scheme_Object* g194, int g195);
|
||||
#define SIG_iiS_v 23
|
||||
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 g195, int g196, Scheme_Object** g197);
|
||||
#define SIG_ss_v 23
|
||||
void scheme_rtcall_iiS_v(const char *who, int src_type, prim_iiS_v f, int g196, int g197, Scheme_Object** g198);
|
||||
#define SIG_ss_v 24
|
||||
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* g198, Scheme_Object* g199);
|
||||
#define SIG_b_v 24
|
||||
void scheme_rtcall_ss_v(const char *who, int src_type, prim_ss_v f, Scheme_Object* g199, Scheme_Object* g200);
|
||||
#define SIG_b_v 25
|
||||
typedef void (*prim_b_v)(Scheme_Bucket*);
|
||||
void scheme_rtcall_b_v(const char *who, int src_type, prim_b_v f, Scheme_Bucket* g200);
|
||||
#define SIG_sl_s 25
|
||||
void scheme_rtcall_b_v(const char *who, int src_type, prim_b_v f, Scheme_Bucket* g201);
|
||||
#define SIG_sl_s 26
|
||||
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* g201, intptr_t g202);
|
||||
#define SIG_iS_s 26
|
||||
Scheme_Object* scheme_rtcall_sl_s(const char *who, int src_type, prim_sl_s f, Scheme_Object* g202, intptr_t g203);
|
||||
#define SIG_iS_s 27
|
||||
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 g203, Scheme_Object** g204);
|
||||
#define SIG_S_s 27
|
||||
Scheme_Object* scheme_rtcall_iS_s(const char *who, int src_type, prim_iS_s f, int g204, Scheme_Object** g205);
|
||||
#define SIG_S_s 28
|
||||
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** g205);
|
||||
#define SIG_s_v 28
|
||||
Scheme_Object* scheme_rtcall_S_s(const char *who, int src_type, prim_S_s f, Scheme_Object** g206);
|
||||
#define SIG_s_v 29
|
||||
typedef void (*prim_s_v)(Scheme_Object*);
|
||||
void scheme_rtcall_s_v(const char *who, int src_type, prim_s_v f, Scheme_Object* g206);
|
||||
#define SIG_iSi_s 29
|
||||
void scheme_rtcall_s_v(const char *who, int src_type, prim_s_v f, Scheme_Object* g207);
|
||||
#define SIG_iSi_s 30
|
||||
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 g207, Scheme_Object** g208, int g209);
|
||||
#define SIG_siS_v 30
|
||||
Scheme_Object* scheme_rtcall_iSi_s(const char *who, int src_type, prim_iSi_s f, int g208, Scheme_Object** g209, int g210);
|
||||
#define SIG_siS_v 31
|
||||
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* g210, int g211, Scheme_Object** g212);
|
||||
#define SIG_z_p 31
|
||||
void scheme_rtcall_siS_v(const char *who, int src_type, prim_siS_v f, Scheme_Object* g211, int g212, Scheme_Object** g213);
|
||||
#define SIG_z_p 32
|
||||
typedef void* (*prim_z_p)(size_t);
|
||||
void* scheme_rtcall_z_p(const char *who, int src_type, prim_z_p f, size_t g213);
|
||||
#define SIG_si_s 32
|
||||
void* scheme_rtcall_z_p(const char *who, int src_type, prim_z_p f, size_t g214);
|
||||
#define SIG_si_s 33
|
||||
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* g214, int g215);
|
||||
#define SIG_sis_v 33
|
||||
Scheme_Object* scheme_rtcall_si_s(const char *who, int src_type, prim_si_s f, Scheme_Object* g215, int g216);
|
||||
#define SIG_sis_v 34
|
||||
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* g216, int g217, Scheme_Object* g218);
|
||||
#define SIG_ss_i 34
|
||||
void scheme_rtcall_sis_v(const char *who, int src_type, prim_sis_v f, Scheme_Object* g217, int g218, Scheme_Object* g219);
|
||||
#define SIG_ss_i 35
|
||||
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* g219, Scheme_Object* g220);
|
||||
#define SIG_iSp_v 35
|
||||
int scheme_rtcall_ss_i(const char *who, int src_type, prim_ss_i f, Scheme_Object* g220, Scheme_Object* g221);
|
||||
#define SIG_iSp_v 36
|
||||
typedef void (*prim_iSp_v)(int, Scheme_Object**, void*);
|
||||
void scheme_rtcall_iSp_v(const char *who, int src_type, prim_iSp_v f, int g221, Scheme_Object** g222, void* g223);
|
||||
#define SIG_sss_s 36
|
||||
void scheme_rtcall_iSp_v(const char *who, int src_type, prim_iSp_v f, int g222, Scheme_Object** g223, void* g224);
|
||||
#define SIG_sss_s 37
|
||||
typedef Scheme_Object* (*prim_sss_s)(Scheme_Object*, Scheme_Object*, Scheme_Object*);
|
||||
Scheme_Object* scheme_rtcall_sss_s(const char *who, int src_type, prim_sss_s f, Scheme_Object* g224, Scheme_Object* g225, Scheme_Object* g226);
|
||||
#define SIG__v 37
|
||||
Scheme_Object* scheme_rtcall_sss_s(const char *who, int src_type, prim_sss_s f, Scheme_Object* g225, Scheme_Object* g226, Scheme_Object* g227);
|
||||
#define SIG__v 38
|
||||
typedef void (*prim__v)();
|
||||
void scheme_rtcall__v(const char *who, int src_type, prim__v f );
|
||||
|
|
|
@ -515,6 +515,13 @@ int scheme_generate_tail_call(mz_jit_state *jitter, int num_rands, int direct_na
|
|||
return 1;
|
||||
}
|
||||
|
||||
int scheme_generate_finish_apply(mz_jit_state *jitter)
|
||||
{
|
||||
GC_CAN_IGNORE jit_insn *refr;
|
||||
(void)mz_finish_lwe(ts__scheme_apply_from_native, refr);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int scheme_generate_finish_tail_apply(mz_jit_state *jitter)
|
||||
{
|
||||
GC_CAN_IGNORE jit_insn *refr;
|
||||
|
@ -522,6 +529,13 @@ int scheme_generate_finish_tail_apply(mz_jit_state *jitter)
|
|||
return 1;
|
||||
}
|
||||
|
||||
int scheme_generate_finish_multi_apply(mz_jit_state *jitter)
|
||||
{
|
||||
GC_CAN_IGNORE jit_insn *refr;
|
||||
(void)mz_finish_lwe(ts__scheme_apply_multi_from_native, refr);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int scheme_generate_finish_tail_call(mz_jit_state *jitter, int direct_native)
|
||||
{
|
||||
mz_prepare(3);
|
||||
|
|
|
@ -175,7 +175,6 @@ static void chaperone_set_mark()
|
|||
}
|
||||
|
||||
#define JITCOMMON_TS_PROCS
|
||||
#define JIT_APPLY_TS_PROCS
|
||||
#include "jit_ts.c"
|
||||
|
||||
#ifdef MZ_USE_FUTURES
|
||||
|
@ -761,7 +760,7 @@ static int common2(mz_jit_state *jitter, void *_data)
|
|||
jit_pusharg_p(JIT_R2);
|
||||
jit_pusharg_i(JIT_R1);
|
||||
jit_pusharg_p(JIT_R0);
|
||||
(void)mz_finish_lwe(ts__scheme_apply_multi_from_native, ref);
|
||||
scheme_generate_finish_multi_apply(jitter);
|
||||
CHECK_LIMIT();
|
||||
mz_pop_threadlocal();
|
||||
mz_pop_locals();
|
||||
|
@ -1378,12 +1377,12 @@ static int gen_struct_slow(mz_jit_state *jitter, int kind, int ok_proc,
|
|||
jit_pusharg_p(JIT_R0);
|
||||
if (is_tail) {
|
||||
scheme_generate_finish_tail_apply(jitter);
|
||||
CHECK_LIMIT();
|
||||
} else if (multi_ok) {
|
||||
(void)mz_finish_lwe(ts__scheme_apply_multi_from_native, refrts);
|
||||
scheme_generate_finish_multi_apply(jitter);
|
||||
} else {
|
||||
(void)mz_finish_lwe(ts__scheme_apply_from_native, refrts);
|
||||
scheme_generate_finish_apply(jitter);
|
||||
}
|
||||
CHECK_LIMIT();
|
||||
} else {
|
||||
/* The proc is a setter or getter, but the argument is
|
||||
bad or chaperoned. We can take a shortcut by using
|
||||
|
@ -1789,7 +1788,7 @@ static int common4b(mz_jit_state *jitter, void *_data)
|
|||
for (i = 0; i < 3; i++) {
|
||||
for (ii = 0; ii < 3; ii++) { /* single, multi, or tail */
|
||||
void *code;
|
||||
GC_CAN_IGNORE jit_insn *ref, *ref2, *ref3, *refno, *refslow, *refloop, *refrts;
|
||||
GC_CAN_IGNORE jit_insn *ref, *ref2, *ref3, *refno, *refslow, *refloop;
|
||||
|
||||
code = jit_get_ip().ptr;
|
||||
|
||||
|
@ -1844,12 +1843,12 @@ static int common4b(mz_jit_state *jitter, void *_data)
|
|||
jit_pusharg_p(JIT_R0);
|
||||
if (ii == 2) {
|
||||
scheme_generate_finish_tail_apply(jitter);
|
||||
CHECK_LIMIT();
|
||||
} else if (ii == 1) {
|
||||
(void)mz_finish_lwe(ts__scheme_apply_multi_from_native, refrts);
|
||||
scheme_generate_finish_multi_apply(jitter);
|
||||
} else {
|
||||
(void)mz_finish_lwe(ts__scheme_apply_from_native, refrts);
|
||||
scheme_generate_finish_apply(jitter);
|
||||
}
|
||||
CHECK_LIMIT();
|
||||
jit_retval(JIT_R0);
|
||||
VALIDATE_RESULT(JIT_R0);
|
||||
if (i == 1) {
|
||||
|
@ -1956,6 +1955,61 @@ static int common4b(mz_jit_state *jitter, void *_data)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int common4c(mz_jit_state *jitter, void *_data)
|
||||
{
|
||||
int i, ii;
|
||||
|
||||
/* We can't use this code if inline alloc isn't supported, but make it
|
||||
compiled in that mode, anyway. */
|
||||
|
||||
/* *** struct_constr_{unary,binary,nary}_[multi_,tail_]code *** */
|
||||
/* For unary case, rator is in R0, R1 is argument.
|
||||
For binary case, rator is in R0, R1 is first argument, V1 is second argument.
|
||||
For nary case, rator in R0, args on are on runstack, R1 has the count. */
|
||||
for (i = 0; i < 3; i++) { /* unary, binary, or nary */
|
||||
for (ii = 0; ii < 3; ii++) { /* single, multi, or tail */
|
||||
void *code;
|
||||
int num_args;
|
||||
|
||||
code = jit_get_ip().ptr;
|
||||
|
||||
if (i == 0) {
|
||||
if (ii == 2)
|
||||
sjc.struct_constr_unary_tail_code = code;
|
||||
else if (ii == 1)
|
||||
sjc.struct_constr_unary_multi_code = code;
|
||||
else
|
||||
sjc.struct_constr_unary_code = code;
|
||||
num_args = 1;
|
||||
} else if (i == 1) {
|
||||
if (ii == 2)
|
||||
sjc.struct_constr_binary_tail_code = code;
|
||||
else if (ii == 1)
|
||||
sjc.struct_constr_binary_multi_code = code;
|
||||
else
|
||||
sjc.struct_constr_binary_code = code;
|
||||
num_args = 2;
|
||||
} else if (i == 2) {
|
||||
if (ii == 2)
|
||||
sjc.struct_constr_nary_tail_code = code;
|
||||
else if (ii == 1)
|
||||
sjc.struct_constr_nary_multi_code = code;
|
||||
else
|
||||
sjc.struct_constr_nary_code = code;
|
||||
num_args =-1;
|
||||
}
|
||||
|
||||
scheme_generate_struct_alloc(jitter, num_args, 1, 1, ii == 2, ii == 1);
|
||||
|
||||
CHECK_LIMIT();
|
||||
|
||||
scheme_jit_register_sub_func(jitter, code, scheme_false);
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int common5(mz_jit_state *jitter, void *_data)
|
||||
{
|
||||
int i, ii;
|
||||
|
@ -2792,6 +2846,7 @@ int scheme_do_generate_common(mz_jit_state *jitter, void *_data)
|
|||
if (!common3(jitter, _data)) return 0;
|
||||
if (!common4(jitter, _data)) return 0;
|
||||
if (!common4b(jitter, _data)) return 0;
|
||||
if (!common4c(jitter, _data)) return 0;
|
||||
if (!common5(jitter, _data)) return 0;
|
||||
if (!common6(jitter, _data)) return 0;
|
||||
if (!common7(jitter, _data)) return 0;
|
||||
|
|
|
@ -122,16 +122,13 @@ static int check_val_struct_prim(Scheme_Object *p, int arity)
|
|||
{
|
||||
if (p && SCHEME_PRIMP(p)) {
|
||||
int t = (((Scheme_Primitive_Proc *)p)->pp.flags & SCHEME_PRIM_OTHER_TYPE_MASK);
|
||||
if (t == SCHEME_PRIM_STRUCT_TYPE_CONSTR) {
|
||||
#if 0
|
||||
/* not yet ready... */
|
||||
if (t == SCHEME_PRIM_STRUCT_TYPE_SIMPLE_CONSTR) {
|
||||
Scheme_Struct_Type *t;
|
||||
t = (Scheme_Struct_Type *)SCHEME_PRIM_CLOSURE_ELS(p)[0];
|
||||
if ((arity == t->num_islots)
|
||||
&& scheme_is_simple_struct_type(t)) {
|
||||
if ((arity == t->num_islots)
|
||||
&& (arity < 100)) {
|
||||
return INLINE_STRUCT_PROC_CONSTR;
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
} else if (arity == 1) {
|
||||
if (t == SCHEME_PRIM_STRUCT_TYPE_PRED)
|
||||
|
@ -444,13 +441,7 @@ static int generate_inlined_struct_op(int kind, mz_jit_state *jitter,
|
|||
(void)jit_calli(sjc.struct_prop_pred_code);
|
||||
}
|
||||
} else if (kind == INLINE_STRUCT_PROC_CONSTR) {
|
||||
return 0;
|
||||
#if 0
|
||||
if (!rand2)
|
||||
(void)jit_calli(sjc.struct_constr_unary_code);
|
||||
else
|
||||
(void)jit_calli(sjc.struct_constr_binary_code);
|
||||
#endif
|
||||
scheme_generate_struct_alloc(jitter, rand2 ? 2 : 1, 0, 0, is_tail, multi_ok);
|
||||
} else {
|
||||
scheme_signal_error("internal error: unknown struct-op mode");
|
||||
}
|
||||
|
@ -458,21 +449,309 @@ static int generate_inlined_struct_op(int kind, mz_jit_state *jitter,
|
|||
return 1;
|
||||
}
|
||||
|
||||
#ifdef CAN_INLINE_ALLOC
|
||||
static int inline_struct_alloc(mz_jit_state *jitter, int c, int inline_slow)
|
||||
{
|
||||
return scheme_inline_alloc(jitter,
|
||||
sizeof(Scheme_Structure) + ((c - mzFLEX_DELTA) * sizeof(Scheme_Object*)),
|
||||
scheme_structure_type,
|
||||
0, 1, 0, inline_slow);
|
||||
}
|
||||
#endif
|
||||
|
||||
static Scheme_Object *alloc_structure(Scheme_Object *_stype, int argc)
|
||||
#ifdef MZ_USE_FUTURES
|
||||
XFORM_SKIP_PROC
|
||||
#endif
|
||||
{
|
||||
Scheme_Struct_Type *stype = (Scheme_Struct_Type *)_stype;
|
||||
Scheme_Structure *inst;
|
||||
Scheme_Object **args;
|
||||
int i;
|
||||
|
||||
#ifdef MZ_USE_FUTURES
|
||||
jit_future_storage[0] = stype;
|
||||
#endif
|
||||
|
||||
inst = (Scheme_Structure *)
|
||||
scheme_malloc_tagged(sizeof(Scheme_Structure)
|
||||
+ ((argc - mzFLEX_DELTA) * sizeof(Scheme_Object *)));
|
||||
|
||||
#ifdef MZ_USE_FUTURES
|
||||
stype = (Scheme_Struct_Type *)jit_future_storage[0];
|
||||
|
||||
if (!inst) {
|
||||
/* Must be in a future thread */
|
||||
inst = scheme_rtcall_allocate_structure(argc, stype);
|
||||
} else
|
||||
#endif
|
||||
inst->stype = stype;
|
||||
|
||||
inst->so.type = scheme_structure_type;
|
||||
|
||||
args = MZ_RUNSTACK;
|
||||
for (i = 0; i < argc; i++) {
|
||||
inst->slots[i] = args[i];
|
||||
}
|
||||
|
||||
return (Scheme_Object *)inst;
|
||||
}
|
||||
|
||||
Scheme_Structure *scheme_jit_allocate_structure(int argc, Scheme_Struct_Type *stype)
|
||||
{
|
||||
Scheme_Structure *inst;
|
||||
|
||||
inst = (Scheme_Structure *)
|
||||
scheme_malloc_tagged(sizeof(Scheme_Structure)
|
||||
+ ((argc - mzFLEX_DELTA) * sizeof(Scheme_Object *)));
|
||||
inst->stype = stype;
|
||||
|
||||
return inst;
|
||||
}
|
||||
|
||||
static int generate_inlined_nary_struct_op(int kind, mz_jit_state *jitter,
|
||||
Scheme_Object *rator, Scheme_App_Rec *app,
|
||||
Branch_Info *for_branch, int branch_short,
|
||||
int multi_ok)
|
||||
int is_tail, int multi_ok)
|
||||
/* de-sync'd ok; for branch, sync'd before */
|
||||
{
|
||||
#if 1
|
||||
scheme_signal_error("shouldn't get here, yet"); /* REMOVEME */
|
||||
#else
|
||||
/* generate code to evaluate the arguments */
|
||||
scheme_generate_app(app, NULL, app->num_args, jitter, 0, 0, 2);
|
||||
scheme_generate_app(app, NULL, app->num_args, jitter, 0, 0, 1);
|
||||
CHECK_LIMIT();
|
||||
mz_rs_sync();
|
||||
|
||||
jit_movr_l(JIT_R0, JIT_V1); /* move rator to R0 */
|
||||
|
||||
/* arguments are now on the runstack, rator is in R0 */
|
||||
scheme_generate_struct_alloc(jitter, app->num_args, 0, 0, is_tail, multi_ok);
|
||||
|
||||
CHECK_LIMIT();
|
||||
|
||||
if (!is_tail && app->num_args) {
|
||||
mz_rs_inc(app->num_args);
|
||||
mz_runstack_popped(jitter, app->num_args);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int scheme_generate_struct_alloc(mz_jit_state *jitter, int num_args,
|
||||
int inline_slow, int pop_and_jump,
|
||||
int is_tail, int multi_ok)
|
||||
/* Rator is in R0.
|
||||
For unary case, R1 is argument.
|
||||
For binary case, R1 is first argument, V1 is second argument.
|
||||
For nary case, args on are on runstack.
|
||||
If num_args is -1, nary and R1 has the count.*/
|
||||
{
|
||||
GC_CAN_IGNORE jit_insn *ref, *refslow, *refrts, *refdone;
|
||||
int always_slow = 0;
|
||||
|
||||
#ifndef CAN_INLINE_ALLOC
|
||||
if (!inline_slow)
|
||||
always_slow = 1;
|
||||
#endif
|
||||
return 0;
|
||||
|
||||
if (pop_and_jump) {
|
||||
mz_prolog(JIT_R2);
|
||||
}
|
||||
|
||||
__START_SHORT_JUMPS__(1);
|
||||
|
||||
if (!always_slow) {
|
||||
ref = jit_bmci_ul(jit_forward(), JIT_R0, 0x1);
|
||||
CHECK_LIMIT();
|
||||
}
|
||||
|
||||
/* Slow path: non-struct-prop proc, or argument type is
|
||||
bad for a getter. */
|
||||
refslow = _jit.x.pc;
|
||||
if (inline_slow) {
|
||||
if (num_args == 1) {
|
||||
jit_subi_p(JIT_RUNSTACK, JIT_RUNSTACK, WORDS_TO_BYTES(1));
|
||||
CHECK_RUNSTACK_OVERFLOW();
|
||||
JIT_UPDATE_THREAD_RSPTR();
|
||||
jit_str_p(JIT_RUNSTACK, JIT_R1);
|
||||
jit_movi_i(JIT_V1, 1);
|
||||
num_args = 1;
|
||||
} else if (num_args == 2) {
|
||||
jit_subi_p(JIT_RUNSTACK, JIT_RUNSTACK, WORDS_TO_BYTES(2));
|
||||
CHECK_RUNSTACK_OVERFLOW();
|
||||
JIT_UPDATE_THREAD_RSPTR();
|
||||
jit_str_p(JIT_RUNSTACK, JIT_R1);
|
||||
jit_stxi_p(WORDS_TO_BYTES(1), JIT_RUNSTACK, JIT_V1);
|
||||
jit_movi_i(JIT_V1, 2);
|
||||
num_args = 2;
|
||||
} else {
|
||||
JIT_UPDATE_THREAD_RSPTR();
|
||||
if (num_args == -1)
|
||||
jit_movr_i(JIT_V1, JIT_R1);
|
||||
else
|
||||
jit_movi_i(JIT_V1, num_args);
|
||||
num_args = -1;
|
||||
}
|
||||
CHECK_LIMIT();
|
||||
jit_prepare(3);
|
||||
jit_pusharg_p(JIT_RUNSTACK);
|
||||
jit_pusharg_i(JIT_V1);
|
||||
jit_pusharg_p(JIT_R0);
|
||||
if (is_tail) {
|
||||
scheme_generate_finish_tail_apply(jitter);
|
||||
} else if (multi_ok) {
|
||||
scheme_generate_finish_multi_apply(jitter);
|
||||
} else {
|
||||
scheme_generate_finish_apply(jitter);
|
||||
}
|
||||
CHECK_LIMIT();
|
||||
jit_retval(JIT_R0);
|
||||
VALIDATE_RESULT(JIT_R0);
|
||||
if ((num_args == 1) || (num_args == 2)) {
|
||||
jit_addi_p(JIT_RUNSTACK, JIT_RUNSTACK, WORDS_TO_BYTES(num_args));
|
||||
JIT_UPDATE_THREAD_RSPTR();
|
||||
}
|
||||
} else {
|
||||
if (num_args == 1) {
|
||||
if (is_tail)
|
||||
(void)jit_calli(sjc.struct_constr_unary_tail_code);
|
||||
else if (multi_ok)
|
||||
(void)jit_calli(sjc.struct_constr_unary_multi_code);
|
||||
else
|
||||
(void)jit_calli(sjc.struct_constr_unary_code);
|
||||
} else if (num_args == 2) {
|
||||
if (is_tail)
|
||||
(void)jit_calli(sjc.struct_constr_binary_tail_code);
|
||||
else if (multi_ok)
|
||||
(void)jit_calli(sjc.struct_constr_binary_multi_code);
|
||||
else
|
||||
(void)jit_calli(sjc.struct_constr_binary_code);
|
||||
} else {
|
||||
if (num_args != -1) {
|
||||
jit_movi_l(JIT_R1, num_args);
|
||||
}
|
||||
if (is_tail)
|
||||
(void)jit_calli(sjc.struct_constr_nary_tail_code);
|
||||
else if (multi_ok)
|
||||
(void)jit_calli(sjc.struct_constr_nary_multi_code);
|
||||
else
|
||||
(void)jit_calli(sjc.struct_constr_nary_code);
|
||||
}
|
||||
}
|
||||
|
||||
if (pop_and_jump) {
|
||||
mz_epilog(JIT_V1);
|
||||
refdone = NULL;
|
||||
} else if (!always_slow) {
|
||||
__END_SHORT_JUMPS__(1);
|
||||
refdone = jit_jmpi(jit_forward());
|
||||
__START_SHORT_JUMPS__(1);
|
||||
}
|
||||
CHECK_LIMIT();
|
||||
|
||||
if (always_slow) {
|
||||
__END_SHORT_JUMPS__(1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Continue trying fast path: check proc */
|
||||
mz_patch_branch(ref);
|
||||
(void)mz_bnei_t(refslow, JIT_R0, scheme_prim_type, JIT_R2);
|
||||
jit_ldxi_s(JIT_R2, JIT_R0, &((Scheme_Primitive_Proc *)0x0)->pp.flags);
|
||||
(void)jit_bmci_i(refslow, JIT_R2, SCHEME_PRIM_STRUCT_TYPE_SIMPLE_CONSTR);
|
||||
CHECK_LIMIT();
|
||||
|
||||
jit_ldxi_p(JIT_R2, JIT_R0, &(SCHEME_PRIM_CLOSURE_ELS(0x0)[0]));
|
||||
/* R2 now has the Scheme_Struct_Type* */
|
||||
|
||||
if (num_args != 2) {
|
||||
/* V1 is available */
|
||||
jit_ldxi_i(JIT_V1, JIT_R2, &((Scheme_Struct_Type *)0x0)->num_slots);
|
||||
if (num_args == -1)
|
||||
(void)jit_bner_i(refslow, JIT_V1, JIT_R1);
|
||||
else
|
||||
(void)jit_bnei_i(refslow, JIT_V1, num_args);
|
||||
} else {
|
||||
/* No registers available, so we'll have to re-extract to R2 */
|
||||
jit_ldxi_i(JIT_R2, JIT_R2, &((Scheme_Struct_Type *)0x0)->num_slots);
|
||||
(void)jit_bnei_i(refslow, JIT_R2, num_args);
|
||||
jit_ldxi_p(JIT_R2, JIT_R0, &(SCHEME_PRIM_CLOSURE_ELS(0x0)[0]));
|
||||
}
|
||||
|
||||
CHECK_LIMIT();
|
||||
|
||||
/* It's a simple constructor expecting the given arguments. */
|
||||
|
||||
__END_SHORT_JUMPS__(1);
|
||||
|
||||
if ((num_args == 1) || (num_args == 2)) {
|
||||
if (num_args == 2) {
|
||||
/* save second argument on runstack */
|
||||
jit_subi_p(JIT_RUNSTACK, JIT_RUNSTACK, WORDS_TO_BYTES(1));
|
||||
jit_str_p(JIT_RUNSTACK, JIT_V1);
|
||||
}
|
||||
#ifdef CAN_INLINE_ALLOC
|
||||
jit_movr_p(JIT_R0, JIT_R2);
|
||||
inline_struct_alloc(jitter, num_args, inline_slow);
|
||||
/* allocation result is in V1 */
|
||||
jit_stxi_p((intptr_t)&((Scheme_Structure *)0x0)->stype + OBJHEAD_SIZE, JIT_V1, JIT_R0);
|
||||
jit_stxi_p((intptr_t)&(((Scheme_Structure *)0x0)->slots[0]) + OBJHEAD_SIZE, JIT_V1, JIT_R1);
|
||||
if (num_args == 2) {
|
||||
/* second argument was saved on runstack */
|
||||
jit_ldr_p(JIT_R1, JIT_RUNSTACK);
|
||||
jit_addi_p(JIT_RUNSTACK, JIT_RUNSTACK, WORDS_TO_BYTES(1));
|
||||
jit_stxi_p((intptr_t)&(((Scheme_Structure *)0x0)->slots[1]) + OBJHEAD_SIZE, JIT_V1, JIT_R1);
|
||||
}
|
||||
jit_addi_p(JIT_R0, JIT_V1, OBJHEAD_SIZE);
|
||||
#else
|
||||
jit_subi_p(JIT_RUNSTACK, JIT_RUNSTACK, WORDS_TO_BYTES(1));
|
||||
CHECK_RUNSTACK_OVERFLOW();
|
||||
JIT_UPDATE_THREAD_RSPTR();
|
||||
jit_str_p(JIT_RUNSTACK, JIT_R1);
|
||||
jit_movi_i(JIT_V1, num_args);
|
||||
jit_prepare(2);
|
||||
jit_pusharg_i(JIT_V1);
|
||||
jit_pusharg_p(JIT_R2);
|
||||
(void)mz_finish_lwe(alloc_structure, refrts);
|
||||
jit_retval(JIT_R0);
|
||||
jit_addi_p(JIT_RUNSTACK, JIT_RUNSTACK, WORDS_TO_BYTES(num_args));
|
||||
JIT_UPDATE_THREAD_RSPTR();
|
||||
#endif
|
||||
} else if (num_args == -1) {
|
||||
JIT_UPDATE_THREAD_RSPTR();
|
||||
jit_prepare(2);
|
||||
jit_pusharg_i(JIT_R1);
|
||||
jit_pusharg_p(JIT_R2);
|
||||
(void)mz_finish_lwe(alloc_structure, refrts);
|
||||
jit_retval(JIT_R0);
|
||||
} else {
|
||||
#ifdef CAN_INLINE_ALLOC
|
||||
int i;
|
||||
jit_movr_p(JIT_R0, JIT_R2);
|
||||
inline_struct_alloc(jitter, num_args, inline_slow);
|
||||
/* allocation result is in V1 */
|
||||
jit_stxi_p((intptr_t)&((Scheme_Structure *)0x0)->stype + OBJHEAD_SIZE, JIT_V1, JIT_R0);
|
||||
for (i = 0; i < num_args; i++) {
|
||||
jit_ldxi_p(JIT_R1, JIT_RUNSTACK, WORDS_TO_BYTES(i));
|
||||
jit_stxi_p((intptr_t)&(((Scheme_Structure *)0x0)->slots[0]) + OBJHEAD_SIZE + WORDS_TO_BYTES(i), JIT_V1, JIT_R1);
|
||||
}
|
||||
jit_addi_p(JIT_R0, JIT_V1, OBJHEAD_SIZE);
|
||||
#else
|
||||
JIT_UPDATE_THREAD_RSPTR();
|
||||
jit_movi_l(JIT_R1, num_args);
|
||||
jit_prepare(2);
|
||||
jit_pusharg_i(JIT_R1);
|
||||
jit_pusharg_p(JIT_R2);
|
||||
(void)mz_finish_lwe(alloc_structure, refrts);
|
||||
jit_retval(JIT_R0);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (pop_and_jump) {
|
||||
mz_epilog(JIT_V1);
|
||||
} else {
|
||||
mz_patch_ucbranch(refdone);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int is_cXr_prim(const char *name)
|
||||
|
@ -2849,7 +3128,7 @@ int scheme_generate_inlined_nary(mz_jit_state *jitter, Scheme_App_Rec *app, int
|
|||
int k;
|
||||
k = inlineable_struct_prim(rator, jitter, app->num_args, app->num_args);
|
||||
if (k) {
|
||||
generate_inlined_nary_struct_op(k, jitter, rator, app, for_branch, branch_short, multi_ok);
|
||||
generate_inlined_nary_struct_op(k, jitter, rator, app, for_branch, branch_short, is_tail, multi_ok);
|
||||
scheme_direct_call_count++;
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -3069,7 +3069,8 @@ struct_constr_p(int argc, Scheme_Object *argv[])
|
|||
{
|
||||
Scheme_Object *v = argv[0];
|
||||
if (SCHEME_CHAPERONEP(v)) v = SCHEME_CHAPERONE_VAL(v);
|
||||
return (STRUCT_mPROCP(v, SCHEME_PRIM_STRUCT_TYPE_CONSTR)
|
||||
return ((STRUCT_mPROCP(v, SCHEME_PRIM_STRUCT_TYPE_CONSTR)
|
||||
|| STRUCT_mPROCP(v, SCHEME_PRIM_STRUCT_TYPE_SIMPLE_CONSTR))
|
||||
? scheme_true : scheme_false);
|
||||
}
|
||||
|
||||
|
@ -3781,7 +3782,9 @@ make_struct_proc(Scheme_Struct_Type *struct_type,
|
|||
struct_type->num_islots,
|
||||
struct_type->num_islots,
|
||||
0);
|
||||
flags |= SCHEME_PRIM_STRUCT_TYPE_CONSTR;
|
||||
flags |= (simple
|
||||
? SCHEME_PRIM_STRUCT_TYPE_SIMPLE_CONSTR
|
||||
: SCHEME_PRIM_STRUCT_TYPE_CONSTR);
|
||||
} else if (proc_type == SCHEME_PRED) {
|
||||
a[0] = (Scheme_Object *)struct_type;
|
||||
p = scheme_make_folding_prim_closure(struct_pred,
|
||||
|
|
Loading…
Reference in New Issue
Block a user