aboutsummaryrefslogtreecommitdiffstats
path: root/prism_compile.c
Commit message (Collapse)AuthorAgeFilesLines
...
* [PRISM] Compile IndexAndWriteNodeJemma Issroff2023-11-271-224/+246
|
* [PRISM] Compile IndexOrWriteNodeJemma Issroff2023-11-271-0/+69
|
* [PRISM] Fix compilation for SplatNodes within ArrayNodesJemma Issroff2023-11-271-5/+68
| | | | | | | | 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.
* [PRISM] Don't pop several args related nodesJemma Issroff2023-11-271-6/+6
|
* [PRISM] Insert Tracepoint line events on line changeMatt Valentine-House2023-11-241-0/+11
|
* [PRISM] Rename flag to CONTAINS_KEYWORD_SPLATJemma Issroff2023-11-211-1/+1
| | | | | We need to do this change first on ruby/ruby before merging to ruby/prism to avoid breaking ruby/ruby CI
* Remove string concat node in prismKevin Newton2023-11-211-9/+0
|
* Use new match write targetsKevin Newton2023-11-201-34/+51
|
* [PRISM] Updated LocalVariableTargetNodes tooJemma Issroff2023-11-201-2/+1
|
* [PRISM] Fix LocalVariableWriteNodes within blocksJemma Issroff2023-11-201-3/+23
| | | | | | 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
* [PRISM] Implement once node for interpolated regexeileencodes2023-11-201-1/+45
| | | | | | | | 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.
* [PRISM] Don't pop args to YieldNodeJemma Issroff2023-11-201-1/+1
|
* Switching first argument in pm_interpolated_node_compileeileencodes2023-11-201-8/+9
| | | | | This changes the first argument in `pm_interpolated_node_compile` to use a pointer.
* [PRISM] Initialize keyword to silence warningJemma Issroff2023-11-131-1/+1
|
* [PRISM] Implement compilation for ForwardingArgumentssNodeJemma Issroff2023-11-091-0/+12
|
* Range check in pm_constant_id_lookupNobuyoshi Nakada2023-11-091-0/+3
|
* Remove useless castsNobuyoshi Nakada2023-11-091-2/+2
|
* [PRISM] Always lookup idERROR_INFO consistently.Matt Valentine-House2023-11-081-9/+1
| | | | | | | | 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>
* [PRISM] Add tests for OptionalKeywordParameterNodeJemma Issroff2023-11-081-0/+19
| | | | | | This commit adds tests for the compilation of the OptionalKeywordParameterNode, and fixes cases on the RequiredKeywordParameterNode
* [PRISM] Added tests for ForwardingParameterNode, KeywordRestParameterNodeJemma Issroff2023-11-081-2/+8
|
* [PRISM] Add tests for several parameters nodesJemma Issroff2023-11-081-12/+5
| | | | | This commit adds tests for BlockParameterNode, RequiredParameterNode, RequiredKeywordParameterNode and RestParameterNode
* [PRISM] Implement compilation for different parametersJemma Issroff2023-11-071-28/+127
| | | | | | 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
* [PRISM] Move Local table setup into EnsureNode compilationMatt Valentine-House2023-11-071-8/+5
|
* [PRISM] Don't generate leave insns for Ensure nodesMatt Valentine-House2023-11-071-1/+1
|
* [PRISM] CompileEnsureNodeMatt Valentine-House2023-11-071-43/+117
|
* [PRISM] PM_COMPILE into a specified LINK_ANCHORMatt Valentine-House2023-11-071-43/+43
|
* [PRISM] Implement compilation for MultiWriteNodes, fix MultiTargetNodesJemma Issroff2023-11-061-20/+48
| | | | | | Compilation now works for MultiWriteNodes and MultiTargetNodes, with nesting on MultiWrites. See the tests added in this commit for example behavior.
* [PRISM] Fix stack consistency with Popped beginMatt Valentine-House2023-11-031-1/+1
| | | | | 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.
* [PRISM] Fix CallNode with arguments when poppedMatt Valentine-House2023-11-031-1/+1
| | | | | | | | | | | | | | | | | 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) --------------------- ```
* [PRISM] Fix popped for ForNodeJemma Issroff2023-11-021-5/+4
|
* [PRISM] Fix popped for CallOperatorWriteNodeJemma Issroff2023-11-021-2/+2
|
* [PRISM] Fix popped for Call{And,Or}WriteNodeJemma Issroff2023-11-021-2/+2
|
* [PRISM] Fix popped for SingletonClassNodeJemma Issroff2023-11-021-1/+2
|
* [PRISM] Fix popped for CaseNodeJemma Issroff2023-11-021-1/+1
|
* [PRISM] Fix popped for AssocSplatNodeJemma Issroff2023-11-021-1/+4
|
* [PRISM] Fix popped for MatchWriteNodeJemma Issroff2023-11-021-2/+4
|
* [PRISM] Fix popped for ConstantPathOperatorWriteNodeJemma Issroff2023-11-021-2/+2
|
* [PRISM] Fix popped for ConstantPathOrWriteNodeJemma Issroff2023-11-021-2/+2
|
* [PRISM] Fix popped on DefinedNodeJemma Issroff2023-11-021-1/+3
|
* [PRISM] Fixed popped for ConstantPathAndWriteNodeJemma Issroff2023-11-021-2/+2
|
* [prism] Use a pointer for optional node listKevin Newton2023-11-011-15/+15
|
* [PRISM] Remove unnecessary variableJemma Issroff2023-10-311-1/+0
|
* [PRISM] Implement compilation for SuperNodeJemma Issroff2023-10-311-147/+198
|
* [PRISM] Compile forwarding super nodeJemma Issroff2023-10-311-4/+24
|
* [PRISM] Implement compilation for PostExecutionNodeJemma Issroff2023-10-311-3/+46
| | | | | This commit implements compilation for the PostExeuctionNode by using the ScopeNode to create child iseqs where appropriate.
* Add defined array nodeHParker2023-10-311-0/+10
|
* compile defined with nested constants and stovetopHParker2023-10-311-10/+46
|
* Fix warning in Prism compile For NodeMatt Valentine-House2023-10-311-1/+1
|
* [PRISM] Implement all argument types for CallNodesJemma Issroff2023-10-301-13/+149
|
* Document TEMP_CONSTANT_IDENTIFIERMatt Valentine-House2023-10-301-1/+12
|