Skip to content

Commit bf7a648

Browse files
committed
[GR-48237] Backports for 23.1 batch1
PullRequest: truffleruby/3978
2 parents 4018b86 + 8186db9 commit bf7a648

File tree

354 files changed

+3475
-3346
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

354 files changed

+3475
-3346
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Bug fixes:
1212
* Fix `Marshal.load` and raise `ArgumentError` when dump is broken and is too short (#3108, @andrykonchin).
1313
* Fix `super` method lookup for unbounded attached methods (#3131, @itarato).
1414
* Fix `Module#define_method(name, Method)` to respect `module_function` visibility (#3181, @andrykonchin).
15+
* Fix stack overflow with `Kernel.require` and `zeitwerk` (#3224, @eregon).
1516

1617
Compatibility:
1718

@@ -41,11 +42,13 @@ Compatibility:
4142
* Add `Module#const_added` (#3039, @itarato).
4243
* Show the pointer size information (if available) in `FFI::Pointer#inspect` (@nirvdrum).
4344
* Implement performance warnings (`Warning[:performance]`) like in CRuby 3.3 (@eregon).
45+
* The output of `Marshal.dump` is now compatible with CRuby for `Rational` and `Complex` instances (#3228, @eregon).
4446

4547
Performance:
4648

4749
* Improve `Truffle::FeatureLoader.loaded_feature_path` by removing expensive string ops from a loop. Speeds up feature lookup time (#3010, @itarato).
4850
* Improve `String#-@` performance by reducing unnecessary data copying and supporting substring lookups (@nirvdrum)
51+
* Specialize `Array#<<` and related methods appending elements per call site to have a single array storage strategy in the inline cache for most cases (@eregon).
4952

5053
Changes:
5154

common.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"Jsonnet files should not include this file directly but use ci/common.jsonnet instead."
55
],
66

7-
"mx_version": "6.42.0",
7+
"mx_version": "6.43.0",
88

99
"COMMENT.jdks": "When adding or removing JDKs keep in sync with JDKs in ci/common.jsonnet",
1010
"jdks": {
@@ -35,12 +35,12 @@
3535
"labsjdk-ee-20-llvm": {"name": "labsjdk", "version": "ee-20.0.2+2-jvmci-23.1-b02-sulong", "platformspecific": true },
3636

3737
"oraclejdk21": {"name": "jpg-jdk", "version": "21", "build_id": "33", "release": true, "platformspecific": true, "extrabundles": ["static-libs"]},
38-
"labsjdk-ce-21": {"name": "labsjdk", "version": "ce-21+35-jvmci-23.1-b13", "platformspecific": true },
39-
"labsjdk-ce-21Debug": {"name": "labsjdk", "version": "ce-21+35-jvmci-23.1-b13-debug", "platformspecific": true },
40-
"labsjdk-ce-21-llvm": {"name": "labsjdk", "version": "ce-21+35-jvmci-23.1-b13-sulong", "platformspecific": true },
41-
"labsjdk-ee-21": {"name": "labsjdk", "version": "ee-21+35-jvmci-23.1-b13", "platformspecific": true },
42-
"labsjdk-ee-21Debug": {"name": "labsjdk", "version": "ee-21+35-jvmci-23.1-b13-debug", "platformspecific": true },
43-
"labsjdk-ee-21-llvm": {"name": "labsjdk", "version": "ee-21+35-jvmci-23.1-b13-sulong", "platformspecific": true },
38+
"labsjdk-ce-21": {"name": "labsjdk", "version": "ce-21+35-jvmci-23.1-b14", "platformspecific": true },
39+
"labsjdk-ce-21Debug": {"name": "labsjdk", "version": "ce-21+35-jvmci-23.1-b14-debug", "platformspecific": true },
40+
"labsjdk-ce-21-llvm": {"name": "labsjdk", "version": "ce-21+35-jvmci-23.1-b14-sulong", "platformspecific": true },
41+
"labsjdk-ee-21": {"name": "labsjdk", "version": "ee-21+35-jvmci-23.1-b14", "platformspecific": true },
42+
"labsjdk-ee-21Debug": {"name": "labsjdk", "version": "ee-21+35-jvmci-23.1-b14-debug", "platformspecific": true },
43+
"labsjdk-ee-21-llvm": {"name": "labsjdk", "version": "ee-21+35-jvmci-23.1-b14-sulong", "platformspecific": true },
4444

4545
"oraclejdk22": {"name": "jpg-jdk", "version": "22", "build_id": "2", "release": true, "platformspecific": true, "extrabundles": ["static-libs"]}
4646
},

doc/contributor/updating-ruby.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Update all of these:
145145
* Update `.ruby-version`, `TruffleRuby.LANGUAGE_VERSION`
146146
* Reset `lib/cext/ABI_version.txt` and `lib/cext/ABI_check.txt` to `1` if `RUBY_VERSION` was updated.
147147
* Update `versions.json` (with gem versions provided by `cat ../ruby/gems/bundled_gems | sort`, `ls -l lib/gems/specifications/default` and `grep 'VERSION =' lib/mri/rubygems.rb`)
148-
* Also update version numbers in `src/main/c/Makefile`.
148+
* Also update version numbers for `debug` and `rbs` in `src/main/c/Makefile` and in `mx.truffleruby/suite.py`.
149149
* Copy and paste `-h` and `--help` output to `RubyLauncher` (instructions are in the end of the file `src/launcher/java/org/truffleruby/launcher/RubyLauncher.java`)
150150
* This is a good time to get `jt build` working.
151151
* Copy and paste the TruffleRuby `--help` output to `doc/user/options.md` (e.g., with `jt ruby --help | xsel -b`)

lib/json/lib/json/ext/.keep

Whitespace-only changes.

mx.truffleruby/mx_truffleruby.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,8 @@ def verify_ci(args):
274274
'truffleruby:JONI',
275275
],
276276
support_distributions=[
277-
'truffleruby:TRUFFLERUBY_GRAALVM_SUPPORT',
277+
'truffleruby:TRUFFLERUBY_GRAALVM_SUPPORT_PLATFORM_AGNOSTIC',
278+
'truffleruby:TRUFFLERUBY_GRAALVM_SUPPORT_PLATFORM_SPECIFIC',
278279
'truffleruby:TRUFFLERUBY_GRAALVM_SUPPORT_NO_NI_RESOURCES',
279280
],
280281
provided_executables=[
@@ -296,13 +297,13 @@ def verify_ci(args):
296297
launchers=['bin/<exe:ruby>', 'bin/<exe:truffleruby>'],
297298
jar_distributions=['truffleruby:TRUFFLERUBY-LAUNCHER'],
298299
main_class='org.truffleruby.launcher.RubyLauncher',
300+
# Set Xmx to use a reliable amount of memory and avoid swapping
299301
build_args=[
300-
'-J-Xmx6g', # Set Xmx to use a reliable amount of memory
302+
'-J-Xmx6g',
301303
'-H:+DetectUserDirectoriesInImageHeap',
302304
],
303-
build_args_enterprise=[
304-
'-J-Xmx7g', # Set Xmx to use a reliable amount of memory
305-
] + (['--gc=G1', '-H:-ProtectionKeys'] if (mx.get_os() == 'linux' and 'NATIVE_IMAGE_AUXILIARY_ENGINE_CACHE' not in os.environ) else []), # G1 is only supported on linux currently
305+
# G1 is only supported on linux currently
306+
build_args_enterprise=(['-J-Xmx8g', '--gc=G1', '-H:-ProtectionKeys'] if (mx.get_os() == 'linux' and 'NATIVE_IMAGE_AUXILIARY_ENGINE_CACHE' not in os.environ) else ['-J-Xmx7g']),
306307
language='ruby',
307308
option_vars=[
308309
'RUBYOPT',
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
# This file contains native-image arguments needed to build truffleruby
2-
#
32

43
Requires = language:nfi language:llvm language:regex
54

6-
Args = -H:MaxRuntimeCompileMethods=5400 \
7-
-H:+AddAllCharsets \
8-
--initialize-at-build-time=org.truffleruby,org.jcodings,org.joni,org.yarp
9-
105
JavaArgs = -Dpolyglot.image-build-time.PreinitializeContexts=ruby

0 commit comments

Comments
 (0)