Skip to content

Commit 17e85f6

Browse files
committed
Fold one branch in RubyArguments.getDeclarationFrame() for host inlining
* 4503 -> 4412 for org.truffleruby.language.dispatch.RubyCallNode.execute * 106 + 202 -> 106 + 106: INLINE org.truffleruby.language.arguments.RubyArguments.getDeclarationFrame(Frame, int) cost 106 INLINE org.truffleruby.language.arguments.RubyArguments.getDeclarationFrame(MaterializedFrame, int) cost 202 After: INLINE org.truffleruby.language.arguments.RubyArguments.getDeclarationFrame(Frame, int) cost 106 INLINE org.truffleruby.language.arguments.RubyArguments.getDeclarationFrame(MaterializedFrame, int) cost 106
1 parent 62df85d commit 17e85f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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
}

0 commit comments

Comments
 (0)