JIT inline real-part, imag-part, make-rectangular
This commit is contained in:
parent
491ab3c12b
commit
eef7a8ba9d
|
@ -90,11 +90,12 @@
|
|||
(/ v 33333)))
|
||||
v)])
|
||||
(bin0 iv op (/ arg1 33333) (/ arg2 33333)))
|
||||
(unless (eq? op 'make-rectangular)
|
||||
(let ([iv (if (number? v) +nan.0 #f)])
|
||||
(bin0 iv op (exact->inexact arg1) +nan.0)
|
||||
(bin0 iv op +nan.0 (exact->inexact arg2))
|
||||
(unless (eq? op 'eq?)
|
||||
(bin0 iv op +nan.0 +nan.0))))]
|
||||
(bin0 iv op +nan.0 +nan.0)))))]
|
||||
[tri0 (lambda (v op get-arg1 arg2 arg3 check-effect #:wrap [wrap values])
|
||||
;; (printf "Trying ~a ~a ~a\n" op (get-arg1) arg2 arg3);
|
||||
(let ([name `(,op ,get-arg1 ,arg2, arg3)]
|
||||
|
@ -504,6 +505,18 @@
|
|||
(bin-exact #f 'bitwise-bit-set? (expt 2 40) 41)
|
||||
(bin-exact #t 'bitwise-bit-set? (- (expt 2 40)) 41)
|
||||
|
||||
(un 1 'real-part 1+2i)
|
||||
(un 105 'real-part 105)
|
||||
(un 2 'imag-part 1+2i)
|
||||
(un-exact 0 'imag-part 106)
|
||||
(un-exact 0 'imag-part 106.0)
|
||||
|
||||
(bin 1+2i 'make-rectangular 1 2)
|
||||
(bin-exact 1.0+2.0i 'make-rectangular 1 2.0)
|
||||
(bin-exact 1.0+2.0i 'make-rectangular 1.0 2)
|
||||
(bin-exact 1 'make-rectangular 1 0)
|
||||
(bin-exact 1.0 'make-rectangular 1.0 0)
|
||||
|
||||
(bin-exact #t 'char=? #\a #\a)
|
||||
(bin-exact #t 'char=? #\u1034 #\u1034)
|
||||
(bin-exact #f 'char=? #\a #\b)
|
||||
|
|
|
@ -64,6 +64,7 @@ typedef struct future_t {
|
|||
void *prim_func;
|
||||
int prim_protocol;
|
||||
Scheme_Object *arg_s0;
|
||||
const Scheme_Object *arg_t0;
|
||||
Scheme_Object **arg_S0;
|
||||
Scheme_Bucket *arg_b0;
|
||||
int arg_i0;
|
||||
|
@ -71,6 +72,7 @@ typedef struct future_t {
|
|||
size_t arg_z0;
|
||||
Scheme_Native_Closure_Data *arg_n0;
|
||||
Scheme_Object *arg_s1;
|
||||
const Scheme_Object *arg_t1;
|
||||
Scheme_Object **arg_S1;
|
||||
int arg_i1;
|
||||
long arg_l1;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
(define (char->type c)
|
||||
(case c
|
||||
[(#\s) "Scheme_Object*"]
|
||||
[(#\t) "const Scheme_Object*"]
|
||||
[(#\S) "Scheme_Object**"]
|
||||
[(#\b) "Scheme_Bucket*"]
|
||||
[(#\n) "Scheme_Native_Closure_Data*"]
|
||||
|
@ -142,6 +143,7 @@
|
|||
n_s
|
||||
_s
|
||||
ss_s
|
||||
tt_s
|
||||
ss_m
|
||||
Sl_s
|
||||
l_s
|
||||
|
|
|
@ -147,6 +147,7 @@ SHARED_OK static void *bad_car_code, *bad_cdr_code;
|
|||
SHARED_OK static void *bad_caar_code, *bad_cdar_code, *bad_cadr_code, *bad_cddr_code;
|
||||
SHARED_OK static void *bad_mcar_code, *bad_mcdr_code;
|
||||
SHARED_OK static void *bad_set_mcar_code, *bad_set_mcdr_code;
|
||||
SHARED_OK static void *imag_part_code, *real_part_code, *make_rectangular_code;
|
||||
SHARED_OK static void *unbox_code, *set_box_code;
|
||||
SHARED_OK static void *bad_vector_length_code;
|
||||
SHARED_OK static void *bad_flvector_length_code;
|
||||
|
@ -6840,6 +6841,50 @@ static int generate_inlined_unary(mz_jit_state *jitter, Scheme_App2_Rec *app, in
|
|||
|
||||
(void)jit_calli(syntax_e_code);
|
||||
|
||||
return 1;
|
||||
} else if (IS_NAMED_PRIM(rator, "imag-part")
|
||||
|| IS_NAMED_PRIM(rator, "real-part")) {
|
||||
GC_CAN_IGNORE jit_insn *reffail = NULL, *ref, *refdone;
|
||||
const char *name = ((Scheme_Primitive_Proc *)rator)->name;
|
||||
|
||||
LOG_IT(("inlined %s\n", ((Scheme_Primitive_Proc *)rator)->name));
|
||||
|
||||
mz_runstack_skipped(jitter, 1);
|
||||
|
||||
generate_non_tail(app->rand, jitter, 0, 1, 0);
|
||||
CHECK_LIMIT();
|
||||
|
||||
mz_runstack_unskipped(jitter, 1);
|
||||
|
||||
mz_rs_sync();
|
||||
|
||||
__START_TINY_JUMPS__(1);
|
||||
|
||||
ref = jit_bmci_ul(jit_forward(), JIT_R0, 0x1);
|
||||
reffail = _jit.x.pc;
|
||||
__END_TINY_JUMPS__(1);
|
||||
if (name[0] == 'i') {
|
||||
(void)jit_calli(imag_part_code);
|
||||
} else {
|
||||
(void)jit_calli(real_part_code);
|
||||
}
|
||||
jit_retval(JIT_R0);
|
||||
CHECK_LIMIT();
|
||||
__START_TINY_JUMPS__(1);
|
||||
refdone = jit_jmpi(jit_forward());
|
||||
mz_patch_branch(ref);
|
||||
jit_ldxi_s(JIT_R1, JIT_R0, &((Scheme_Object *)0x0)->type);
|
||||
(void)jit_bnei_i(reffail, JIT_R1, scheme_complex_type);
|
||||
if (name[0] == 'i') {
|
||||
(void)jit_ldxi_p(JIT_R0, JIT_R0, &((Scheme_Complex *)0x0)->i);
|
||||
} else {
|
||||
(void)jit_ldxi_p(JIT_R0, JIT_R0, &((Scheme_Complex *)0x0)->r);
|
||||
}
|
||||
VALIDATE_RESULT(JIT_R0);
|
||||
mz_patch_ucbranch(refdone);
|
||||
CHECK_LIMIT();
|
||||
__END_TINY_JUMPS__(1);
|
||||
|
||||
return 1;
|
||||
} else if (IS_NAMED_PRIM(rator, "add1")) {
|
||||
generate_arith(jitter, rator, app->rand, NULL, 1, 1, 0, 1, NULL, 1, 0, 0, NULL);
|
||||
|
@ -7985,6 +8030,78 @@ static int generate_inlined_binary(mz_jit_state *jitter, Scheme_App3_Rec *app, i
|
|||
} else if (IS_NAMED_PRIM(rator, "vector-immutable")
|
||||
|| IS_NAMED_PRIM(rator, "vector")) {
|
||||
return generate_vector_alloc(jitter, rator, NULL, NULL, app);
|
||||
} else if (IS_NAMED_PRIM(rator, "make-rectangular")) {
|
||||
GC_CAN_IGNORE jit_insn *ref, *ref2, *ref3, *refslow, *refdone;
|
||||
|
||||
LOG_IT(("inlined make-rectangular\n"));
|
||||
|
||||
generate_two_args(app->rand1, app->rand2, jitter, 1, 2);
|
||||
CHECK_LIMIT();
|
||||
mz_rs_sync();
|
||||
|
||||
jit_movi_i(JIT_V1, 0); /* V1 as 0 => exact first argument */
|
||||
|
||||
__START_SHORT_JUMPS__(1);
|
||||
/* Check first arg: */
|
||||
ref = jit_bmsi_ul(jit_forward(), JIT_R0, 0x1);
|
||||
jit_ldxi_s(JIT_R2, JIT_R0, &((Scheme_Object *)0x0)->type);
|
||||
ref2 = jit_bgei_i(jit_forward(), JIT_R2, scheme_bignum_type);
|
||||
/* (slow path) */
|
||||
refslow = _jit.x.pc;
|
||||
(void)jit_calli(make_rectangular_code);
|
||||
jit_retval(JIT_R0);
|
||||
CHECK_LIMIT();
|
||||
refdone = jit_jmpi(jit_forward());
|
||||
/* (end of slow path) */
|
||||
mz_patch_branch(ref2);
|
||||
(void)jit_bgei_i(refslow, JIT_R2, scheme_complex_type);
|
||||
/* set V1 if inexact */
|
||||
ref3 = jit_blti_i(jit_forward(), JIT_R2, scheme_float_type);
|
||||
jit_movi_i(JIT_V1, 1);
|
||||
mz_patch_branch(ref3);
|
||||
mz_patch_branch(ref);
|
||||
CHECK_LIMIT();
|
||||
|
||||
/* Check second arg: */
|
||||
ref = jit_bmsi_ul(jit_forward(), JIT_R1, 0x1);
|
||||
jit_ldxi_s(JIT_R2, JIT_R1, &((Scheme_Object *)0x0)->type);
|
||||
(void)jit_blti_i(refslow, JIT_R2, scheme_bignum_type);
|
||||
(void)jit_bgei_i(refslow, JIT_R2, scheme_complex_type);
|
||||
ref3 = jit_blti_i(jit_forward(), JIT_R2, scheme_float_type);
|
||||
(void)jit_bnei_i(refslow, JIT_V1, 1); /* need to coerce other to inexact */
|
||||
mz_patch_branch(ref3);
|
||||
ref3 = jit_jmpi(jit_forward());
|
||||
mz_patch_branch(ref);
|
||||
(void)jit_bnei_i(refslow, JIT_V1, 0); /* need to coerce to inexact */
|
||||
/* exact zero => result is real */
|
||||
(void)jit_beqi_p(refslow, JIT_R1, scheme_make_integer(0));
|
||||
CHECK_LIMIT();
|
||||
mz_patch_ucbranch(ref3);
|
||||
|
||||
__END_SHORT_JUMPS__(1);
|
||||
|
||||
#ifdef CAN_INLINE_ALLOC
|
||||
/* Inlined alloc */
|
||||
inline_alloc(jitter, sizeof(Scheme_Complex), scheme_complex_type, 0, 1, 0, 0);
|
||||
CHECK_LIMIT();
|
||||
|
||||
jit_stxi_p((long)&(((Scheme_Complex *)0x0)->r) + OBJHEAD_SIZE, JIT_V1, JIT_R0);
|
||||
jit_stxi_p((long)&(((Scheme_Complex *)0x0)->i) + OBJHEAD_SIZE, JIT_V1, JIT_R1);
|
||||
jit_addi_p(JIT_R0, JIT_V1, OBJHEAD_SIZE);
|
||||
#else
|
||||
/* Non-inlined alloc */
|
||||
JIT_UPDATE_THREAD_RSPTR_IF_NEEDED();
|
||||
mz_prepare(2);
|
||||
jit_pusharg_p(JIT_R1);
|
||||
jit_pusharg_p(JIT_R0);
|
||||
(void)mz_finish(ts_scheme_make_complex);
|
||||
jit_retval(JIT_R0);
|
||||
#endif
|
||||
CHECK_LIMIT();
|
||||
|
||||
mz_patch_ucbranch(refdone);
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10583,9 +10700,9 @@ static int do_generate_common(mz_jit_state *jitter, void *_data)
|
|||
__END_SHORT_JUMPS__(1);
|
||||
mz_epilog(JIT_V1);
|
||||
|
||||
/* *** bad_[m]{car,cdr,...}_code *** */
|
||||
/* Bad argument is in R0 for car/cdr, R2 otherwise */
|
||||
for (i = 0; i < 8; i++) {
|
||||
/* *** [bad_][m]{car,cdr,...,{imag,real}_part}_code *** */
|
||||
/* Argument is in R0 for car/cdr, R2 otherwise */
|
||||
for (i = 0; i < 10; i++) {
|
||||
void *code;
|
||||
|
||||
code = jit_get_ip().ptr;
|
||||
|
@ -10614,6 +10731,12 @@ static int do_generate_common(mz_jit_state *jitter, void *_data)
|
|||
case 7:
|
||||
bad_mcdr_code = code;
|
||||
break;
|
||||
case 8:
|
||||
real_part_code = code;
|
||||
break;
|
||||
case 9:
|
||||
imag_part_code = code;
|
||||
break;
|
||||
}
|
||||
mz_prolog(JIT_R1);
|
||||
jit_subi_p(JIT_RUNSTACK, JIT_RUNSTACK, WORDS_TO_BYTES(1));
|
||||
|
@ -10654,15 +10777,33 @@ static int do_generate_common(mz_jit_state *jitter, void *_data)
|
|||
case 7:
|
||||
(void)mz_finish(ts_scheme_checked_mcdr);
|
||||
break;
|
||||
case 8:
|
||||
(void)mz_finish(ts_scheme_checked_real_part);
|
||||
break;
|
||||
case 9:
|
||||
(void)mz_finish(ts_scheme_checked_imag_part);
|
||||
break;
|
||||
}
|
||||
CHECK_LIMIT();
|
||||
|
||||
switch (i) {
|
||||
case 8:
|
||||
case 9:
|
||||
jit_addi_p(JIT_RUNSTACK, JIT_RUNSTACK, WORDS_TO_BYTES(1));
|
||||
jit_retval(JIT_R0);
|
||||
mz_epilog(JIT_R1);
|
||||
break;
|
||||
default:
|
||||
/* never returns */
|
||||
break;
|
||||
}
|
||||
|
||||
register_sub_func(jitter, code, scheme_false);
|
||||
}
|
||||
|
||||
/* *** bad_set_{car,cdr}_code *** */
|
||||
/* *** bad_set_{car,cdr}_code and make_rectangular_code *** */
|
||||
/* Bad argument is in R0, other is in R1 */
|
||||
for (i = 0; i < 2; i++) {
|
||||
for (i = 0; i < 3; i++) {
|
||||
void *code;
|
||||
code = jit_get_ip().ptr;
|
||||
switch (i) {
|
||||
|
@ -10672,6 +10813,9 @@ static int do_generate_common(mz_jit_state *jitter, void *_data)
|
|||
case 1:
|
||||
bad_set_mcdr_code = code;
|
||||
break;
|
||||
case 2:
|
||||
make_rectangular_code = code;
|
||||
break;
|
||||
}
|
||||
mz_prolog(JIT_R2);
|
||||
jit_subi_p(JIT_RUNSTACK, JIT_RUNSTACK, WORDS_TO_BYTES(2));
|
||||
|
@ -10691,6 +10835,12 @@ static int do_generate_common(mz_jit_state *jitter, void *_data)
|
|||
case 1:
|
||||
(void)mz_finish(ts_scheme_checked_set_mcdr);
|
||||
break;
|
||||
case 2:
|
||||
(void)mz_finish(ts_scheme_checked_make_rectangular);
|
||||
jit_retval(JIT_R0);
|
||||
jit_addi_p(JIT_RUNSTACK, JIT_RUNSTACK, WORDS_TO_BYTES(2));
|
||||
mz_epilog(JIT_R2);
|
||||
break;
|
||||
}
|
||||
CHECK_LIMIT();
|
||||
register_sub_func(jitter, code, scheme_false);
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
# include "jit_ts_def.c"
|
||||
|
||||
/* s = Scheme_Object*
|
||||
t = const Scheme_Object*
|
||||
i = int
|
||||
l = long
|
||||
S = Scheme_Object**
|
||||
|
@ -58,6 +59,12 @@ define_ts_iS_s(scheme_checked_mcar, FSRC_MARKS)
|
|||
define_ts_iS_s(scheme_checked_mcdr, FSRC_MARKS)
|
||||
define_ts_iS_s(scheme_checked_set_mcar, FSRC_MARKS)
|
||||
define_ts_iS_s(scheme_checked_set_mcdr, FSRC_MARKS)
|
||||
define_ts_iS_s(scheme_checked_imag_part, FSRC_MARKS)
|
||||
define_ts_iS_s(scheme_checked_real_part, FSRC_MARKS)
|
||||
define_ts_iS_s(scheme_checked_make_rectangular, FSRC_MARKS)
|
||||
#ifndef CAN_INLINE_ALLOC
|
||||
define_ts_tt_s(scheme_make_complex, FSRC_OTHER)
|
||||
#endif
|
||||
define_ts_s_s(scheme_unbox, FSRC_MARKS)
|
||||
define_ts_s_s(scheme_vector_length, FSRC_MARKS)
|
||||
define_ts_s_s(scheme_flvector_length, FSRC_MARKS)
|
||||
|
@ -122,6 +129,10 @@ define_ts_siS_v(wrong_argument_count, FSRC_MARKS)
|
|||
# define ts_scheme_checked_mcdr scheme_checked_mcdr
|
||||
# define ts_scheme_checked_set_mcar scheme_checked_set_mcar
|
||||
# define ts_scheme_checked_set_mcdr scheme_checked_set_mcdr
|
||||
# define ts_scheme_checked_imag_part scheme_checked_imag_part
|
||||
# define ts_scheme_checked_real_part scheme_checked_real_part
|
||||
# define ts_scheme_checked_make_rectangular scheme_checked_make_rectangular
|
||||
# define ts_scheme_make_complex scheme_make_complex
|
||||
# define ts_scheme_unbox scheme_unbox
|
||||
# define ts_scheme_set_box scheme_set_box
|
||||
# define ts_scheme_vector_length scheme_vector_length
|
||||
|
|
|
@ -52,147 +52,156 @@ static Scheme_Object* ts_ ## id(Scheme_Object* g15, Scheme_Object* g16) \
|
|||
else \
|
||||
return id(g15, g16); \
|
||||
}
|
||||
#define define_ts_ss_m(id, src_type) \
|
||||
static MZ_MARK_STACK_TYPE ts_ ## id(Scheme_Object* g17, Scheme_Object* g18) \
|
||||
#define define_ts_tt_s(id, src_type) \
|
||||
static Scheme_Object* ts_ ## id(const Scheme_Object* g17, const Scheme_Object* g18) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
return scheme_rtcall_ss_m("[" #id "]", src_type, id, g17, g18); \
|
||||
return scheme_rtcall_tt_s("[" #id "]", src_type, id, g17, g18); \
|
||||
else \
|
||||
return id(g17, g18); \
|
||||
}
|
||||
#define define_ts_Sl_s(id, src_type) \
|
||||
static Scheme_Object* ts_ ## id(Scheme_Object** g19, long g20) \
|
||||
#define define_ts_ss_m(id, src_type) \
|
||||
static MZ_MARK_STACK_TYPE ts_ ## id(Scheme_Object* g19, Scheme_Object* g20) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
return scheme_rtcall_Sl_s("[" #id "]", src_type, id, g19, g20); \
|
||||
return scheme_rtcall_ss_m("[" #id "]", src_type, id, g19, g20); \
|
||||
else \
|
||||
return id(g19, g20); \
|
||||
}
|
||||
#define define_ts_l_s(id, src_type) \
|
||||
static Scheme_Object* ts_ ## id(long g21) \
|
||||
#define define_ts_Sl_s(id, src_type) \
|
||||
static Scheme_Object* ts_ ## id(Scheme_Object** g21, long g22) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
return scheme_rtcall_l_s("[" #id "]", src_type, id, g21); \
|
||||
return scheme_rtcall_Sl_s("[" #id "]", src_type, id, g21, g22); \
|
||||
else \
|
||||
return id(g21); \
|
||||
return id(g21, g22); \
|
||||
}
|
||||
#define define_ts_l_s(id, src_type) \
|
||||
static Scheme_Object* ts_ ## id(long g23) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
return scheme_rtcall_l_s("[" #id "]", src_type, id, g23); \
|
||||
else \
|
||||
return id(g23); \
|
||||
}
|
||||
#define define_ts_bsi_v(id, src_type) \
|
||||
static void ts_ ## id(Scheme_Bucket* g22, Scheme_Object* g23, int g24) \
|
||||
static void ts_ ## id(Scheme_Bucket* g24, Scheme_Object* g25, int g26) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
scheme_rtcall_bsi_v("[" #id "]", src_type, id, g22, g23, g24); \
|
||||
scheme_rtcall_bsi_v("[" #id "]", src_type, id, g24, g25, g26); \
|
||||
else \
|
||||
id(g22, g23, g24); \
|
||||
id(g24, g25, g26); \
|
||||
}
|
||||
#define define_ts_iiS_v(id, src_type) \
|
||||
static void ts_ ## id(int g25, int g26, Scheme_Object** g27) \
|
||||
static void ts_ ## id(int g27, int g28, Scheme_Object** g29) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
scheme_rtcall_iiS_v("[" #id "]", src_type, id, g25, g26, g27); \
|
||||
scheme_rtcall_iiS_v("[" #id "]", src_type, id, g27, g28, g29); \
|
||||
else \
|
||||
id(g25, g26, g27); \
|
||||
id(g27, g28, g29); \
|
||||
}
|
||||
#define define_ts_ss_v(id, src_type) \
|
||||
static void ts_ ## id(Scheme_Object* g28, Scheme_Object* g29) \
|
||||
static void ts_ ## id(Scheme_Object* g30, Scheme_Object* g31) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
scheme_rtcall_ss_v("[" #id "]", src_type, id, g28, g29); \
|
||||
scheme_rtcall_ss_v("[" #id "]", src_type, id, g30, g31); \
|
||||
else \
|
||||
id(g28, g29); \
|
||||
id(g30, g31); \
|
||||
}
|
||||
#define define_ts_b_v(id, src_type) \
|
||||
static void ts_ ## id(Scheme_Bucket* g30) \
|
||||
static void ts_ ## id(Scheme_Bucket* g32) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
scheme_rtcall_b_v("[" #id "]", src_type, id, g30); \
|
||||
scheme_rtcall_b_v("[" #id "]", src_type, id, g32); \
|
||||
else \
|
||||
id(g30); \
|
||||
id(g32); \
|
||||
}
|
||||
#define define_ts_sl_s(id, src_type) \
|
||||
static Scheme_Object* ts_ ## id(Scheme_Object* g31, long g32) \
|
||||
static Scheme_Object* ts_ ## id(Scheme_Object* g33, long g34) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
return scheme_rtcall_sl_s("[" #id "]", src_type, id, g31, g32); \
|
||||
else \
|
||||
return id(g31, g32); \
|
||||
}
|
||||
#define define_ts_iS_s(id, src_type) \
|
||||
static Scheme_Object* ts_ ## id(int g33, Scheme_Object** g34) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
return scheme_rtcall_iS_s("[" #id "]", src_type, id, g33, g34); \
|
||||
return scheme_rtcall_sl_s("[" #id "]", src_type, id, g33, g34); \
|
||||
else \
|
||||
return id(g33, g34); \
|
||||
}
|
||||
#define define_ts_S_s(id, src_type) \
|
||||
static Scheme_Object* ts_ ## id(Scheme_Object** g35) \
|
||||
#define define_ts_iS_s(id, src_type) \
|
||||
static Scheme_Object* ts_ ## id(int g35, Scheme_Object** g36) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
return scheme_rtcall_S_s("[" #id "]", src_type, id, g35); \
|
||||
return scheme_rtcall_iS_s("[" #id "]", src_type, id, g35, g36); \
|
||||
else \
|
||||
return id(g35); \
|
||||
return id(g35, g36); \
|
||||
}
|
||||
#define define_ts_S_s(id, src_type) \
|
||||
static Scheme_Object* ts_ ## id(Scheme_Object** g37) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
return scheme_rtcall_S_s("[" #id "]", src_type, id, g37); \
|
||||
else \
|
||||
return id(g37); \
|
||||
}
|
||||
#define define_ts_s_v(id, src_type) \
|
||||
static void ts_ ## id(Scheme_Object* g36) \
|
||||
static void ts_ ## id(Scheme_Object* g38) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
scheme_rtcall_s_v("[" #id "]", src_type, id, g36); \
|
||||
scheme_rtcall_s_v("[" #id "]", src_type, id, g38); \
|
||||
else \
|
||||
id(g36); \
|
||||
id(g38); \
|
||||
}
|
||||
#define define_ts_iSi_s(id, src_type) \
|
||||
static Scheme_Object* ts_ ## id(int g37, Scheme_Object** g38, int g39) \
|
||||
static Scheme_Object* ts_ ## id(int g39, Scheme_Object** g40, int g41) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
return scheme_rtcall_iSi_s("[" #id "]", src_type, id, g37, g38, g39); \
|
||||
return scheme_rtcall_iSi_s("[" #id "]", src_type, id, g39, g40, g41); \
|
||||
else \
|
||||
return id(g37, g38, g39); \
|
||||
return id(g39, g40, g41); \
|
||||
}
|
||||
#define define_ts_siS_v(id, src_type) \
|
||||
static void ts_ ## id(Scheme_Object* g40, int g41, Scheme_Object** g42) \
|
||||
static void ts_ ## id(Scheme_Object* g42, int g43, Scheme_Object** g44) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
scheme_rtcall_siS_v("[" #id "]", src_type, id, g40, g41, g42); \
|
||||
scheme_rtcall_siS_v("[" #id "]", src_type, id, g42, g43, g44); \
|
||||
else \
|
||||
id(g40, g41, g42); \
|
||||
id(g42, g43, g44); \
|
||||
}
|
||||
#define define_ts_z_p(id, src_type) \
|
||||
static void* ts_ ## id(size_t g43) \
|
||||
static void* ts_ ## id(size_t g45) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
return scheme_rtcall_z_p("[" #id "]", src_type, id, g43); \
|
||||
return scheme_rtcall_z_p("[" #id "]", src_type, id, g45); \
|
||||
else \
|
||||
return id(g43); \
|
||||
return id(g45); \
|
||||
}
|
||||
#define define_ts_si_s(id, src_type) \
|
||||
static Scheme_Object* ts_ ## id(Scheme_Object* g44, int g45) \
|
||||
static Scheme_Object* ts_ ## id(Scheme_Object* g46, int g47) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
return scheme_rtcall_si_s("[" #id "]", src_type, id, g44, g45); \
|
||||
return scheme_rtcall_si_s("[" #id "]", src_type, id, g46, g47); \
|
||||
else \
|
||||
return id(g44, g45); \
|
||||
return id(g46, g47); \
|
||||
}
|
||||
#define define_ts_sis_v(id, src_type) \
|
||||
static void ts_ ## id(Scheme_Object* g46, int g47, Scheme_Object* g48) \
|
||||
static void ts_ ## id(Scheme_Object* g48, int g49, Scheme_Object* g50) \
|
||||
XFORM_SKIP_PROC \
|
||||
{ \
|
||||
if (scheme_use_rtcall) \
|
||||
scheme_rtcall_sis_v("[" #id "]", src_type, id, g46, g47, g48); \
|
||||
scheme_rtcall_sis_v("[" #id "]", src_type, id, g48, g49, g50); \
|
||||
else \
|
||||
id(g46, g47, g48); \
|
||||
id(g48, g49, g50); \
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Scheme_Object* scheme_rtcall_siS_s(const char *who, int src_type, prim_siS_s f, Scheme_Object* g49, int g50, Scheme_Object** g51)
|
||||
Scheme_Object* scheme_rtcall_siS_s(const char *who, int src_type, prim_siS_s f, Scheme_Object* g51, int g52, Scheme_Object** g53)
|
||||
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 = g49;
|
||||
future->arg_i1 = g50;
|
||||
future->arg_S2 = g51;
|
||||
future->arg_s0 = g51;
|
||||
future->arg_i1 = g52;
|
||||
future->arg_S2 = g53;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0);
|
||||
future = fts->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 g52, Scheme_Object** g53, Scheme_Object* g54)
|
||||
Scheme_Object* scheme_rtcall_iSs_s(const char *who, int src_type, prim_iSs_s f, int g54, Scheme_Object** g55, Scheme_Object* g56)
|
||||
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 = g52;
|
||||
future->arg_S1 = g53;
|
||||
future->arg_s2 = g54;
|
||||
future->arg_i0 = g54;
|
||||
future->arg_S1 = g55;
|
||||
future->arg_s2 = g56;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0);
|
||||
future = fts->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* g55)
|
||||
Scheme_Object* scheme_rtcall_s_s(const char *who, int src_type, prim_s_s f, Scheme_Object* g57)
|
||||
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 = g55;
|
||||
send_special_result(future, g55);
|
||||
future->arg_s0 = g57;
|
||||
send_special_result(future, g57);
|
||||
future_do_runtimecall(fts, (void*)f, 0);
|
||||
future = fts->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* g56)
|
||||
Scheme_Object* scheme_rtcall_n_s(const char *who, int src_type, prim_n_s f, Scheme_Native_Closure_Data* g58)
|
||||
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 = g56;
|
||||
future->arg_n0 = g58;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0);
|
||||
future = fts->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* g57, Scheme_Object* g58)
|
||||
Scheme_Object* scheme_rtcall_ss_s(const char *who, int src_type, prim_ss_s f, Scheme_Object* g59, Scheme_Object* g60)
|
||||
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 = g57;
|
||||
future->arg_s1 = g58;
|
||||
future->arg_s0 = g59;
|
||||
future->arg_s1 = g60;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0);
|
||||
future = fts->current_ft;
|
||||
|
@ -147,7 +147,32 @@
|
|||
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* g59, Scheme_Object* g60)
|
||||
Scheme_Object* scheme_rtcall_tt_s(const char *who, int src_type, prim_tt_s f, const Scheme_Object* g61, const Scheme_Object* g62)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
future_t *future;
|
||||
double tm;
|
||||
Scheme_Object* retval;
|
||||
|
||||
future = fts->current_ft;
|
||||
future->prim_protocol = SIG_tt_s;
|
||||
future->prim_func = f;
|
||||
tm = scheme_get_inexact_milliseconds();
|
||||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_t0 = g61;
|
||||
future->arg_t1 = g62;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0);
|
||||
future = fts->current_ft;
|
||||
retval = future->retval_s;
|
||||
future->retval_s = 0;
|
||||
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)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -162,8 +187,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 = g63;
|
||||
future->arg_s1 = g64;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0);
|
||||
future = fts->current_ft;
|
||||
|
@ -172,7 +197,7 @@
|
|||
|
||||
return retval;
|
||||
}
|
||||
Scheme_Object* scheme_rtcall_Sl_s(const char *who, int src_type, prim_Sl_s f, Scheme_Object** g61, long g62)
|
||||
Scheme_Object* scheme_rtcall_Sl_s(const char *who, int src_type, prim_Sl_s f, Scheme_Object** g65, long g66)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -187,8 +212,8 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_S0 = g61;
|
||||
future->arg_l1 = g62;
|
||||
future->arg_S0 = g65;
|
||||
future->arg_l1 = g66;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0);
|
||||
future = fts->current_ft;
|
||||
|
@ -197,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, long g63)
|
||||
Scheme_Object* scheme_rtcall_l_s(const char *who, int src_type, prim_l_s f, long g67)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -212,7 +237,7 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_l0 = g63;
|
||||
future->arg_l0 = g67;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0);
|
||||
future = fts->current_ft;
|
||||
|
@ -221,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* g64, Scheme_Object* g65, int g66)
|
||||
void scheme_rtcall_bsi_v(const char *who, int src_type, prim_bsi_v f, Scheme_Bucket* g68, Scheme_Object* g69, int g70)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -236,9 +261,9 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_b0 = g64;
|
||||
future->arg_s1 = g65;
|
||||
future->arg_i2 = g66;
|
||||
future->arg_b0 = g68;
|
||||
future->arg_s1 = g69;
|
||||
future->arg_i2 = g70;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0);
|
||||
future = fts->current_ft;
|
||||
|
@ -247,7 +272,7 @@
|
|||
|
||||
|
||||
}
|
||||
void scheme_rtcall_iiS_v(const char *who, int src_type, prim_iiS_v f, int g67, int g68, Scheme_Object** g69)
|
||||
void scheme_rtcall_iiS_v(const char *who, int src_type, prim_iiS_v f, int g71, int g72, Scheme_Object** g73)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -262,9 +287,9 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_i0 = g67;
|
||||
future->arg_i1 = g68;
|
||||
future->arg_S2 = g69;
|
||||
future->arg_i0 = g71;
|
||||
future->arg_i1 = g72;
|
||||
future->arg_S2 = g73;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0);
|
||||
future = fts->current_ft;
|
||||
|
@ -273,7 +298,7 @@
|
|||
|
||||
|
||||
}
|
||||
void scheme_rtcall_ss_v(const char *who, int src_type, prim_ss_v f, Scheme_Object* g70, Scheme_Object* g71)
|
||||
void scheme_rtcall_ss_v(const char *who, int src_type, prim_ss_v f, Scheme_Object* g74, Scheme_Object* g75)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -288,8 +313,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 = g74;
|
||||
future->arg_s1 = g75;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0);
|
||||
future = fts->current_ft;
|
||||
|
@ -298,7 +323,7 @@
|
|||
|
||||
|
||||
}
|
||||
void scheme_rtcall_b_v(const char *who, int src_type, prim_b_v f, Scheme_Bucket* g72)
|
||||
void scheme_rtcall_b_v(const char *who, int src_type, prim_b_v f, Scheme_Bucket* g76)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -313,7 +338,7 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_b0 = g72;
|
||||
future->arg_b0 = g76;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0);
|
||||
future = fts->current_ft;
|
||||
|
@ -322,7 +347,7 @@
|
|||
|
||||
|
||||
}
|
||||
Scheme_Object* scheme_rtcall_sl_s(const char *who, int src_type, prim_sl_s f, Scheme_Object* g73, long g74)
|
||||
Scheme_Object* scheme_rtcall_sl_s(const char *who, int src_type, prim_sl_s f, Scheme_Object* g77, long g78)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -337,8 +362,8 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_s0 = g73;
|
||||
future->arg_l1 = g74;
|
||||
future->arg_s0 = g77;
|
||||
future->arg_l1 = g78;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0);
|
||||
future = fts->current_ft;
|
||||
|
@ -347,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 g75, Scheme_Object** g76)
|
||||
Scheme_Object* scheme_rtcall_iS_s(const char *who, int src_type, prim_iS_s f, int g79, Scheme_Object** g80)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -362,8 +387,8 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_i0 = g75;
|
||||
future->arg_S1 = g76;
|
||||
future->arg_i0 = g79;
|
||||
future->arg_S1 = g80;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0);
|
||||
future = fts->current_ft;
|
||||
|
@ -372,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** g77)
|
||||
Scheme_Object* scheme_rtcall_S_s(const char *who, int src_type, prim_S_s f, Scheme_Object** g81)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -387,7 +412,7 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_S0 = g77;
|
||||
future->arg_S0 = g81;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0);
|
||||
future = fts->current_ft;
|
||||
|
@ -396,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* g78)
|
||||
void scheme_rtcall_s_v(const char *who, int src_type, prim_s_v f, Scheme_Object* g82)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -411,8 +436,8 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_s0 = g78;
|
||||
send_special_result(future, g78);
|
||||
future->arg_s0 = g82;
|
||||
send_special_result(future, g82);
|
||||
future_do_runtimecall(fts, (void*)f, 0);
|
||||
future = fts->current_ft;
|
||||
|
||||
|
@ -420,7 +445,7 @@
|
|||
|
||||
|
||||
}
|
||||
Scheme_Object* scheme_rtcall_iSi_s(const char *who, int src_type, prim_iSi_s f, int g79, Scheme_Object** g80, int g81)
|
||||
Scheme_Object* scheme_rtcall_iSi_s(const char *who, int src_type, prim_iSi_s f, int g83, Scheme_Object** g84, int g85)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -435,9 +460,9 @@
|
|||
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_i2 = g81;
|
||||
future->arg_i0 = g83;
|
||||
future->arg_S1 = g84;
|
||||
future->arg_i2 = g85;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0);
|
||||
future = fts->current_ft;
|
||||
|
@ -446,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* g82, int g83, Scheme_Object** g84)
|
||||
void scheme_rtcall_siS_v(const char *who, int src_type, prim_siS_v f, Scheme_Object* g86, int g87, Scheme_Object** g88)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -461,9 +486,9 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_s0 = g82;
|
||||
future->arg_i1 = g83;
|
||||
future->arg_S2 = g84;
|
||||
future->arg_s0 = g86;
|
||||
future->arg_i1 = g87;
|
||||
future->arg_S2 = g88;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0);
|
||||
future = fts->current_ft;
|
||||
|
@ -472,7 +497,7 @@
|
|||
|
||||
|
||||
}
|
||||
void* scheme_rtcall_z_p(const char *who, int src_type, prim_z_p f, size_t g85)
|
||||
void* scheme_rtcall_z_p(const char *who, int src_type, prim_z_p f, size_t g89)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -487,7 +512,7 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_z0 = g85;
|
||||
future->arg_z0 = g89;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0);
|
||||
future = fts->current_ft;
|
||||
|
@ -496,7 +521,7 @@
|
|||
|
||||
return retval;
|
||||
}
|
||||
Scheme_Object* scheme_rtcall_si_s(const char *who, int src_type, prim_si_s f, Scheme_Object* g86, int g87)
|
||||
Scheme_Object* scheme_rtcall_si_s(const char *who, int src_type, prim_si_s f, Scheme_Object* g90, int g91)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -511,8 +536,8 @@
|
|||
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_s0 = g90;
|
||||
future->arg_i1 = g91;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0);
|
||||
future = fts->current_ft;
|
||||
|
@ -521,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* g88, int g89, Scheme_Object* g90)
|
||||
void scheme_rtcall_sis_v(const char *who, int src_type, prim_sis_v f, Scheme_Object* g92, int g93, Scheme_Object* g94)
|
||||
XFORM_SKIP_PROC
|
||||
{
|
||||
Scheme_Future_Thread_State *fts = scheme_future_thread_state;
|
||||
|
@ -536,9 +561,9 @@
|
|||
future->time_of_request = tm;
|
||||
future->source_of_request = who;
|
||||
future->source_type = src_type;
|
||||
future->arg_s0 = g88;
|
||||
future->arg_i1 = g89;
|
||||
future->arg_s2 = g90;
|
||||
future->arg_s0 = g92;
|
||||
future->arg_i1 = g93;
|
||||
future->arg_s2 = g94;
|
||||
|
||||
future_do_runtimecall(fts, (void*)f, 0);
|
||||
future = fts->current_ft;
|
||||
|
|
|
@ -1,66 +1,69 @@
|
|||
#define SIG_siS_s 5
|
||||
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* g133, int g134, Scheme_Object** g135);
|
||||
Scheme_Object* scheme_rtcall_siS_s(const char *who, int src_type, prim_siS_s f, Scheme_Object* g139, int g140, Scheme_Object** g141);
|
||||
#define SIG_iSs_s 6
|
||||
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 g136, Scheme_Object** g137, Scheme_Object* g138);
|
||||
Scheme_Object* scheme_rtcall_iSs_s(const char *who, int src_type, prim_iSs_s f, int g142, Scheme_Object** g143, Scheme_Object* g144);
|
||||
#define SIG_s_s 7
|
||||
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* g139);
|
||||
Scheme_Object* scheme_rtcall_s_s(const char *who, int src_type, prim_s_s f, Scheme_Object* g145);
|
||||
#define SIG_n_s 8
|
||||
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* g140);
|
||||
Scheme_Object* scheme_rtcall_n_s(const char *who, int src_type, prim_n_s f, Scheme_Native_Closure_Data* g146);
|
||||
#define SIG__s 9
|
||||
typedef Scheme_Object* (*prim__s)();
|
||||
Scheme_Object* scheme_rtcall__s(const char *who, int src_type, prim__s f );
|
||||
#define SIG_ss_s 10
|
||||
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* g141, Scheme_Object* g142);
|
||||
#define SIG_ss_m 11
|
||||
Scheme_Object* scheme_rtcall_ss_s(const char *who, int src_type, prim_ss_s f, Scheme_Object* g147, Scheme_Object* g148);
|
||||
#define SIG_tt_s 11
|
||||
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);
|
||||
#define SIG_ss_m 12
|
||||
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* g143, Scheme_Object* g144);
|
||||
#define SIG_Sl_s 12
|
||||
MZ_MARK_STACK_TYPE scheme_rtcall_ss_m(const char *who, int src_type, prim_ss_m f, Scheme_Object* g151, Scheme_Object* g152);
|
||||
#define SIG_Sl_s 13
|
||||
typedef Scheme_Object* (*prim_Sl_s)(Scheme_Object**, long);
|
||||
Scheme_Object* scheme_rtcall_Sl_s(const char *who, int src_type, prim_Sl_s f, Scheme_Object** g145, long g146);
|
||||
#define SIG_l_s 13
|
||||
Scheme_Object* scheme_rtcall_Sl_s(const char *who, int src_type, prim_Sl_s f, Scheme_Object** g153, long g154);
|
||||
#define SIG_l_s 14
|
||||
typedef Scheme_Object* (*prim_l_s)(long);
|
||||
Scheme_Object* scheme_rtcall_l_s(const char *who, int src_type, prim_l_s f, long g147);
|
||||
#define SIG_bsi_v 14
|
||||
Scheme_Object* scheme_rtcall_l_s(const char *who, int src_type, prim_l_s f, long g155);
|
||||
#define SIG_bsi_v 15
|
||||
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* g148, Scheme_Object* g149, int g150);
|
||||
#define SIG_iiS_v 15
|
||||
void scheme_rtcall_bsi_v(const char *who, int src_type, prim_bsi_v f, Scheme_Bucket* g156, Scheme_Object* g157, int g158);
|
||||
#define SIG_iiS_v 16
|
||||
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 g151, int g152, Scheme_Object** g153);
|
||||
#define SIG_ss_v 16
|
||||
void scheme_rtcall_iiS_v(const char *who, int src_type, prim_iiS_v f, int g159, int g160, Scheme_Object** g161);
|
||||
#define SIG_ss_v 17
|
||||
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* g154, Scheme_Object* g155);
|
||||
#define SIG_b_v 17
|
||||
void scheme_rtcall_ss_v(const char *who, int src_type, prim_ss_v f, Scheme_Object* g162, Scheme_Object* g163);
|
||||
#define SIG_b_v 18
|
||||
typedef void (*prim_b_v)(Scheme_Bucket*);
|
||||
void scheme_rtcall_b_v(const char *who, int src_type, prim_b_v f, Scheme_Bucket* g156);
|
||||
#define SIG_sl_s 18
|
||||
void scheme_rtcall_b_v(const char *who, int src_type, prim_b_v f, Scheme_Bucket* g164);
|
||||
#define SIG_sl_s 19
|
||||
typedef Scheme_Object* (*prim_sl_s)(Scheme_Object*, long);
|
||||
Scheme_Object* scheme_rtcall_sl_s(const char *who, int src_type, prim_sl_s f, Scheme_Object* g157, long g158);
|
||||
#define SIG_iS_s 19
|
||||
Scheme_Object* scheme_rtcall_sl_s(const char *who, int src_type, prim_sl_s f, Scheme_Object* g165, long g166);
|
||||
#define SIG_iS_s 20
|
||||
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 g159, Scheme_Object** g160);
|
||||
#define SIG_S_s 20
|
||||
Scheme_Object* scheme_rtcall_iS_s(const char *who, int src_type, prim_iS_s f, int g167, Scheme_Object** g168);
|
||||
#define SIG_S_s 21
|
||||
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** g161);
|
||||
#define SIG_s_v 21
|
||||
Scheme_Object* scheme_rtcall_S_s(const char *who, int src_type, prim_S_s f, Scheme_Object** g169);
|
||||
#define SIG_s_v 22
|
||||
typedef void (*prim_s_v)(Scheme_Object*);
|
||||
void scheme_rtcall_s_v(const char *who, int src_type, prim_s_v f, Scheme_Object* g162);
|
||||
#define SIG_iSi_s 22
|
||||
void scheme_rtcall_s_v(const char *who, int src_type, prim_s_v f, Scheme_Object* g170);
|
||||
#define SIG_iSi_s 23
|
||||
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 g163, Scheme_Object** g164, int g165);
|
||||
#define SIG_siS_v 23
|
||||
Scheme_Object* scheme_rtcall_iSi_s(const char *who, int src_type, prim_iSi_s f, int g171, Scheme_Object** g172, int g173);
|
||||
#define SIG_siS_v 24
|
||||
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* g166, int g167, Scheme_Object** g168);
|
||||
#define SIG_z_p 24
|
||||
void scheme_rtcall_siS_v(const char *who, int src_type, prim_siS_v f, Scheme_Object* g174, int g175, Scheme_Object** g176);
|
||||
#define SIG_z_p 25
|
||||
typedef void* (*prim_z_p)(size_t);
|
||||
void* scheme_rtcall_z_p(const char *who, int src_type, prim_z_p f, size_t g169);
|
||||
#define SIG_si_s 25
|
||||
void* scheme_rtcall_z_p(const char *who, int src_type, prim_z_p f, size_t g177);
|
||||
#define SIG_si_s 26
|
||||
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* g170, int g171);
|
||||
#define SIG_sis_v 26
|
||||
Scheme_Object* scheme_rtcall_si_s(const char *who, int src_type, prim_si_s f, Scheme_Object* g178, int g179);
|
||||
#define SIG_sis_v 27
|
||||
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* g172, int g173, Scheme_Object* g174);
|
||||
void scheme_rtcall_sis_v(const char *who, int src_type, prim_sis_v f, Scheme_Object* g180, int g181, Scheme_Object* g182);
|
||||
|
|
|
@ -64,6 +64,17 @@ case SIG_ss_s:
|
|||
send_special_result(future, retval);
|
||||
break;
|
||||
}
|
||||
case SIG_tt_s:
|
||||
{
|
||||
prim_tt_s f = (prim_tt_s)future->prim_func;
|
||||
Scheme_Object* retval;
|
||||
|
||||
retval =
|
||||
f(future->arg_t0, future->arg_t1);
|
||||
future->retval_s = retval;
|
||||
send_special_result(future, retval);
|
||||
break;
|
||||
}
|
||||
case SIG_ss_m:
|
||||
{
|
||||
prim_ss_m f = (prim_ss_m)future->prim_func;
|
||||
|
|
|
@ -5619,10 +5619,12 @@ static int future_MARK(void *p, struct NewGC *gc) {
|
|||
future_t *f = (future_t *)p;
|
||||
gcMARK2(f->orig_lambda, gc);
|
||||
gcMARK2(f->arg_s0, gc);
|
||||
gcMARK2(f->arg_t0, gc);
|
||||
gcMARK2(f->arg_S0, gc);
|
||||
gcMARK2(f->arg_b0, gc);
|
||||
gcMARK2(f->arg_n0, gc);
|
||||
gcMARK2(f->arg_s1, gc);
|
||||
gcMARK2(f->arg_t1, gc);
|
||||
gcMARK2(f->arg_S1, gc);
|
||||
gcMARK2(f->arg_s2, gc);
|
||||
gcMARK2(f->arg_S2, gc);
|
||||
|
@ -5643,10 +5645,12 @@ static int future_FIXUP(void *p, struct NewGC *gc) {
|
|||
future_t *f = (future_t *)p;
|
||||
gcFIXUP2(f->orig_lambda, gc);
|
||||
gcFIXUP2(f->arg_s0, gc);
|
||||
gcFIXUP2(f->arg_t0, gc);
|
||||
gcFIXUP2(f->arg_S0, gc);
|
||||
gcFIXUP2(f->arg_b0, gc);
|
||||
gcFIXUP2(f->arg_n0, gc);
|
||||
gcFIXUP2(f->arg_s1, gc);
|
||||
gcFIXUP2(f->arg_t1, gc);
|
||||
gcFIXUP2(f->arg_S1, gc);
|
||||
gcFIXUP2(f->arg_s2, gc);
|
||||
gcFIXUP2(f->arg_S2, gc);
|
||||
|
|
|
@ -2302,10 +2302,12 @@ future {
|
|||
future_t *f = (future_t *)p;
|
||||
gcMARK2(f->orig_lambda, gc);
|
||||
gcMARK2(f->arg_s0, gc);
|
||||
gcMARK2(f->arg_t0, gc);
|
||||
gcMARK2(f->arg_S0, gc);
|
||||
gcMARK2(f->arg_b0, gc);
|
||||
gcMARK2(f->arg_n0, gc);
|
||||
gcMARK2(f->arg_s1, gc);
|
||||
gcMARK2(f->arg_t1, gc);
|
||||
gcMARK2(f->arg_S1, gc);
|
||||
gcMARK2(f->arg_s2, gc);
|
||||
gcMARK2(f->arg_S2, gc);
|
||||
|
|
|
@ -87,9 +87,6 @@ static Scheme_Object *tan_prim (int argc, Scheme_Object *argv[]);
|
|||
static Scheme_Object *asin_prim (int argc, Scheme_Object *argv[]);
|
||||
static Scheme_Object *acos_prim (int argc, Scheme_Object *argv[]);
|
||||
static Scheme_Object *atan_prim (int argc, Scheme_Object *argv[]);
|
||||
static Scheme_Object *make_rectangular (int argc, Scheme_Object *argv[]);
|
||||
static Scheme_Object *real_part (int argc, Scheme_Object *argv[]);
|
||||
static Scheme_Object *imag_part (int argc, Scheme_Object *argv[]);
|
||||
static Scheme_Object *magnitude (int argc, Scheme_Object *argv[]);
|
||||
static Scheme_Object *angle (int argc, Scheme_Object *argv[]);
|
||||
static Scheme_Object *int_sqrt (int argc, Scheme_Object *argv[]);
|
||||
|
@ -488,26 +485,25 @@ scheme_init_number (Scheme_Env *env)
|
|||
"expt",
|
||||
2, 2, 1),
|
||||
env);
|
||||
scheme_add_global_constant("make-rectangular",
|
||||
scheme_make_folding_prim(make_rectangular,
|
||||
"make-rectangular",
|
||||
2, 2, 1),
|
||||
env);
|
||||
|
||||
p = scheme_make_folding_prim(scheme_checked_make_rectangular, "make-rectangular", 2, 2, 1);
|
||||
SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_BINARY_INLINED;
|
||||
scheme_add_global_constant("make-rectangular", p, env);
|
||||
|
||||
scheme_add_global_constant("make-polar",
|
||||
scheme_make_folding_prim(scheme_make_polar,
|
||||
"make-polar",
|
||||
2, 2, 1),
|
||||
env);
|
||||
scheme_add_global_constant("real-part",
|
||||
scheme_make_folding_prim(real_part,
|
||||
"real-part",
|
||||
1, 1, 1),
|
||||
env);
|
||||
scheme_add_global_constant("imag-part",
|
||||
scheme_make_folding_prim(imag_part,
|
||||
"imag-part",
|
||||
1, 1, 1),
|
||||
env);
|
||||
|
||||
p = scheme_make_folding_prim(scheme_checked_real_part, "real-part", 1, 1, 1);
|
||||
SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_UNARY_INLINED;
|
||||
scheme_add_global_constant("real-part", p, env);
|
||||
|
||||
p = scheme_make_folding_prim(scheme_checked_imag_part, "imag-part", 1, 1, 1);
|
||||
SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_UNARY_INLINED;
|
||||
scheme_add_global_constant("imag-part", p, env);
|
||||
|
||||
scheme_add_global_constant("angle",
|
||||
scheme_make_folding_prim(angle,
|
||||
"angle",
|
||||
|
@ -2470,7 +2466,7 @@ scheme_expt(int argc, Scheme_Object *argv[])
|
|||
}
|
||||
|
||||
|
||||
static Scheme_Object *make_rectangular (int argc, Scheme_Object *argv[])
|
||||
Scheme_Object *scheme_checked_make_rectangular (int argc, Scheme_Object *argv[])
|
||||
{
|
||||
Scheme_Object *a, *b;
|
||||
int af, bf;
|
||||
|
@ -2519,7 +2515,7 @@ Scheme_Object *scheme_make_polar (int argc, Scheme_Object *argv[])
|
|||
return scheme_make_complex(r, i);
|
||||
}
|
||||
|
||||
static Scheme_Object *real_part (int argc, Scheme_Object *argv[])
|
||||
Scheme_Object *scheme_checked_real_part (int argc, Scheme_Object *argv[])
|
||||
{
|
||||
Scheme_Object *o = argv[0];
|
||||
|
||||
|
@ -2532,7 +2528,7 @@ static Scheme_Object *real_part (int argc, Scheme_Object *argv[])
|
|||
return argv[0];
|
||||
}
|
||||
|
||||
static Scheme_Object *imag_part (int argc, Scheme_Object *argv[])
|
||||
Scheme_Object *scheme_checked_imag_part (int argc, Scheme_Object *argv[])
|
||||
{
|
||||
Scheme_Object *o = argv[0];
|
||||
|
||||
|
|
|
@ -3380,6 +3380,9 @@ Scheme_Object *scheme_vector_length(Scheme_Object *v);
|
|||
Scheme_Object *scheme_checked_flvector_ref(int argc, Scheme_Object **argv);
|
||||
Scheme_Object *scheme_checked_flvector_set(int argc, Scheme_Object **argv);
|
||||
Scheme_Object *scheme_flvector_length(Scheme_Object *v);
|
||||
Scheme_Object *scheme_checked_real_part (int argc, Scheme_Object *argv[]);
|
||||
Scheme_Object *scheme_checked_imag_part (int argc, Scheme_Object *argv[]);
|
||||
Scheme_Object *scheme_checked_make_rectangular (int argc, Scheme_Object *argv[]);
|
||||
|
||||
Scheme_Object *scheme_chaperone_vector_copy(Scheme_Object *obj);
|
||||
Scheme_Object *scheme_chaperone_hash_table_copy(Scheme_Object *obj);
|
||||
|
|
Loading…
Reference in New Issue
Block a user