summaryrefslogtreecommitdiff
path: root/parse/use.c
AgeCommit message (Collapse)Author
2020-03-28Fix typo: s/intializer/initializer/ghenesy
2019-05-08Revert "Tag types on import."Ori Bernstein
This reverts commit a3bce47d15d25fc3bca79ee50fca3fd4df538d5b.
2019-05-07Tag types on import.Ori Bernstein
Fixes missing tagged types.
2019-03-14Get a bit better at wrangling type bindings.Ori Bernstein
2019-02-26Accept that `file` isn't a node.Ori Bernstein
Shrink node sizes, simplify code a bit.
2019-02-26Add support for `__fini__` functions.Ori Bernstein
2018-01-21Cheap enums.Quentin Carbonneaux
2018-01-17Hack in seqaux.Ori Bernstein
It's not perfect, and the right solution would be to keep a trait->aux mapping, but for now it works good enough.
2018-01-17Infer after generating init functions.Ori Bernstein
Pull out the usefile loading, so we can call it separately from inference. Then shuffle the infer() call to after we generate init().
2018-01-14Fix serializing trait specs in usefiles.Ori Bernstein
2017-11-14Rename comparable => equatableOri Bernstein
2017-11-05Accept the globalness of file.Ori Bernstein
2017-10-29Fix traits when exported cross-namespaces.Ori Bernstein
2017-10-21Don't bungle trait merging and exporting.Ori Bernstein
2017-10-19If we haven't installed the proto, use the one we have.Ori Bernstein
2017-10-18Look up the proto before attaching the gimpls.Ori Bernstein
This means we don't lose the gimpls when they come from a file other than the one they're implemented in.
2017-08-22Clean up usefile cruft.Ori Bernstein
2017-08-20Fix a few bugs.Ori Bernstein
2017-08-20Fix trait shit.Ori Bernstein
2017-08-07Failing to load a usefile isn't a crash.Ori Bernstein
Exit with a sane message.
2017-07-29Eliminate the deduptab.Ori Bernstein
tydedup does the job.
2017-07-15Type binding refactoring now compiles.Ori Bernstein
Still a bit sloppy on a few things, needs some dedup work, but it's working.
2017-07-12Add support for -O in 6m.Ori Bernstein
First step to not polluting source dirs.
2017-07-09Style(9)-ify.Ori Bernstein
2017-07-03Specialize impl declarations on impl type in addition to decl typeMichael Forney
This allows multiple specializations of a declarations with a concrete type, which can be selected with the new impl expression if it can't be deduced by its type alone. For example trait hasname @t = Name: byte[:] ;; impl hasname void = Name = "somename" ;; impl hasname bool = Name = "othername" ;; const boolname = impl(Name, void) To do this, pass the param type through to genericname and specializedcl. Since we now need the type parameter to look up trait decls, make sure n->expr.param gets the necessary treatment in typesub, specializenode, pickle, and unpickle. We also need to tag the param types for export.
2017-07-03Write trait IDs instead of indices in typickleMichael Forney
If trait prototypes are used and merged with the actual trait, there may be entries in the trait table which have an ID corresponding to some other entry. When pickling types, write the trait ID instead of the index since the trait definitions are written with their IDs. Otherwise, we may end up reading types referring to non-existent traits, resulting in an error like Unable to find trait for id 7 Also, only pickle traits whose index matches its ID to avoid duplicates.
2017-07-03Fix indentationMichael Forney
2017-06-28Remove unused memb from Trait and rename funcs -> protoMichael Forney
These are prototype declarations that must be implemented by the impl (not necessarily functions), so proto seems like a better name.
2017-06-18For consistency, lfree should be paired with lappend.Ori Bernstein
2017-06-18Track typefix and traitfix in single arraysMichael Forney
2017-06-18Only need to free typefixdest onceMichael Forney
2017-06-18Prevent traitfixtype from getting out of syncMichael Forney
These arrays are always appended to at the same time, and fixtraitmappings relies on their indices corresponding. Previously, only traitfixdest and traitfixid were cleared at the end of fixtraitmappings, causing traits to get added to incorrect types.
2017-04-21Dedup conflicting use statements.Ori Bernstein
2017-03-09Put ucons into the right namespace.Ori Bernstein
Transitive includes used to go into the wrong place sometimes.
2017-02-17Search for usefiles relative to the output.Ori Bernstein
For most uses, this is equivalent to compiler cwd, but supports out of tree builds better. It also means that builds behave the same way regardless of the directory that the compiler is run from, which is convenient for testing. This also drops support for `.use` suffixes on local uses.
2017-01-14Unfuck cross module traits a bit.Ori Bernstein
Mildly tested.
2016-07-12Revert "don't completely fuck up trait exports."Ori Bernstein
This reverts commit bc82e05805d51c1f58cd2e0f9b3ba098522b8ad9.
2016-07-12don't completely fuck up trait exports.Ori Bernstein
2016-05-13Switch to using lib{}.use.Ori Bernstein
Does 3 things; 1) Teaches the compiler about how to load libfoo.use, falling back to 'foo' 2) teaches muse how to generate packages named 'pkg' in fille 'libthing.use' 3) teaches mbld how to look up and resolve libfoo.use named usefiles. Eventually a fallback will be implemented.
2016-03-03Handle hiding of traits correctly.Ori Bernstein
2016-03-02Allow importing multiple instances of a trait.Ori Bernstein
Hidden imports ftw.
2016-02-27Fix up type generation a bit.Ori Bernstein
2016-02-22Extract util functions into separate dir from parse/Ori Bernstein
2016-02-07Don't double init generic impls.Ori Bernstein
It's possible for a generic to be serialized twice. If we've already added an impl for a type, don't double it.
2016-02-07Generic iterators now seem to work.Ori Bernstein
2016-01-31Add support for generic impls.Ori Bernstein
You can now implement generic shit like iterators.
2016-01-23Make '.use' suffix on usefiles optional.Ori Bernstein
2016-01-23Print search path on failing to load usefile.Ori Bernstein
2016-01-23Improve error message if we fail to open a usefile.Ori Bernstein
2016-01-01Fix style.Ori Bernstein