Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IR: Let primitive expressions take manifest arguments #572

Merged
merged 2 commits into from
Jul 17, 2019

Commits on Jul 15, 2019

  1. IR: Let primitive expressions take manifest arguments

    Triggered by the clean-up necessary post #560 I finally fixe something
    that bothered me a long time:
    
    The IR pretends that primitive values are first-class functions, but
    they are never compiled that way (and should not, and maybe even cannot,
    as in the case of `@serialize` with a lying polymorophic type), instead
    they _always_ have manifest arguments.
    
    So this gives `PrimE` an `exp list`.
    
    At this point, there is no fundamental difference anymore between an
    unary operation and a primitive with one argument. So unary and binary
    operations and relations become just one such primtive operations.
    This removes redundancy in IR-to-IR passes.
    
    There is currently an `OtherPrim` constructor that still takes a string.
    Eventually, this should disappear, replaced by an ADT of the actual
    prims we support, e.g. a `NumericConversion of (Type.prim, Type.prim)`
    constructor instead of the unstructured `"Int->Word32"` strings right
    now. This would also allow for a nicer backend, as common code is
    easiler shared between the many conversions.
    nomeata committed Jul 15, 2019
    Configuration menu
    Copy the full SHA
    8762595 View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2019

  1. Configuration menu
    Copy the full SHA
    85cc812 View commit details
    Browse the repository at this point in the history