; ifcalls.inc - interface call site constants (E06-S05). ; ; A call through an interface type knows the interface and the method at ; compile time, so it also knows the declaration slot: slot n is at ; table + IF_SLOT_SIZE*n (interfaces.inc). src/compiler/interfaces.s resolves ; that slot from the parser tables with iface_slot; the table pointer half of ; the fat reference is read at run time, so two classes answering the same ; slot reach different methods. ; ; A call site that cannot resolve a slot reports an error rather than emitting ; a call that would dispatch through whatever bytes sit at that offset. .ifndef IFCALLS_INC IFCALLS_INC = 1 IS_OK = 0 IS_ERR_METHOD = 1 ; the interface declares no such method .endif