summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-09-01[YARP] Small fixes for existing ConstantNodes (#8346)Jemma Issroff
Popped was slightly inaccurate for ConstantNodes and leading to issues if there was content after a ConstantNode. This fix doesn't pop any ConstantWriteNode values. Notes: Merged-By: jemmaissroff
2023-09-01Skip weak references to old objects in minor GCPeter Zhu
If we are in a minor GC and the object to mark is old, then the old object should already be marked and cannot be reclaimed in this GC cycle so we don't need to add it to the weak refences list. Notes: Merged: https://github.com/ruby/ruby/pull/8304
2023-09-01[ruby/yarp] Ensure node are present only once in the desugared ASTBenoit Daloze
https://github.com/ruby/yarp/commit/7b090bc23d
2023-09-01[ruby/yarp] Move name_loc before value for LocalVariableWriteNodeBenoit Daloze
* Consistent with ClassVariableWriteNode, ConstantWriteNode, InstanceVariableWriteNode, GlobalVariableWriteNode. * Fixes desugaring of local variable with operators. https://github.com/ruby/yarp/commit/9a66737775
2023-09-01[ruby/yarp] Make operator_loc the last field for GlobalVariableWriteNodeBenoit Daloze
* Consistent with ClassVariableWriteNode, ConstantWriteNode, InstanceVariableWriteNode, LocalVariableWriteNode. * Fixes desugaring of global variable with operators. https://github.com/ruby/yarp/commit/fb5a53fc0b
2023-09-01[ruby/yarp] Do not desugar Foo::Bar {||,&&,+}= baz as it is incorrect ↵Benoit Daloze
without a temporary variable * See https://github.com/ruby/yarp/pull/1329#discussion_r1310775433 for details. https://github.com/ruby/yarp/commit/f0fdcba0c3
2023-09-01[ruby/yarp] Fix comments for methods using desugar_or_write_defined_nodeBenoit Daloze
https://github.com/ruby/yarp/commit/a39147736e
2023-09-01[rubygems/rubygems] Use assertion message strictlyHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/98da5b9826
2023-09-01Copy compile options from AST directly without intermediate HashNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/8349
2023-09-01Copy `rb_compile_option_t` only if neededNobuyoshi Nakada
Use `COMPILE_OPTION_DEFAULT` if nothing to change. Notes: Merged: https://github.com/ruby/ruby/pull/8349
2023-09-01Use macro argument not the variable directlyNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/8349
2023-09-01[Bug #19281] Allow semicolon in parenthesis at the first argument of command ↵yui-knk
call Allow compstmt in the first argument of command call wrapped with parenthesis like following arguments with parenthesis. Notes: Merged: https://github.com/ruby/ruby/pull/8347
2023-08-31[ruby/yarp] fix: octal, hex, and unicode strings at the end of aMike Dalessio
file (https://github.com/ruby/yarp/pull/1371) * refactor: move EOF check into yp_unescape_calculate_difference parser_lex is a bit more readable when we can rely on that behavior * fix: octal and hex digits at the end of a file Previously this resulted in invalid memory access. * fix: unicode strings at the end of a file Previously this resulted in invalid memory access. * Unterminated curly-bracket unicode is a syntax error https://github.com/ruby/yarp/commit/21cf11acb5
2023-09-01[Bug-18878] Parse qualified const with brace block as method callNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/8343
2023-08-31Remove gc_mark_valuesMatt Valentine-House
Now that gc_mark_values and rb_gc_mark_values are identical, we should remove one. Notes: Merged: https://github.com/ruby/ruby/pull/8341
2023-08-31Prevent rb_gc_mark_values from pinning objectsMatt Valentine-House
This is an internal only function not exposed to the C extension API. It's only use so far is from rb_vm_mark, where it's used to mark the values in the vm->trap_list.cmd array. There shouldn't be any reason why these cannot move. This commit allows them to move by updating their references during the reference updating step of compaction. To do this we've introduced another internal function rb_gc_update_values as a partner to rb_gc_mark_values. This allows us to refactor rb_gc_mark_values to not pin Notes: Merged: https://github.com/ruby/ruby/pull/8341
2023-08-31[DOC] RDoc for #spawn (#8342)Burdette Lamar
Notes: Merged-By: peterzhu2118 <peter@peterzhu.ca>
2023-08-31[ruby/yarp] add some `const` qualifiers to local variablesNathan Froyd
https://github.com/ruby/yarp/commit/eb3c6eb928
2023-08-31[YARP] Avoid if-else in yp_compile_node (#8336)Mau Magnaguagno
Move last node case outside for loop. Notes: Merged-By: jemmaissroff
2023-08-31[YARP] Implement SourceNodes (File, Line, Encoding) (#8328)Jemma Issroff
* [YARP] Implement SourceNodes (File, Line, Encoding) Notes: Merged-By: jemmaissroff
2023-08-31[ruby/irb] Drop rdoc's version requirementStan Lo
(https://github.com/ruby/irb/pull/704) 1. The newer versions of rdoc requires pysch 4.0+, which could break apps using Ruby 3.0 or 2.7. #703 has more detailed explanation on this. 2. We actually don't use any version-specific rdoc APIs. So having a version requirement is not necessary atm. https://github.com/ruby/irb/commit/3e6ba78c42
2023-08-31YJIT: Handle getblockparamproxy with ifuncJohn Hawthorn
getblockparamproxy for "ifunc" behaves identically to iseq, in just pushing rb_block_param_proxy. Notes: Merged: https://github.com/ruby/ruby/pull/8300
2023-08-31TestSocket_UNIXSocket: stop testing empty packetsJean Boussier
OpenBSD and Solaris behave differently here. Linux does deliver the empty packet, which is questionable as it's undistinguishable from a closed connection. It seems that OpenBSD and Solaris simply drop it. We could test the platform before doing the assertion, but it would likely be fragile, and the entire web recommend to not ever send an empty packet, so the value of this assertion is low. Notes: Merged: https://github.com/ruby/ruby/pull/8338
2023-08-31[DOC] Link fix (#8340)Burdette Lamar
Notes: Merged-By: peterzhu2118 <peter@peterzhu.ca>
2023-08-31[ruby/irb] Require Reline 0.3.8+Stan Lo
(https://github.com/ruby/irb/pull/702) Reline 0.3.8 reduces the chance of having a deadlock with the debugger while using the new `irb:rdbg` integration. https://github.com/ruby/irb/commit/9b8c56b7d4
2023-08-31Correctly calculate initial pagesPeter Zhu
The old algorithm could calculate an undercount for the initial pages due to two issues: 1. It did not take into account that some heap pages will have one less slot due to alignment. It assumed that every heap page would be able to be fully filled with slots. Pages that are unaligned with the slot size will lose one slot. The new algorithm assumes that every page will be unaligned. 2. It performed integer division, which truncates down. This means that the number of pages might not actually satisfy the number of slots. This can cause the heap to grow in `gc_sweep_finish_size_pool` after allocating all of the allocatable pages because the total number of slots would be less than the initial configured number of slots. Notes: Merged: https://github.com/ruby/ruby/pull/8333
2023-08-31[DOC] RDoc for Kernel#system (#8309)Burdette Lamar
Notes: Merged-By: peterzhu2118 <peter@peterzhu.ca>
2023-08-31[Bug #19349] Respect `#to_int` of `base` argumentNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/7144
2023-08-31Separate test for `Kernel#Integer` with `base` argumentNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/7144
2023-08-31[ruby/shellwords] omit blank lineHiroshi SHIBATA
https://github.com/ruby/shellwords/commit/b45de514ab
2023-08-31[YARP] Remove Java templates [ci skip]Nobuyoshi Nakada
2023-08-31CodeQL: Increase memory size [ci skip]Nobuyoshi Nakada
Query evaluation ran out of Java heap frequently since CodeQL 2.14.3. Notes: Merged: https://github.com/ruby/ruby/pull/8337
2023-08-31sync_default_gems.rb: Discard some error messagesNobuyoshi Nakada
These messages are expected: - `cat-file -e` at newly added entries. - `commit --amend` when all changes removed. Notes: Merged: https://github.com/ruby/ruby/pull/8329
2023-08-31sync_default_gems.rb: Remove the pattern for yarpNobuyoshi Nakada
Changes to `ext/yarp/extconf.rb` are detected as conflicts now, and ignored. Notes: Merged: https://github.com/ruby/ruby/pull/8329
2023-08-31sync_default_gems.rb: Remove the pattern for bundlerNobuyoshi Nakada
The "bundler" directory at the top-level will be removed by more generic rule for top-level new entries. Notes: Merged: https://github.com/ruby/ruby/pull/8329
2023-08-31sync_default_gems.rb: RefactorNobuyoshi Nakada
- Filter out files to be ignored first, then resolve conflicts. - Add "added by gem" files, instead of hard-code paths to add. - Remove gem specific patterns covered by more generic rules. Notes: Merged: https://github.com/ruby/ruby/pull/8329
2023-08-31sync_default_gems.rb: Move ignored_paths to ignore_file_pattern_forNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/8329
2023-08-30Change heap init environment variable namesPeter Zhu
This commit changes RUBY_GC_HEAP_INIT_SIZE_{40,80,160,320,640}_SLOTS to RUBY_GC_HEAP_{0,1,2,3,4}_INIT_SLOTS. This is easier to use because the user does not need to determine the slot sizes (which can vary between 32 and 64 bit systems). They now just use the heap names (`GC.stat_heap.keys`). Notes: Merged: https://github.com/ruby/ruby/pull/8335
2023-08-30[ruby/yarp] Add a value to numbered referencesKevin Newton
https://github.com/ruby/yarp/commit/5d9b048971
2023-08-30[YARP] Compile ProgramNode as ScopeNode (#8327)Jemma Issroff
* [YARP] Compile ProgramNode as ScopeNode Notes: Merged-By: jemmaissroff
2023-08-30[YARP] Implement BreakNode, NextNode, RedoNode (#8334)Jemma Issroff
Notes: Merged-By: jemmaissroff
2023-08-30[YARP] Fix variables in compilation (#8326)Jemma Issroff
* [YARP] Fixed several popped instructions * [YARP] Correctly compiling class path Notes: Merged-By: jemmaissroff
2023-08-30[ruby/yarp] simplify the calling convention for `unescape`Mike Dalessio
We don't need to pass in a destination pointer _and_ a write_to_str boolean flag. https://github.com/ruby/yarp/commit/347cb29ebb
2023-08-30[ruby/yarp] fix: regular expression with start and end out of orderMike Dalessio
Also, a similar test and fix for interpolated regular expressions. This snippet: <<-A.g//, A /{/, ''\ previously created a regular expression node with inverted start and end: RegularExpressionNode(14...13)((14...15), (15...21), (12...13), ", ''", 0), which failed an assertion during serialization. After this change: RegularExpressionNode(12...15)((14...15), (15...21), (12...13), ", ''", 0), Found by the fuzzer. https://github.com/ruby/yarp/commit/5fef572f95
2023-08-30[ruby/yarp] fix: binary CallNode with out-of-order arg and receiverMike Dalessio
The snippet added in this commit previously resulted in a CallNode with inverted start and end locations: > AssocNode(15...13)( > CallNode(15...13)( StringNode(15...17)((15...16), (16...16), (16...17), ""), nil, (12...13), nil, ArgumentsNode(12...13)([MissingNode(12...13)()]), nil, nil, 0, "/" ), MissingNode(13...13)(), (13...13) ), which failed an assertion during serialization. After this change, it looks better: > AssocNode(12...13)( > CallNode(12...17)( StringNode(15...17)((15...16), (16...16), (16...17), ""), nil, (12...13), nil, ArgumentsNode(12...13)([MissingNode(12...13)()]), nil, nil, 0, "/" ), MissingNode(13...13)(), (13...13) ), Found by the fuzzer. https://github.com/ruby/yarp/commit/040aa63ad6
2023-08-30[ruby/yarp] fix: StatementsNode with out-of-order body nodesMike Dalessio
The presence of the heredocs in this snippet with invalid syntax: for <<A + <<B A B causes the MissingNode to have a location after other nodes in the list, resulting in a StatementsNode with inverted start and end locations: [ForNode(0...14)( MultiWriteNode(4...7)([InterpolatedStringNode(4...7)((4...7), [], (14...16))], nil, nil, nil, nil), MissingNode(16...16)(), > StatementsNode(16...14)( [MissingNode(16...16)(), InterpolatedStringNode(10...13)((10...13), [], (16...18)), MissingNode(13...14)()] ), (0...3), (16...16), nil, (14...14) )] which failed an assertion during serialization. With this fix, the node's locations are: [ForNode(0...14)( MultiWriteNode(4...7)([InterpolatedStringNode(4...7)((4...7), [], (14...16))], nil, nil, nil, nil), MissingNode(16...16)(), > StatementsNode(10...16)( [MissingNode(16...16)(), InterpolatedStringNode(10...13)((10...13), [], (16...18)), MissingNode(13...14)()] ), (0...3), (16...16), nil, (14...14) )] Found by the fuzzer. https://github.com/ruby/yarp/commit/09bcedc05e
2023-08-30[ruby/yarp] BASERUBY fails because of .then not existingKevin Newton
https://github.com/ruby/yarp/commit/db925f2b88
2023-08-30[ruby/yarp] Revisit lex.rake, make lex:rubygems more useableKevin Newton
https://github.com/ruby/yarp/commit/4c76f4a0c0
2023-08-30[ruby/yarp] Nest all of the YARP tests under the YARP namespaceKevin Newton
https://github.com/ruby/yarp/commit/440cf93a70
2023-08-30[ruby/yarp] Fix up Rust config.yml readingKevin Newton
https://github.com/ruby/yarp/commit/087f367847