CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[SOT] Catch BreakGraphError
when extend ListVariable
with RangeVariable
#67591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SOT] Catch BreakGraphError
when extend ListVariable
with RangeVariable
#67591
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
@@ -1056,7 +1056,8 @@ def build_seq_unpack(self, instr: Instruction): | |||
|
|||
retval = [] | |||
for item in unpack_values: | |||
assert isinstance(item, (TupleVariable, ListVariable)) | |||
if isinstance(item, (TupleVariable, ListVariable)): | |||
BreakGraphError(f"{type(item)} not support unpack") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
你确定不是 not isinstance 才 BreakGraph?
而且 BreakGraph 的 raise 呢?
@@ -1561,6 +1563,7 @@ def MAP_ADD(self, instr: Instruction): | |||
self.stack.peek[instr.arg], key, value | |||
) | |||
|
|||
@call_break_graph_decorator(push_n=1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
确定会 push 一个元素么?我看咋好像没有 push
@@ -1077,6 +1078,7 @@ def BUILD_TUPLE_UNPACK_WITH_CALL(self, instr: Instruction): | |||
def BUILD_TUPLE_UNPACK(self, instr: Instruction): | |||
self.build_seq_unpack(instr) | |||
|
|||
@call_break_graph_decorator(push_n=1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果这里加,那么所有用了 self.build_seq_unpack(instr)
的都应该加
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
本 PR 先不修改这里,会引发打断
下个 PR 优化打断后再修改
ListVariable
unpack RangeVariable
BreakGraphError
when extend ListVariable
with RangeVariable
…unpack_range # Conflicts: # test/sot/test_04_list.py
Co-authored-by: Nyakku Shigure <sigure.qaq@gmail.com>
@@ -1071,12 +1072,15 @@ def build_seq_unpack(self, instr: Instruction): | |||
) | |||
) | |||
|
|||
@call_break_graph_decorator(push_n=0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个 push 是 0 吗?不是往栈上 push 了一个吗?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Category
Execute Infrastructure
PR Types
Performance
Description
修复
b2124e7
(#67344) 遇到的问题在下一阶段支持
list.extend(list, range | list | dict)