Skip to content

Indirect Type Rows #2022

@andrew4328

Description

@andrew4328

Rows like this are problematic. Direct types expand exponentially with more and more levels of internal types.

Instead we need to take type cases like this and make them indirect. This could be automatic, or an annotation, but it needs to be relatively easy and at least have a lint step to identify them.

type AST = Typedef { location: SourceLocation, lhs-type: Type, implies: Vector<Type>, implements: Vector<Type>,
                    size: Type, alias: Type, opaque-alias: Type, cases: Vector<(CString,Vector<(CString,Type)>)>,
                    misc-type: Type, implied-phi: Type };

This makes the AST type become hundreds of bytes per instance no matter whether or not it is actually a Typedef.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions