Don't make redundant copies of the DFA (#2763)

This commit is contained in:
Batuhan Taskaya 2022-01-14 05:01:44 +03:00 committed by GitHub
parent 799f76f537
commit 7a29568115
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,7 +54,7 @@ def stack_copy(
stack: List[Tuple[DFAS, int, RawNode]]
) -> List[Tuple[DFAS, int, RawNode]]:
"""Nodeless stack copy."""
return [(copy.deepcopy(dfa), label, DUMMY_NODE) for dfa, label, _ in stack]
return [(dfa, label, DUMMY_NODE) for dfa, label, _ in stack]
class Recorder: