Message395099
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 |
|
Date |
User |
Action |
Args |
2021-06-04 16:33:18 | BTaskaya | set | recipients:
+ BTaskaya, Mark.Shannon |
2021-06-04 16:33:18 | BTaskaya | set | messageid: <1622824398.73.0.627770754352.issue44313@roundup.psfhosted.org> |
2021-06-04 16:33:18 | BTaskaya | link | issue44313 messages |
2021-06-04 16:33:18 | BTaskaya | create | |
|