Skip to content

Commit 1189173

Browse files
optimize_cfg has been fixed
1 parent f170cc0 commit 1189173

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

web/driver.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -331,10 +331,7 @@ def view_pseudo(code: str, *, optimize: bool = False) -> dict[str, Any]:
331331
co_consts = _merge_co_consts(
332332
_co_consts_from_metadata(metadata), _compiled_co_consts(code)
333333
)
334-
# On some newer WASM builds (e.g. CPython 3.15 snapshots), optimize_cfg can
335-
# trap at runtime with low-level wasm errors. Prefer a stable pseudo view
336-
# there instead of crashing the whole worker process.
337-
if optimize and sys.version_info < (3, 15):
334+
if optimize:
338335
insts = optimize_cfg(insts, co_consts, 0)
339336
items = _instruction_items(insts)
340337
adjusted_consts = _apply_annotations_const_workaround(items, co_consts)

0 commit comments

Comments
 (0)