summaryrefslogtreecommitdiff
path: root/lib/prism/debug.rb
AgeCommit message (Collapse)Author
2023-12-01[ruby/prism] Change numbered parametersKevin Newton
Previously numbered parameters were a field on blocks and lambdas that indicated the maximum number of numbered parameters in either the block or lambda, respectively. However they also had a parameters field that would always be nil in these cases. This changes it so that we introduce a NumberedParametersNode that goes in place of parameters, which has a single uint8_t maximum field on it. That field contains the maximum numbered parameter in either the block or lambda. As a part of the PR, I'm introducing a new UInt8Field type that can be used on nodes, which is just to make it a little more explicit what the maximum values can be (the maximum is actually 9, since it only goes up to _9). Plus we can do a couple of nice things in serialization like just read a single byte. https://github.com/ruby/prism/commit/2d87303903
2023-11-28[ruby/prism] Implicit rest nodesKevin Newton
Fundamentally, `foo { |bar,| }` is different from `foo { |bar, *| }` because of arity checks. This PR introduces a new node to handle that, `ImplicitRestNode`, which goes in the `rest` slot of parameter nodes instead of `RestParameterNode` instances. This is also used in a couple of other places, namely: * pattern matching: `foo in [bar,]` * multi target: `for foo, in bar do end` * multi write: `foo, = bar` Now the only splat nodes with a `NULL` value are when you're forwarding, as in: `def foo(*) = bar(*)`. https://github.com/ruby/prism/commit/dba2a3b652
2023-11-10[ruby/prism] Remove extra locals added by ...Kevin Newton
https://github.com/ruby/prism/commit/b7850f2d30
2023-11-03[ruby/prism] Wire up options through the FFI APIKevin Newton
https://github.com/ruby/prism/commit/f0aa8ad93b
2023-11-01[ruby/prism] Fix up Prism and Debug docsKevin Newton
https://github.com/ruby/prism/commit/c2b7724d91
2023-11-01[ruby/prism] Flip incorrect names of OptionalKeywordParameterNode and ↵Jemma Issroff
RequiredKeywordParameterNode https://github.com/ruby/prism/commit/c31f61e898
2023-11-01[ruby/prism] Split KeywordParameterNode into Optional and RequiredJemma Issroff
Prior to this commit, KeywordParameterNode included both optional and required keywords. With this commit, it is split in two, with `OptionalKeywordParameterNode`s no longer having a value field. https://github.com/ruby/prism/commit/89084d9af4
2023-10-26[prism] handle locals consistentlyKevin Newton
2023-10-26[ruby/prism] Rename to lefts/rightsKevin Newton
https://github.com/ruby/prism/commit/e6deed05a5
2023-10-26[ruby/prism] Remove RequiredDestructuredParameterNode in favor of ↵Kevin Newton
MultiTargetNode https://github.com/ruby/prism/commit/6d1858192e
2023-10-19Don't add anonymous locals when ISEQ binary debug is onMatt Valentine-House
2023-10-18[ruby/prism] Modify less of the CRuby localsKevin Newton
https://github.com/ruby/prism/commit/aca24b3a17
2023-10-18[ruby/prism] Add * and & to methods with ...Kevin Newton
https://github.com/ruby/prism/commit/e8114a786a
2023-09-27Sync to prism rename commitsKevin Newton
2023-09-27Rename YARP filepaths to prism filepathsKevin Newton