summaryrefslogtreecommitdiff
path: root/test/ruby
AgeCommit message (Collapse)Author
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-03rb_ivar_defined: handle complex modulesJean Boussier
It was assuming only objects can be complex.
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-11-02Fix vm_getivar to handle module with TOO_COMPLEX shapeJean Boussier
2023-11-02Make every initial size pool shape a root shapePeter Zhu
This commit makes every initial size pool shape a root shape and assigns it a capacity of 0.
2023-11-02YJIT: Always define method codegen table at boot (#8807)Takashi Kokubun
2023-11-02Better handle running out of shapes in remove_shape_recursiveJean Boussier
2023-11-01Fix SystemStackError in test_run_out_of_shape_for_class_cvarPeter Zhu
2023-11-01Fix remove_class_variable for too complex classesPeter Zhu
2023-11-01remove_instance_variable: Handle running out of shapesJean Boussier
`remove_shape_recursive` wasn't considering that if we run out of shapes, it might have to transition to SHAPE_TOO_COMPLEX. When this happens, we now return with an error and the caller initiates the evacuation.
2023-11-01Fix removing non-existent ivar for too complexPeter Zhu
2023-10-31Fix remove_instance_variable for too complex generic ivarPeter Zhu
2023-10-31Fix SystemStackError for test_run_out_of_shape_for_classPeter Zhu
2023-10-31Fix remove_instance_variable for too complex classPeter Zhu
2023-10-31[PRISM] Implement compilation for SuperNodeJemma Issroff
2023-10-31[PRISM] Compile forwarding super nodeJemma Issroff
2023-10-31Fix "too complex" iv sets on generic ivar objectsAaron Patterson
We weren't taking in to account that objects with generic IV tables could go "too complex" in the IV set code. This commit takes that in to account and also ensures FL_EXIVAR is set when a geniv object transitions to "too complex" Co-Authored-By: Jean Boussier <byroot@ruby-lang.org>
2023-10-31Handle SHAPE_TOO_COMPLEX in `generic_ivar_set`Jean Boussier
2023-10-31Handle running out of shapes in `Object#dup`Jean Boussier
There is a handful of call sites where we may transition to OBJ_TOO_COMPLEX_SHAPE if we just ran out of shapes, but that weren't handling it properly.
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-31Keep unused literal nodesyui-knk
For static analysis, it’s better to keep unused literal nodes. If simply change `block_append` to fall through, both "unused literal ignored" and "possibly useless use of a literal in void context" warnings are shown for the same line. But it’s verbose then remove "unused literal ignored" warning. This kind of optimization is already implemented on compile.c. `compile_block` calls `iseq_compile_each0` with `popped = 1` when NODE_BLOCK has next.
2023-10-30[Prism] Add ForNode testsMatt Valentine-House
2023-10-30Optimize regexp matching for look-around and atomic groups (#7931)Hiroya Fujinami
2023-10-28Extract transcoding assertionsNobuyoshi Nakada
- Prefix `check_both_ways` with `assert_` to show proper failure lines. - Extract dedicated assertions for Encoding::UndefinedConversionError and Encoding::InvalidByteSequenceError.
2023-10-27Make get_next_shape_internal idempotentJean Boussier
Since the check for MAX_SHAPE_ID was done before even checking if the transition we're looking for even exists, as soon as the max shape is reached, get_next_shape_internal would always return `TOO_COMPLEX` regardless of whether the transition we're looking for already exist or not. In addition to entirely de-optimize all newly created objects, it also made an assertion fail in `vm_setivar`: ``` vm_setivar:rb_shape_get_next_iv_shape(rb_shape_get_shape_by_id(source_shape_id), id) == dest_shape ```
2023-10-27Revert "Add debug info for flaky test_warmup_frees_pages"Peter Zhu
This reverts commit db3b814cb0ff6ffe83fe0c4f66cd6ce8951c3ca7. This debugging information is no longer needed.
2023-10-27[Feature #19244] Windows: Prefer USERPROFILE over HOMEPATH on startup as wellLars Kanis
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-26add more shapes testslukeg
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