Skip to content

Commit 011b77a

Browse files
committed
fix BytecodeSizeEstimator
1 parent 63f87c8 commit 011b77a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/perlonjava/astvisitor/BytecodeSizeEstimator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,8 @@ public void visit(TernaryOperatorNode node) {
229229

230230
@Override
231231
public void visit(SubroutineNode node) {
232-
// Mirror EmitSubroutine.emitSubroutine() patterns
233-
if (node.block != null) node.block.accept(this);
232+
// Subroutine body is not part of the current block
233+
// if (node.block != null) node.block.accept(this);
234234
estimatedSize += OBJECT_CREATION + METHOD_CALL_OVERHEAD; // Subroutine creation
235235
}
236236

0 commit comments

Comments
 (0)