Skip to content

Commit 4557050

Browse files
committed
optimization - migrate from INVOKEINTERFACE to INVOKEVIRTUAL
1 parent 910f27a commit 4557050

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/org/perlonjava/codegen/EmitterMethodCreator.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,8 @@ public static byte[] getBytecode(EmitterContext ctx, Node ast, boolean useTryCat
277277
// Teardown local variables and environment after the method execution
278278
Local.localTeardown(localRecord, mv);
279279

280-
// XXX - See EmitLiteral and ReturnTypeVisitor for optimization, replacing INVOKEINTERFACE with INVOKEVIRTUAL
281280
// Transform the value in the stack to RuntimeList
282-
mv.visitMethodInsn(Opcodes.INVOKEINTERFACE, "org/perlonjava/runtime/RuntimeDataProvider", "getList", "()Lorg/perlonjava/runtime/RuntimeList;", true);
281+
mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "org/perlonjava/runtime/RuntimeBaseEntity", "getList", "()Lorg/perlonjava/runtime/RuntimeList;", false);
283282

284283
mv.visitInsn(Opcodes.ARETURN); // Returns an Object
285284
mv.visitMaxs(0, 0); // Automatically computed

0 commit comments

Comments
 (0)