CSC448: OO Languages: Java/C# [4/12] | ![]() ![]() ![]() |
==================================================== Increasing expense: - static call (invokestatic, invokespecial) - virtual call (invokevirtual) (use vtable to look up function) - interface call (invokeinterface) (use itable to look up function) (Return with areturn, ireturn or return, depending on type of return value) Itable is just a vtable for an interface. Object points to single vtable. Object point to collection of itables. Compiler may reduce interface call to virtual (know upper bound on class) Compiler may reduce virtual call to static (know exact class) ====================================================