Skip to content

fix(array|debug): array/hash strict equality and var_dump nested recursion#438

Draft
Guikingone wants to merge 1 commit into
illegalstudio:mainfrom
Guikingone:fix/batch-5
Draft

fix(array|debug): array/hash strict equality and var_dump nested recursion#438
Guikingone wants to merge 1 commit into
illegalstudio:mainfrom
Guikingone:fix/batch-5

Conversation

@Guikingone

Copy link
Copy Markdown
Collaborator

#424: array/hash strict equality (===) was unsupported by the EIR backend, causing a compile error. New runtime helpers __rt_array_strict_eq and __rt_hash_strict_eq compare indexed arrays and hashes element-by-element following insertion-order chains. Pointer-identity short-circuit handles aliases and cycles. String elements compare via __rt_str_eq; Mixed elements via __rt_mixed_strict_eq. Loose equality (==) deferred.

#388: var_dump printed NULL for nested arrays/hashes instead of recursing. New __rt_var_dump_value recursive renderer dispatches on runtime tags: arrays/hashes recurse with 2-space-per-level indent, Mixed cells unbox and redispatch. Depth cap at 128 prevents stack overflow on cyclic arrays. Rodata literals updated to remove baked-in 2-space prefix; indentation is now driven by __rt_var_dump_spaces. Objects (tag 6) remain NULL (documented limitation).

illegalstudio#424: array/hash strict equality (===) was unsupported by the EIR backend,
causing a compile error. New runtime helpers __rt_array_strict_eq and
__rt_hash_strict_eq compare indexed arrays and hashes element-by-element
following insertion-order chains. Pointer-identity short-circuit handles
aliases and cycles. String elements compare via __rt_str_eq; Mixed elements
via __rt_mixed_strict_eq. Loose equality (==) deferred.

illegalstudio#388: var_dump printed NULL for nested arrays/hashes instead of recursing.
New __rt_var_dump_value recursive renderer dispatches on runtime tags:
arrays/hashes recurse with 2-space-per-level indent, Mixed cells unbox and
redispatch. Depth cap at 128 prevents stack overflow on cyclic arrays.
Rodata literals updated to remove baked-in 2-space prefix; indentation is
now driven by __rt_var_dump_spaces. Objects (tag 6) remain NULL (documented
limitation).
@github-actions github-actions Bot added area:codegen Touches target-aware assembly or backend lowering. area:eir Touches EIR definitions, lowering, validation, or passes. area:runtime Touches runtime helpers, GC, ownership, or bridge runtimes. size:l Large pull request. type:fix Corrects broken or incompatible behavior. labels Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:codegen Touches target-aware assembly or backend lowering. area:eir Touches EIR definitions, lowering, validation, or passes. area:runtime Touches runtime helpers, GC, ownership, or bridge runtimes. size:l Large pull request. type:fix Corrects broken or incompatible behavior.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant