Skip to content

Conversation

zenspider
Copy link
Member

@zenspider zenspider commented May 10, 2025

Diff instructions against parse.y using:

DUMP="puts RubyVM::InstructionSequence.compile(ARGV.first).disasm.gsub(/^\d+ /, '')"
RUBY="def a(x, ...); b(...); end"

env -u RUBYOPT \
    diff -U99 \
    <(./build/ruby -v --parser=parse.y -e "$DUMP" "$RUBY" 2>/dev/null) \
    <(./build/ruby -v --parser=prism   -e "$DUMP" "$RUBY" 2>/dev/null)

shows:

--- /dev/fd/63	2025-05-10 14:46:37
+++ /dev/fd/62	2025-05-10 14:46:37
@@ -1,17 +1,18 @@
-ruby 3.5.0dev (2025-05-10T17:32:21Z master 98667f82d2) +GC [arm64-darwin24]
+ruby 3.5.0dev (2025-05-10T17:32:21Z master 98667f82d2) +PRISM +GC [arm64-darwin24]
 == disasm: #<ISeq:<compiled>@<compiled>:1 (1,0)-(1,26)>
 definemethod                           :a, a                     (   1)[Li]
 putobject                              :a
 leave
 
 == disasm: #<ISeq:a@<compiled>:1 (1,0)-(1,26)>
 local table (size: 5, argc: 1 [opts: 0, rest: 1, post: 0, block: 3, kw: -1@-1, kwrest: 2])
 [ 5] x@0<Arg>   [ 4] "*"@1<AnonRest>[ 3] "**"@2<AnonKwrest>[ 2] "&"@3<Block>[ 1] "..."@4
 putself                                                          (   1)[LiCa]
 getlocal_WC_0                          "*"@1
-splatarray                             false
+splatarray                             true
 getlocal_WC_0                          "**"@2
 getblockparamproxy                     "&"@3, 0
 splatkw
-send                                   <calldata!mid:b, argc:2, ARGS_SPLAT|ARGS_BLOCKARG|FCALL|KW_SPLAT>, nil
+splatkw
+send                                   <calldata!mid:b, argc:2, ARGS_SPLAT|ARGS_SPLAT_MUT|ARGS_BLOCKARG|FCALL|KW_SPLAT>, nil
 leave                                  [Re]

this PR eliminates those differences.

@zenspider
Copy link
Member Author

@nobu I'm not sure but it looks like windows builds might have been broken around your recent clock changes.

This comment has been minimized.

@zenspider zenspider closed this Jul 26, 2025
@zenspider zenspider force-pushed the zenspider/prism_splatkw_diff branch from e370e26 to abafb66 Compare July 26, 2025 21:55
@zenspider
Copy link
Member Author

I guess all these fixes eventually made its way into master over the past 3 months... would have been nice to be acknowledged. 🤷🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant