Skip to content

Commit 1c4438f

Browse files
committed
[GR-17457] Ensure the host inlining test is run when it should
PullRequest: truffleruby/3919
2 parents 4dab7ea + 17e85f6 commit 1c4438f

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

ci.jsonnet

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,9 @@ local part_definitions = {
212212
"--extra-image-builder-argument=rubyvm:-H:+TruffleHostInliningPrintExplored",
213213
"--extra-image-builder-argument=rubyvm:-Dgraal.LogFile=host-inlining.txt",
214214
],
215+
environment+: {
216+
TRUFFLERUBY_HOST_INLINING_TEST: "1",
217+
},
215218
},
216219
},
217220

src/main/java/org/truffleruby/language/arguments/RubyArguments.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ public static MaterializedFrame getDeclarationFrame(MaterializedFrame frame, int
386386
assert level >= 0;
387387

388388
CompilerAsserts.partialEvaluationConstant(level);
389-
return level <= RubyBaseNode.MAX_EXPLODE_SIZE
389+
return (CompilerDirectives.inCompiledCode() && level <= RubyBaseNode.MAX_EXPLODE_SIZE)
390390
? getDeclarationFrameExplode(frame, level)
391391
: getDeclarationFrameLoop(frame, level);
392392
}

test/truffle/compiler/host-inlining.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ source test/truffle/common.sh.inc
44

55
file=${1:-host-inlining.txt}
66

7-
if [ -f "$file" ]; then
7+
if [ -n "$TRUFFLERUBY_HOST_INLINING_TEST" ]; then
88
# shellcheck disable=SC2016
99
ruby tool/extract_host_inlining.rb 'org.truffleruby.language.methods.CallForeignMethodNodeGen.execute' "$file" > out.txt
1010
# shellcheck disable=SC2016

0 commit comments

Comments
 (0)