Sorry, something went wrong.
|
Is this ready for review? If not, perhaps mark it as a "draft" for now. |
Sorry, something went wrong.
|
Looks promising. Will need some tests for the new output format. |
Sorry, something went wrong.
|
One problem is that some instructions are too long(like PRECALL_BUILTIN_FAST_WITH_KEYWORDS), do I need to increase _OPNAME_WIDTH def adaptive_test(a, b):
c = a + b
print(c.__class__)
Exec dis(adaptive_test): 30 0 RESUME 0
31 2 LOAD_FAST 0 (a)
4 LOAD_FAST 1 (b)
6 BINARY_OP 0 (+)
10 STORE_FAST 2 (c)
32 12 LOAD_GLOBAL 1 (NULL + print)
24 LOAD_FAST 2 (c)
26 LOAD_ATTR 1 (__class__)
36 PRECALL 1
40 CALL 1
50 POP_TOP
52 LOAD_CONST 0 (None)
54 RETURN_VALUE
Exec dis(adaptive_test, adaptive=True): 30 0 RESUME_QUICK 0
31 2 LOAD_FAST__LOAD_FAST 0 (a)
4 LOAD_FAST 1 (b)
6 BINARY_OP_ADD_INT 0 (+)
10 STORE_FAST 2 (c)
32 12 LOAD_GLOBAL_BUILTIN 1 (NULL + print)
24 LOAD_FAST 2 (c)
26 LOAD_ATTR_SLOT 1 (__class__)
36 PRECALL_BUILTIN_FAST_WITH_KEYWORDS 1
40 CALL_ADAPTIVE 1
50 POP_TOP
52 LOAD_CONST 0 (None)
54 RETURN_VALUE
|
Sorry, something went wrong.
|
Looks promising. Will need some tests for the new output format. Already add some test cases for quicken code in the dis. |
Sorry, something went wrong.
There was a problem hiding this comment.
Could you remove the changes to _testinternalcapi, so we don't need to export the _PyCode_Quicken function.
Sorry, something went wrong.
|
I have made the requested changes; please review again :) @markshannon @brandtbucher |
Sorry, something went wrong.
|
Thanks for making the requested changes! : please review the changes made to this pull request. |
Sorry, something went wrong.
|
On small typo, otherwise looks good. |
Sorry, something went wrong.
|
Thanks. :) |
Sorry, something went wrong.
|
Thanks for making the requested changes! : please review the changes made to this pull request. |
Sorry, something went wrong.
https://bugs.python.org/issue46841