@@ -318,8 +318,6 @@ args_setup_kw_parameters_lookup(const ID key, VALUE *ptr, const VALUE *const pas
318318 return FALSE;
319319}
320320
321- #define KW_SPECIFIED_BITS_MAX (32-1) /* TODO: 32 -> Fixnum's max bits */
322-
323321static void
324322args_setup_kw_parameters (rb_execution_context_t * const ec , const rb_iseq_t * const iseq , const rb_callable_method_entry_t * cme ,
325323 VALUE * const passed_values , const int passed_keyword_len , const VALUE * const passed_keywords ,
@@ -355,7 +353,7 @@ args_setup_kw_parameters(rb_execution_context_t *const ec, const rb_iseq_t *cons
355353 if (UNDEF_P (default_values [di ])) {
356354 locals [i ] = Qnil ;
357355
358- if (LIKELY (i < KW_SPECIFIED_BITS_MAX )) {
356+ if (LIKELY (i < VM_KW_SPECIFIED_BITS_MAX )) {
359357 unspecified_bits |= 0x01 << di ;
360358 }
361359 else {
@@ -364,7 +362,7 @@ args_setup_kw_parameters(rb_execution_context_t *const ec, const rb_iseq_t *cons
364362 int j ;
365363 unspecified_bits_value = rb_hash_new ();
366364
367- for (j = 0 ; j < KW_SPECIFIED_BITS_MAX ; j ++ ) {
365+ for (j = 0 ; j < VM_KW_SPECIFIED_BITS_MAX ; j ++ ) {
368366 if (unspecified_bits & (0x01 << j )) {
369367 rb_hash_aset (unspecified_bits_value , INT2FIX (j ), Qtrue );
370368 }
@@ -450,7 +448,7 @@ args_setup_kw_parameters_from_kwsplat(rb_execution_context_t *const ec, const rb
450448 if (UNDEF_P (default_values [di ])) {
451449 locals [i ] = Qnil ;
452450
453- if (LIKELY (i < KW_SPECIFIED_BITS_MAX )) {
451+ if (LIKELY (i < VM_KW_SPECIFIED_BITS_MAX )) {
454452 unspecified_bits |= 0x01 << di ;
455453 }
456454 else {
@@ -459,7 +457,7 @@ args_setup_kw_parameters_from_kwsplat(rb_execution_context_t *const ec, const rb
459457 int j ;
460458 unspecified_bits_value = rb_hash_new ();
461459
462- for (j = 0 ; j < KW_SPECIFIED_BITS_MAX ; j ++ ) {
460+ for (j = 0 ; j < VM_KW_SPECIFIED_BITS_MAX ; j ++ ) {
463461 if (unspecified_bits & (0x01 << j )) {
464462 rb_hash_aset (unspecified_bits_value , INT2FIX (j ), Qtrue );
465463 }
0 commit comments