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

1888 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada 7e8d9f49b3 [Bug #18286] Show checksum of builtin_binary.inc for confirmation 2023-11-09 16:01:01 +09:00
Nobuyoshi Nakada 22939382a8 [Bug #18286] Make builtin binary if sharable in universal binaries 2023-11-09 16:01:01 +09:00
Nobuyoshi Nakada 40d40a651e Revert "Disable iseq-dumped builtin module for universal x86_64/arm64 binaries"
This reverts commit 1d5598fe0d.
2023-11-09 16:01:01 +09:00
Ben Hamilton 1d5598fe0d Disable iseq-dumped builtin module for universal x86_64/arm64 binaries
During the build, Ruby has special logic to serialize its own builtin
module to disk using the binary iseq format during the build (I assume
for speed so it doesn't have to parse builtin every time it starts
up).

However, since iseq format is architecture-specific, when building on
x86_64 for universal x86_64 + arm64, the serialized builtin module is
written with the x86_64 architecture of the build machine, which fails
this check whenever ruby imports the builtin module on arm64:

1fdaa06660/compile.c (L13243)

Thankfully, there's logic to disable this feature for cross-compiled builds:

1fdaa06660/builtin.c (L6)

This disables the iseq logic for universal builds as well.

Fixes [Bug #18286]
2023-11-09 12:24:01 +09:00
Kevin Newton ec86b2eb39
[prism] Update to use new options APIs 2023-11-03 10:13:50 -04:00
Kevin Newton 90b21b864d [prism] Updates for sync 2023-11-01 13:10:29 -04:00
Kevin Newton 719b40bdf6
[prism] Update prettyprint deps 2023-10-26 15:47:01 -04:00
Jemma Issroff 8f71a5c530 [PRISM] Move scope_node itself to CRuby, create prism_compile.h 2023-10-25 18:18:35 -03:00
ydah e6fcf07a6f Use `-H` option instead of `-h` option
Follow up: https://github.com/ruby/lrama/pull/139
2023-10-23 17:04:27 +09:00
Nobuyoshi Nakada 665b4c5b2a
[Bug #19967] Reset `LIBPATHENV` env after started
Not to affect other tools invoked as child processes.
2023-10-21 14:05:20 +09:00
Alan Wu d2b0c9da2e
YJIT: Add a live ISeq counter
It's an estimator for application size and could be used as a
compilation heuristic later.

Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
2023-10-18 23:46:35 +00:00
Nobuyoshi Nakada 4c54492770 Separate `test-precheck` target
So that the tests can run without updating other than the programs.
2023-10-17 21:07:25 +09:00
Nobuyoshi Nakada 03ac10898f Wait for `showflag` to finish to prevent interspersed outputs 2023-10-17 21:07:25 +09:00
yui-knk 448e8b5ebb Remove duplicated option
`-d` option is basically same with `-h` (`--header`).
The difference is `-h` accept header file name.
Therefore remove `-d` option.
2023-10-17 08:09:49 +09:00
Kevin Newton 17697c968e
[prism] Remove unused make target 2023-10-13 15:34:59 -04:00
Kevin Newton b5ee570eb8 [prism] Remove unescape targets 2023-10-13 15:31:30 -04:00
Jemma Issroff d705885286
[PRISM] Add --dump=prism mode (#8643) 2023-10-13 12:24:40 -07:00
Koichi Sasada be1bbd5b7d M:N thread scheduler for Ractors
This patch introduce M:N thread scheduler for Ractor system.

In general, M:N thread scheduler employs N native threads (OS threads)
to manage M user-level threads (Ruby threads in this case).
On the Ruby interpreter, 1 native thread is provided for 1 Ractor
and all Ruby threads are managed by the native thread.

From Ruby 1.9, the interpreter uses 1:1 thread scheduler which means
1 Ruby thread has 1 native thread. M:N scheduler change this strategy.

Because of compatibility issue (and stableness issue of the implementation)
main Ractor doesn't use M:N scheduler on default. On the other words,
threads on the main Ractor will be managed with 1:1 thread scheduler.

There are additional settings by environment variables:

`RUBY_MN_THREADS=1` enables M:N thread scheduler on the main ractor.
Note that non-main ractors use the M:N scheduler without this
configuration. With this configuration, single ractor applications
run threads on M:1 thread scheduler (green threads, user-level threads).

`RUBY_MAX_CPU=n` specifies maximum number of native threads for
M:N scheduler (default: 8).

This patch will be reverted soon if non-easy issues are found.

[Bug #19842]
2023-10-12 14:47:01 +09:00
Kevin Newton a213d21448 Move CRuby-specific prism files to top level 2023-09-28 09:44:16 -04:00
Kevin Newton 3d0a46796b Rename YARP symbols to prism 2023-09-27 13:57:38 -04:00
Kevin Newton 7e0971eb5d Update YARP build targets 2023-09-27 12:10:23 -04:00
Nobuyoshi Nakada 8bbaa81454
Clean also YARP build directory [ci skip] 2023-09-27 00:16:56 +09:00
Nobuyoshi Nakada 7e2775b057 Invoke the command when RUBY_BUGREPORT_PATH starts with `|` 2023-09-25 22:57:28 +09:00
Nobuyoshi Nakada 20bd19a9ad
Move YARP_BUILD_DIR to common.mk
It does not need to be an absolute path.
2023-09-21 18:18:27 +09:00
Nobuyoshi Nakada 2b41df2477 `.NOTPARALLEL` with prerequisites needs recent GNU Make
GNU Make prior to 4.4 just ignores the prerequisites, and runs
everything in serial.
2023-09-21 12:18:41 +09:00
Nobuyoshi Nakada bcb3247072
[Bug #19778] Pass additional include options to INCFLAGS in common.mk 2023-09-17 19:18:23 +09:00
Nobuyoshi Nakada e22086bb6a
Enable `.NOTPARALLEL` on `ripper_srcs`
And add special treats only for old GNU make.
2023-09-13 12:11:43 +09:00
Nobuyoshi Nakada b1f0d009cb
Use the keyword for output and omit default arguments [ci skip] 2023-09-11 12:23:57 +09:00
Jemma Issroff 3b815ed7da
Add yarp/yarp_compiler.c (#8042)
* Add yarp/yarp_compiler.c as stencil for compiling YARP

This commit adds yarp/yarp_compiler.c, and changes the sync script
to ensure that yarp/yarp_compiler.c will not get overwritten

* [Misc #119772] Create and expose RubyVM::InstructionSequence.compile_yarp

This commit creates the stencil for a compile_yarp function, which
we will continue to fill out. It allows us to check the output
of compiled YARP code against compiled code without using YARP.
2023-08-28 13:55:58 -07:00
Nobuyoshi Nakada 0c9d0684e1
YARP: generated files using from templates depend on config.yml 2023-08-28 09:51:55 +09:00
Kevin Newton 00ec8dedb1 Update deps 2023-08-25 18:20:51 -04:00
Kevin Newton 293959a745 Remove config.h from targets necessary for YARP 2023-08-25 18:20:51 -04:00
Kevin Newton 85c8e8b9bd
Fix VPATH for yarp/version.h 2023-08-25 15:53:01 -04:00
Kevin Newton a7c7cd11bc
Update sync script to handle yarp/version.h 2023-08-25 15:47:25 -04:00
Kevin Newton dd07b70253
Fix mutation visitor build for YARP templating 2023-08-25 15:33:14 -04:00
Peter Zhu bfb395c620 Implement weak references in the GC
[Feature #19783]

This commit adds support for weak references in the GC through the
function `rb_gc_mark_weak`. Unlike strong references, weak references
does not mark the object, but rather lets the GC know that an object
refers to another one. If the child object is freed, the pointer from
the parent object is overwritten with `Qundef`.

Co-Authored-By: Jean Boussier <byroot@ruby-lang.org>
2023-08-25 09:01:21 -04:00
Takashi Kokubun 6f1dfa7411
Resurrect srcs dependency for YARP templates (#8285) 2023-08-24 18:46:06 -07:00
Takashi Kokubun e89150b1d4
Render YARP templates into the build directory (#8266) 2023-08-22 21:56:51 -07:00
Takashi Kokubun 57dfd5c245 Revert "Fix tool/update-deps for YARP files"
This reverts commit 6fff5c5ba2.

Revert "Use $(top_srcdir) entries for mswin (#8244)"

This reverts commit e327bf32bd.

Revert "Update dependencies"

This reverts commit aba26a8804.

Revert "Use {$(VPATH)} for OpenBSD"

This reverts commit 2046e054bc.

---

None of those revisions actually worked for both mswin and OpenBSD at
the same time. I need more time to build something that works for both.
2023-08-18 01:12:41 -07:00
Takashi Kokubun 6fff5c5ba2 Fix tool/update-deps for YARP files 2023-08-18 01:07:05 -07:00
Takashi Kokubun aba26a8804 Update dependencies 2023-08-18 00:34:36 -07:00
Takashi Kokubun 2046e054bc Use {$(VPATH)} for OpenBSD
Scratch build on OpenBSD has been failing since 67b5f63e97.
`make; make` works though. (`make` alone doesn't work)

I have no idea what I'm doing, but I do know that this patch fixes
scratch build on an OpenBSD machine.

My best guess is that BSD make isn't capable of distinguishing foo.c vs
./foo.c in dependencies, and {$(VPATH)} becomes empty when it needs to be.
2023-08-18 00:20:11 -07:00
Takashi Kokubun 78e7fd7b49 Include YARP templated files in snapshots
Those files should be part of CRuby distributions.
2023-08-17 15:04:14 -07:00
Takashi Kokubun 72a16c61dc Move the dependency of node.rb and serialize.rb
to `main`.

This is what lib/ruby_vm/rjit/instruction.rb currently does. Letting
.time depend on those files was just a workaround.
2023-08-17 14:52:23 -07:00
Takashi Kokubun 67b5f63e97
Render YARP templates in the build process (#8228) 2023-08-17 14:39:04 -07:00
Takashi Kokubun 87f74a349e Update dependencies 2023-08-16 17:47:32 -07:00
Nobuyoshi Nakada 2a3acbc420
Fix test and precheck order for old GNU Make 2023-08-14 11:30:05 +09:00
Nobuyoshi Nakada efc9127790
Prefix `excludes` with a dot to prevent chkbuild from firing wrongly
Chkbuild runs for each directories just under `test` directory when
`test-all` failed.  `test/excludes` itself should not be a target.
2023-08-13 15:23:54 +09:00
Nobuyoshi Nakada 475241ee91
Group test-syntax-suggest and leaked-globals [ci skip] 2023-08-11 16:22:18 +09:00
Nobuyoshi Nakada 907560f5dc
Fix test-bundler dependencies 2023-08-11 15:23:48 +09:00