You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The tier 2 optimizer specification (optimizer_bytecodes.c) contains lots of boilerplate for handling contradictions and running out of space in the optimizer's data structures.
These can be handled but setting flags on the optimizer context and checking those in the abstract interpreter loop.
For example OUT_OF_SPACE_IF_NULL(res = sym_new_unknown(ctx)); can be replaced with res = sym_new_unknown(ctx)
and
if (!sym_set_type(right, &PyUnicode_Type)) {
goto hit_bottom;
}
can be replaced with sym_set_type(left, &PyUnicode_Type);
Hopefully this will make the optimizer a bit more approachable and maintainable
The tier 2 optimizer specification (optimizer_bytecodes.c) contains lots of boilerplate for handling contradictions and running out of space in the optimizer's data structures.
These can be handled but setting flags on the optimizer context and checking those in the abstract interpreter loop.
For example
OUT_OF_SPACE_IF_NULL(res = sym_new_unknown(ctx));
can be replaced withres = sym_new_unknown(ctx)
and
can be replaced with
sym_set_type(left, &PyUnicode_Type);
Hopefully this will make the optimizer a bit more approachable and maintainable
Linked PRs
The text was updated successfully, but these errors were encountered: