inline a few more predicates
svn: r2358
This commit is contained in:
parent
776e15490e
commit
c88dc9c26b
|
@ -189,11 +189,12 @@ scheme_init_fun (Scheme_Env *env)
|
||||||
REGISTER_SO(cached_dv_stx);
|
REGISTER_SO(cached_dv_stx);
|
||||||
REGISTER_SO(cached_ds_stx);
|
REGISTER_SO(cached_ds_stx);
|
||||||
|
|
||||||
scheme_add_global_constant("procedure?",
|
o = scheme_make_folding_prim(procedure_p,
|
||||||
scheme_make_folding_prim(procedure_p,
|
"procedure?",
|
||||||
"procedure?",
|
1, 1, 1);
|
||||||
1, 1, 1),
|
SCHEME_PRIM_PROC_FLAGS(o) |= SCHEME_PRIM_IS_UNARY_INLINED;
|
||||||
env);
|
scheme_add_global_constant("procedure?", o, env);
|
||||||
|
|
||||||
scheme_add_global_constant("apply",
|
scheme_add_global_constant("apply",
|
||||||
scheme_make_prim_w_arity2(apply,
|
scheme_make_prim_w_arity2(apply,
|
||||||
"apply",
|
"apply",
|
||||||
|
|
|
@ -2051,6 +2051,18 @@ static int generate_inlined_unary(mz_jit_state *jitter, Scheme_App2_Rec *app, in
|
||||||
} else if (IS_NAMED_PRIM(rator, "real?")) {
|
} else if (IS_NAMED_PRIM(rator, "real?")) {
|
||||||
generate_inlined_type_test(jitter, app, scheme_integer_type, scheme_complex_izi_type, for_branch, branch_short);
|
generate_inlined_type_test(jitter, app, scheme_integer_type, scheme_complex_izi_type, for_branch, branch_short);
|
||||||
return 1;
|
return 1;
|
||||||
|
} else if (IS_NAMED_PRIM(rator, "procedure?")) {
|
||||||
|
generate_inlined_type_test(jitter, app, scheme_prim_type, scheme_native_closure_type, for_branch, branch_short);
|
||||||
|
return 1;
|
||||||
|
} else if (IS_NAMED_PRIM(rator, "vector?")) {
|
||||||
|
generate_inlined_type_test(jitter, app, scheme_vector_type, scheme_vector_type, for_branch, branch_short);
|
||||||
|
return 1;
|
||||||
|
} else if (IS_NAMED_PRIM(rator, "string?")) {
|
||||||
|
generate_inlined_type_test(jitter, app, scheme_char_string_type, scheme_char_string_type, for_branch, branch_short);
|
||||||
|
return 1;
|
||||||
|
} else if (IS_NAMED_PRIM(rator, "bytes?")) {
|
||||||
|
generate_inlined_type_test(jitter, app, scheme_byte_string_type, scheme_byte_string_type, for_branch, branch_short);
|
||||||
|
return 1;
|
||||||
} else if (IS_NAMED_PRIM(rator, "eof-object?")) {
|
} else if (IS_NAMED_PRIM(rator, "eof-object?")) {
|
||||||
generate_inlined_constant_test(jitter, app, scheme_eof, NULL, for_branch, branch_short);
|
generate_inlined_constant_test(jitter, app, scheme_eof, NULL, for_branch, branch_short);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -288,6 +288,8 @@ static Scheme_Object *complete_symbol, *continues_symbol, *aborts_symbol, *error
|
||||||
void
|
void
|
||||||
scheme_init_string (Scheme_Env *env)
|
scheme_init_string (Scheme_Env *env)
|
||||||
{
|
{
|
||||||
|
Scheme_Object *p;
|
||||||
|
|
||||||
REGISTER_SO(sys_symbol);
|
REGISTER_SO(sys_symbol);
|
||||||
sys_symbol = scheme_intern_symbol(SYSTEM_TYPE_NAME);
|
sys_symbol = scheme_intern_symbol(SYSTEM_TYPE_NAME);
|
||||||
|
|
||||||
|
@ -327,11 +329,10 @@ scheme_init_string (Scheme_Env *env)
|
||||||
REGISTER_SO(embedding_banner);
|
REGISTER_SO(embedding_banner);
|
||||||
REGISTER_SO(current_locale_name);
|
REGISTER_SO(current_locale_name);
|
||||||
|
|
||||||
scheme_add_global_constant("string?",
|
p = scheme_make_folding_prim(string_p, "string?", 1, 1, 1);
|
||||||
scheme_make_folding_prim(string_p,
|
SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_UNARY_INLINED;
|
||||||
"string?",
|
scheme_add_global_constant("string?", p, env);
|
||||||
1, 1, 1),
|
|
||||||
env);
|
|
||||||
scheme_add_global_constant("make-string",
|
scheme_add_global_constant("make-string",
|
||||||
scheme_make_noncm_prim(make_string,
|
scheme_make_noncm_prim(make_string,
|
||||||
"make-string",
|
"make-string",
|
||||||
|
@ -597,11 +598,10 @@ scheme_init_string (Scheme_Env *env)
|
||||||
1, 1, 1),
|
1, 1, 1),
|
||||||
env);
|
env);
|
||||||
|
|
||||||
scheme_add_global_constant("bytes?",
|
p = scheme_make_folding_prim(byte_string_p, "bytes?", 1, 1, 1);
|
||||||
scheme_make_folding_prim(byte_string_p,
|
SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_UNARY_INLINED;
|
||||||
"bytes?",
|
scheme_add_global_constant("bytes?", p, env);
|
||||||
1, 1, 1),
|
|
||||||
env);
|
|
||||||
scheme_add_global_constant("make-bytes",
|
scheme_add_global_constant("make-bytes",
|
||||||
scheme_make_noncm_prim(make_byte_string,
|
scheme_make_noncm_prim(make_byte_string,
|
||||||
"make-bytes",
|
"make-bytes",
|
||||||
|
|
|
@ -49,11 +49,10 @@ scheme_init_vector (Scheme_Env *env)
|
||||||
zero_length_vector->type = scheme_vector_type;
|
zero_length_vector->type = scheme_vector_type;
|
||||||
SCHEME_VEC_SIZE(zero_length_vector) = 0;
|
SCHEME_VEC_SIZE(zero_length_vector) = 0;
|
||||||
|
|
||||||
scheme_add_global_constant("vector?",
|
p = scheme_make_folding_prim(vector_p, "vector?", 1, 1, 1);
|
||||||
scheme_make_folding_prim(vector_p,
|
SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_UNARY_INLINED;
|
||||||
"vector?",
|
scheme_add_global_constant("vector?", p, env);
|
||||||
1, 1, 1),
|
|
||||||
env);
|
|
||||||
scheme_add_global_constant("make-vector",
|
scheme_add_global_constant("make-vector",
|
||||||
scheme_make_noncm_prim(make_vector,
|
scheme_make_noncm_prim(make_vector,
|
||||||
"make-vector",
|
"make-vector",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user