aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* YJIT: Avoid accumulating freed pages in the payload (#6657)Takashi Kokubun2022-11-022-8/+33
| | | | | | | Co-Authored-By: Alan Wu <alansi.xingwu@shopify.com> Co-Authored-By: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com> Co-authored-by: Alan Wu <alansi.xingwu@shopify.com> Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
* Use shared flags of the typePeter Zhu2022-11-022-2/+3
| | | | | | The ELTS_SHARED flag is generic, so we should prefer to use the flags specific of the type (STR_SHARED for strings and RARRAY_SHARED_FLAG for arrays).
* [rubygems/rubygems] Bump rb-sys in ↵dependabot[bot]2022-11-022-5/+5
| | | | | | | | | | | | | | | | | | | /test/rubygems/test_gem_ext_cargo_builder/custom_name Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.34 to 0.9.35. - [Release notes](https://github.com/oxidize-rb/rb-sys/releases) - [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.34...v0.9.35) --- updated-dependencies: - dependency-name: rb-sys dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> https://github.com/rubygems/rubygems/commit/19feb314cb
* Update Regexp.timeout doc (#6658)Sampat Badhe2022-11-021-2/+2
| | | | | * Correct Regexp.timeout doc, Timeout.timeout= => Regexp.timeout= * add link Regexp Timeout section
* file2lastrev.rb: changed revision may be `nil` [ci skip]Nobuyoshi Nakada2022-11-021-2/+4
| | | | | | When `--suppress_not_found` option is given, no revision information is available. And remove extraneous newline, when result is empty or ends with a newline.
* file2lastrev.rb: try to overwrite the found revision.h as beforeNobuyoshi Nakada2022-11-022-6/+9
|
* file2lastrev.rb: separate options for `Output` and `VPath`Nobuyoshi Nakada2022-11-023-1/+8
| | | | | So the `--srcdir` option in this file can override the same option in `VPath`.
* Fix infinite loop when out-of-place buildNobuyoshi Nakada2022-11-021-1/+1
|
* Manage the timestamp for revision.hNobuyoshi Nakada2022-11-021-7/+2
|
* Ivar copy needs to happen _before_ setting the shapeAaron Patterson2022-11-012-6/+6
| | | | | | | | When we copy instance variables, it is possible for the GC to be kicked off. The GC looks at the shape to determine what slots to mark inside the object. If the shape is set too soon, the GC could think that there are more instance variables on the object than there actually are at that moment.
* YJIT: Visualize live ranges on register spill (#6651)Takashi Kokubun2022-11-011-6/+37
|
* YJIT: Add an assert to help with Context changesAlan Wu2022-11-011-1/+6
| | | | | | | While experimenting I found that it's easy to change Context and forget to also change the copying operation in limit_block_versions(). Add an assert to make sure we substitute a compatible generic context when limiting the number of versions.
* YJIT: Delete redundant ways to make ContextAlan Wu2022-11-012-21/+6
| | | | | Context::new() is the same as Context::default() and Context::new_with_stack_size() was only used in tests.
* file2lastrev.rb: use output.rb for the optionsNobuyoshi Nakada2022-11-011-2/+5
|
* file2lastrev.rb: rename output as formatNobuyoshi Nakada2022-11-011-15/+15
| | | | | | Also: - format -> time_format - output -> formatter
* output.rb: extract from generic_erb.rbNobuyoshi Nakada2022-11-012-33/+55
| | | | | | | - writing to a file or stdout - touching timestamp files - overwriting only if changed - colorizing
* colorize.rb: support for NO_COLORNobuyoshi Nakada2022-11-011-1/+1
|
* vpath.rb: tweak --vpath option messageNobuyoshi Nakada2022-11-011-1/+1
|
* We don't care about actual hostname resolution. (#6652)Samuel Williams2022-11-011-1/+1
| | | https://bugs.ruby-lang.org/issues/18380
* vcs.rb: do not reference the constant before assignmentNobuyoshi Nakada2022-11-011-3/+3
|
* Adjust indents [ci skip]Nobuyoshi Nakada2022-11-011-11/+11
|
* [rubygems/rubygems] Bump rb-sysdependabot[bot]2022-11-012-5/+5
| | | | | | | | | | | | | | | | | Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.34 to 0.9.35. - [Release notes](https://github.com/oxidize-rb/rb-sys/releases) - [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.34...v0.9.35) --- updated-dependencies: - dependency-name: rb-sys dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> https://github.com/rubygems/rubygems/commit/73268e7af5
* Always lookup IV buffers when iteratingAaron Patterson2022-10-311-7/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Always look up instance variable buffers when iterating. It is possible for the instance variable buffer to change out from under the object during iteration, so we cannot cache the buffer on the stack. In the case of Bug #19095, the transient heap moved the buffer during iteration: ``` Watchpoint 1 hit: old value: 0x0000000107c00df8 new value: 0x00000001032743c0 Process 31720 stopped * thread #1, queue = 'com.apple.main-thread', stop reason = watchpoint 1 frame #0: 0x00000001006e5178 miniruby`rb_obj_transient_heap_evacuate(obj=0x000000010d6b94b0, promote=1) at variable.c:1361:5 1358 } 1359 MEMCPY(new_ptr, old_ptr, VALUE, len); 1360 ROBJECT(obj)->as.heap.ivptr = new_ptr; -> 1361 } 1362 } 1363 #endif 1364 miniruby`rb_obj_transient_heap_evacuate: -> 0x1006e5178 <+328>: b 0x1006e517c ; <+332> at variable.c:1362:1 0x1006e517c <+332>: ldp x29, x30, [sp, #0x50] 0x1006e5180 <+336>: add sp, sp, #0x60 0x1006e5184 <+340>: ret Target 0: (miniruby) stopped. (lldb) bt * thread #1, queue = 'com.apple.main-thread', stop reason = watchpoint 1 * frame #0: 0x00000001006e5178 miniruby`rb_obj_transient_heap_evacuate(obj=0x000000010d6b94b0, promote=1) at variable.c:1361:5 frame #1: 0x00000001006cb150 miniruby`transient_heap_block_evacuate(theap=0x0000000100b196c0, block=0x0000000107c00000) at transient_heap.c:734:17 frame #2: 0x00000001006c854c miniruby`transient_heap_evacuate(dmy=0x0000000000000000) at transient_heap.c:808:17 frame #3: 0x00000001007fe6c0 miniruby`rb_postponed_job_flush(vm=0x0000000104402900) at vm_trace.c:1773:21 frame #4: 0x0000000100637a84 miniruby`rb_threadptr_execute_interrupts(th=0x0000000103803bc0, blocking_timing=0) at thread.c:2316:13 frame #5: 0x000000010078b730 miniruby`rb_vm_check_ints(ec=0x00000001048038d0) at vm_core.h:2025:9 frame #6: 0x00000001006fbd10 miniruby`vm_pop_frame(ec=0x00000001048038d0, cfp=0x0000000104a04440, ep=0x0000000104904a28) at vm_insnhelper.c:422:5 frame #7: 0x00000001006fbca0 miniruby`rb_vm_pop_frame(ec=0x00000001048038d0) at vm_insnhelper.c:431:5 frame #8: 0x00000001007d6420 miniruby`vm_call0_cfunc_with_frame(ec=0x00000001048038d0, calling=0x000000016fdcc6a0, argv=0x0000000000000000) at vm_eval.c:153:9 frame #9: 0x00000001007d44cc miniruby`vm_call0_cfunc(ec=0x00000001048038d0, calling=0x000000016fdcc6a0, argv=0x0000000000000000) at vm_eval.c:164:12 frame #10: 0x0000000100766e80 miniruby`vm_call0_body(ec=0x00000001048038d0, calling=0x000000016fdcc6a0, argv=0x0000000000000000) at vm_eval.c:210:15 frame #11: 0x00000001007d76f0 miniruby`vm_call0_cc(ec=0x00000001048038d0, recv=0x000000010d6b49d8, id=2769, argc=0, argv=0x0000000000000000, cc=0x000000010d6b2e58, kw_splat=0) at vm_eval.c:87:12 frame #12: 0x0000000100769e48 miniruby`rb_funcallv_scope(recv=0x000000010d6b49d8, mid=2769, argc=0, argv=0x0000000000000000, scope=CALL_FCALL) at vm_eval.c:1051:16 frame #13: 0x0000000100760a54 miniruby`rb_funcallv(recv=0x000000010d6b49d8, mid=2769, argc=0, argv=0x0000000000000000) at vm_eval.c:1066:12 frame #14: 0x000000010037513c miniruby`rb_inspect(obj=0x000000010d6b49d8) at object.c:633:34 frame #15: 0x000000010002c950 miniruby`inspect_ary(ary=0x000000010d6b4938, dummy=0x0000000000000000, recur=0) at array.c:3091:13 frame #16: 0x0000000100642020 miniruby`exec_recursive(func=(miniruby`inspect_ary at array.c:3084), obj=0x000000010d6b4938, pairid=0x0000000000000000, arg=0x0000000000000000, outer=0, mid=2769) at thread.c:5177:23 frame #17: 0x00000001006412fc miniruby`rb_exec_recursive(func=(miniruby`inspect_ary at array.c:3084), obj=0x000000010d6b4938, arg=0x0000000000000000) at thread.c:5205:12 frame #18: 0x00000001000127f0 miniruby`rb_ary_inspect(ary=0x000000010d6b4938) at array.c:3117:12 ``` In general though, any calls back out to the interpreter could change the IV buffer, so it's not safe to cache. [Bug #19095]
* Implement object shapes for T_CLASS and T_MODULE (#6637)John Hawthorn2022-10-3110-202/+265
| | | | | | | | * Avoid RCLASS_IV_TBL in marshal.c * Avoid RCLASS_IV_TBL for class names * Avoid RCLASS_IV_TBL for autoload * Avoid RCLASS_IV_TBL for class variables * Avoid copying RCLASS_IV_TBL onto ICLASSes * Use object shapes for Class and Module IVs
* YJIT: Add RubyVM::YJIT.code_gc (#6644)Takashi Kokubun2022-10-316-21/+46
| | | | | * YJIT: Add RubyVM::YJIT.code_gc * Rename compiled_page_count to live_page_count
* YJIT: reduce default `--yjit-exec-mem-size` to 128MiB instead of 256 (#6649)Maxime Chevalier-Boisvert2022-10-311-1/+1
| | | Reduce default --yjit-exec-mem-size to 128MiB instead of 256
* Reuse FIBER_RESUMED_P macroS-H-GAMELINKS2022-10-311-1/+1
|
* [ruby/error_highlight] Support nodes in `spot`eileencodes2022-10-312-2/+33
| | | | | | | | | | | | | | | Fixes a bug where `spot` was using the wrong local variable. We want to use error highlight with code that has been eval'd, specifically ERB templates. We can recover the compiled source code of the ERB template but we need an API to pass the node into error highlight's `spot`. Required Ruby PR: https://github.com/ruby/ruby/pull/6593 https://github.com/ruby/error_highlight/commit/0b1b650a59 Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
* Add `node_id_for_backtrace_location` functioneileencodes2022-10-313-0/+40
| | | | | | | | | | | | | | | We want to use error highlight with eval'd code, specifically ERB templates. We're able to recover the generated code for eval'd templates and can get a parse tree for the ERB generated code, but we don't have a way to get the node id from the backtrace location. So we can't pass the right node into error highlight. This patch gives us an API to get the node id from the backtrace location so we can find the node in the AST. Error Highlight PR: https://github.com/ruby/error_highlight/pull/26 Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
* [ruby/bigdecimal] Suppress macro redefinition warningsNobuyoshi Nakada2022-10-301-2/+2
| | | | | | `HAVE_` macros by autoconf are defined as 1. https://github.com/ruby/bigdecimal/commit/cd35868aa6
* Ignore failure at moving revision.h [ci skip]Nobuyoshi Nakada2022-10-301-1/+1
| | | | The source directory may be read-only.
* Try -fstack-protector-strong on MinGWNobuyoshi Nakada2022-10-302-3/+5
| | | | The CI for MinGW has used it.
* Run spec_guards only when spec files changed [ci skip]Nobuyoshi Nakada2022-10-301-13/+5
|
* vcs.rb: copy safe directory configurationNobuyoshi Nakada2022-10-301-5/+42
| | | | | | | Now revision.tmp will be regenerated always and every times, even if the recent file exists in the source directory, as far as using git. On the other hand, VirtualBox mounts shared folders as root, and git rejects the repository there as dubious ownership.
* vcs.rb: prettify debug printNobuyoshi Nakada2022-10-301-10/+27
|
* Update bundled gems list at 2022-10-30git2022-10-302-2/+2
|
* [DOC] Enhanced RDOc for IO (#6642)Burdette Lamar2022-10-292-31/+89
| | | | | | | In io.c treats: #close #close_read #close_write #closed
* Fix links and sort [ci skip]Kazuhiro NISHIYAMA2022-10-301-6/+8
|
* [ruby/optparse] Add tests for `load(into:)`Nobuyoshi Nakada2022-10-291-0/+2
| | | | https://github.com/ruby/optparse/commit/51f7e060ee
* [ruby/optparse] #load() into hashWhyme Lyu2022-10-291-4/+7
| | | | | | | | | (https://github.com/ruby/optparse/pull/42) OptionParser#load learns .load(into: Hash) https://github.com/ruby/optparse/commit/2ea626fcff Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
* [ruby/optparse] Add tests for `OptionParser#load`Nobuyoshi Nakada2022-10-291-0/+139
| | | | https://github.com/ruby/optparse/commit/fb34a1d3a3
* [ruby/digest] Use CommonDigest by default if availableNobuyoshi Nakada2022-10-291-1/+1
| | | | https://github.com/ruby/digest/commit/cce9ada85e
* Clear `_FORTIFY_SOURCE` before definitionNobuyoshi Nakada2022-10-291-1/+2
| | | | | | As clang on macOS defines this macro as 0 internally when a sanitizer option is given, clear it before definition to suppress redefinition warnings.
* fix ASAN error in GCAaron Patterson2022-10-281-0/+2
|
* Follow up "Rework `first_lineno` to be `int`."Nobuyoshi Nakada2022-10-281-1/+1
|
* sync_default_gems.rb: do not add extra empty lines [ci skip]Nobuyoshi Nakada2022-10-281-2/+2
|
* [ruby/irb] Do not make non-existent XDG directory on startNobuyoshi Nakada2022-10-282-4/+5
| | | | | | | (https://github.com/ruby/irb/pull/357) https://github.com/ruby/irb/commit/298b134792
* [ruby/irb] Update regarding NO_COLOR valueNobuyoshi Nakada2022-10-282-1/+5
| | | | | | | | | | | | https://no-color.org has been updated (jcs/no_color#83): > Command-line software which adds ANSI color to its output by default should check for a `NO_COLOR` environment variable that, when present and **not an empty string** (regardless of its value), prevents the addition of ANSI color. https://github.com/ruby/irb/commit/46e0f7e370 Co-authored-by: Stan Lo <stan001212@gmail.com>
* [ruby/irb] Suppress sequence to inspect asian ambiguous width Nobuyoshi Nakada2022-10-281-1/+11
| | | | https://github.com/ruby/irb/commit/a7097c5b80
* [ruby/irb] Suppress "switching inspect mode" messages Nobuyoshi Nakada2022-10-281-0/+2
| | | | https://github.com/ruby/irb/commit/565eeb3c19