dylanmckay / compiler Goto Github PK
View Code? Open in Web Editor NEWA [not-really-working] compiler from the ground-up
License: MIT License
A [not-really-working] compiler from the ground-up
License: MIT License
Inside each reference value we store a copy of the type of the pointee.
This means that if we change the type of the pointed-to value, such as global, the types will be inconsistent.
ty()
should probably take a ir::Module
.
We parse ret
but print it as ret void
.
A decision needs to be made.
We tend to clone every type when returning them.
We should return references which can then be cloned at the callers discretion.
The label for the entry basic block for a function should default to entry
if not specified.
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.
Currently we begin parsing something like a function, we
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.
See the FIXME
in deba52d. The MergeVirtRegs
adjustment was created solely for this purpose.
Many things implement util::Identifiable
, defining Identifiable::get_id
but still define Self::id()
methods. This is unnecessary.
Rename the filenames of the reference values.
They are currently like functionref.rs
, when they should be function_ref.rs
.
lookup(...)
should return an Option
whereas find(..)
should simply unwrap the value of lookup
with a nice assertion message.
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 with
set %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.
We currently manually implement Identifiable
for all the reference values, and implement Into<Expression>
for all values.
This should be split into macros to reduce duplication.
It may be a bit more readable.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.