Skip to content

nil values takes up space #808

@msullivan

Description

@msullivan

Right now we represent the () type as a one bit integer. () shouldn't take up any space.

In theory we should be able to use an empty llvm struct type, but there are some issues that come up.

Making that change doesn't actually just work. Compiling with optimization, LLVM decides that assigning () to a local is undefined behavior because we do a zero length memset to an invalid address.

Compiling without optimization, we crash in some of the hashtable drop glue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea: Code generationI-slowIssue: Problems and improvements with respect to performance of generated code.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions