summaryrefslogtreecommitdiff
path: root/test/ruby/test_compile_prism.rb
AgeCommit message (Collapse)Author
2023-11-17Skip test_ForwardingArgumentsNodeYusuke Endoh
due to a failure on a CI http://ci.rvm.jp/results/trunk-iseq_binary@ruby-sp2-docker/4779277 ``` expected: == disasm: #<ISeq:prism_test_forwarding_arguments_node1@<compiled>:2 (2,8)-(4,11)> local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: 1]) [ 1] "..."@0 0000 putself ( 3) 0001 getlocal_WC_0 ?@-2 0003 splatarray false 0005 getblockparamproxy ?@-1, 0 0008 send <calldata!mid:prism_test_forwarding_arguments_node, argc:1, ARGS_SPLAT|ARGS_BLOCKARG|FCALL>, nil 0011 leave ( 2) actual: == disasm: #<ISeq:prism_test_forwarding_arguments_node1@<compiled>:2 (2,8)-(4,11)> local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: 1]) [ 1] "..."@0 0000 putself ( 3) 0001 getlocal_WC_0 ?@-2 0003 splatarray false 0005 getblockparamproxy "!"@-1, 0 0008 send <calldata!mid:prism_test_forwarding_arguments_node, argc:1, ARGS_SPLAT|ARGS_BLOCKARG|FCALL>, nil 0011 leave ( 2) /tmp/ruby/src/trunk-iseq_binary/tool/lib/iseq_loader_checker.rb:36:in `exit': exit (SystemExit) ```
2023-11-09[PRISM] Implement compilation for ForwardingArgumentssNodeJemma Issroff
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] CompileEnsureNodeMatt 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-02[PRISM] Fix test infrastucture, comment out failing testsJemma Issroff
Unfortunately, 84dfa0fa5e451adb87beaf497165cb5a1bc93770 introduced a bug where we were no longer testing the "popped" case because the "; 1" meant to be appended to the source was no longer functioning as intended. This commit re-introduces the popped case, and comments out all now failing tests.
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-30[Prism] Add ForNode testsMatt Valentine-House
2023-10-26[PRISM] Implement regex encoding flagseileencodes
Added the correct encoding to the allocated regex. This required making a new method to set the encoding and pass that to `rb_enc_reg_new` instead of `rb_reg_new`. The former `rb_reg_new` would set the encoding to ASCII8BIT regardless of encoding flag.
2023-10-26teach prism define to compile basic typesHParker
2023-10-26[PRISM] Implement compilation for ConstantPathAndWriteNodeJemma Issroff
2023-10-26[PRISM] Implement compilation for ConstantPathOrWriteNodeJemma Issroff
2023-10-26[PRISM] Implemented ConstantPathOperatorWriteNodeJemma Issroff
2023-10-26[PRISM] Implement compilation for CaseNodeJemma Issroff
2023-10-26[PRISM] Rename new tests to use `assert_prism_eval`Jemma Issroff
2023-10-26[PRISM] Refactor tests to deconflict with existing testsJemma Issroff
2023-10-26[PRISM] Implement CallOperatorWriteNodeJemma Issroff
2023-10-26[PRISM] Implement compilation for CallOrWriteNodeJemma Issroff
2023-10-26[PRISM] Implemented compilation for CallAndWriteNodeJemma Issroff
2023-10-25Fix few test_prism_eval that snuck inHParker
2023-10-25Use `assert_prism_eval` over `test_prism_eval` in helpereileencodes
When we use `test_prism_eval`, failed tests will point to the line number of the `test_prism_eval` method definition instead of the test that failed. If we use `assert_prism_eval` instead, failed tests will properly poin to the test that failed because the test framework knows to stop the backtrace earlier. Before line number in failure points to helper definition: ``` Prism::TestCompilePrism#test_RegularExpressionNode = 0.21 s 1) Failure: Prism::TestCompilePrism#test_RegularExpressionNode [test/ruby/test_compile_prism.rb:755]: </pit/> (Windows-31J) expected but was </pit/> (US-ASCII). ``` After line number in failure points to test that failed: ``` Prism::TestCompilePrism#test_RegularExpressionNode = 0.00 s 1) Failure: Prism::TestCompilePrism#test_RegularExpressionNode [test/ruby/test_compile_prism.rb:334]: </pit/> (Windows-31J) expected but was </pit/> (US-ASCII). ```
2023-10-25[PRISM] Add tests for ParametersNodeJemma Issroff
2023-10-25[PRISM] Implement NoKeywordsParameterNodeJemma Issroff
2023-10-23[PRISM] Implement compilation for PreExecutionNodesJemma Issroff
2023-10-23[PRISM] Fix AssocSplat nodeJemma Issroff
This commit emits the correct instructions for hashes which have both AssocSplat and Assoc nodes contained within them
2023-10-23[PRISM] Fix __LINE__ to be 1-indexed by defaultJemma Issroff
2023-10-23[PRISM] Add several testsJemma Issroff
2023-10-23[PRISM] Fix compilation for IfNode, UnlessNodeJemma Issroff
This properly implements the branch condition for FlipFlopNodes on If / UnlessNodes, and also fixes the bug in UnlessNodes
2023-10-23[PRISM] Add tests for BlockNode, BlockLocalVariableNode, BlockParamet… (#8725)Jemma Issroff
[PRISM] Add tests for BlockNode, BlockLocalVariableNode, BlockParametersNode
2023-10-20[PRISM] Setup encodings in prism compilerJemma Issroff