Граф коммитов

3022 Коммитов

Автор SHA1 Сообщение Дата
Takashi Kokubun 2cc4f506ba Implement optimized send 2023-03-05 23:28:59 -08:00
Takashi Kokubun a4bf1c661b Implement opt_invokebuiltin_delegate 2023-03-05 23:28:59 -08:00
Takashi Kokubun 7b78fd0df2 Count optimized method types 2023-03-05 23:28:59 -08:00
Takashi Kokubun d120394df3 Implement duparray and expandarray 2023-03-05 23:28:59 -08:00
Takashi Kokubun 3774fe4e91 Implement opt_eq and opt_neq 2023-03-05 23:28:59 -08:00
Takashi Kokubun bc50b0475a Implement opt_and and opt_or 2023-03-05 23:28:59 -08:00
Takashi Kokubun 67cc53214c Implement setlocal_WC_0 2023-03-05 23:28:59 -08:00
Takashi Kokubun ba491598cc Implement opt_mod 2023-03-05 23:28:59 -08:00
Takashi Kokubun 73a5b3d5d2 Implement Array#[] 2023-03-05 23:28:59 -08:00
Takashi Kokubun 51d36c7b34 Implement opt_le, opt_ge, and opt_gt 2023-03-05 23:28:59 -08:00
Takashi Kokubun 9e42f31574 Do not compile C calls when C tracing is enabled 2023-03-05 22:41:35 -08:00
Takashi Kokubun 14acf9b0a3 Decode trace insns properly 2023-03-05 22:41:35 -08:00
Takashi Kokubun 494989e87e Partially implement send of cfunc 2023-03-05 22:41:35 -08:00
Takashi Kokubun ecae1cd74e Implement attr_reader 2023-03-05 22:41:35 -08:00
Takashi Kokubun fa9a0cb970 Count unsupported method types 2023-03-05 22:11:20 -08:00
Takashi Kokubun 8d099ff699 Implement opt_aref for Hash 2023-03-05 22:11:20 -08:00
Takashi Kokubun a458923fe5 Implement jit_guard_known_class 2023-03-05 22:11:20 -08:00
Takashi Kokubun d332c6ee12 Implement getlocal_WC_1 2023-03-05 22:11:20 -08:00
Takashi Kokubun 5a1cee1d96 Implement getivar 2023-03-05 22:11:20 -08:00
Takashi Kokubun 6c1b1fa1f5 Refactor BranchStub 2023-03-05 22:11:20 -08:00
Takashi Kokubun 5c638c97bb Implement opt_plus 2023-03-05 22:11:20 -08:00
Takashi Kokubun e731ced271 Implement method call 2023-03-05 22:11:20 -08:00
Takashi Kokubun fa0b9c1c97 Initial implementation of send 2023-03-05 22:11:20 -08:00
Takashi Kokubun 9ef04f5636 Implement opt_minus 2023-03-05 22:11:20 -08:00
Takashi Kokubun a8dec34961 Implement initial opt_lt 2023-03-05 22:11:20 -08:00
Takashi Kokubun 21696ad81e Partly implement BOP assumption 2023-03-05 22:11:20 -08:00
Takashi Kokubun 9f8f1afba2 Implement --mjit-stats 2023-03-05 22:11:20 -08:00
Takashi Kokubun 4fe5efbf7f Implement asm comments 2023-03-05 22:11:20 -08:00
Takashi Kokubun d9c2eb6f42 Move modules around 2023-03-05 22:11:20 -08:00
Hiroshi SHIBATA 38831ae290
Introduce `UPDATE_BUNDLED_GEMS_ALL` option for auto update for bundled_gems file
We used `url` field for testing via git clone. Because `Gem::Specification#homepage` or
  `Gem::Specification#metadata` could assign non-git url. Unfotunately, We should specify
  clone URL for testing.
2023-03-06 10:42:36 +09:00
Nobuyoshi Nakada 6b46057e5c
Expand the test directory to real path
When the test source directory path contains symbolic links, that
directory might be placed earlier in the result of
`IRB::InputCompletor.retrieve_gem_and_system_load_path`, than other
directories in the source tree that are expanded to the real path.  In
that case, the test file in "csv" under the test directory of csv gem
instead of the library path will be the first candidate, in
`TestIRB::TestCompletion#test_complete_require_library_name_first`.

```
<"'csv"> expected but was
<"'csv/helper">.
```
2023-03-03 15:30:02 +09:00
Soutaro Matsumoto 1abec43b5d
Fix rbs (#7415)
* Update RBS to skip validation task
* Revert TEST_BUNDLED_GEMS_ALLOW_FAILURES
2023-03-02 12:59:04 +09:00
lukeg ba55706fb6 fix test/rubygems/test_gem_package_task.rb when in -j mode
This test skipped sometimes due to failure to load 'rake/packagetask'.
This is due to manipulation of $LOAD_PATH by other rubygems tests. If
rake is loaded before any rubygems tests run, then it works fine.

To reproduce the skipping behavior:
  $ make test-all TESTOPTS="-j6 --test-order=sorted test/rubygems/test_*.rb"
2023-02-28 06:34:27 +09:00
Hiroshi SHIBATA db0a4c8923 Prefer to use File.foreach instead of IO.foreach 2023-02-27 18:49:18 +09:00
Ben Hamilton c8bafc3b01 Fix autoconf RUBY_STACK_GROW_DIRECTION on ARM devices 2023-02-26 22:17:24 +09:00
Peter Zhu 3e09822407 Fix incorrect line numbers in GC hook
If the previous instruction is not a leaf instruction, then the PC was
incremented before the instruction was ran (meaning the currently
executing instruction is actually the previous instruction), so we
should not increment the PC otherwise we will calculate the source
line for the next instruction.

This bug can be reproduced in the following script:

```
require "objspace"

ObjectSpace.trace_object_allocations_start
a =

  1.0 / 0.0
p [ObjectSpace.allocation_sourceline(a), ObjectSpace.allocation_sourcefile(a)]
```

Which outputs: [4, "test.rb"]

This is incorrect because the object was allocated on line 10 and not
line 4. The behaviour is correct when we use a leaf instruction (e.g.
if we replaced `1.0 / 0.0` with `"hello"`), then the output is:
[10, "test.rb"].

[Bug #19456]
2023-02-24 14:10:09 -05:00
Peter Zhu d2631c427e Fix RubyVM::CExpr#inspect
@__LINE__ can be nil which causes the inspect method to fail.
2023-02-24 14:10:09 -05:00
Nobuyoshi Nakada ac5a949c2a
Refine exception messages when git failed 2023-02-22 10:23:05 +09:00
Nobuyoshi Nakada 37b6d98840 Use `Gem::Package#build` instead of the class method for old baseruby 2023-02-22 02:07:59 +09:00
Nobuyoshi Nakada 289080e4d8 Clone and create dummy gemspec in sequential build 2023-02-22 02:07:59 +09:00
Nobuyoshi Nakada 241c4cfdd4 Move dummy gemspec file creation for extract-gems-sequential 2023-02-22 02:07:59 +09:00
Matt Valentine-House 3c01342e19 Fix detection of compiler_wd in tool/update-deps 2023-02-21 10:57:28 -05:00
Yusuke Endoh 759d23584e Create a dummy minitest.gemspec for a bundled gem
To use the repository version of bundled gems, we need to build a gem by
"gem build", but the repository of minitest does not include
minitest.gemspec because it uses hoe.

This change creats a dummy minitest.gemspec to pass the CI.
2023-02-19 21:06:13 +09:00
Nobuyoshi Nakada 849087ccb1
Apply zone offset to the last modified time 2023-02-13 15:12:14 +09:00
Hiroshi SHIBATA 07bf97e94f
Enhancement github releases generator
* Create GitHub Releases by itself
  * Added help and usage message
  * Decorate release body
2023-02-10 09:26:12 +09:00
Hiroshi SHIBATA 0a8faab5c2
Avoid to duplicate entries that own redmine and github ids 2023-02-09 19:21:31 +09:00
Hiroshi SHIBATA 5991af204c
Added helper script for generate github releases 2023-02-09 18:52:59 +09:00
Hiroshi SHIBATA 6e7990144f Removed svn feature from make-snapshot 2023-02-08 15:36:32 +09:00
NARUSE, Yui 269c5d408f fix to work with the case default issue is used 2023-02-01 22:49:54 +09:00
Nobuyoshi Nakada be81495c16
Silence dozens of useless warnings from `nm` on macOS 2023-01-31 19:42:01 +09:00
NARUSE, Yui b0b61623ad Add quotes to backport field 2023-01-31 10:53:57 +09:00
Nobuyoshi Nakada 3a7367ccc3 mkconfig: Map `includedir` only for system ruby
Only when installing to the system path on macOS, prepend '$(SDKROOT)'
and remap `includedir`.
Fix https://github.com/rbenv/ruby-build/discussions/2123
2023-01-31 06:33:16 +09:00
Alan Wu 7d4395cb69 YJIT: Fix shared/static library symbol leaks
Rust 1.58.0 unfortunately doesn't provide facilities to control symbol
visibility/presence, but we care about controlling the list of
symbols exported from libruby-static.a and libruby.so.

This commit uses `ld -r` to make a single object out of rustc's
staticlib output, libyjit.a. This moves libyjit.a out of MAINLIBS and adds
libyjit.o into COMMONOBJS, which obviates the code for merging libyjit.a
into libruby-static.a. The odd appearance of libyjit.a in SOLIBS is also
gone.

To filter out symbols we do not want to export on ELF platforms, we use
objcopy after the partial link. On darwin, we supply a symbol list to
the linker which takes care of hiding unprefixed symbols.

[Bug #19255]

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2023-01-27 12:28:09 -05:00
Nobuyoshi Nakada 6422fef90c Fix `target_cpu` at runtime 2023-01-26 16:31:08 +09:00
Hiroshi SHIBATA 2d98127131
Filter spec directory for code coverage 2023-01-26 14:05:01 +09:00
Hiroshi SHIBATA 069b6f88e2 Ignore all of tool directory from code coverage, It contains tool/test and etc. 2023-01-26 13:52:20 +09:00
Hiroshi SHIBATA 8662d70a8b Ignore vendored libraries by rubygems from code coverage 2023-01-26 13:52:20 +09:00
Hiroshi SHIBATA 98e84f3f7a filter coverage result with vendored libraries and test code 2023-01-26 13:52:20 +09:00
Nobuyoshi Nakada 17f5631c6e [Bug #19340] Fix bundle gems with test revision
Build temporary gem package from cloned repository if test revision is
set.
2023-01-26 12:50:39 +09:00
Hiroshi SHIBATA 5e1e5af2e7
Support simplecov-0.22.0.
simplecov-0.22.0 no longer support pre-0.18 result format. result data needs
  `lines` key for coverage data.
2023-01-25 16:47:05 +09:00
Nobuyoshi Nakada 1e2523fad7
Silence dozens of useless warnings from `ranlib` on macOS [ci skip] 2023-01-23 19:02:36 +09:00
Nobuyoshi Nakada 418b03c750
tool/leaked-globals: ignore function typedef [ci skip] 2023-01-21 19:26:16 +09:00
Nobuyoshi Nakada 03f5db01e6
Make installation messages verbose a little [ci skip] 2023-01-18 23:55:25 +09:00
Hiroshi SHIBATA 18d8333c30 Switch to use gem version of simplecov, not git clone 2023-01-18 20:19:08 +09:00
Hiroshi SHIBATA ba45be3c43
Supressing warnings messages like:
Ignoring debug-1.7.1 because its extensions are not built. Try: gem pristine debug --version 1.7.

  Revert "Clear gem paths for each test"

  This reverts commit 6698b580dd.
2023-01-18 16:14:00 +09:00
Nobuyoshi Nakada 6698b580dd Clear gem paths for each test
So that rubygems can find the bundled rake.
2023-01-15 23:57:43 +09:00
Nobuyoshi Nakada fc7f852033
[DOC] Add gem lists to NEWS.md automatically 2023-01-13 20:34:45 +09:00
Nobuyoshi Nakada 447f8f7a3c
[DOC] Changed gem list style in NEWS.md 2023-01-13 20:34:45 +09:00
Nobuyoshi Nakada 3ecffae8e8
[DOC] Extract tool/update-NEWS-gemlist.rb 2023-01-13 20:34:08 +09:00
Benoit Daloze 327cf5ec40 Skip rbs Encoding#replicate test 2023-01-11 13:41:41 +01:00
Nobuyoshi Nakada be1db1ca5c
Just ignore empty lines in bundled_gems file [ci skip] 2023-01-10 23:31:04 +09:00
Hiroshi SHIBATA 900230837b
Fixed a typo 2023-01-10 13:07:36 +09:00
Nobuyoshi Nakada 1cd4db772c
Adjust spec of bundler like as `sync_default_gems` [ci skip] 2023-01-08 22:14:39 +09:00
Nobuyoshi Nakada 60ccd1ca81
Ignore LICENSE files of libraries vendored in rubygems [ci skip] 2023-01-08 20:58:12 +09:00
Hiroshi SHIBATA b496578758
Skip Test::Unit::AutoRunner logic in ruby/ruby repository 2023-01-05 08:16:24 +09:00
Hiroshi SHIBATA 1f2fef1f9a
[ruby/openssl] Stop AutoRunner with test-unit
https://github.com/ruby/openssl/commit/0d4cd8b9ca
2023-01-05 08:06:49 +09:00
Koichi Sasada c182d46d24 check `NO_COLOR` envval
Support `NO_COLOR` (https://no-color.org/) to make parsing output easy.
2022-12-26 23:06:35 +09:00
Hiroshi SHIBATA b7ad60a794 Merge RubyGems/Bundler master
from 72fd3dd209
2022-12-26 15:09:21 +09:00
Hiroshi SHIBATA 5ec94ff740
Generate parser-text.rb of racc when sync it 2022-12-26 13:17:33 +09:00
David Rodríguez 8f05e4f54b Update Bundler to 2.4.1 & and RubyGems to 3.4.1 2022-12-25 05:55:36 +09:00
Nobuyoshi Nakada 3cbe37bd35
Support new style diagnostic reports 2022-12-25 00:43:27 +09:00
Takashi Kokubun b9332ac8e7
MJIT: Cancel all on disastrous situations (#7019)
I noticed this while running test_yjit with --mjit-call-threshold=1, 
which redefines `Integer#<`. When Ruby is monkey-patched, 
MJIT itself could be broken.

Similarly, Ruby scripts could break MJIT in many different ways. I
prepared the same set of hooks as YJIT so that we could possibly
override it and disable it on those moments. Every constant under
RubyVM::MJIT is private and thus it's an unsupported behavior though.
2022-12-24 01:13:40 -08:00
Hiroshi SHIBATA f6620037ba Merge RubyGems-3.4.0 and Bundler-2.4.0 2022-12-24 16:57:07 +09:00
Takashi Kokubun 0b2aea861c Polish the public docs for MJIT [ci skip]
Now every private interface is cleaned up, and the public interface is
documented.
2022-12-22 14:30:09 -08:00
Takashi Kokubun bb4cbd0803
Put RubyVM::MJIT::Compiler under ruby_vm directory (#6989)
[Misc #19250]
2022-12-21 22:46:15 -08:00
Nobuyoshi Nakada 398aaed2f0
Fix the case trailer without newline
cf0b413ef8
2022-12-22 00:34:21 +09:00
Soutaro Matsumoto 6af6857ecf
Set up RBS_SKIP_TESTS (#6862)
* Set up RBS_SKIP_TESTS
2022-12-21 22:11:51 +09:00
Nobuyoshi Nakada befc99c008
[DOC] tool/update-NEWS-refs.rb: Align footnotes 2022-12-21 20:48:51 +09:00
Nobuyoshi Nakada c7c006cc68
[DOC] tool/update-NEWS-refs.rb: Remove extra brackets
Surrounding with brackets is just a convention for the bugs tracker
links.
2022-12-21 20:48:51 +09:00
Yuta Saito afd46429fc tool/m4/ruby_wasm_tools.m4: force passing WASI_SDK_PATH when building for wasi
Make the WASI_SDK_PATH variable mandatory when building for wasi host.
This requirement prevents developers from being stuck due to unfriendly
configuration's error message.
2022-12-21 11:19:23 +09:00
Nobuyoshi Nakada 031bc21abb
expand-config.rb: search revision.h to extract release date 2022-12-20 17:40:19 +09:00
Yusuke Endoh 2605ff79aa tool/update-NEWS-refs.rb: Accept non-redmine url links 2022-12-19 14:48:18 +09:00
Yusuke Endoh b9ea83fc1c Update NEWS.md
Regexp optimization and Wasm support are added.
2022-12-16 02:21:50 +09:00
Hiroshi SHIBATA f2690be746
Removed temporary workaround for syntax_suggest tags 2022-12-16 15:48:00 +09:00
Hiroshi SHIBATA 49b0f3b024 Merge RubyGems/Bundler master
Pick from 084f7d1f21
2022-12-15 19:06:40 +09:00
Samuel Williams d20bd06a97
Remove `require 'io/wait'` where it's no longer necessary. (#6932)
* Remove `require 'io/wait'` as it's part of core now.

* Update ruby specs using version gates.

* Add note about why it's conditional.
2022-12-15 11:37:01 +13:00
Hiroshi SHIBATA 20c34f10d7
Use versioning sort for released version detection 2022-12-14 15:46:19 +09:00
Takashi Kokubun abf9a32182
Match ABI versions precisely
"3.2.0+33" starts with "3.2.0+3", but it doesn't mean that they are the
same ABI version.
2022-12-13 22:07:42 -08:00
Jimmy Miller 2d5b723b2f
Fix build when enable_shared is on (#6924)
Before this change, if enable_shared was true, the directory would have a suffix of -static and be deleted on each make install. This would cause a second make install to fail.
2022-12-13 21:59:21 -08:00
Hiroshi SHIBATA 03927b565b
Pin syntax_suggest-1.0.1 manually because it mixed dead_end tags 2022-12-14 12:57:30 +09:00
Takashi Kokubun 3262842e0a
Skip calling f.read for `overwrite: true`-only cases
We only need to set outpath for that case.
2022-12-13 00:25:02 -08:00
Takashi Kokubun 5ba9dcff16
Make sure f.read is not called twice
--revision.h and --if-change are not used simultaneously, but they might
be in the future.

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2022-12-13 00:17:47 -08:00
Takashi Kokubun 7edcdc380f
Avoid overwriting revision.h when .git doesn't exist (#6915)
* Avoid overwriting revision.h when .git doesn't exist

* Overwrite revision.h if it's blank
2022-12-12 23:34:30 -08:00
David Rodríguez 17559f0420 Don't leave backup file around
I suspect this was for debugging? If not, these days we have source
control tools, so this wouldn't seem necessary?
2022-12-13 07:01:52 +09:00
Nobuyoshi Nakada 6d6b1e5990
Display error messages outside the groups so can be found quickly 2022-12-12 23:32:37 +09:00
Nobuyoshi Nakada e809bd31fd
Fix positional argument color [ci skip] 2022-12-12 23:32:37 +09:00
Nobuyoshi Nakada 0ba65c689e
outdate-bundled-gems.rb: check for gemspec files for extensions
https://github.com/ruby/setup-ruby/issues/415#issuecomment-1345662263
2022-12-12 17:05:37 +09:00
Nobuyoshi Nakada ff6831c334
outdate-bundled-gems.rb: remove unused option 2022-12-12 17:05:03 +09:00
Hiroshi SHIBATA bbe56a6437 Merge RubyGems/Bundler master
from bfb0ae6977
2022-12-12 10:49:43 +09:00
Nobuyoshi Nakada 0645c8b3c1
[DOC] Fix update-NEWS-refs.rb
* Issue numbers are path components but not fragments
* Align justification width to Feature lines
2022-12-10 19:01:29 +09:00
Hiroshi SHIBATA 2efaa80523
Don't sync jar artifact of CGI 2022-12-08 12:22:02 +09:00
Aaron Patterson edc7af48ac Stop transitioning to UNDEF when undefining an instance variable
Cases like this:

```ruby
obj = Object.new
loop do
  obj.instance_variable_set(:@foo, 1)
  obj.remove_instance_variable(:@foo)
end
```

can cause us to use many more shapes than we want (and even run out).
This commit changes the code such that when an instance variable is
removed, we'll walk up the shape tree, find the shape, then rebuild any
child nodes that happened to be below the "targetted for removal" IV.

This also requires moving any instance variables so that indexes derived
from the shape tree will work correctly.

Co-Authored-By: Jemma Issroff <jemmaissroff@gmail.com>
Co-authored-by: John Hawthorn <jhawthorn@github.com>
2022-12-07 09:57:11 -08:00
Yusuke Endoh bcd8b2f00a NEWS.md: Added some missing features
Also, tool/update-NEWS-refs.rb is added to help the update of NEWS.md.
2022-12-07 12:32:29 +09:00
Nobuyoshi Nakada 901471ab8a
[Bug #18623] Link only existing excutables to make runnable [ci skip] 2022-12-06 17:52:58 +09:00
Yuta Saito 48644e7109 tool/runruby.rb: remove LD_PRELOAD-like env-var options from runruby.rb
LD_PRELOAD sometimes forces loading libraries into unrelated
executables. For example, macOS on recent Apple Silicon can execute
arm64 and arm64e binaries by default, and /usr/bin/clang is built as
arm64e. If Ruby is built as arm64, and mkmf launched through runruby.rb
spawns /usr/bin/clang, dynamic loader tries to load libruby (arm64e)
into clang (arm64). This force-load causes library load failure.
In theory, we don't need both LD_PRELOAD and LD_LIBRARY_PATH at the same
time, because executables requiring libruby already have libruby
dependency, so LD_LIBRARY_PATH is enough for this case.
2022-12-05 17:24:17 +09:00
Nobuyoshi Nakada c2671fa051
downloader.rb: Select less components path 2022-12-03 02:03:23 +09:00
Nobuyoshi Nakada e558c374b7
downloader.rb: Fix link to absolute cache path 2022-12-03 01:28:34 +09:00
Takashi Kokubun 07ac707758 MJIT: Use install = true for bundler/inline
It prints a `bundle install`-like output, which seems more useful than
a silent output.
2022-12-01 23:56:02 -08:00
Nobuyoshi Nakada d752cf7601 Use class methods of `File` over `Kernel.open` and `IO.read` 2022-12-01 02:28:49 +09:00
Takashi Kokubun a1d70f5b12 MJIT: Rename mjit_compile_attr to mjit_sp_inc
There's no mjit_compile.inc, so no need to use this prefix anymore.
2022-11-29 21:45:34 -08:00
Nobuyoshi Nakada ed4b5c4f21
Extract outdate-bundled-gems.rb 2022-11-29 18:12:43 +09:00
Takashi Kokubun acb76663ba MJIT: Rename mjit_compiler.h to mjit_c.h
because it exists primarily for generating mjit_c.rb.
2022-11-28 21:23:14 -08:00
Nobuyoshi Nakada ee11090b28 sync_default_gems.rb: move default_branch to REPOSITORIES
`sync_default_gems_with_commits` also needs the default branch.
2022-11-28 20:55:09 +09:00
Nobuyoshi Nakada 6559ba3b5c sync_default_gems.rb: suppress a duplicated range warning 2022-11-28 20:55:09 +09:00
Nobuyoshi Nakada d72f6749cb sync_default_gems.rb: adjust indent [ci skip] 2022-11-28 20:55:09 +09:00
Nobuyoshi Nakada 906a2f067d
sync_default_gems.rb: extend for singleton methods 2022-11-28 17:17:06 +09:00
Nobuyoshi Nakada 93e87c0217 Fix the case of multiple trailers 2022-11-28 16:30:40 +09:00
Nobuyoshi Nakada 5a171ee4c0 Add tests for sync_default_gems.rb 2022-11-28 16:30:40 +09:00
Takashi Kokubun 6844bcc6b4 MJIT: Use a String buffer in builtin compilers
instead of FILE*.

Using C.fprintf is slower than String manipulation on memory. I'm going
to change the way MJIT writes files, and this is a prerequisite for it.
2022-11-27 21:11:33 -08:00
Takashi Kokubun 6d26f78f68 MJIT: Clear .cache/clangd on bindgen if exists 2022-11-27 21:04:41 -08:00
Takashi Kokubun 29bf5495a9 Do not use the same variable for multiple things
`conv` proc is used before and after the `url` variable is updated. So
this script didn't seem to behave correctly for the "Close #xxx" syntax.

Reusing the same variable name for different things seems prone to errors.
2022-11-25 21:45:28 -08:00
Takashi Kokubun 95647378ff Support other GitHub PR/issue syntaxes
https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue
2022-11-25 21:44:21 -08:00
Nobuyoshi Nakada 612aa5c24a
Use class methods of `File` over `Kernel.open` and `IO.read` 2022-11-21 22:16:49 +09:00
Takashi Kokubun 1753cf59cc
Fix a broken interpolation #{head} 2022-11-20 21:23:28 -08:00
Nobuyoshi Nakada 230c7de252
sync_default_gems.rb: Fix substitution [ci skip]
As there should be no modified files just affter `git cherry-pick`
succeeded in `sync_default_gems_with_commits`, reset to the previous
revision once to pick up the committed files.
2022-11-20 18:51:41 +09:00
Alan Wu 574d849869 Run skipped minitest tests that now pass
The mentioned PR was merged.
2022-11-19 10:36:51 +09:00
Aaron Patterson 6582f34831 rename SHAPE_BITS to SHAPE_ID_NUM_BITS 2022-11-18 12:04:10 -08:00
Yusuke Endoh 417f3cd893 tool/generic_erb.rb: Add a hack to prevent "unused variable" warnings 2022-11-18 14:56:55 +09:00
Yusuke Endoh e19afe36ca Revert "tool/generic_erb.rb: Use ERB#result_with_hash instead of #result"
This reverts commit bd148a2bdd.

ERB#result_with_hash does not work on Ruby 2.2

https://ci.appveyor.com/project/ruby/ruby/builds/45420170
```
../tool/generic_erb.rb:33:in `block (2 levels) in <main>': undefined method `result_with_hash' for #<ERB:0x0000000002516650> (NoMethodError)
```
2022-11-18 14:45:21 +09:00
Yusuke Endoh bd148a2bdd tool/generic_erb.rb: Use ERB#result_with_hash instead of #result
to prevent the warnings:
```
./tool/generic_erb.rb:23: warning: assigned but unused variable - output
./tool/generic_erb.rb:24: warning: assigned but unused variable - vpath
```
2022-11-18 14:38:49 +09:00
Nobuyoshi Nakada 24cbc50c76 Remove duplicate `.rbinc` on `.rb` dependencies 2022-11-16 20:47:23 +09:00
Takashi Kokubun fca50abb7c
Let mjit-bindgen use BASERUBY and bundle/inline (#6740) 2022-11-15 23:42:41 -08:00
Nobuyoshi Nakada ac063fd4c4
Depending on revision.h with VPATH 2022-11-16 00:44:34 +09:00
Takashi Kokubun 1a9e87fe3a
MJIT: Fix vm_cc_cme(cc).def.type to use bit field
access properly. Because the libclang node had two children, it wasn't
handled well by the pattern matching for the bit field case.

In addition to that, this bit field has a non-1 width. Because we're
returning true/false for a width-1 bit field, I added another behavior
that works like a char value for bit fields with width 2-8.
2022-11-15 00:34:00 -08:00
David Rodríguez c925a2ee91
Update RSpec gems 2022-11-15 14:45:51 +09:00
Aaron Patterson b7d591643a Remove USE_RVARGC code
We don't need this constant to be exposed anymore, so remove it
2022-11-14 15:42:11 -08:00
Takashi Kokubun a8537aa6a5
Import shape constants with mjit-bindgen 2022-11-14 00:29:28 -08:00
Takashi Kokubun 80bab6c8ed
Import class constants with mjit-bindgen 2022-11-14 00:24:08 -08:00
Nobuyoshi Nakada 70c9d5b504
Try to overwrite the file in VPATH if possible 2022-11-13 18:05:11 +09:00
Nobuyoshi Nakada b7504af8fc Preprocess for older bison is no longer needed 2022-11-10 09:51:50 +09:00
Nobuyoshi Nakada ab01b8f23f
jobserver option may not be at the last 2022-11-07 10:08:09 +09:00
Nobuyoshi Nakada 180d37c817
Set `autoclose:` for inherited FDs only [ci skip] 2022-11-07 09:06:15 +09:00
Nobuyoshi Nakada 12883f8fa6
GNU make 4.4 now uses a fifo for the jobserver 2022-11-06 23:39:55 +09:00
Peter Zhu 6d83590157 Don't report changed ENV caused by Bundler
Bundler's backups changes environment variables starting with
BUNDLER_ORIG_. This causes a lot of noise in tests as the leakchecker
reports them as changed.
2022-11-04 15:36:30 -04:00
Nobuyoshi Nakada ed9d761217
mkconfig.rb: take CPU name from arch flag 2022-11-04 18:19:30 +09:00
Nobuyoshi Nakada 7e3af23d1d
sync_default_gems.rb: fix a typo [ci skip] 2022-11-04 16:22:47 +09:00
Nobuyoshi Nakada b6d7e98f25
sync_default_gems.rb: fix the position to insert the original URL
Since the regexp had expected an empty line before `Co-Authored-By:`
trailer lines, it failed to match when the body has the trailer only.
2022-11-04 15:43:29 +09:00
Nobuyoshi Nakada 570dee15a6
sync_default_gems.rb: accept log input from other than STDIN 2022-11-04 15:43:29 +09:00
Peter Zhu b777408c33 Fix crash in test runner on timeout
When a test worker hangs and timeouts, the test runner crashes with the
following stack trace:

ruby/tool/lib/test/unit.rb:1747:in `puke': undefined method `backtrace' for Timeout::Error:Class (NoMethodError)
	from ruby/tool/lib/test/unit.rb:790:in `block in _run_parallel'
	from ruby/tool/lib/test/unit.rb:788:in `each'

This commit adds handling for Timeout::Error and outputs a message.
2022-11-02 13:34:02 -04:00
Nobuyoshi Nakada 8e2c70af14
file2lastrev.rb: changed revision may be `nil` [ci skip]
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.
2022-11-02 13:37:50 +09:00
Nobuyoshi Nakada 3475b66160
file2lastrev.rb: try to overwrite the found revision.h as before 2022-11-02 12:38:31 +09:00
Nobuyoshi Nakada ac06951c31
file2lastrev.rb: separate options for `Output` and `VPath`
So the `--srcdir` option in this file can override the same option in
`VPath`.
2022-11-02 12:38:03 +09:00
Nobuyoshi Nakada 6bf458eefd
file2lastrev.rb: use output.rb for the options 2022-11-01 14:34:05 +09:00
Nobuyoshi Nakada 7e6e94262c
file2lastrev.rb: rename output as format
Also:
- format -> time_format
- output -> formatter
2022-11-01 14:34:05 +09:00
Nobuyoshi Nakada a2e7b11f2a
output.rb: extract from generic_erb.rb
- writing to a file or stdout
- touching timestamp files
- overwriting only if changed
- colorizing
2022-11-01 14:34:05 +09:00
Nobuyoshi Nakada 99a79dc40b
colorize.rb: support for NO_COLOR 2022-11-01 14:34:05 +09:00
Nobuyoshi Nakada f0c8c1e878
vpath.rb: tweak --vpath option message 2022-11-01 14:34:05 +09:00
Nobuyoshi Nakada aa8c6759ee
vcs.rb: do not reference the constant before assignment 2022-11-01 11:40:32 +09:00
Nobuyoshi Nakada 00d5b7ce7c vcs.rb: copy safe directory configuration
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.
2022-10-30 17:06:33 +09:00
Nobuyoshi Nakada b64514f132 vcs.rb: prettify debug print 2022-10-30 17:06:33 +09:00
Nobuyoshi Nakada 1de8a42869
sync_default_gems.rb: do not add extra empty lines [ci skip] 2022-10-28 19:04:53 +09:00
Nobuyoshi Nakada e6e202234c
sync_default_gems.rb: append orignal commit URLs to subject only log 2022-10-28 13:15:14 +09:00
Nobuyoshi Nakada d76284dfb7
sync_default_gems.rb: Ignore unmergeable files [ci skip] 2022-10-25 13:52:53 +09:00
John Hawthorn b652dbf63b Remove iv_index_tbl_entry 2022-10-24 10:54:01 -07:00
Nobuyoshi Nakada 6cca8a0ceb
Strip trailing spaces [ci skip] 2022-10-24 18:38:09 +09:00
Nobuyoshi Nakada 8873c420d3
Fix error when commit hash is removed [ci skip] 2022-10-24 18:12:25 +09:00
Sergey Fedorov 567725ed30
Fix and improve coroutines for Darwin (macOS) ppc/ppc64. (#5975) 2022-10-19 23:49:45 +13:00
Nobuyoshi Nakada 1654f88ca7
sync_default_gems.rb: commit all after replaced rdoc-ref [ci skip] 2022-10-19 09:11:11 +09:00
Nobuyoshi Nakada e1ca90c2a4
sync_default_gems.rb: fold too long subject [ci skip]
Line with substituted issue references with URLs are often very long.
Although Git (and GitHub) recommends folding subject lines less than
50 columns, but many commits ignore this, so fold at 68 columns for
now.
2022-10-18 17:43:43 +09:00
Takashi Kokubun 134acf98d8
ruby/ruby-commit-hook has been renamed [ci skip]
to ruby/git.ruby-lang.org
2022-10-17 21:16:09 -07:00
Nobuyoshi Nakada ab3b1b2381
sync_default_gems.rb: fix links to GitHub issues
- Substitute `GH-xxxx` which does not contain `#` too.
- Split each substitutions.
2022-10-18 11:37:12 +09:00
Aaron Patterson e5058b58c2
Only expose Ruby Shape API if VM_CHECK_MODE is enabled 2022-10-13 13:11:01 -07:00
Nobuyoshi Nakada c50623f093
Revert "FreeBSD make uses the target under srcdir [ci skip]"
This reverts commit 751ffb276f, which
caused build failures on other platforms.
2022-10-13 12:24:59 +09:00
Nobuyoshi Nakada 751ffb276f
FreeBSD make uses the target under srcdir [ci skip] 2022-10-13 12:10:10 +09:00
Nobuyoshi Nakada 80da7250c5
file2lastrev.rb: Refactor VCS directory search
Search VCS directory after other options are in effective, i.e.,
`--srcdir=nonexitent --suppress_not_found` options, as well as the
reverse order case, should print the current date only and exit
successfully.
2022-10-12 22:24:53 +09:00
Nobuyoshi Nakada b57ecc3eb8
sync_default_gems: Replace the URIs to be redirected
The reference generated by using RDoc without the proper `--page-dir`
option (or `.rdoc_options`) file may contain `/doc/`.  Since these
URIs are redirected by the server now, replace such URIs with the
corresponding rdoc-refs too.
2022-10-12 13:24:53 +09:00
Nobuyoshi Nakada 2b5d4fe28d
sync_default_gems: Add rdoc-ref command to test 2022-10-12 12:27:40 +09:00
Nobuyoshi Nakada df588440ee
sync_default_gems: Replace the external URIs to docs with rdoc-ref 2022-10-12 12:27:40 +09:00
Nobuyoshi Nakada c67e496886
sync_default_gems: Should match with the beginning of the strings
`git status -z` result is NUL-separated, and can contain newline
characters.
2022-10-12 12:27:40 +09:00
Jemma Issroff ad63b668e2
Revert "Revert "This commit implements the Object Shapes technique in CRuby.""
This reverts commit 9a6803c90b.
2022-10-11 08:40:56 -07:00
Aaron Patterson 9a6803c90b
Revert "This commit implements the Object Shapes technique in CRuby."
This reverts commit 68bc9e2e97d12f80df0d113e284864e225f771c2.
2022-09-30 16:01:50 -07:00
Nobuyoshi Nakada ab31d2e69f
Add `--zone` option to `VCS`
Which controls the timezone offset for `RUBY_RELEASE_DATE`.
2022-09-30 10:39:43 +09:00
Nobuyoshi Nakada 5a5644dadc
Introduce `VCS::Null` for fallback 2022-09-30 10:39:42 +09:00
Nobuyoshi Nakada f70ba9cf80
Check for the availability of the command when detecting 2022-09-30 10:39:42 +09:00
Nobuyoshi Nakada 58b3a535cc
Pull up `VCS.short_revision` from `VCS::SVN` 2022-09-30 09:21:02 +09:00
Jemma Issroff d594a5a8bd
This commit implements the Object Shapes technique in CRuby.
Object Shapes is used for accessing instance variables and representing the
"frozenness" of objects.  Object instances have a "shape" and the shape
represents some attributes of the object (currently which instance variables are
set and the "frozenness").  Shapes form a tree data structure, and when a new
instance variable is set on an object, that object "transitions" to a new shape
in the shape tree.  Each shape has an ID that is used for caching. The shape
structure is independent of class, so objects of different types can have the
same shape.

For example:

```ruby
class Foo
  def initialize
    # Starts with shape id 0
    @a = 1 # transitions to shape id 1
    @b = 1 # transitions to shape id 2
  end
end

class Bar
  def initialize
    # Starts with shape id 0
    @a = 1 # transitions to shape id 1
    @b = 1 # transitions to shape id 2
  end
end

foo = Foo.new # `foo` has shape id 2
bar = Bar.new # `bar` has shape id 2
```

Both `foo` and `bar` instances have the same shape because they both set
instance variables of the same name in the same order.

This technique can help to improve inline cache hits as well as generate more
efficient machine code in JIT compilers.

This commit also adds some methods for debugging shapes on objects.  See
`RubyVM::Shape` for more details.

For more context on Object Shapes, see [Feature: #18776]

Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org>
Co-Authored-By: Eileen M. Uchitelle <eileencodes@gmail.com>
Co-Authored-By: John Hawthorn <john@hawthorn.email>
2022-09-28 08:26:21 -07:00
Nobuyoshi Nakada 247d598477
Install all file trees for lldb [ci skip]
It is no longer single lldb_cruby.py only.
2022-09-28 21:27:42 +09:00
Aaron Patterson 06abfa5be6
Revert this until we can figure out WB issues or remove shapes from GC
Revert "* expand tabs. [ci skip]"

This reverts commit 830b5b5c35.

Revert "This commit implements the Object Shapes technique in CRuby."

This reverts commit 9ddfd2ca00.
2022-09-26 16:10:11 -07:00
Jemma Issroff 9ddfd2ca00 This commit implements the Object Shapes technique in CRuby.
Object Shapes is used for accessing instance variables and representing the
"frozenness" of objects.  Object instances have a "shape" and the shape
represents some attributes of the object (currently which instance variables are
set and the "frozenness").  Shapes form a tree data structure, and when a new
instance variable is set on an object, that object "transitions" to a new shape
in the shape tree.  Each shape has an ID that is used for caching. The shape
structure is independent of class, so objects of different types can have the
same shape.

For example:

```ruby
class Foo
  def initialize
    # Starts with shape id 0
    @a = 1 # transitions to shape id 1
    @b = 1 # transitions to shape id 2
  end
end

class Bar
  def initialize
    # Starts with shape id 0
    @a = 1 # transitions to shape id 1
    @b = 1 # transitions to shape id 2
  end
end

foo = Foo.new # `foo` has shape id 2
bar = Bar.new # `bar` has shape id 2
```

Both `foo` and `bar` instances have the same shape because they both set
instance variables of the same name in the same order.

This technique can help to improve inline cache hits as well as generate more
efficient machine code in JIT compilers.

This commit also adds some methods for debugging shapes on objects.  See
`RubyVM::Shape` for more details.

For more context on Object Shapes, see [Feature: #18776]

Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org>
Co-Authored-By: Eileen M. Uchitelle <eileencodes@gmail.com>
Co-Authored-By: John Hawthorn <john@hawthorn.email>
2022-09-26 09:21:30 -07:00
Takashi Kokubun 7588f21851
Allow changing conversion macro in MJIT bindgen
This is necessary for object shapes.
2022-09-24 00:02:21 +09:00