| Age | Commit message (Collapse) | Author |
|
We should bundle released version of Prism for Ruby 3.3.0
|
|
https://github.com/ruby/prism/commit/62cc50e41b
|
|
|
|
https://github.com/ruby/prism/commit/5642a57f39
|
|
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
|
|
Ruby allows for 0 or negative line start, this is often used
with `eval` calls to get a correct offset when prefixing a snippet.
e.g.
```ruby
caller = caller_locations(1, 1).first
class_eval <<~RUBY, caller.path, caller.line - 2
# frozen_string_literal: true
def some_method
#{caller_provided_code_snippet}
end
RUBY
```
https://github.com/ruby/prism/commit/0d14ed1452
|
|
Line numbers may be negative, so we need to introduce signed varint,
so renaming unsigned ones first avoid confusion.
https://github.com/ruby/prism/commit/90d862361e
|
|
https://github.com/ruby/prism/commit/42b60b6e95
|
|
template
(https://github.com/ruby/prism/pull/1905)
https://github.com/ruby/prism/commit/6f7cbc1ca9
|
|
https://github.com/ruby/prism/commit/1398879d79
|
|
(https://github.com/ruby/prism/pull/1809)
https://github.com/ruby/prism/commit/d493ccd093
|
|
https://github.com/ruby/prism/commit/4cec275fff
|
|
https://github.com/ruby/prism/commit/0c762ee68a
|
|
https://github.com/ruby/prism/commit/3e4b4fb947
|
|
|
|
https://github.com/ruby/prism/commit/61a306cd5c
|
|
We were previously holding a type field on Comment to tell what
kind of comment it was. Instead, let's just use actual classes for
this.
https://github.com/ruby/prism/commit/e76830ca6e
|
|
https://github.com/ruby/prism/commit/13fa262669
|
|
https://github.com/ruby/prism/commit/ca9a660f52
|
|
https://github.com/ruby/prism/commit/085da4feb9
|
|
https://github.com/ruby/prism/commit/3abd09c803
|
|
https://github.com/ruby/prism/commit/8062849d0d
|
|
https://github.com/ruby/prism/commit/6e5556dbdf
|
|
|
|
The existing comment generation was hard to read and was making a lot of string manipulation. However, ERB files are already designed to do string manipulation, so we can use that instead.
So, instead of doing a split and a map, I opted to use the `#each_line` method to iterate over the lines of the file.
Also, in order to add an optional space padding at the beginning of the line, I opted to pad it with a space and to then right trim it. This makes sure that no space is left behind if the line is empty, but a space is added if the line is not empty.
https://github.com/ruby/prism/commit/5736711e70
|
|
https://github.com/ruby/prism/commit/5b72f84480
|
|
https://github.com/ruby/prism/commit/6d8358c083
|
|
* Otherwise load_node is too big to compile and is forced to run in interpreter:
https://github.com/oracle/truffleruby/issues/3293#issuecomment-1759730996
* For the benchmark at https://github.com/oracle/truffleruby/issues/3293#issuecomment-1759790280
TruffleRuby Native 23.1.0:
Before: 10.574041 After: 5.592436
JRuby 9.4.3.0:
Before: 7.037780 After: 3.995317
JRuby 9.4.3.0 -Xcompile.invokedynamic=true:
Before: 7.047832 After: 2.269294
https://github.com/ruby/prism/commit/a592ec346a
|
|
https://github.com/ruby/prism/commit/d906a8ceba
|
|
https://github.com/ruby/prism/commit/ee429f8d50
|
|
https://github.com/ruby/prism/commit/c7ef25a79a
|
|
https://github.com/ruby/prism/commit/1731bf4520
|
|
https://github.com/ruby/prism/commit/c82a9dad64
|
|
https://github.com/ruby/prism/commit/ca4943e3f9
|
|
* https://github.com/ruby/prism/pull/1533
|
|
https://github.com/ruby/prism/commit/3e44415ca2
|
|
https://github.com/ruby/prism/commit/0c7d9c3c01
|
|
|
|
|