summaryrefslogtreecommitdiff
path: root/prism
AgeCommit message (Collapse)Author
2023-10-30[prism] Update prism to latestKevin Newton
2023-10-30[ruby/prism] Faster lex_identifierHaldun Bayhantopcu
https://github.com/ruby/prism/commit/e44a9ae742
2023-10-30[ruby/prism] parse_inline_comments -> parse_commentsKevin Newton
https://github.com/ruby/prism/commit/bd4d248fd6
2023-10-30[ruby/prism] Improve comment generation in templatesUfuk Kayserilioglu
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
2023-10-27[ruby/prism] Prism.parse_inline_commentsKevin Newton
https://github.com/ruby/prism/commit/5b72f84480
2023-10-27[ruby/prism] Parse inline commentsKevin Newton
https://github.com/ruby/prism/commit/44090d9f26
2023-10-27[ruby/prism] Use printf attribute and then fix warningsKevin Newton
https://github.com/ruby/prism/commit/3193902c43
2023-10-27[ruby/prism] Add rbi_class to fieldsVinicius Stock
https://github.com/ruby/prism/commit/568fb39e2c
2023-10-27[ruby/prism] Add RBI and RBS templates for PrismVinicius Stock
https://github.com/ruby/prism/commit/b62305ff3e Co-authored-by: Stan Lo <st0012@users.noreply.github.com>
2023-10-27[ruby/prism] Use MatchWriteNode on split InterpolatedRENKevin Newton
https://github.com/ruby/prism/commit/ee54244800
2023-10-27[ruby/prism] Fix parsing lone assoc splat within hash patternsKevin Newton
https://github.com/ruby/prism/commit/1da5e05672
2023-10-26[ruby/prism] Allow regexp flags to changeKevin Newton
https://github.com/ruby/prism/commit/88a61cc30c
2023-10-26[ruby/prism] Regenerate snapshotsKevin Newton
https://github.com/ruby/prism/commit/160df9a687
2023-10-26[ruby/prism] Match existing Ruby prettyprintKevin Newton
https://github.com/ruby/prism/commit/6d8358c083
2023-10-26[ruby/prism] Get general prettyprint structure workingKevin Newton
https://github.com/ruby/prism/commit/7c9cf63d4c
2023-10-26[ruby/prism] Avoid warning for pm_token_buffer_t initializationBenoit Daloze
* 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
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-26[ruby/prism] Ensure no extra multi-target nodes are created for splatsKevin Newton
https://github.com/ruby/prism/commit/e60240d54b
2023-10-26[ruby/prism] Ensure no extra multi-target nodes are createdKevin Newton
https://github.com/ruby/prism/commit/ec31fd827f
2023-10-26[ruby/prism] Split up multi target/write targetsKevin Newton
https://github.com/ruby/prism/commit/dda7a0da52
2023-10-26[ruby/prism] Add KeywordSplat flag to ArgumentsNodeJemma Issroff
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
2023-10-26[ruby/prism] Split Prism::Loader#load_node in one lambda per node typeBenoit Daloze
* 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
2023-10-26[ruby/prism] Compile with WASIKevin Newton
https://github.com/ruby/prism/commit/73c44b0b9c
2023-10-25[PRISM] Move scope_node itself to CRuby, create prism_compile.hJemma Issroff
2023-10-25[PRISM] Move pm_scope_node_init to prism_compile.cJemma Issroff
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
2023-10-24[ruby/prism] Add PostExecutionNode to pm_scope_node_initJemma Issroff
https://github.com/ruby/prism/commit/88fe6213af
2023-10-23[ruby/prism] Exclude comments when only serializing semantic fieldsBenoit Daloze
https://github.com/ruby/prism/commit/6f4fab362e
2023-10-18Revert "Revert "[ruby/prism] Change ScopeNode to point to previous ScopeNode""Jemma Issroff
This reverts commit fd87372a7482cbf7672c44ef95bc1dc3b00bab7c.
2023-10-18[ruby/prism] Bump to version 0.15.1Kevin Newton
https://github.com/ruby/prism/commit/d906a8ceba
2023-10-18[ruby/prism] Bump to version 0.15.0Kevin Newton
https://github.com/ruby/prism/commit/ee429f8d50
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-10-18[ruby/prism] Extract out constant pool bucket bits to constantsKevin Newton
https://github.com/ruby/prism/commit/1985a9ba51
2023-10-18[ruby/prism] Provide "constant" constants, embedded in the codeKevin Newton
https://github.com/ruby/prism/commit/d469a56e7e
2023-10-18[ruby/prism] Use the unescaped regexp to scan for capture groupsKevin Newton
https://github.com/ruby/prism/commit/555551e8f2
2023-10-18[ruby/prism] Index{Operator,And,Or}WriteNodeKevin Newton
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
2023-10-17[ruby/prism] Ensure last encoding flag winseileencodes
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
2023-10-17[ruby/prism] Fix up super with a blockargKevin Newton
https://github.com/ruby/prism/commit/0ea19ed823
2023-10-16[ruby/prism] Load magic comments in javaKevin Newton
https://github.com/ruby/prism/commit/5d189ce33e
2023-10-16[ruby/prism] Additionally handle encoding comments in vim modeKevin Newton
https://github.com/ruby/prism/commit/bf9bdb9d82
2023-10-16[ruby/prism] Attach magic comments to the parse resultKevin Newton
https://github.com/ruby/prism/commit/c7ef25a79a
2023-10-16[ruby/prism] Parse all magic commentsKevin Newton
https://github.com/ruby/prism/commit/2b3d59f424
2023-10-16Revert "[ruby/prism] Change ScopeNode to point to previous ScopeNode"Jemma Issroff
This reverts commit 67a987f82bc8a2b7ec15581306873530821fcf9e.
2023-10-16[ruby/prism] Change ScopeNode to point to previous ScopeNodeJemma Issroff
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
2023-10-14[ruby/prism] Put names on back reference read nodesKevin Newton
https://github.com/ruby/prism/commit/10a6403293
2023-10-13[ruby/prism] Make PM_NODE_FLAG_COMMON_MASK into a constantKevin Newton
https://github.com/ruby/prism/commit/ec66feb595
2023-10-13[ruby/prism] Bump version to 0.14.0Kevin Newton
https://github.com/ruby/prism/commit/1731bf4520
2023-10-13[ruby/prism] Move common flags to top bitseileencodes
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
2023-10-13[ruby/prism] Fix up PR failingsKevin Newton
https://github.com/ruby/prism/commit/11255f636e