This repository has been archived by the owner on Jan 24, 2024. It is now read-only.
[Compat][3.11] gen KW_NAMES
when call breakgraph, enable test_constant_graph.py
#375
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
3.11 在发生
CALL
子图打断的时候,除去当前模拟栈、相关 Variable,还会依赖KW_NAMES
注册的call_shape
,因此如果生成的代码里不包含KW_NAMES
是会认为是不含 kwargs 的调用,大概率就会发生段错误,因此KW_NAMES
是需要恢复到生成的字节码里的原来
KW_NAMES
的模拟执行会提前将call_shape
设回 None,导致发生打断时其总是 None,因此调整为CALL
完成后才设回 None