| Age | Commit message (Collapse) | Author |
|
|
|
https://github.com/ruby/prism/commit/e44a9ae742
|
|
https://github.com/ruby/prism/commit/bd4d248fd6
|
|
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/44090d9f26
|
|
https://github.com/ruby/prism/commit/3193902c43
|
|
https://github.com/ruby/prism/commit/568fb39e2c
|
|
https://github.com/ruby/prism/commit/b62305ff3e
Co-authored-by: Stan Lo <st0012@users.noreply.github.com>
|
|
https://github.com/ruby/prism/commit/ee54244800
|
|
https://github.com/ruby/prism/commit/1da5e05672
|
|
https://github.com/ruby/prism/commit/88a61cc30c
|
|
https://github.com/ruby/prism/commit/160df9a687
|
|
https://github.com/ruby/prism/commit/6d8358c083
|
|
https://github.com/ruby/prism/commit/7c9cf63d4c
|
|
* This was causing this error on macOS Mojave:
src/prism.c:8216:48: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
pm_token_buffer_t token_buffer = { 0 };
^
https://github.com/ruby/prism/commit/5055fc04fd
|
|
https://github.com/ruby/prism/commit/e6deed05a5
|
|
MultiTargetNode
https://github.com/ruby/prism/commit/6d1858192e
|
|
https://github.com/ruby/prism/commit/e60240d54b
|
|
https://github.com/ruby/prism/commit/ec31fd827f
|
|
https://github.com/ruby/prism/commit/dda7a0da52
|
|
Method calls with keyword splat args compile differently than
without since they merge the keyword arg hash with the keyword splat
hash. We know this information at parse time, so can set a flag
which the compiler can use.
https://github.com/ruby/prism/commit/e5f8a9a3cd
|
|
* 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/73c44b0b9c
|
|
|
|
pm_scope_node_init is only used for CRuby, so should not live in the
ruby/prism repo. We will merge the changes here first so they're
not breaking, and will then remove from ruby/prism
|
|
https://github.com/ruby/prism/commit/88fe6213af
|
|
https://github.com/ruby/prism/commit/6f4fab362e
|
|
This reverts commit fd87372a7482cbf7672c44ef95bc1dc3b00bab7c.
|
|
https://github.com/ruby/prism/commit/d906a8ceba
|
|
https://github.com/ruby/prism/commit/ee429f8d50
|
|
https://github.com/ruby/prism/commit/aca24b3a17
|
|
https://github.com/ruby/prism/commit/e8114a786a
|
|
https://github.com/ruby/prism/commit/1985a9ba51
|
|
https://github.com/ruby/prism/commit/d469a56e7e
|
|
https://github.com/ruby/prism/commit/555551e8f2
|
|
Right now, our Call{Operator,And,Or}WriteNode nodes represent two
different concepts:
```ruby
foo.bar += 1
foo[bar] += 1
```
These two statements are different in what they can support. The
former can never have arguments (or an opening_loc or closing_loc).
The former can also never have a block. Also, the former is a
variable method name.
The latter is always going to be []/[]=, it can have any number of
arguments including blocks (`foo[&bar] ||= 1`), and will always
have an opening_loc and closing_loc.
Furthermore, these statements end of having to take different paths
through the various compilers because with the latter you have to
consider the arguments and the block, whereas the former can
perform some additional peephole optimizations since there are
fewer values on the stack.
For these reasons, I'm introducing Index{Operator,And,Or}WriteNode.
These nodes never have a read_name or write_name on them because
they are always []/[]=. They also support blocks, which the previous
write nodes didn't. As a benefit of introducing these nodes, I've
removed the opening_loc, closing_loc, and arguments from the older
write nodes because they will always be null.
For the serialized format, both of these nodes end up being
smaller, and for in-memory we're storing fewer things in general,
so we have savings all around.
I don't love that we are introducing another node that is a call
node since we generally want consumers to only have to handle a
single call, but these nodes are so specific that they would have
to be handled separately anyway since in fact call 2 methods.
https://github.com/ruby/prism/commit/70155db9cd
|
|
You can't encoding a string with more than one encoding so ensure that
the last one wins.
https://github.com/ruby/prism/commit/4182c988c9
|
|
https://github.com/ruby/prism/commit/0ea19ed823
|
|
https://github.com/ruby/prism/commit/5d189ce33e
|
|
https://github.com/ruby/prism/commit/bf9bdb9d82
|
|
https://github.com/ruby/prism/commit/c7ef25a79a
|
|
https://github.com/ruby/prism/commit/2b3d59f424
|
|
This reverts commit 67a987f82bc8a2b7ec15581306873530821fcf9e.
|
|
Amend ScopeNode to point to previous ScopeNode, and to have void*
pointers to constants and index_lookup_table
https://github.com/ruby/prism/commit/0534324312
|
|
https://github.com/ruby/prism/commit/10a6403293
|
|
https://github.com/ruby/prism/commit/ec66feb595
|
|
https://github.com/ruby/prism/commit/1731bf4520
|
|
Moves the common flag bits to the top. This lets us eliminate the `COMMON`
constant, and also allows us to group encoding flags on a nibble so we
can more easily mask them.
https://github.com/ruby/prism/commit/895508659e
|
|
https://github.com/ruby/prism/commit/11255f636e
|