Age | Commit message (Collapse) | Author |
|
Installs the last revision in the previous `RUBY_RELEASE_DATE`.
|
|
|
|
Since #10209 we've been noticing that on macos after running `make
clean` the `coroutine/arm64/Context.S` file is missing, causing
subsequent make calls to fail because `Context.S` is needed to build
`Context.o`.
The reason this is happening is because macos is case-insensitive so the
`.s` looks for `coroutine/arm64/Context.s` and finds
`coroutine/arm64/Context.s`. This does not happen on linux because the
filesystem is case sensitive.
I attempted to use `find` because it is case sensitive regardless of
filesystem, but it was a lot slower than `rm` since we can't pass
multiple file names the same way to `find`.
Reverting this small part of #10209 fixes the issue for macos and it
wasn't clear that those changes were strictly necessary for the rest of
the PR.
We changed the original code to use `rm` instead of `delete` because it
is not standarized on POSIX.
|
|
|
|
There is an English word "vast".
This commit changes the name to be more clear name to avoid confusion.
|
|
This patch removes the `VALUE flags` member from the `rb_ast_t` structure making `rb_ast_t` no longer an IMEMO object.
## Background
We are trying to make the Ruby parser generated from parse.y a universal parser that can be used by other implementations such as mruby.
To achieve this, it is necessary to exclude VALUE and IMEMO from parse.y, AST, and NODE.
## Summary (file by file)
- `rubyparser.h`
- Remove the `VALUE flags` member from `rb_ast_t`
- `ruby_parser.c` and `internal/ruby_parser.h`
- Use TypedData_Make_Struct VALUE which wraps `rb_ast_t` `in ast_alloc()` so that GC can manage it
- You can retrieve `rb_ast_t` from the VALUE by `rb_ruby_ast_data_get()`
- Change the return type of `rb_parser_compile_XXXX()` functions from `rb_ast_t *` to `VALUE`
- rb_ruby_ast_new() which internally `calls ast_alloc()` is to create VALUE vast outside ruby_parser.c
- `iseq.c` and `vm_core.h`
- Amend the first parameter of `rb_iseq_new_XXXX()` functions from `rb_ast_body_t *` to `VALUE`
- This keeps the VALUE of AST on the machine stack to prevent being removed by GC
- `ast.c`
- Almost all change is replacement `rb_ast_t *ast` with `VALUE vast` (sorry for the big diff)
- Fix `node_memsize()`
- Now it includes `rb_ast_local_table_link`, `tokens` and script_lines
- `compile.c`, `load.c`, `node.c`, `parse.y`, `proc.c`, `ruby.c`, `template/prelude.c.tmpl`, `vm.c` and `vm_eval.c`
- Follow-up due to the above changes
- `imemo.{c|h}`
- If an object with `imemo_ast` appears, considers it a bug
Co-authored-by: Nobuyoshi Nakada <[email protected]>
|
|
This patch is part of universal parser work.
## Summary
- Decouple VALUE from members below:
- `(struct parser_params *)->debug_lines`
- `(rb_ast_t *)->body.script_lines`
- Instead, they are now `rb_parser_ary_t *`
- They can also be a `(VALUE)FIXNUM` as before to hold line count
- `ISEQ_BODY(iseq)->variable.script_lines` remains VALUE
- In order to do this,
- Add `VALUE script_lines` param to `rb_iseq_new_with_opt()`
- Introduce `rb_parser_build_script_lines_from()` to convert `rb_parser_ary_t *` into `VALUE`
## Other details
- Extend `rb_parser_ary_t *`. It previously could only store `rb_parser_ast_token *`, now can store script_lines, too
- Change tactics of building the top-level `SCRIPT_LINES__` in `yycompile0()`
- Before: While parsing, each line of the script is added to `SCRIPT_LINES__[path]`
- After: After `yyparse(p)`, `SCRIPT_LINES__[path]` will be built from `p->debug_lines`
- Remove the second parameter of `rb_parser_set_script_lines()` to make it simple
- Introduce `script_lines_free()` to be called from `rb_ast_free()` because the GC no longer takes care of the script_lines
- Introduce `rb_parser_string_deep_copy()` in parse.y to maintain script_lines when `rb_ruby_parser_free()` called
- With regard to this, please see *Future tasks* below
## Future tasks
- Decouple IMEMO from `rb_ast_t *`
- This lifts the five-members-restriction of Ruby object,
- So we will be able to move the ownership of the `lex.string_buffer` from parser to AST
- Then we remove `rb_parser_string_deep_copy()` to make the whole thing simple
|
|
|
|
|
|
These macros have not been used since the commit "Stop exporting
symbols for MJIT" 233ddfac541749a0da80ea27913dc1ef4ea700bb, and
renamed as RJIT.
|
|
|
|
- Simplify globbed file names.
- Prefer `File.open` over `Kernel#open`.
- Swallow initializer blocks instead of line by line with flip-flop.
- Re-structure converter list.
|
|
This reverts commit 301fa452f7a9cdea922103e9c50d85a2d5652d0d.
|
|
When multiple libraries exist in a subdirectory under `ext`, `rmdir
-p` may fail, because other directories have not been removed yet or
the parent directory has been removed by other `distclean`. `rmdir`
in GNU coreutils has `--ignore-fail-on-non-empty` option for the
former case but others may not, and the latter race condition is not
avoidable anyway.
|
|
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.
|
|
|
|
|
|
|
|
The condition is rarely met in usual cases, so it's worth to note about
the situation and the reason why we care about it.
|
|
The extension library has each initialization function named "Init_" +
basename. If multiple extensions have the same base name (such as
cgi/escape and erb/escape), the same function will be registered for
both names.
To fix this conflict, rename the initialization functions under sub
directories using using parent names, when statically linking.
|
|
The libruby.so linking extension libraries contain symbols exported
from extension libraries, and is not subject of test-leaked-globals.
|
|
The libruby.a linking extension libraries contain symbols exported
from extension libraries, and is not subject of test-leaked-globals.
|
|
|
|
This reverts commit 5bb946228550c7f171c27725860b153a675404f3.
Fixes https://bugs.ruby-lang.org/issues/20072
|
|
|
|
|
|
This reverts commit 1d5598fe0d3470e7cab06a756d40a9221fcd501b.
|
|
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:
https://github.com/ruby/ruby/blob/1fdaa0666086529b3aae2d509a2e71c4247c3a12/compile.c#L13243
Thankfully, there's logic to disable this feature for cross-compiled builds:
https://github.com/ruby/ruby/blob/1fdaa0666086529b3aae2d509a2e71c4247c3a12/builtin.c#L6
This disables the iseq logic for universal builds as well.
Fixes [Bug #18286]
|
|
Not to affect other tools invoked as child processes.
|
|
On some platforms, such as FreeBSD and Oracle Linux, symbols defined
in the crt0 setup routine are exported from shared libraries. So
ignore the symbols that would be exported even in an empty shared
library.
|
|
It does not need to be an absolute path.
|
|
|
|
Non-ASCII code are often warned by localized compilers.
Notes:
Merged: https://github.com/ruby/ruby/pull/8276
|
|
`$(MAINLIBS)` should be included in `$(LIBRUBYARG)` in cases it is
needed.
Notes:
Merged: https://github.com/ruby/ruby/pull/8233
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/8224
|
|
|
|
|
|
`$(MAINLIBS)` should include `$(LIBS)` already.
|
|
Notes:
Merged-By: k0kubun <[email protected]>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/8115
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/8040
|
|
https://bugs.ruby-lang.org/issues/19728
Notes:
Merged: https://github.com/ruby/ruby/pull/7944
Merged-By: nobu <[email protected]>
|
|
applied doxygen -g for Doxygen 1.9.7.
Notes:
Merged: https://github.com/ruby/ruby/pull/7986
|
|
Add yarp to common.mk and windows builds to enable us to run yarp
correctly with CI.
Notes:
Merged: https://github.com/ruby/ruby/pull/7964
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/7954
|
|
Introduce Universal Parser mode for the parser.
This commit includes these changes:
* Introduce `UNIVERSAL_PARSER` macro. All of CRuby related functions
are passed via `struct rb_parser_config_struct` when this macro is enabled.
* Add CI task with 'cppflags=-DUNIVERSAL_PARSER' for ubuntu.
Notes:
Merged: https://github.com/ruby/ruby/pull/7927
|
|
https://bugs.ruby-lang.org/issues/19637
Co-authored-by: Nobuyoshi Nakada <[email protected]>
Notes:
Merged: https://github.com/ruby/ruby/pull/7798
Merged-By: yui-knk <[email protected]>
|
|
So that ABI version is not included in it even on the develepment
branch.
|