• Damien George's avatar
    py: Add LOAD_SUPER_METHOD bytecode to allow heap-free super meth calls. · dd11af20
    Damien George authored
    This patch allows the following code to run without allocating on the heap:
    Before this patch such a call would allocate a super object on the heap and
    then load the foo method and call it right away.  The super object is only
    needed to perform the lookup of the method and not needed after that.  This
    patch makes an optimisation to allocate the super object on the C stack and
    discard it right after use.
    Changes in code size due to this patch are:
       bare-arm: +128
        minimal: +232
       unix x64: +416
    unix nanbox: +364
         stmhal: +184
        esp8266: +340
         cc3200: +128