Git Product home page Git Product logo

compiler's People

Contributors

dylanmckay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

compiler's Issues

CoerceValue adjustments don't go past individual nodes

When a pattern match results in a Adjustment::CoerceValue adjustment, the only node that is adjusted is the root node (see Adjustment::apply_to).

When doing this adjustment, we will almost always have to do this to surrounding nodes in the function as well.

Create a resolution item before parsing the item itself in the IR resolver

Currently we begin parsing something like a function, we

  • Parse the function
  • Read the subvalues and blocks
  • Create the function, add it to the resolver and the module

This suffers from the fact that if a value in the function refers to the function itself, it will then need to be marked as an UnresolvedRef and be resolved later.

This could be sped up by creating a resolve::Item before parsing subvalues, so that they would already know about the function.

Remove duplicate `get_id` methods

Many things implement util::Identifiable, defining Identifiable::get_id but still define Self::id() methods. This is unnecessary.

Come up with mechanism for loading arguments into registers

Currently something like this fails

fn @add_8_reg_imm(%foo: i8) {
  %a = add %foo, i8 5
  %b = add %a, i8 5
  ret
}

Because %a = add %foo, i8 5 get cannonicalised to set %a, (add %foo, i8 5).

Because AVR requires that the LHS and the destination are the same, %a is coerced into %foo, so we're left withset %foo, (add %foo, i8 5)`. This doesn't work because the register allocator doesn't know how to replace these argument references with active registers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.