From 9068341cb9d96e2cc6613202f56255e7e1d0f201 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 8 Aug 2013 17:56:08 -0700 Subject: [PATCH] JIT: add missing check on inlined `procedure-arity-includes?' Closes PR 13951 --- pkgs/racket-pkgs/racket-test/tests/racket/optimize.rktl | 2 +- racket/src/racket/src/jitcommon.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/racket-pkgs/racket-test/tests/racket/optimize.rktl b/pkgs/racket-pkgs/racket-test/tests/racket/optimize.rktl index 082509ea1b..80335e82fb 100644 --- a/pkgs/racket-pkgs/racket-test/tests/racket/optimize.rktl +++ b/pkgs/racket-pkgs/racket-test/tests/racket/optimize.rktl @@ -846,7 +846,7 @@ (lambda () v) 0 "other" (lambda () (test 77 unbox v)))) - (bin-exact #t 'procedure-arity-includes? cons 2) + (bin-exact #t 'procedure-arity-includes? cons 2 #t) (bin-exact #f 'procedure-arity-includes? cons 1) (bin-exact #f 'procedure-arity-includes? cons 3) (bin-exact #t 'procedure-arity-includes? car 1) diff --git a/racket/src/racket/src/jitcommon.c b/racket/src/racket/src/jitcommon.c index 0e59bd6a2c..58278d05ab 100644 --- a/racket/src/racket/src/jitcommon.c +++ b/racket/src/racket/src/jitcommon.c @@ -2950,6 +2950,8 @@ static int common10(mz_jit_state *jitter, void *_data) mz_patch_branch(ref); (void)jit_blti_l(refslow, JIT_R1, 0); + (void)jit_bmsi_l(refslow, JIT_R0, 0x1); + jit_ldxi_s(JIT_R2, JIT_R0, &((Scheme_Object *)0x0)->type); ref_nc = jit_beqi_i(jit_forward(), JIT_R2, scheme_native_closure_type); ref_prim = jit_beqi_i(jit_forward(), JIT_R2, scheme_prim_type);