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

1974 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada 0d44e23831
Prevent test-bundled-gems outputs from mixing
Run test-bundled-gems-run and test-bundled-gems-spec sequentially.
2024-05-26 22:17:57 +09:00
Kevin Newton 6c07aa364d [PRISM] Remove old prism spec workflow, just use default.mspec now 2024-05-20 12:28:47 -04:00
Hiroshi SHIBATA 9df3f205b1 test-syntax-suggest is not working with mswin environment 2024-05-09 15:22:53 +09:00
卜部昌平 c844968b72 ruby tool/update-deps --fix 2024-04-27 21:55:28 +09:00
Kevin Newton d3a7e55542
Update common.mk dependencies 2024-04-24 15:45:23 -04:00
Kevin Newton 58847b7df8 [PRISM] Generate inspect_visitor in common.mk 2024-04-24 14:16:42 -04:00
Nobuyoshi Nakada 66edc33f4e
[DOC] Wait for `docs` to complete before installing all
The document directories may be incomplete or empty before `docs` is
completed.
2024-04-24 12:06:20 +09:00
yui-knk 2992e1074a Refactor parser compile functions
Refactor parser compile functions to reduce the dependence
on ruby functions.
This commit includes these changes

1. Refactor `gets`, `input` and `gets_` of `parser_params`

Parser needs two different data structure to get next line, function (`gets`) and input data (`input`).
However `gets_` is used for both function (`call`) and input data (`ptr`).
`call` is used for managing general callback function when `rb_ruby_parser_compile_generic` is used.
`ptr` is used for managing the current pointer on String when `parser_compile_string` is used.
This commit changes parser to used only `gets` and `input` then removes `gets_`.

2. Move parser_compile functions and `gets` functions from parse.y to ruby_parser.c

This change reduces the dependence on ruby functions from parser.

3. Change ruby_parser and ripper to take care of `VALUE input` GC mark

Move the responsibility of calling `rb_gc_mark` for `VALUE input` from parser to ruby_parser and ripper.
`input` is arbitrary data pointer from the viewpoint of parser.

4. Introduce rb_parser_compile_array function

Caller of `rb_parser_compile_generic` needs to take care about GC because ruby_parser doesn’t know
about the detail of `lex_gets` and `input`.
Introduce `rb_parser_compile_array` to reduce the complexity of ast.c.
2024-04-23 07:20:22 +09:00
yui-knk d07df8567e Parser and universal parser share wrapper functions 2024-04-20 18:08:33 +09:00
Nobuyoshi Nakada c789e4c493
Use isolated temporary directory in test-all too for RubyGems tests 2024-04-19 23:06:46 +09:00
Nobuyoshi Nakada 801e4a4feb
Remove UPDATE_LIBRARIES
It has not been used since e48375c112.
2024-04-19 14:12:42 +09:00
Kevin Newton 51485e63fc [PRISM] Generate the reflection file 2024-04-17 13:54:29 -04:00
Kevin Newton 8c8068c06f [PRISM] Remove old make targets for state stack 2024-04-17 10:36:52 -04:00
Hiroshi SHIBATA cc37c89c2f Separate docs task from main to install-*
[Feature #20347]
2024-04-17 19:56:20 +09:00
yui-knk 6056773105 Move shareable_constant_value logic from parse.y to compile.c 2024-04-04 08:44:10 +09:00
Nobuyoshi Nakada 03ab4a56d2
Clean symlinks to be runnable [ci skip] 2024-03-28 23:58:07 +09:00
Takashi Kokubun 46bf6ae886
YJIT: Propagate Array, Hash, and String classes (#10323) 2024-03-25 12:06:47 -04:00
Nobuyoshi Nakada 7c015c3b30
Remove never used macros related to RJIT [ci skip]
These macros have not been used since the commit "Stop exporting
symbols for MJIT" 233ddfac54, and
renamed as RJIT.
2024-03-24 22:37:20 +09:00
Kevin Newton 0e8b6c62a4 [PRISM] Enable specs in CI 2024-03-20 14:28:13 -04:00
Kevin Newton 0b34b75ba1
[PRISM] Remove unnecessary dependencies in common.mk 2024-03-18 14:18:53 -04:00
Nobuyoshi Nakada 0fb39ab1b9
Clean intermediate files and debug info for each target
By replacing `ALLOBJS` suffix with intermediate file suffixes instead
of roughly removing by wildcards.  Made `cleanlibs` append `.dSYM`
suffix for each word in `TARGET_SO`, not the end of the entire list.
2024-03-10 22:12:00 +09:00
Nobuyoshi Nakada 1c083c4db0
Clean up files made by runnable in clean-runnable [ci skip] 2024-03-07 16:40:27 +09:00
Nobuyoshi Nakada 810779fab9
Clean up dump file generated by `--yjit-exit-locations` [ci skip] 2024-03-07 14:33:40 +09:00
Kevin Newton e13fd48f55 [PRISM] Update dependencies for prism diagnostics 2024-03-06 21:42:54 -05:00
Jean Boussier b4a69351ec Move FL_SINGLETON to FL_USER1
This frees FL_USER0 on both T_MODULE and T_CLASS.

Note: prior to this, FL_SINGLETON was never set on T_MODULE,
so checking for `FL_SINGLETON` without first checking that
`FL_TYPE` was `T_CLASS` was valid. That's no longer the case.
2024-03-06 13:11:41 -05:00
Peter Zhu a255b43ff1 Update common.mk 2024-02-23 17:17:12 -05:00
Takashi Kokubun 8a6740c70e
YJIT: Lazily push a frame for specialized C funcs (#10080)
* YJIT: Lazily push a frame for specialized C funcs

Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>

* Fix a comment on pc_to_cfunc

* Rename rb_yjit_check_pc to rb_yjit_lazy_push_frame

* Rename it to jit_prepare_lazy_frame_call

* Fix a typo

* Optimize String#getbyte as well

* Optimize String#byteslice as well

---------

Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
2024-02-23 19:08:09 +00:00
Kevin Newton 9a09e27a73 [PRISM] Use new static literal comparisons 2024-02-23 13:25:31 -05:00
Kevin Newton 4016535404 [PRISM] Integrate new number parsing 2024-02-22 22:42:44 -05:00
Peter Zhu e65315a725 Extract imemo functions from gc.c into imemo.c 2024-02-22 11:35:09 -05:00
Nobuyoshi Nakada 01c7e16c0c Separate miniruby from dmyext.c 2024-02-21 23:37:20 +09:00
yui-knk e7ab5d891c Introduce NODE_REGX to manage regexp literal 2024-02-21 08:06:48 +09:00
Hiroshi SHIBATA cb9e0a4537
Don't exclude `test_gem_package_task.rb` explicitly.
3d4f5e7671 suppressed warnings.
2024-02-19 13:55:06 +09:00
Alan Wu fbe63047cb Fix PRISM build dependencies 2024-02-16 14:47:16 -05:00
Hiroshi SHIBATA 38cc9dacaa We can test bundled gems without default gems installation 2024-02-16 17:28:00 +09:00
Hiroshi SHIBATA 0da12fa34e Added singleton for prime 2024-02-15 20:34:52 +09:00
Benoit Daloze 8f926cb8d8 No need to extract bundled gems before test-spec
* Since https://github.com/ruby/ruby/pull/9977
2024-02-15 12:06:21 +01:00
Hiroshi SHIBATA 6958e88f29 Fix task dependency 2024-02-15 18:57:23 +09:00
Hiroshi SHIBATA 1e6fffaeeb Added new ruby/spec task for bundled gems 2024-02-15 18:57:23 +09:00
Kevin Newton 8e3eb8c9b4
[PRISM] Fix up common.mk dependencies 2024-02-13 20:32:19 -05:00
Benoit Daloze 39788e5888 Try prepare-gems instead of extract-gems
* `make install` uses prepare-gems.
2024-02-12 11:33:19 +01:00
Benoit Daloze 90a746d246 Always extract bundled gems before running ruby/spec
* Fixes 44d74f22c8 (r138276491)
2024-02-12 10:55:57 +01:00
KJ Tsanaktsidis 1d467f2255 Burn default ASAN options into the built Ruby
* We always need use_sigaltstack=0 because Ruby registers sigaltstack
  handlers
* We also need to disable leak detection (unless RUBY_FREE_AT_EXIT is
  set - I might experiment later with automatically enabling leak
  detection if RUBY_FREE_AT_EXIT is set).

Burning it into the built ruby binary in this way avoids people needing
to remember to start their Ruby program with these flags all the time.

We also need a small fix in mkmf to make sure that test programs also
don't have leak detection enabled (this is never desirable)

[Bug #20256]
2024-02-12 10:51:46 +11:00
Nobuyoshi Nakada 055615a473
Statically linking does not use shared libraries of encodings 2024-02-03 15:59:55 +09:00
Kevin Newton 610636fd6b [PRISM] Mirror iseq APIs
Before this commit, we were mixing a lot of concerns with the prism
compile between RubyVM::InstructionSequence and the general entry
points to the prism parser/compiler.

This commit makes all of the various prism-related APIs mirror
their corresponding APIs in the existing parser/compiler. This means
we now have the correct frame naming, and it's much easier to follow
where the logic actually flows. Furthermore this consolidates a lot
of the prism initialization, making it easier to see where we could
potentially be raising errors.
2024-01-31 13:41:36 -05:00
S.H f3df218f48
Introduced `rb_node_const_decl_val` function
Introduce `rb_node_const_decl_val` function to allow `rb_ary_join` and
`rb_ary_reverse` functions to be removed from Universal Parser.
2024-01-31 13:31:38 +09:00
Hiroshi SHIBATA 220f7c9d8e Re-use drb from bundled gems 2024-01-22 11:08:59 +09:00
Hiroshi SHIBATA c46d23cde7 Added dependencies rinda and drb 2024-01-19 20:02:19 +09:00
KJ Tsanaktsidis 61da90c1b8 Mark asan fake stacks during machine stack marking
ASAN leaves a pointer to the fake frame on the stack; we can use the
__asan_addr_is_in_fake_stack API to work out the extent of the fake
stack and thus mark any VALUEs contained therein.

[Bug #20001]
2024-01-19 09:55:12 +11:00
Nobuyoshi Nakada 01459f1644
Set `CHECK_LEAKS` in spec/default.mspec
Because of `.NOEXPORT:` in template/Makefile.in, variables in
common.mk will not be exported.
2024-01-16 20:29:06 +09:00