Author BTaskaya
Recipients BTaskaya, Mark.Shannon
Date 2021-06-04.16:33:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1622824398.73.0.627770754352.issue44313@roundup.psfhosted.org>
In-reply-to
Content
import foo
def func():
    return foo.bar()

The snippet above will generate the following code;

  2           0 LOAD_GLOBAL              0 (foo)
              2 LOAD_METHOD              1 (bar)
              4 CALL_METHOD              0
              6 RETURN_VALUE

Though this will make things harder for specializing the LOAD_ATTR for modules since now the handling of LOAD_METHOD for that case is necessary so for the imports that we can infer during the symbol analysis pass, we'll generate LOAD_ATTR+CALL_ATTR instead of LOAD_METHOD+CALL_METHOD and hopefully the generated code will get specialized via the PEP 659.

Ref: https://github.com/faster-cpython/ideas/issues/55#issuecomment-853101039
History
Date User Action Args
2021-06-04 16:33:18BTaskayasetrecipients: + BTaskaya, Mark.Shannon
2021-06-04 16:33:18BTaskayasetmessageid: <1622824398.73.0.627770754352.issue44313@roundup.psfhosted.org>
2021-06-04 16:33:18BTaskayalinkissue44313 messages
2021-06-04 16:33:18BTaskayacreate