fixing typo in new opcodes.c

This commit is contained in:
Alex Shinn 2010-07-27 00:24:37 +09:00
parent fb8e1cf441
commit e0cb8fd076
2 changed files with 5 additions and 3 deletions

View file

@ -48,7 +48,9 @@ static sexp sexp_get_opcode_name (sexp ctx sexp_api_params(self, n), sexp op) {
static sexp sexp_translate_opcode_type (sexp ctx, sexp type) { static sexp sexp_translate_opcode_type (sexp ctx, sexp type) {
sexp_gc_var2(res, tmp); sexp_gc_var2(res, tmp);
res = type; res = type;
if (sexp_nullp(res)) { /* opcode list types */ if (sexp_fixnump(res)) {
res = sexp_type_by_index(ctx, sexp_unbox_fixnum(res));
} else if (sexp_nullp(res)) { /* opcode list types */
sexp_gc_preserve2(ctx, res, tmp); sexp_gc_preserve2(ctx, res, tmp);
tmp = sexp_intern(ctx, "or", -1); tmp = sexp_intern(ctx, "or", -1);
res = sexp_cons(ctx, sexp_make_fixnum(SEXP_PAIR), SEXP_NULL); res = sexp_cons(ctx, sexp_make_fixnum(SEXP_PAIR), SEXP_NULL);
@ -174,7 +176,7 @@ sexp sexp_init_library (sexp ctx sexp_api_params(self, n), sexp env) {
sexp_define_foreign(ctx, env, "opcode-name", 1, sexp_get_opcode_name); sexp_define_foreign(ctx, env, "opcode-name", 1, sexp_get_opcode_name);
sexp_define_foreign(ctx, env, "opcode-num-params", 1, sexp_get_opcode_num_params); sexp_define_foreign(ctx, env, "opcode-num-params", 1, sexp_get_opcode_num_params);
sexp_define_foreign(ctx, env, "opcode-return-type", 1, sexp_get_opcode_ret_type); sexp_define_foreign(ctx, env, "opcode-return-type", 1, sexp_get_opcode_ret_type);
sexp_define_foreign(ctx, env, "opcode-param-type", 1, sexp_get_opcode_param_type); sexp_define_foreign(ctx, env, "opcode-param-type", 2, sexp_get_opcode_param_type);
sexp_define_foreign(ctx, env, "optimize", 1, sexp_optimize); sexp_define_foreign(ctx, env, "optimize", 1, sexp_optimize);
return SEXP_VOID; return SEXP_VOID;
} }

View file

@ -69,7 +69,7 @@ _OP(SEXP_OPC_TYPE_PREDICATE, SEXP_OP_CHARP, 1, 0, _I(SEXP_OBJECT), SEXP_FALSE,
_OP(SEXP_OPC_TYPE_PREDICATE, SEXP_OP_FIXNUMP, 1, 0, _I(SEXP_OBJECT), SEXP_FALSE, 0, "fixnum?", NULL, 0), _OP(SEXP_OPC_TYPE_PREDICATE, SEXP_OP_FIXNUMP, 1, 0, _I(SEXP_OBJECT), SEXP_FALSE, 0, "fixnum?", NULL, 0),
_OP(SEXP_OPC_TYPE_PREDICATE, SEXP_OP_TYPEP, 1, 0, _I(SEXP_OBJECT), SEXP_FALSE, 0, "pair?", _I(SEXP_PAIR), 0), _OP(SEXP_OPC_TYPE_PREDICATE, SEXP_OP_TYPEP, 1, 0, _I(SEXP_OBJECT), SEXP_FALSE, 0, "pair?", _I(SEXP_PAIR), 0),
_OP(SEXP_OPC_TYPE_PREDICATE, SEXP_OP_TYPEP, 1, 0, _I(SEXP_OBJECT), SEXP_FALSE, 0, "string?", _I(SEXP_STRING), 0), _OP(SEXP_OPC_TYPE_PREDICATE, SEXP_OP_TYPEP, 1, 0, _I(SEXP_OBJECT), SEXP_FALSE, 0, "string?", _I(SEXP_STRING), 0),
_OP(SEXP_OPC_TYPE_PREDICATE, SEXP_OP_TYPEP, 1, 0, _I(SEXP_OBJECT), SEXP_FALSE, 0, "vector?", _I(_I(SEXP_VECTOR)), 0), _OP(SEXP_OPC_TYPE_PREDICATE, SEXP_OP_TYPEP, 1, 0, _I(SEXP_OBJECT), SEXP_FALSE, 0, "vector?", _I(SEXP_VECTOR), 0),
#if SEXP_USE_IMMEDIATE_FLONUMS #if SEXP_USE_IMMEDIATE_FLONUMS
_FN1(_I(SEXP_OBJECT), "flonum?", 0, sexp_flonump_op), _FN1(_I(SEXP_OBJECT), "flonum?", 0, sexp_flonump_op),
#else #else