summaryrefslogtreecommitdiff
path: root/prism_compile.c
AgeCommit message (Collapse)Author
2023-11-27[PRISM] Fix compilation for SplatNodes within ArrayNodesJemma Issroff
SplatNodes within ArrayNodes (e.g. [*1..2, 3]) need to be special cased in the compiler because they use a combination of concatarray and newarray instructions to treat each sequence of splat or non-splat elements as independent arrays which get concatenated. This commit implements those cases.
2023-11-27[PRISM] Don't pop several args related nodesJemma Issroff
2023-11-24[PRISM] Insert Tracepoint line events on line changeMatt Valentine-House
2023-11-21[PRISM] Rename flag to CONTAINS_KEYWORD_SPLATJemma Issroff
We need to do this change first on ruby/ruby before merging to ruby/prism to avoid breaking ruby/ruby CI
2023-11-21Remove string concat node in prismKevin Newton
2023-11-20Use new match write targetsKevin Newton
2023-11-20[PRISM] Updated LocalVariableTargetNodes tooJemma Issroff
2023-11-20[PRISM] Fix LocalVariableWriteNodes within blocksJemma Issroff
Prior to this commit, we weren't recursing up scopes to look for the local definition. With this commit, we do so, fixing local writes within blocks
2023-11-20[PRISM] Implement once node for interpolated regexeileencodes
This PR implements the once node on interpolated regexes. There is a bug in Prism where the interpolated regex with the once flag only works when there is not a local variable so the test uses a "1". We'll need to fix that.
2023-11-20[PRISM] Don't pop args to YieldNodeJemma Issroff
2023-11-20Switching first argument in pm_interpolated_node_compileeileencodes
This changes the first argument in `pm_interpolated_node_compile` to use a pointer.
2023-11-13[PRISM] Initialize keyword to silence warningJemma Issroff
2023-11-09[PRISM] Implement compilation for ForwardingArgumentssNodeJemma Issroff
2023-11-09Range check in pm_constant_id_lookupNobuyoshi Nakada
2023-11-09Remove useless castsNobuyoshi Nakada
2023-11-08[PRISM] Always lookup idERROR_INFO consistently.Matt Valentine-House
We know where it is in the iseq local table, because we forced it using `iseq_set_exception_local_table` when compiling the BEGIN_NODE, so we can always look it up from the same place. Co-Authored-By Peter Zhu <peter@peterzhu.ca>
2023-11-08[PRISM] Add tests for OptionalKeywordParameterNodeJemma Issroff
This commit adds tests for the compilation of the OptionalKeywordParameterNode, and fixes cases on the RequiredKeywordParameterNode
2023-11-08[PRISM] Added tests for ForwardingParameterNode, KeywordRestParameterNodeJemma Issroff
2023-11-08[PRISM] Add tests for several parameters nodesJemma Issroff
This commit adds tests for BlockParameterNode, RequiredParameterNode, RequiredKeywordParameterNode and RestParameterNode
2023-11-07[PRISM] Implement compilation for different parametersJemma Issroff
This commit compiles most parameter types, setting appropriate values on the ISEQ_BODY. It also adds tests for callers and callees of methods, using many versions of tests from bootstraptest
2023-11-07[PRISM] Move Local table setup into EnsureNode compilationMatt Valentine-House
2023-11-07[PRISM] Don't generate leave insns for Ensure nodesMatt Valentine-House
2023-11-07[PRISM] CompileEnsureNodeMatt Valentine-House
2023-11-07[PRISM] PM_COMPILE into a specified LINK_ANCHORMatt Valentine-House
2023-11-06[PRISM] Implement compilation for MultiWriteNodes, fix MultiTargetNodesJemma Issroff
Compilation now works for MultiWriteNodes and MultiTargetNodes, with nesting on MultiWrites. See the tests added in this commit for example behavior.
2023-11-03[PRISM] Fix stack consistency with Popped beginMatt Valentine-House
When a begin node is popped it only needs to putnil if that nil is going to be the return value, otherwise it can successfully be optimised out.
2023-11-03[PRISM] Fix CallNode with arguments when poppedMatt Valentine-House
Previously emitting a call node with an argument followed by another node would cause the argument to be mistakenly omitted from the argument list causing a stack underflow. ``` PRISM: ************************************************** -- raw disasm-------- 0000 putself ( 0) 0001 send <calldata:puts, 1>, nil ( 0) * 0004 pop ( 0) 0005 putobject 1 ( 0) 0007 leave ( 0) --------------------- ```
2023-11-02[PRISM] Fix popped for ForNodeJemma Issroff
2023-11-02[PRISM] Fix popped for CallOperatorWriteNodeJemma Issroff
2023-11-02[PRISM] Fix popped for Call{And,Or}WriteNodeJemma Issroff
2023-11-02[PRISM] Fix popped for SingletonClassNodeJemma Issroff
2023-11-02[PRISM] Fix popped for CaseNodeJemma Issroff
2023-11-02[PRISM] Fix popped for AssocSplatNodeJemma Issroff
2023-11-02[PRISM] Fix popped for MatchWriteNodeJemma Issroff
2023-11-02[PRISM] Fix popped for ConstantPathOperatorWriteNodeJemma Issroff
2023-11-02[PRISM] Fix popped for ConstantPathOrWriteNodeJemma Issroff
2023-11-02[PRISM] Fix popped on DefinedNodeJemma Issroff
2023-11-02[PRISM] Fixed popped for ConstantPathAndWriteNodeJemma Issroff
2023-11-01[prism] Use a pointer for optional node listKevin Newton
2023-10-31[PRISM] Remove unnecessary variableJemma Issroff
2023-10-31[PRISM] Implement compilation for SuperNodeJemma Issroff
2023-10-31[PRISM] Compile forwarding super nodeJemma Issroff
2023-10-31[PRISM] Implement compilation for PostExecutionNodeJemma Issroff
This commit implements compilation for the PostExeuctionNode by using the ScopeNode to create child iseqs where appropriate.
2023-10-31Add defined array nodeHParker
2023-10-31compile defined with nested constants and stovetopHParker
2023-10-31Fix warning in Prism compile For NodeMatt Valentine-House
2023-10-30[PRISM] Implement all argument types for CallNodesJemma Issroff
2023-10-30Document TEMP_CONSTANT_IDENTIFIERMatt Valentine-House
2023-10-30Move constant indexing into rb_translate_prismMatt Valentine-House
2023-10-30[Prism] Compile ForNodeMatt Valentine-House
Fixes ruby/prism#1648