ObjAsm
Search…
⌃K

Method Binding

ObjAsm supports “Early Binding” and “Late Binding”. These terms, used widely in the OOP jargon, refer on when and how the method execution addresses are resolved.
“Early Binding” refers to methodology in which the addresses are resolved on compile-time. The method invocation is directly done using the shortest and fastest way.
“Late Binding” refers to the methodology in which the addresses are resolved at run-time using tables called “Virtual Method Tables”. First, the execution address is read from the table and then the invocation is done in the same way as using early bound methods. Late bound methods are more flexible since they can be manipulated over the Method tables but at a small cost that is the few instructions needed to read those tables.
Virtual, Dynamic and Interface methods are late bounded. Only Static methods are early bounded. That means that the binding type is selected when the object layout is designed.
The binding type does not affect inheritance and parenthood relations, but special care has to be taken since some polymorphic attributes are not preserved. Only late bound methods can be considered for polymorphic purposes.