diff --git a/pkgs/racket-test-core/tests/racket/jitinline.rktl b/pkgs/racket-test-core/tests/racket/jitinline.rktl index a899695e68..b40010c64e 100644 --- a/pkgs/racket-test-core/tests/racket/jitinline.rktl +++ b/pkgs/racket-test-core/tests/racket/jitinline.rktl @@ -72,14 +72,14 @@ (test (if v 'yes 'no) name ((eval `(lambda (x) (if (,op x) 'yes 'no))) arg)))))] - [un-exact (lambda (v op arg [check-fixnum-as-bad? #f]) - (check-error-message op (eval `(lambda (x) (,op x)))) + [un-exact (lambda (v op arg [check-fixnum-as-bad? #f] #:name [name op]) + (check-error-message name (eval `(lambda (x) (,op x)))) (when check-fixnum-as-bad? - (check-error-message op (eval `(lambda (x) (,op x))) #t)) + (check-error-message name (eval `(lambda (x) (,op x))) #t)) (un0 v op arg))] - [un (lambda (v op arg [check-fixnum-as-bad? #f]) - (un-exact v op arg check-fixnum-as-bad?) + [un (lambda (v op arg [check-fixnum-as-bad? #f] #:name [name op]) + (un-exact v op arg check-fixnum-as-bad? #:name name) (when (number? arg) (let ([iv (if (number? v) (exact->inexact v) @@ -1034,6 +1034,9 @@ (bin0 'yes 'thing-ref a-rock 99) (bin0 99 'thing-ref 10 99) + (un 'b '(lambda (ht) (hash-ref ht 'a #f)) '#hash((a . b)) #t + #:name 'hash-ref) + )) ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/racket/src/racket/src/jitinline.c b/racket/src/racket/src/jitinline.c index beb805826b..a709ea0f9c 100644 --- a/racket/src/racket/src/jitinline.c +++ b/racket/src/racket/src/jitinline.c @@ -5767,7 +5767,7 @@ int scheme_generate_inlined_nary(mz_jit_state *jitter, Scheme_App_Rec *app, int return 1; } else if (IS_NAMED_PRIM(rator, "hash-ref")) { - GC_CAN_IGNORE jit_insn *refdone0, *refdone, *refslow; + GC_CAN_IGNORE jit_insn *refdone0, *refdone, *refslow, *refslow2; /* We only get here if we have three arguments with the last as a non-procedure constant */ @@ -5779,7 +5779,8 @@ int scheme_generate_inlined_nary(mz_jit_state *jitter, Scheme_App_Rec *app, int /* Jump to slow path for anything other than an immutable hasheq */ __START_SHORT_JUMPS__(1); - refslow = mz_bnei_t(jit_forward(), JIT_R0, scheme_eq_hash_tree_type, JIT_R2); + refslow = jit_bmsi_ul(jit_forward(), JIT_R0, 0x1); + refslow2 = mz_bnei_t(jit_forward(), JIT_R0, scheme_eq_hash_tree_type, JIT_R2); __END_SHORT_JUMPS__(1); /* scheme_eq_hash_tree_get doesn't trigger a GC */ @@ -5798,6 +5799,7 @@ int scheme_generate_inlined_nary(mz_jit_state *jitter, Scheme_App_Rec *app, int /* slow path */ mz_patch_branch(refslow); + mz_patch_branch(refslow2); __END_SHORT_JUMPS__(1); scheme_mz_load_retained(jitter, JIT_R2, app->args[3]);