Skip to content

Reducing recursive data structures #519

@mtshiba

Description

@mtshiba

Describe the code issue?

There are a number of recursive data structures used inside the Erg compiler, such as Type::{And, Or} and Predicate::{And, Or}. These are potential sources of stack overflow when large, as well as poor performance, and should be replaced with non-recursive structures. These structures have no ordering, so they should be replaced with something like Type::Or(Set<Type>). This replacement may not be difficult, but would require extensive changes.

Additional context

No response

Erg version

0.6.42

Python version

None

OS

None

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions