Commit aa69596f
aa69596f090fMerged
Yukihiro "Matz" Matsumoto <[email protected]> · 6 months ago · 227 files · +57 added · -169 deleted
Description
test: fourth bundle batch + restore int_overflow_raises standalone
Continued auto-rename bundling for the remaining medium-class tests. Adds the bundle_classd_NN sequence (~70 more tests bundled). Single- test bundles still unbundled back to standalone.
One revert: int_overflow_raises was bundled into bundle_misc_c_14
during batch 2, but Makefile's filter-out test/int_overflow_raises.rb
under SPINEL_INT_OVERFLOW=promote no longer matched (the bundle file
has a different name). Restored int_overflow_raises and the bundled
sibling integer_div as standalone tests so the filter keeps working.
Tests that are mode-incompatible at the raise level shouldn't be
bundled in a way that hides them from mode-aware filters.
Verified: default 447/0/0, promote 446/0/0 (skip 1: int_overflow_raises as designed), optcarrot 59662.
Co-Authored-By: Claude Opus 4.7 [email protected]
Details
- Commit
- aa69596f090f
- Parent
- 22563be619e8
test/bundle_classd_04.rbaddedView file
# Bundled tests:# - instance_eval_return_value# - map_array_block_result# - map_block_returns_nested_array# === instance_eval_return_value ===# instance_eval as an expression: the block's last expression is the# call's value (CRuby semantics). Void-bodied blocks (assignment-only)# fall through to a truthy receiver so `if obj.instance_eval { @f = 1 }`# still works.class T_instance_eval_return_value_Counter def initialize @count = 0 end def inc @count = @count + 1 endendc = T_instance_eval_return_value_Counter.newc.incc.incc.inc# Int-valued block returns the ivar, not the receiver.n = c.instance_eval { @count }puts n # 3# Boolean-valued block.big = c.instance_eval { @count > 2 }puts big # true# Arithmetic expression body.doubled = c.instance_eval { @count + @count }puts doubled # 6# String-valued block (pointer-typed return).class T_instance_eval_return_value_Greeter def initialize @greeting = "hello" endendg = T_instance_eval_return_value_Greeter.newmsg = g.instance_eval { @greeting }puts msg # hello# Void body: receiver flows out via comma-expr fallback, keeping the# `if` arm truthy.class T_instance_eval_return_value_Flag def initialize @flag = 0 endendf = T_instance_eval_return_value_Flag.newif f.instance_eval { @flag = 1 } puts "truthy"endputs "done"# === map_array_block_result ===# `arr.map { array_block }` — outer recv is a typed Array, block# returns a typed array (`(0..i).to_a` here is int_array). Without# the fix, two issues conspire:## - infer_method_name_type returned int_array, so the ivar `@rows`# was typed as int_array. The outer accumulator was an# sp_IntArray pushed via sp_IntArray_push — but each iteration's# value was an sp_IntArray pointer reinterpreted as mrb_int,# which gcc rejects on -Wint-conversion.# - Even if the cast were silent, the inner arrays would not be# traced from an IntArray slot and could be collected mid-loop.## After the fix, the result is `<elem>_ptr_array` and the codegen# accumulator is an sp_PtrArray pushed via sp_PtrArray_push.class T_map_array_block_result_C def initialize @rows = [1, 6].map { |i| (0..i).to_a } end def show @rows.each do |row| row.each { |x| print x, " " } puts end endendT_map_array_block_result_C.new.show# === map_block_returns_nested_array ===# `Range#map` / `int_array.map` whose block returns an array# (1D, 2D, 3D nested) used to silently degrade — the codegen# returned `0` for non-int/string/float block returns at the# Range#map path, and `int_array.map` boxed inner ptr_array# results via `sp_box_ptr_array(val)` which erased the# elem-type info (cls_id PTR_ARRAY only) so deeper indexing# fell through every dispatch arm to `sp_box_nil()`.## Fixes:## - Range#map block returning a typed array now stores in# `sp_PtrArray` (matching the inferred `<bret>_ptr_array`# type). Deeper nesting (block returns ptr_array /# poly_array) stores in `sp_PolyArray` with `box_value_to_poly`# boxing — preserves cls_id chain for `arr[i][j][k]...`.## - `int_array.map`'s deep-array branch (block returns# `<X>_ptr_array`) converts the inner sp_PtrArray to# sp_PolyArray inline via a per-element `sp_box_<elem>` re-tag,# so the outer PolyArray's elements carry the right cls_id at# the next dispatch level.## Together this lets nested-map-of-array-block constructs# (e.g. optcarrot's `TILE_LUT = [...].map { (0..7).map {# (0...0x10000).map { ... } }.transpose }`) compile and read# at every depth.# Range#map -> int_array_ptr_array (2D)class T_map_block_returns_nested_array_M2 def initialize @t = (0..2).map { |i| (0..3).map { |j| i * 10 + j } } end def read(i, j); @t[i][j]; endendm2 = T_map_block_returns_nested_array_M2.newputs m2.read(0, 0) # 0puts m2.read(1, 2) # 12puts m2.read(2, 3) # 23# int_array.map { Range#map { ... } } -> 3D via PolyArrayclass T_map_block_returns_nested_array_M3 def initialize @t = [10, 20].map do |a| (0..2).map { |b| [a + b, a + b + 100] } end end def read(i, j, k); @t[i][j][k]; endendm3 = T_map_block_returns_nested_array_M3.newputs m3.read(0, 0, 0) # 10puts m3.read(0, 1, 1) # 111puts m3.read(1, 2, 0) # 22puts m3.read(1, 2, 1) # 122test/bundle_classd_04.rb.expectedaddedView file
Loading diff…
test/bundle_classd_05.rbaddedView file
Loading diff…
test/bundle_classd_05.rb.expectedaddedView file
Loading diff…
test/bundle_classd_08.rbaddedView file
Loading diff…
test/bundle_classd_08.rb.expectedrenamedView file
Loading diff…
test/bundle_classd_09.rbaddedView file
Loading diff…
test/bundle_classd_09.rb.expectedaddedView file
Loading diff…
test/bundle_classd_10.rbaddedView file
Loading diff…
test/bundle_classd_10.rb.expectedaddedView file
Loading diff…
test/bundle_classd_11.rbaddedView file
Loading diff…
test/bundle_classd_11.rb.expectedaddedView file
Loading diff…
test/bundle_classd_12.rbaddedView file
Loading diff…
test/bundle_classd_12.rb.expectedaddedView file
Loading diff…
test/bundle_classd_13.rbaddedView file
Loading diff…
test/bundle_classd_13.rb.expectedaddedView file
Loading diff…
test/bundle_classd_14.rbaddedView file
Loading diff…
test/bundle_classd_14.rb.expectedaddedView file
Loading diff…
test/bundle_classd_17.rbaddedView file
Loading diff…
test/bundle_classd_17.rb.expectedaddedView file
Loading diff…
test/bundle_classd_18.rbaddedView file
Loading diff…
test/bundle_classd_18.rb.expectedaddedView file
Loading diff…
test/bundle_classd_19.rbaddedView file
Loading diff…
test/bundle_classd_19.rb.expectedaddedView file
Loading diff…
test/bundle_classd_26.rbaddedView file
Loading diff…
test/bundle_classd_26.rb.expectedaddedView file
Loading diff…
test/bundle_classd_27.rbaddedView file
Loading diff…
test/bundle_classd_27.rb.expectedaddedView file
Loading diff…
test/bundle_classd_28.rbaddedView file
Loading diff…
test/bundle_classd_28.rb.expectedaddedView file
Loading diff…
test/bundle_classd_32.rbaddedView file
Loading diff…
test/bundle_classd_32.rb.expectedaddedView file
Loading diff…
test/bundle_classd_33.rbaddedView file
Loading diff…
test/bundle_classd_33.rb.expectedaddedView file
Loading diff…
test/bundle_classd_35.rbaddedView file
Loading diff…
test/bundle_classd_35.rb.expectedaddedView file
Loading diff…
test/bundle_classd_36.rbaddedView file
Loading diff…
test/bundle_classd_36.rb.expectedaddedView file
Loading diff…
test/bundle_classd_38.rbaddedView file
Loading diff…
test/bundle_classd_38.rb.expectedaddedView file
Loading diff…
test/bundle_classd_39.rbaddedView file
Loading diff…
test/bundle_classd_39.rb.expectedaddedView file
Loading diff…
test/bundle_classd_43.rbaddedView file
Loading diff…
test/bundle_classd_43.rb.expectedaddedView file
Loading diff…
test/bundle_classd_45.rbaddedView file
Loading diff…
test/bundle_classd_45.rb.expectedaddedView file
Loading diff…
test/bundle_classd_46.rbaddedView file
Loading diff…
test/bundle_classd_46.rb.expectedaddedView file
Loading diff…
test/bundle_classd_48.rbaddedView file
Loading diff…
test/bundle_classd_49.rbaddedView file
Loading diff…
test/bundle_classd_50.rbaddedView file
Loading diff…
test/bundle_classd_50.rb.expectedaddedView file
Loading diff…
test/bundle_classd_51.rbaddedView file
Loading diff…
test/bundle_classd_51.rb.expectedaddedView file
Loading diff…
test/bundle_misc_c_14.rbdeleted
Loading diff…
test/bundle_misc_c_14.rb.expecteddeleted
Loading diff…
test/instance_eval_return_value.rbdeleted
Loading diff…
test/instance_eval_return_value.rb.expecteddeleted
Loading diff…
test/int_overflow_raises.rbaddedView file
Loading diff…
test/int_overflow_raises.rb.expectedaddedView file
Loading diff…
test/integer_div.rbaddedView file
Loading diff…
test/integer_div.rb.expectedaddedView file
Loading diff…
test/map_array_block_result.rbdeleted
Loading diff…
test/map_array_block_result.rb.expecteddeleted
Loading diff…
test/map_block_returns_nested_array.rbdeleted
Loading diff…
test/map_block_returns_nested_array.rb.expecteddeleted
Loading diff…
test/map_empty_block.rbdeleted
Loading diff…
test/map_empty_block.rb.expecteddeleted
Loading diff…
test/map_range_recv_array_block.rbdeleted
Loading diff…
test/map_range_recv_array_block.rb.expecteddeleted
Loading diff…
test/method_name_collision_imeth.rbdeleted
Loading diff…
test/method_name_collision_multi_class.rbdeleted
Loading diff…
test/method_name_collision_multi_class.rb.expecteddeleted
Loading diff…
test/method_named_log_no_math_collision.rbdeleted
Loading diff…
test/method_named_log_no_math_collision.rb.expecteddeleted
Loading diff…
test/method_param_unify_to_poly.rbdeleted
Loading diff…
test/method_param_unify_to_poly.rb.expecteddeleted
Loading diff…
test/method_redefinition_warning.rbdeleted
Loading diff…
test/method_redefinition_warning.rb.expecteddeleted
Loading diff…
test/multi_arg_block_call.rbdeleted
Loading diff…
test/multi_arg_block_call.rb.expecteddeleted
Loading diff…
test/multi_assign_ivar.rbdeleted
Loading diff…
test/multi_assign_ivar.rb.expecteddeleted
Loading diff…
test/multi_write_const.rbdeleted
Loading diff…
test/multi_write_const.rb.expecteddeleted
Loading diff…
test/multi_write_from_poly_recv.rbdeleted
Loading diff…
test/multi_write_from_poly_recv.rb.expecteddeleted
Loading diff…
test/multi_write_ivar.rbdeleted
Loading diff…
test/multi_write_ivar.rb.expecteddeleted
Loading diff…
test/multi_write_ivar_widening.rbdeleted
Loading diff…
test/multi_write_ivar_widening.rb.expecteddeleted
Loading diff…
test/multi_write_map_block.rbdeleted
Loading diff…
test/multi_write_map_block.rb.expecteddeleted
Loading diff…
test/multi_write_setter.rbdeleted
Loading diff…
test/multi_write_setter.rb.expecteddeleted
Loading diff…
test/multi_write_typed_array_dispatch.rbdeleted
Loading diff…
test/multi_write_typed_array_dispatch.rb.expecteddeleted
Loading diff…
test/mutable_str_into_poly_slot.rbdeleted
Loading diff…
test/mutable_str_into_poly_slot.rb.expecteddeleted
Loading diff…
test/nested_class_in_class.rbdeleted
Loading diff…
test/nested_class_in_class.rb.expecteddeleted
Loading diff…
test/nested_proc_interp_capture.rbdeleted
Loading diff…
test/nested_proc_interp_capture.rb.expecteddeleted
Loading diff…
test/new_kwarg_bundle.rbdeleted
Loading diff…
test/new_kwarg_bundle.rb.expecteddeleted
Loading diff…
test/nil_ivar_no_predicate_stays_scalar.rbdeleted
Loading diff…
test/nil_ivar_no_predicate_stays_scalar.rb.expecteddeleted
Loading diff…
test/nil_scalar_ivar_widen.rbdeleted
Loading diff…
test/nil_scalar_ivar_widen.rb.expecteddeleted
Loading diff…
test/no_attr_write_shortcut_complex.rbdeleted
Loading diff…
test/no_attr_write_shortcut_complex.rb.expecteddeleted
Loading diff…
test/no_attr_write_shortcut_multi.rbdeleted
Loading diff…
test/no_attr_write_shortcut_multi.rb.expecteddeleted
Loading diff…
test/obj_array.rbdeleted
Loading diff…
test/obj_array.rb.expecteddeleted
Loading diff…
test/poly_aref_shift_via_block_param.rbdeleted
Loading diff…
test/poly_aref_shift_via_block_param.rb.expecteddeleted
Loading diff…
test/poly_array_literal_callnode_typed_elem.rbdeleted
Loading diff…
test/poly_array_literal_callnode_typed_elem.rb.expecteddeleted
Loading diff…
test/poly_array_slot_literal.rbdeleted
Loading diff…
test/poly_array_slot_literal.rb.expecteddeleted
Loading diff…
test/poly_array_slot_sized_default.rbdeleted
Loading diff…
test/poly_array_slot_sized_default.rb.expecteddeleted
Loading diff…
test/poly_dispatch_args_ret.rbdeleted
Loading diff…
test/poly_dispatch_args_ret.rb.expecteddeleted
Loading diff…
test/poly_dispatch_arity_padding.rbdeleted
Loading diff…
test/poly_dispatch_arity_padding.rb.expecteddeleted
Loading diff…
test/poly_dispatch_arity_truncate.rbdeleted
Loading diff…
test/poly_dispatch_arity_truncate.rb.expecteddeleted
Loading diff…
test/poly_hash_literal_from_ivar.rbdeleted
Loading diff…
test/poly_hash_literal_from_ivar.rb.expecteddeleted
Loading diff…
test/poly_int_arith_auto_unify.rbdeleted
Loading diff…
test/poly_int_arith_auto_unify.rb.expecteddeleted
Loading diff…
test/poly_int_bit_index.rbdeleted
Loading diff…
test/poly_int_bit_index.rb.expecteddeleted
Loading diff…
test/poly_nil_return_dispatch.rbdeleted
Loading diff…
test/poly_nil_return_dispatch.rb.expecteddeleted
Loading diff…
test/poly_proc_call.rbdeleted
Loading diff…
test/poly_proc_call.rb.expecteddeleted
Loading diff…
test/poly_recv_bracket_assign.rbdeleted
Loading diff…
test/poly_recv_bracket_assign.rb.expecteddeleted
Loading diff…
test/poly_recv_dispatch_includes_subclasses.rbdeleted
Loading diff…
test/poly_recv_dispatch_includes_subclasses.rb.expecteddeleted
Loading diff…
test/poly_recv_dispatch_narrow.rbdeleted
Loading diff…
test/poly_recv_dispatch_narrow.rb.expecteddeleted
Loading diff…
test/poly_recv_each.rbdeleted
Loading diff…
test/poly_recv_each.rb.expecteddeleted
Loading diff…
test/poly_recv_setter_widens_ivar.rbdeleted
Loading diff…
test/poly_recv_setter_widens_ivar.rb.expecteddeleted
Loading diff…
test/poly_return_to_str_unbox.rbdeleted
Loading diff…
test/poly_return_to_str_unbox.rb.expecteddeleted
Loading diff…
test/poly_shl_array_push_dispatch.rbdeleted
Loading diff…
test/poly_shl_array_push_dispatch.rb.expecteddeleted
Loading diff…
test/proc_array_push.rbdeleted
Loading diff…
test/proc_array_push.rb.expecteddeleted
Loading diff…
test/proc_body_nested_block.rbdeleted
Loading diff…
test/proc_body_nested_block.rb.expecteddeleted
Loading diff…
test/proc_hash_value.rbdeleted
Loading diff…
test/proc_hash_value.rb.expecteddeleted
Loading diff…
test/ptr_array_delete_at.rbdeleted
Loading diff…
test/ptr_array_delete_at.rb.expecteddeleted
Loading diff…
test/reopen_class.rbdeleted
Loading diff…
test/reopen_class.rb.expecteddeleted
Loading diff…
test/runtime_widen_int_to_poly_array.rbdeleted
Loading diff…
test/runtime_widen_int_to_poly_array.rb.expecteddeleted
Loading diff…
test/sample_user_method.rbdeleted
Loading diff…
test/sample_user_method.rb.expecteddeleted
Loading diff…
test/scan_ivars_inherited_slot.rbdeleted
Loading diff…
test/scan_ivars_inherited_slot.rb.expecteddeleted
Loading diff…
test/scan_new_calls_class_scope.rbdeleted
Loading diff…
test/scan_new_calls_class_scope.rb.expecteddeleted
Loading diff…
test/self_class_subclass_dispatch.rbdeleted
Loading diff…
test/self_class_subclass_dispatch.rb.expecteddeleted
Loading diff…
test/send.rbdeleted
Loading diff…
test/send.rb.expecteddeleted
Loading diff…
test/send_double_underscore.rbdeleted
Loading diff…
test/send_double_underscore.rb.expecteddeleted
Loading diff…
test/send_literal_string.rbdeleted
Loading diff…
test/send_literal_string.rb.expecteddeleted
Loading diff…
test/send_literal_symbol.rbdeleted
Loading diff…
test/send_literal_symbol.rb.expecteddeleted
Loading diff…
test/str_setbyte_frozen_literal.rbdeleted
Loading diff…
test/str_setbyte_frozen_literal.rb.expecteddeleted
Loading diff…
test/strip_nullable_int_cast.rbdeleted
Loading diff…
test/strip_nullable_int_cast.rb.expecteddeleted
Loading diff…
test/subclass_inherited_attr_reader.rbdeleted
Loading diff…
test/subclass_inherited_attr_reader.rb.expecteddeleted
Loading diff…
test/subclass_override_param_propagate.rbdeleted
Loading diff…
test/subclass_override_param_propagate.rb.expecteddeleted
Loading diff…
test/super_arg_cross_class_cast.rbdeleted
Loading diff…
test/super_arg_cross_class_cast.rb.expecteddeleted
Loading diff…
test/super_forwarding.rbdeleted
Loading diff…
test/super_forwarding.rb.expecteddeleted
Loading diff…
test/super_with_block.rbdeleted
Loading diff…
test/sym_keyed_hash_ivar_value.rbdeleted
Loading diff…
test/sym_keyed_hash_ivar_value.rb.expecteddeleted
Loading diff…
test/symbol_ivar_reassign.rbdeleted
Loading diff…
test/symbol_ivar_reassign.rb.expecteddeleted
Loading diff…
test/unbox_poly_index_in_dispatch.rbdeleted
Loading diff…
test/unbox_poly_index_in_dispatch.rb.expecteddeleted
Loading diff…
test/uncalled_method_dce.rbdeleted
Loading diff…
test/uncalled_method_dce.rb.expecteddeleted
Loading diff…
test/undef.rbdeleted
Loading diff…
test/undef.rb.expecteddeleted
Loading diff…
test/uninit_attr_accessor_reads_as_nil.rbdeleted
Loading diff…
test/user_cmp_int_ivars.rbdeleted
Loading diff…
test/user_cmp_int_ivars.rb.expecteddeleted
Loading diff…
test/user_method_named_like_mutator.rbdeleted
Loading diff…
test/user_method_named_like_mutator.rb.expecteddeleted
Loading diff…
test/value_type_constructor_arg_gc_root.rbdeleted
Loading diff…
test/value_type_constructor_arg_gc_root.rb.expecteddeleted
Loading diff…
test/value_type_ctor_gc_save.rbdeleted
Loading diff…
test/value_type_ctor_gc_save.rb.expecteddeleted
Loading diff…
test/value_type_ivar_gc_scan.rbdeleted
Loading diff…
test/value_type_ivar_gc_scan.rb.expecteddeleted
Loading diff…
test/value_type_recycled_field_clear.rbdeleted
Loading diff…
test/value_type_recycled_field_clear.rb.expecteddeleted
Loading diff…
test/volatile_discarded_at_call.rbdeleted
Loading diff…
test/volatile_discarded_at_call.rb.expecteddeleted
Loading diff…
test/while_cond_side_effect.rbdeleted
Loading diff…
test/while_cond_side_effect.rb.expecteddeleted
Loading diff…
test/while_condition_recomputed.rbdeleted
Loading diff…
test/while_condition_recomputed.rb.expecteddeleted
Loading diff…
test/widen_int_obj_to_poly.rbdeleted
Loading diff…
test/widen_int_obj_to_poly.rb.expecteddeleted
Loading diff…