aboutsummaryrefslogtreecommitdiffstats
path: root/common.mk
Commit message (Collapse)AuthorAgeFilesLines
* Manage the timestamp for revision.hNobuyoshi Nakada2022-11-021-7/+2
|
* Ignore failure at moving revision.h [ci skip]Nobuyoshi Nakada2022-10-301-1/+1
| | | | The source directory may be read-only.
* YJIT: Lazily enable YJIT after prelude (#6597)Takashi Kokubun2022-10-241-0/+1
| | | | | | | * YJIT: Lazily enable YJIT after prelude * Update dependencies * Use a bit field for opt->yjit
* Make mjit_cont sharable with YJIT (#6556)Takashi Kokubun2022-10-171-0/+20
| | | | | | | * Make mjit_cont sharable with YJIT * Update dependencies * Update YJIT binding
* Improvements to IO::Buffer implementation and documentation. (#6525)Samuel Williams2022-10-121-0/+5
|
* Revert "Revert "This commit implements the Object Shapes technique in CRuby.""Jemma Issroff2022-10-111-0/+322
| | | | This reverts commit 9a6803c90b817f70389cae10d60b50ad752da48f.
* Revert "This commit implements the Object Shapes technique in CRuby."Aaron Patterson2022-09-301-322/+0
| | | | This reverts commit 68bc9e2e97d12f80df0d113e284864e225f771c2.
* This commit implements the Object Shapes technique in CRuby.Jemma Issroff2022-09-281-0/+322
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* bootstraptest/runner: manage sub processes with the job serverNobuyoshi Nakada2022-09-281-2/+2
|
* Revert this until we can figure out WB issues or remove shapes from GCAaron Patterson2022-09-261-322/+0
| | | | | | | | | | Revert "* expand tabs. [ci skip]" This reverts commit 830b5b5c351c5c6efa5ad461ae4ec5085e5f0275. Revert "This commit implements the Object Shapes technique in CRuby." This reverts commit 9ddfd2ca004d1952be79cf1b84c52c79a55978f4.
* This commit implements the Object Shapes technique in CRuby.Jemma Issroff2022-09-261-0/+322
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Update `IO::Buffer` read/write to use rb_thread_io_blocking_region. (#6438)Samuel Williams2022-09-261-0/+1
|
* Add several new methods for getting and setting buffer contents. (#6434)Samuel Williams2022-09-261-0/+1
|
* Bindgen enum with builtinTakashi Kokubun2022-09-231-1/+2
|
* mjit_c.rb doesn't need to be an erbTakashi Kokubun2022-09-231-5/+0
|
* Builtin RubyVM::MJIT::CTakashi Kokubun2022-09-231-1/+11
|
* YJIT: Support MAKE=bmake for release buildAlan Wu2022-09-201-0/+8
| | | | | | | | | | This add support for bmake, which should allow building with `configure --enable-yjit` for the BSDs. Tested on FreeBSD 13 and on macOS with `configure MAKE=bmake` on a case-sensitive file system. It works by including a fragment into the Makefile through the configure script, similar to common.mk. It uses the always rebuild approach to keep build system changes minimal.
* Try to ignore a noisy ASAN warning for continuationYusuke Endoh2022-09-201-0/+1
|
* Extract UNICODE_DOWNLOADERNobuyoshi Nakada2022-09-191-19/+13
|
* Include lib/mjit/instruction.rb in a snapshotTakashi Kokubun2022-09-181-0/+1
| | | | baseruby shouldn't be necessary once a snapshot is built.
* Move mjit/instruction.rb rule to common.mkTakashi Kokubun2022-09-181-0/+5
| | | | | | as suggested by nobu. We don't really need to generate this for Windows, but using common.mk whenever possible would probably make maintenance easier.
* Demote mjit_instruction.rb from builtin to stdlibTakashi Kokubun2022-09-181-6/+1
|
* Replace revision.tmp with the HAVE_BASERUBY trickTakashi Kokubun2022-09-181-1/+3
| | | | | | but without relying on replacement. This seems to work on OpenBSD as well.
* Always generate non-empty revision.hTakashi Kokubun2022-09-171-8/+3
| | | | | | | | | | Non-GNU make seems to generate empty revision.h, but it doesn't make sense since https://github.com/ruby/ruby/pull/6382. Also the $(HAVE_BASERUBY:yes=tmp) hack doesn't seem to be working on OpenBSD. I'll remove it to focus on fixing RubyCI first, and then deal with baseruby-missing environments. At least a snapshot should have revision.h and it might work fine though.
* Auto-generate the release date on version.h from git CommitDate (#6382)Takashi Kokubun2022-09-171-1/+2
| | | | | | | * Auto-generate the release date on version.h from git CommitDate * Generate revision.h on mswin
* Move case-folding.rb to tooldir with enc-prefixNobuyoshi Nakada2022-09-171-3/+3
|
* Derive UNICODE_EMOJI_VERSION from UNICODE_VERSIONNobuyoshi Nakada2022-09-171-1/+3
|
* Now test-bundler nees fake.rbNobuyoshi Nakada2022-09-161-1/+1
|
* Add noarch-fake.rb targetNobuyoshi Nakada2022-09-151-0/+3
| | | | | `yes-fake` depends on it when `arch=noarch` is given, but the rule to generate it from fake.rb.in is ignored now.
* Manage paths for bundler testsNobuyoshi Nakada2022-09-141-1/+5
|
* Pass job-server FDs to bundler testsNobuyoshi Nakada2022-09-141-2/+2
|
* Deprecate Encoding#replicateBenoit Daloze2022-09-101-0/+1
| | | | * See [Feature #18949].
* [MSWin] Get rid of single quotes in sed command linesNobuyoshi Nakada2022-09-101-5/+5
| | | | | | | | | GnuWin32 sed strips only double quotes, but not single quotes, and dies: ``` sed: -e expression #1, char 1: unknown command: `'' ```
* Process token IDs from id.def without id.hNobuyoshi Nakada2022-09-081-2/+2
| | | | | | | | | Fixes id.h error during updating ripper.c by `make after-update`. While it used to update id.h in the build directory, but was trying to update ripper.c in the source directory. In principle, files in the source directory can or should not depend on files in the build directory.
* Dump cross.rb only when verbose [ci skip]Nobuyoshi Nakada2022-09-071-1/+1
|
* Define BOOTSTRAPRUBY from HAVE_BASERUBYNobuyoshi Nakada2022-09-071-0/+1
|
* Use BOOTSTRAPRUBY_COMMAND instead of fake.rb directlyNobuyoshi Nakada2022-09-071-1/+1
|
* Add mjit-bindgen workflow (#6327)Takashi Kokubun2022-09-051-0/+15
|
* Ruby MJIT (#6028)Takashi Kokubun2022-09-041-7/+13
|
* Ignore fake.rb for snapshotNobuyoshi Nakada2022-09-041-3/+3
|
* fake.rb needs id.hNobuyoshi Nakada2022-09-041-1/+2
|
* Fix potential target type confliction [ci skip]Nobuyoshi Nakada2022-09-031-1/+1
|
* Make sources by BASERUBY if available instead of minirubyNobuyoshi Nakada2022-09-031-10/+15
|
* Generate the prelude sources by common-srcsNobuyoshi Nakada2022-09-031-1/+1
|
* Exclude LIBPATHENV wrapper from PREPNobuyoshi Nakada2022-09-031-2/+2
|
* builtin.c includes mini_builtin.c when cross-compilingNobuyoshi Nakada2022-09-031-0/+3
|
* Move duplicate dependenciesNobuyoshi Nakada2022-09-031-0/+2
|
* New constant caching insn: opt_getconstant_pathJohn Hawthorn2022-09-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously YARV bytecode implemented constant caching by having a pair of instructions, opt_getinlinecache and opt_setinlinecache, wrapping a series of getconstant calls (with putobject providing supporting arguments). This commit replaces that pattern with a new instruction, opt_getconstant_path, handling both getting/setting the inline cache and fetching the constant on a cache miss. This is implemented by storing the full constant path as a null-terminated array of IDs inside of the IC structure. idNULL is used to signal an absolute constant reference. $ ./miniruby --dump=insns -e '::Foo::Bar::Baz' == disasm: #<ISeq:<main>@-e:1 (1,0)-(1,13)> (catch: FALSE) 0000 opt_getconstant_path <ic:0 ::Foo::Bar::Baz> ( 1)[Li] 0002 leave The motivation for this is that we had increasingly found the need to disassemble the instructions between the opt_getinlinecache and opt_setinlinecache in order to determine the constant we are fetching, or otherwise store metadata. This disassembly was done: * In opt_setinlinecache, to register the IC against the constant names it is using for granular invalidation. * In rb_iseq_free, to unregister the IC from the invalidation table. * In YJIT to find the position of a opt_getinlinecache instruction to invalidate it when the cache is populated * In YJIT to register the constant names being used for invalidation. With this change we no longe need disassemly for these (in fact rb_iseq_each is now unused), as the list of constant names being referenced is held in the IC. This should also make it possible to make more optimizations in the future. This may also reduce the size of iseqs, as previously each segment required 32 bytes (on 64-bit platforms) for each constant segment. This implementation only stores one ID per-segment. There should be no significant performance change between this and the previous implementation. Previously opt_getinlinecache was a "leaf" instruction, but it included a jump (almost always to a separate cache line). Now opt_getconstant_path is a non-leaf (it may raise/autoload/call const_missing) but it does not jump. These seem to even out.
* Fixed typoHiroshi SHIBATA2022-08-261-1/+1
|
* ruby-prof is now optionalHiroshi SHIBATA2022-08-261-1/+1
|