Skip to content

Commit 10125d4

Browse files
committed
[GR-18411] Address "The limit expression has no effect." Truffle warnings and migrate to --compiler options
PullRequest: truffleruby/3914
2 parents 1c4438f + 40c4db3 commit 10125d4

35 files changed

+129
-165
lines changed

ci/common.jsonnet

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ local common_json = import "../common.json";
121121

122122
graalnodejs:: {
123123
packages+: if self.os == "linux" then {
124-
"00:devtoolset": "==7",
124+
"00:devtoolset": "==11",
125125
cmake: "==3.22.2",
126126
} else {},
127127
},
@@ -141,11 +141,8 @@ local common_json = import "../common.json";
141141
"*.log",
142142
],
143143

144-
packages+: if self.os == "linux" && self.arch == "amd64" then {
145-
"00:devtoolset": "==7",
146-
"01:binutils": ">=2.34",
147-
} else if self.os == "linux" && self.arch == "aarch64" then {
148-
"00:devtoolset": "==7",
144+
packages+: if self.os == "linux" && std.objectHas(self, "os_distro") && self.os_distro == "ol" then {
145+
"00:devtoolset": "==11",
149146
} else {},
150147
},
151148
},
@@ -239,6 +236,12 @@ local common_json = import "../common.json";
239236
mount_modules: true,
240237
},
241238
},
239+
local ubuntu22 = {
240+
docker: {
241+
image: "buildslave_ubuntu22",
242+
mount_modules: true,
243+
},
244+
},
242245
local deps_linux = {
243246
},
244247
local deps_darwin = {
@@ -255,6 +258,7 @@ local common_json = import "../common.json";
255258
local aarch64 = { arch:: "aarch64", capabilities+: [self.arch] },
256259

257260
linux_amd64: linux + amd64 + ol7,
261+
linux_amd64_ubuntu: linux + amd64 + ubuntu22,
258262
linux_aarch64: linux + aarch64,
259263

260264
darwin_amd64: darwin + amd64,

common.json

Lines changed: 1 addition & 1 deletion
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.29.0",
7+
"mx_version": "6.34.0",
88

99
"COMMENT.jdks": "When adding or removing JDKs keep in sync with JDKs in ci/common.jsonnet",
1010
"jdks": {

mx.truffleruby/env_files.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Here is how the various env files relate to each other:
44
* `jvm-ce-ntl`: + native toolchain launchers
55
* `jvm-ce-libgraal`: + libgraal
66
* `native`: + librubyvm
7-
* `jvm-ee`: + Oracle GraalVM Compiler
7+
* `jvm-ee`: + Oracle GraalVM Compiler & Oracle GraalVM Truffle
88
* `jvm-ee-ntl`: + native toolchain launchers
99
* `jvm-ee-libgraal`: + libgraal
1010
* `native-ee`: + librubyvm

mx.truffleruby/jvm-ee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
GRAALVM_SKIP_ARCHIVE=true
22
DYNAMIC_IMPORTS=/tools,/graal-enterprise
3-
COMPONENTS=TruffleRuby,suite:tools,GraalVM enterprise compiler
3+
COMPONENTS=TruffleRuby,suite:tools,GraalVM enterprise compiler,Truffle enterprise

mx.truffleruby/jvm-ee-libgraal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
GRAALVM_SKIP_ARCHIVE=true
22
DYNAMIC_IMPORTS=/tools,/graal-enterprise,/substratevm-enterprise
3-
COMPONENTS=TruffleRuby,suite:tools,GraalVM enterprise compiler,SubstrateVM Enterprise,LibGraal Enterprise
3+
COMPONENTS=TruffleRuby,suite:tools,GraalVM enterprise compiler,Truffle enterprise,SubstrateVM Enterprise,LibGraal Enterprise
44
NATIVE_IMAGES=suite:sulong,lib:jvmcicompiler

mx.truffleruby/jvm-ee-ntl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
GRAALVM_SKIP_ARCHIVE=true
22
DYNAMIC_IMPORTS=/tools,/graal-enterprise,/substratevm-enterprise
3-
COMPONENTS=TruffleRuby,suite:tools,GraalVM enterprise compiler,SubstrateVM Enterprise
3+
COMPONENTS=TruffleRuby,suite:tools,GraalVM enterprise compiler,Truffle enterprise,SubstrateVM Enterprise
44
NATIVE_IMAGES=suite:sulong

mx.truffleruby/native-ee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
GRAALVM_SKIP_ARCHIVE=true
22
DYNAMIC_IMPORTS=/tools,/graal-enterprise,/substratevm-enterprise
3-
COMPONENTS=TruffleRuby,suite:tools,GraalVM enterprise compiler,SubstrateVM Enterprise
3+
COMPONENTS=TruffleRuby,suite:tools,GraalVM enterprise compiler,Truffle enterprise,SubstrateVM Enterprise
44
NATIVE_IMAGES=suite:sulong,lib:rubyvm
55
EXTRA_IMAGE_BUILDER_ARGUMENTS=rubyvm:-H:BuildOutputJSONFile=native-image-build-rubyvm.json rubyvm:-H:+AuxiliaryEngineCache rubyvm:-H:ReservedAuxiliaryImageBytes=1073741824
66
# To also create the standalone

mx.truffleruby/native-ee-g1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
GRAALVM_SKIP_ARCHIVE=true
22
DYNAMIC_IMPORTS=/tools,/graal-enterprise,/substratevm-enterprise,substratevm-enterprise-gcs
3-
COMPONENTS=TruffleRuby,suite:tools,GraalVM enterprise compiler,SubstrateVM Enterprise,SubstrateVM Enterprise GC
3+
COMPONENTS=TruffleRuby,suite:tools,GraalVM enterprise compiler,Truffle enterprise,SubstrateVM Enterprise,SubstrateVM Enterprise GC
44
NATIVE_IMAGES=suite:sulong,lib:rubyvm
55
EXTRA_IMAGE_BUILDER_ARGUMENTS=rubyvm:-H:BuildOutputJSONFile=native-image-build-rubyvm.json rubyvm:-H:+UseG1GC
66
# To also create the standalone

mx.truffleruby/suite.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{
88
"name": "regex",
99
"subdir": True,
10-
"version": "9aad6f0e2b71078b7438beb4f517955b3ca013e2",
10+
"version": "dd2391474d1671e8790d79c6ab7004c2a1d601bb",
1111
"urls": [
1212
{"url": "https://github.com/oracle/graal.git", "kind": "git"},
1313
{"url": "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind": "binary"},
@@ -16,7 +16,7 @@
1616
{
1717
"name": "sulong",
1818
"subdir": True,
19-
"version": "9aad6f0e2b71078b7438beb4f517955b3ca013e2",
19+
"version": "dd2391474d1671e8790d79c6ab7004c2a1d601bb",
2020
"urls": [
2121
{"url": "https://github.com/oracle/graal.git", "kind": "git"},
2222
{"url": "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind": "binary"},

src/main/java/org/truffleruby/cext/CExtNodes.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1970,7 +1970,7 @@ protected static Object typesCached(VirtualFrame frame, Object format,
19701970
return cachedTypes;
19711971
}
19721972

1973-
@Specialization(guards = "libFormat.isRubyString(format)", limit = "1")
1973+
@Specialization(guards = "libFormat.isRubyString(format)")
19741974
protected RubyArray typesUncached(VirtualFrame frame, Object format,
19751975
@Cached @Shared RubyStringLibrary libFormat) {
19761976
return compileArgTypes(libFormat.getTString(format), libFormat.getEncoding(format), byteArrayNode);
@@ -2021,9 +2021,7 @@ protected static RubyString formatCached(Object format, Object stringReader, Rub
20212021
return finishFormat(node, cachedFormatLength, result, resizeProfile, fromByteArrayNode);
20222022
}
20232023

2024-
@Specialization(
2025-
guards = "libFormat.isRubyString(format)",
2026-
replaces = "formatCached", limit = "1")
2024+
@Specialization(guards = "libFormat.isRubyString(format)", replaces = "formatCached")
20272025
protected RubyString formatUncached(Object format, Object stringReader, RubyArray argArray,
20282026
@Cached IndirectCallNode formatNode,
20292027
@Cached @Shared InlinedBranchProfile exceptionProfile,

0 commit comments

Comments
 (0)