1. A computer-implemented method comprising: parsing source code; identifying, in the source code, a declaration comprising an object reference and a handler function; identifying, in the source code, a statement de-referencing the referenced object; and generating machine code representative of the statement, the machine code comprising: an instruction to copy an offset associated with the de-referencing to a register corresponding to the handler function input; an instruction to call the handler function; and an instruction to copy a memory address from a register corresponding to the handler function output.