avoid JIT internal error for misuse of unsafe flonum args
This commit is contained in:
parent
87cc623a6f
commit
2a2aede4c5
|
@ -11116,12 +11116,25 @@ static int generate(Scheme_Object *obj, mz_jit_state *jitter, int is_tail, int w
|
||||||
else
|
else
|
||||||
finish_branch_with_true(jitter, for_branch);
|
finish_branch_with_true(jitter, for_branch);
|
||||||
return 1;
|
return 1;
|
||||||
} else if (jitter->unbox && SCHEME_FLOATP(obj)) {
|
} else if (jitter->unbox) {
|
||||||
double d = SCHEME_FLOAT_VAL(obj);
|
double d;
|
||||||
int fpr0;
|
int fpr0;
|
||||||
|
|
||||||
|
if (SCHEME_FLOATP(obj))
|
||||||
|
d = SCHEME_FLOAT_VAL(obj);
|
||||||
|
else {
|
||||||
|
scheme_log(NULL,
|
||||||
|
SCHEME_LOG_WARNING,
|
||||||
|
0,
|
||||||
|
"warning: JIT detects flonum operation applied to non-flonum constant: %V",
|
||||||
|
obj);
|
||||||
|
d = 0.0;
|
||||||
|
}
|
||||||
|
|
||||||
fpr0 = JIT_FPR(jitter->unbox_depth);
|
fpr0 = JIT_FPR(jitter->unbox_depth);
|
||||||
mz_movi_d_fppush(fpr0, d, target);
|
mz_movi_d_fppush(fpr0, d, target);
|
||||||
jitter->unbox_depth++;
|
jitter->unbox_depth++;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
} else if (!result_ignored) {
|
} else if (!result_ignored) {
|
||||||
int retptr;
|
int retptr;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user