mirror of
https://github.com/python/cpython.git
synced 2025-08-02 08:02:56 +00:00
compiler: Merge except_table and cnotab (GH-31614)
This commit is contained in:
parent
422fdb3717
commit
df9f759755
1 changed files with 6 additions and 0 deletions
|
@ -8272,6 +8272,9 @@ assemble(struct compiler *c, int addNone)
|
||||||
if (_PyBytes_Resize(&a.a_except_table, a.a_except_table_off) < 0) {
|
if (_PyBytes_Resize(&a.a_except_table, a.a_except_table_off) < 0) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
if (!merge_const_one(c, &a.a_except_table)) {
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
if (!assemble_start_line_range(&a)) {
|
if (!assemble_start_line_range(&a)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -8293,6 +8296,9 @@ assemble(struct compiler *c, int addNone)
|
||||||
if (_PyBytes_Resize(&a.a_cnotab, a.a_cnotab_off) < 0) {
|
if (_PyBytes_Resize(&a.a_cnotab, a.a_cnotab_off) < 0) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
if (!merge_const_one(c, &a.a_cnotab)) {
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
if (_PyBytes_Resize(&a.a_bytecode, a.a_offset * sizeof(_Py_CODEUNIT)) < 0) {
|
if (_PyBytes_Resize(&a.a_bytecode, a.a_offset * sizeof(_Py_CODEUNIT)) < 0) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue