ruby/lib/prism/parse_result
Kevin Newton e6340258f8 [ruby/prism] Autoload newlines and comment visitors
Having the @newline instance variable in every node adds up, and
since it is so rarely used, we only want to add it when necessary.

Moving this into an autoloaded file and moving the instance variable
out of the default initializers reduces allocated memory because the
nodes are now smaller and some fit into the compact list. On my
machine, I'm seeing about an 8% drop.

eea92c07d2
2024-05-13 15:34:47 +00:00
..
comments.rb [ruby/prism] Autoload newlines and comment visitors 2024-05-13 15:34:47 +00:00
newlines.rb [ruby/prism] Autoload newlines and comment visitors 2024-05-13 15:34:47 +00:00