void scheme_init_extfl_unsafe_numcomp(Scheme_Env *env) { Scheme_Object *p; int flags; p = scheme_make_folding_prim(unsafe_extfl_eq, "unsafe-extfl=", 2, 2, 1); if (MZ_LONG_DOUBLE_AND(scheme_can_inline_fp_comp())) flags = SCHEME_PRIM_IS_BINARY_INLINED; else flags = SCHEME_PRIM_SOMETIMES_INLINED; SCHEME_PRIM_PROC_FLAGS(p) |= scheme_intern_prim_opt_flags(flags | SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL | SCHEME_PRIM_WANTS_EXTFLONUM_BOTH); scheme_add_global_constant("unsafe-extfl=", p, env); p = scheme_make_folding_prim(unsafe_extfl_lt, "unsafe-extfl<", 2, 2, 1); if (MZ_LONG_DOUBLE_AND(scheme_can_inline_fp_comp())) flags = SCHEME_PRIM_IS_BINARY_INLINED; else flags = SCHEME_PRIM_SOMETIMES_INLINED; SCHEME_PRIM_PROC_FLAGS(p) |= scheme_intern_prim_opt_flags(flags | SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL | SCHEME_PRIM_WANTS_EXTFLONUM_BOTH); scheme_add_global_constant("unsafe-extfl<", p, env); p = scheme_make_folding_prim(unsafe_extfl_gt, "unsafe-extfl>", 2, 2, 1); if (MZ_LONG_DOUBLE_AND(scheme_can_inline_fp_comp())) flags = SCHEME_PRIM_IS_BINARY_INLINED; else flags = SCHEME_PRIM_SOMETIMES_INLINED; SCHEME_PRIM_PROC_FLAGS(p) |= scheme_intern_prim_opt_flags(flags | SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL | SCHEME_PRIM_WANTS_EXTFLONUM_BOTH); scheme_add_global_constant("unsafe-extfl>", p, env); p = scheme_make_folding_prim(unsafe_extfl_lt_eq, "unsafe-extfl<=", 2, 2, 1); if (MZ_LONG_DOUBLE_AND(scheme_can_inline_fp_comp())) flags = SCHEME_PRIM_IS_BINARY_INLINED; else flags = SCHEME_PRIM_SOMETIMES_INLINED; SCHEME_PRIM_PROC_FLAGS(p) |= scheme_intern_prim_opt_flags(flags | SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL | SCHEME_PRIM_WANTS_EXTFLONUM_BOTH); scheme_add_global_constant("unsafe-extfl<=", p, env); p = scheme_make_folding_prim(unsafe_extfl_gt_eq, "unsafe-extfl>=", 2, 2, 1); if (MZ_LONG_DOUBLE_AND(scheme_can_inline_fp_comp())) flags = SCHEME_PRIM_IS_BINARY_INLINED; else flags = SCHEME_PRIM_SOMETIMES_INLINED; SCHEME_PRIM_PROC_FLAGS(p) |= scheme_intern_prim_opt_flags(flags | SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL | SCHEME_PRIM_WANTS_EXTFLONUM_BOTH); scheme_add_global_constant("unsafe-extfl>=", p, env); p = scheme_make_folding_prim(unsafe_extfl_min, "unsafe-extflmin", 2, 2, 1); if (MZ_LONG_DOUBLE_AND(scheme_can_inline_fp_op())) flags = SCHEME_PRIM_IS_BINARY_INLINED; else flags = SCHEME_PRIM_SOMETIMES_INLINED; SCHEME_PRIM_PROC_FLAGS(p) |= scheme_intern_prim_opt_flags(flags | SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL | SCHEME_PRIM_PRODUCES_EXTFLONUM | SCHEME_PRIM_WANTS_EXTFLONUM_BOTH); scheme_add_global_constant("unsafe-extflmin", p, env); p = scheme_make_folding_prim(unsafe_extfl_max, "unsafe-extflmax", 2, 2, 1); if (MZ_LONG_DOUBLE_AND(scheme_can_inline_fp_op())) flags = SCHEME_PRIM_IS_BINARY_INLINED; else flags = SCHEME_PRIM_SOMETIMES_INLINED; SCHEME_PRIM_PROC_FLAGS(p) |= scheme_intern_prim_opt_flags(flags | SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL | SCHEME_PRIM_PRODUCES_EXTFLONUM | SCHEME_PRIM_WANTS_EXTFLONUM_BOTH); scheme_add_global_constant("unsafe-extflmax", p, env); }
void scheme_init_unsafe_numcomp(Scheme_Env *env) { Scheme_Object *p; p = scheme_make_folding_prim(unsafe_fx_eq, "unsafe-fx=", 2, 2, 1); SCHEME_PRIM_PROC_FLAGS(p) |= (SCHEME_PRIM_IS_BINARY_INLINED | SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL); scheme_add_global_constant("unsafe-fx=", p, env); p = scheme_make_folding_prim(unsafe_fx_lt, "unsafe-fx<", 2, 2, 1); SCHEME_PRIM_PROC_FLAGS(p) |= (SCHEME_PRIM_IS_BINARY_INLINED | SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL); scheme_add_global_constant("unsafe-fx<", p, env); p = scheme_make_folding_prim(unsafe_fx_gt, "unsafe-fx>", 2, 2, 1); SCHEME_PRIM_PROC_FLAGS(p) |= (SCHEME_PRIM_IS_BINARY_INLINED | SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL); scheme_add_global_constant("unsafe-fx>", p, env); p = scheme_make_folding_prim(unsafe_fx_lt_eq, "unsafe-fx<=", 2, 2, 1); SCHEME_PRIM_PROC_FLAGS(p) |= (SCHEME_PRIM_IS_BINARY_INLINED | SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL); scheme_add_global_constant("unsafe-fx<=", p, env); p = scheme_make_folding_prim(unsafe_fx_gt_eq, "unsafe-fx>=", 2, 2, 1); SCHEME_PRIM_PROC_FLAGS(p) |= (SCHEME_PRIM_IS_BINARY_INLINED | SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL); scheme_add_global_constant("unsafe-fx>=", p, env); p = scheme_make_folding_prim(unsafe_fx_min, "unsafe-fxmin", 2, 2, 1); SCHEME_PRIM_PROC_FLAGS(p) |= (SCHEME_PRIM_IS_BINARY_INLINED | SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL); scheme_add_global_constant("unsafe-fxmin", p, env); p = scheme_make_folding_prim(unsafe_fx_max, "unsafe-fxmax", 2, 2, 1); SCHEME_PRIM_PROC_FLAGS(p) |= (SCHEME_PRIM_IS_BINARY_INLINED | SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL); scheme_add_global_constant("unsafe-fxmax", p, env); p = scheme_make_folding_prim(unsafe_fl_eq, "unsafe-fl=", 2, 2, 1); if (scheme_can_inline_fp_comp()) SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_BINARY_INLINED; else SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_SOMETIMES_INLINED; SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL; scheme_add_global_constant("unsafe-fl=", p, env); p = scheme_make_folding_prim(unsafe_fl_lt, "unsafe-fl<", 2, 2, 1); if (scheme_can_inline_fp_comp()) SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_BINARY_INLINED; else SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_SOMETIMES_INLINED; SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL; scheme_add_global_constant("unsafe-fl<", p, env); p = scheme_make_folding_prim(unsafe_fl_gt, "unsafe-fl>", 2, 2, 1); if (scheme_can_inline_fp_comp()) SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_BINARY_INLINED; else SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_SOMETIMES_INLINED; SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL; scheme_add_global_constant("unsafe-fl>", p, env); p = scheme_make_folding_prim(unsafe_fl_lt_eq, "unsafe-fl<=", 2, 2, 1); if (scheme_can_inline_fp_comp()) SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_BINARY_INLINED; else SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_SOMETIMES_INLINED; SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL; scheme_add_global_constant("unsafe-fl<=", p, env); p = scheme_make_folding_prim(unsafe_fl_gt_eq, "unsafe-fl>=", 2, 2, 1); if (scheme_can_inline_fp_comp()) SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_BINARY_INLINED; else SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_SOMETIMES_INLINED; SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL; scheme_add_global_constant("unsafe-fl>=", p, env); p = scheme_make_folding_prim(unsafe_fl_min, "unsafe-flmin", 2, 2, 1); if (scheme_can_inline_fp_op()) SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_BINARY_INLINED; else SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_SOMETIMES_INLINED; SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL; scheme_add_global_constant("unsafe-flmin", p, env); p = scheme_make_folding_prim(unsafe_fl_max, "unsafe-flmax", 2, 2, 1); if (scheme_can_inline_fp_op()) SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_BINARY_INLINED; else SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_SOMETIMES_INLINED; SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL; scheme_add_global_constant("unsafe-flmax", p, env); }
void scheme_init_flfxnum_numcomp(Scheme_Env *env) { Scheme_Object *p; int flags; p = scheme_make_folding_prim(fx_eq, "fx=", 2, 2, 1); SCHEME_PRIM_PROC_FLAGS(p) |= scheme_intern_prim_opt_flags(SCHEME_PRIM_IS_BINARY_INLINED); scheme_add_global_constant("fx=", p, env); p = scheme_make_folding_prim(fx_lt, "fx<", 2, 2, 1); SCHEME_PRIM_PROC_FLAGS(p) |= scheme_intern_prim_opt_flags(SCHEME_PRIM_IS_BINARY_INLINED); scheme_add_global_constant("fx<", p, env); p = scheme_make_folding_prim(fx_gt, "fx>", 2, 2, 1); SCHEME_PRIM_PROC_FLAGS(p) |= scheme_intern_prim_opt_flags(SCHEME_PRIM_IS_BINARY_INLINED); scheme_add_global_constant("fx>", p, env); p = scheme_make_folding_prim(fx_lt_eq, "fx<=", 2, 2, 1); SCHEME_PRIM_PROC_FLAGS(p) |= scheme_intern_prim_opt_flags(SCHEME_PRIM_IS_BINARY_INLINED); scheme_add_global_constant("fx<=", p, env); p = scheme_make_folding_prim(fx_gt_eq, "fx>=", 2, 2, 1); SCHEME_PRIM_PROC_FLAGS(p) |= scheme_intern_prim_opt_flags(SCHEME_PRIM_IS_BINARY_INLINED); scheme_add_global_constant("fx>=", p, env); p = scheme_make_folding_prim(fx_min, "fxmin", 2, 2, 1); if (scheme_can_inline_fp_comp()) flags = SCHEME_PRIM_IS_BINARY_INLINED; else flags = SCHEME_PRIM_SOMETIMES_INLINED; SCHEME_PRIM_PROC_FLAGS(p) |= scheme_intern_prim_opt_flags(flags | SCHEME_PRIM_PRODUCES_FIXNUM); scheme_add_global_constant("fxmin", p, env); p = scheme_make_folding_prim(fx_max, "fxmax", 2, 2, 1); if (scheme_can_inline_fp_comp()) flags = SCHEME_PRIM_IS_BINARY_INLINED; else flags = SCHEME_PRIM_SOMETIMES_INLINED; SCHEME_PRIM_PROC_FLAGS(p) |= scheme_intern_prim_opt_flags(flags | SCHEME_PRIM_PRODUCES_FIXNUM); scheme_add_global_constant("fxmax", p, env); p = scheme_make_folding_prim(fl_eq, "fl=", 2, 2, 1); if (scheme_can_inline_fp_comp()) flags = SCHEME_PRIM_IS_BINARY_INLINED; else flags = SCHEME_PRIM_SOMETIMES_INLINED; SCHEME_PRIM_PROC_FLAGS(p) |= scheme_intern_prim_opt_flags(flags | SCHEME_PRIM_WANTS_FLONUM_BOTH); scheme_add_global_constant("fl=", p, env); p = scheme_make_folding_prim(fl_lt, "fl<", 2, 2, 1); if (scheme_can_inline_fp_comp()) flags = SCHEME_PRIM_IS_BINARY_INLINED; else flags = SCHEME_PRIM_SOMETIMES_INLINED; SCHEME_PRIM_PROC_FLAGS(p) |= scheme_intern_prim_opt_flags(flags | SCHEME_PRIM_WANTS_FLONUM_BOTH); scheme_add_global_constant("fl<", p, env); p = scheme_make_folding_prim(fl_gt, "fl>", 2, 2, 1); if (scheme_can_inline_fp_comp()) flags = SCHEME_PRIM_IS_BINARY_INLINED; else flags = SCHEME_PRIM_SOMETIMES_INLINED; SCHEME_PRIM_PROC_FLAGS(p) |= scheme_intern_prim_opt_flags(flags | SCHEME_PRIM_WANTS_FLONUM_BOTH); scheme_add_global_constant("fl>", p, env); p = scheme_make_folding_prim(fl_lt_eq, "fl<=", 2, 2, 1); if (scheme_can_inline_fp_comp()) flags = SCHEME_PRIM_IS_BINARY_INLINED; else flags = SCHEME_PRIM_SOMETIMES_INLINED; SCHEME_PRIM_PROC_FLAGS(p) |= scheme_intern_prim_opt_flags(flags | SCHEME_PRIM_WANTS_FLONUM_BOTH); scheme_add_global_constant("fl<=", p, env); p = scheme_make_folding_prim(fl_gt_eq, "fl>=", 2, 2, 1); if (scheme_can_inline_fp_comp()) flags = SCHEME_PRIM_IS_BINARY_INLINED; else flags = SCHEME_PRIM_SOMETIMES_INLINED; SCHEME_PRIM_PROC_FLAGS(p) |= scheme_intern_prim_opt_flags(flags | SCHEME_PRIM_WANTS_FLONUM_BOTH); scheme_add_global_constant("fl>=", p, env); p = scheme_make_folding_prim(fl_min, "flmin", 2, 2, 1); if (scheme_can_inline_fp_op()) flags = SCHEME_PRIM_IS_BINARY_INLINED; else flags = SCHEME_PRIM_SOMETIMES_INLINED; SCHEME_PRIM_PROC_FLAGS(p) |= scheme_intern_prim_opt_flags(flags | SCHEME_PRIM_PRODUCES_FLONUM | SCHEME_PRIM_WANTS_FLONUM_BOTH); scheme_add_global_constant("flmin", p, env); p = scheme_make_folding_prim(fl_max, "flmax", 2, 2, 1); if (scheme_can_inline_fp_op()) flags = SCHEME_PRIM_IS_BINARY_INLINED; else flags = SCHEME_PRIM_SOMETIMES_INLINED; SCHEME_PRIM_PROC_FLAGS(p) |= scheme_intern_prim_opt_flags(flags | SCHEME_PRIM_PRODUCES_FLONUM | SCHEME_PRIM_WANTS_FLONUM_BOTH); scheme_add_global_constant("flmax", p, env); }