summaryrefslogtreecommitdiff
path: root/tool
AgeCommit message (Collapse)Author
2022-10-17ruby/ruby-commit-hook has been renamed [ci skip]Takashi Kokubun
to ruby/git.ruby-lang.org
2022-10-18sync_default_gems.rb: fix links to GitHub issuesNobuyoshi Nakada
- Substitute `GH-xxxx` which does not contain `#` too. - Split each substitutions.
2022-10-13Only expose Ruby Shape API if VM_CHECK_MODE is enabledAaron Patterson
2022-10-13Revert "FreeBSD make uses the target under srcdir [ci skip]"Nobuyoshi Nakada
This reverts commit 751ffb276f658518c6fe06461a9d3d1c136c7d5d, which caused build failures on other platforms.
2022-10-13FreeBSD make uses the target under srcdir [ci skip]Nobuyoshi Nakada
2022-10-12file2lastrev.rb: Refactor VCS directory searchNobuyoshi Nakada
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-12sync_default_gems: Replace the URIs to be redirectedNobuyoshi Nakada
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-12sync_default_gems: Add rdoc-ref command to testNobuyoshi Nakada
2022-10-12sync_default_gems: Replace the external URIs to docs with rdoc-refNobuyoshi Nakada
2022-10-12sync_default_gems: Should match with the beginning of the stringsNobuyoshi Nakada
`git status -z` result is NUL-separated, and can contain newline characters.
2022-10-11Revert "Revert "This commit implements the Object Shapes technique in CRuby.""Jemma Issroff
This reverts commit 9a6803c90b817f70389cae10d60b50ad752da48f.
2022-09-30Revert "This commit implements the Object Shapes technique in CRuby."Aaron Patterson
This reverts commit 68bc9e2e97d12f80df0d113e284864e225f771c2.
2022-09-30Add `--zone` option to `VCS`Nobuyoshi Nakada
Which controls the timezone offset for `RUBY_RELEASE_DATE`. Notes: Merged: https://github.com/ruby/ruby/pull/6473
2022-09-30Introduce `VCS::Null` for fallbackNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6473
2022-09-30Check for the availability of the command when detectingNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6473
2022-09-30Pull up `VCS.short_revision` from `VCS::SVN`Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6473
2022-09-28This commit implements the Object Shapes technique in CRuby.Jemma Issroff
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-28Install all file trees for lldb [ci skip]Nobuyoshi Nakada
It is no longer single lldb_cruby.py only.
2022-09-26Revert this until we can figure out WB issues or remove shapes from GCAaron Patterson
Revert "* expand tabs. [ci skip]" This reverts commit 830b5b5c351c5c6efa5ad461ae4ec5085e5f0275. Revert "This commit implements the Object Shapes technique in CRuby." This reverts commit 9ddfd2ca004d1952be79cf1b84c52c79a55978f4.
2022-09-26This commit implements the Object Shapes technique in CRuby.Jemma Issroff
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> Notes: Merged: https://github.com/ruby/ruby/pull/6386
2022-09-24Allow changing conversion macro in MJIT bindgenTakashi Kokubun
This is necessary for object shapes.
2022-09-23Skip struct fields whose output differsTakashi Kokubun
across different environments Notes: Merged: https://github.com/ruby/ruby/pull/6418
2022-09-23Swap the positions of offsetof and typeTakashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/6418
2022-09-23Bindgen offsetof struct and union with builtinTakashi Kokubun
except for bit fields. I made a risky assumption on leading bit fields and just gave up non-leading bit fields for now. I'll change it to let C code access bit fields later. Notes: Merged: https://github.com/ruby/ruby/pull/6418
2022-09-23Bindgen sizeof struct and union with builtinTakashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/6418
2022-09-23Bindgen immediate types with builtinTakashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/6418
2022-09-23Drop c_64 and c_32Takashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/6418
2022-09-23Bindgen enum with builtinTakashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/6418
2022-09-23Builtin needs to be baseruby-compatibleTakashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/6418
2022-09-23Automatically setup bundler of bindgen.rbTakashi Kokubun
to easily use it with `tool/mjit/bindgen.rb BUILDDIR` instead of using `make mjit-bindgen`. Notes: Merged: https://github.com/ruby/ruby/pull/6418
2022-09-23mjit_c.rb doesn't need to be an erbTakashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/6418
2022-09-23Mix manual and auto-generated C APIsTakashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/6418
2022-09-23Bindgen macro with builtinTakashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/6418
2022-09-23Auto-generate mjit_c.rb.erbTakashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/6418
2022-09-23Builtin RubyVM::MJIT::CTakashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/6418
2022-09-22Expand paths used for dumper.rbTakashi Kokubun
This seems to be needed on Samuel's environment
2022-09-21add rb_execution_contextAaron Patterson
Notes: Merged: https://github.com/ruby/ruby/pull/6417
2022-09-21add rb_control_frame_tAaron Patterson
Notes: Merged: https://github.com/ruby/ruby/pull/6417
2022-09-21reserved_word: just use gperf 3.1 declaration卜部昌平
The reason why this was commented out was because of gperf 3.0 vs 3.1 differences (see [Feature #13883]). Five years passed, I am pretty confident that we can drop support of old versions here. Ditto for uniname2ctype_p(), onig_jis_property(), and zonetab(). Notes: Merged: https://github.com/ruby/ruby/pull/6358
2022-09-20Quiet if the target is already linked the same sourceNobuyoshi Nakada
2022-09-20Fix the trailing comma comment for builtin [ci skip]Takashi Kokubun
so that it's clear why not args.last but args[1]
2022-09-20Support trailing commas in builtinTakashi Kokubun
`foo(Primitive.cexpr!('Qnil'),)` causes SEGV without this change.
2022-09-19Downloader: Define long option aliasesNobuyoshi Nakada
2022-09-19Downloader: Define per-class command line optionsNobuyoshi Nakada
Move `Downloader::Unicode` specific options, and parse options after the downloader specificier.
2022-09-18Introduce --basedir to insns2vm.rbTakashi Kokubun
and leverage that to preserve the directory structure under tool/ruby_vm/views
2022-09-18Revert "Preserve the directory structure under tool/ruby_vm/views"Takashi Kokubun
This reverts commit 62ec621f8c7457374d1f08aec97138ac1b7bdf2a. will revisit this once fixing non-MJIT targets
2022-09-18Preserve the directory structure under tool/ruby_vm/viewsTakashi Kokubun
for nested target directories
2022-09-18Demote mjit_instruction.rb from builtin to stdlibTakashi Kokubun
2022-09-17Remove git command existence check againTakashi Kokubun
With 33c6dd2cc89c27bbf406508ec39038a181fb99bc, it's no longer necessary. This is what I got on openbsd-current: ``` -bash-5.1$ git -v unknown option: -v usage: git [--version] [--help] [-C <path>] [-c <name>=<value>] [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path] [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare] [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>] [--super-prefix=<path>] [--config-env=<name>=<envvar>] <command> [<args>] -bash-5.1$ git version git version 2.35.1 ```
2022-09-17Fallback to VCS.release_date on VCS::NotFoundErrorTakashi Kokubun
when -q is given. One of the RubyCI servers, freebsd12, had a broken git environment: ``` $ git show fatal: detected dubious ownership in repository at '/usr/home/chkbuild/chkbuild/tmp/build/20220917T123002Z/ruby' To add an exception for this directory, call: git config --global --add safe.directory /usr/home/chkbuild/chkbuild/tmp/build/20220917T123002Z/ruby ``` tool/lib/vcs.rb doesn't work normally for that server. Even for such cases, we'd like to generate a usable revision.h. So this patch lets revision.h fallback to default VCS.release_date when VCS::NotFoundError is raised.