summaryrefslogtreecommitdiff
path: root/parse/specialize.c
AgeCommit message (Collapse)Author
2019-04-12Rename traits correctly.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
2019-02-10Pass the type envs through properly in delayed unification.Ori Bernstein
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-17Fix init funcion symtab linkingOri Bernstein
2018-01-14Remove a global-global.Ori Bernstein
Now it's static.
2018-01-11Unify subst specs fully.Ori Bernstein
2018-01-11Fix how we bind types.Ori Bernstein
Now we accept most valid programs, and reject most invalid ones.
2017-11-05Accept the globalness of file.Ori Bernstein
2017-08-20Fix trait shit.Ori Bernstein
2017-07-15Wrap overlong line.Ori Bernstein
2017-07-15Remove unused extern var.Ori Bernstein
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-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-06-24Miscellaneous typo/formatting fixesMichael Forney
2017-06-19Functions are functions, even if you specialize them.Ori Bernstein
2016-12-25Fix openbsd compile warning.Ori Bernstein
2016-02-27Fix up type generation a bit.Ori Bernstein
2016-02-22Extract util functions into separate dir from parse/Ori Bernstein
2016-02-07Generic iterators now seem to work.Ori Bernstein
2016-02-06Don't use a null pointer when printing error.Ori Bernstein
2016-02-06Work towards generic iterables.Ori Bernstein
Keep track of base types.
2016-02-06Type matches for named types are on the args.Ori Bernstein
2016-02-01Copy traits over for Tyname when specializing.Ori Bernstein
We were missing trait copying, which was causing some cases for generic trait implementations to fail.
2016-02-01Don't duplicate type variables.Ori Bernstein
These should unify across generics.
2016-01-31Fix typos.Ori Bernstein
2016-01-31Check array sizes in type goodness evaluation.Ori Bernstein
2016-01-31Add support for generic impls.Ori Bernstein
You can now implement generic shit like iterators.
2016-01-30Fix recursive types. Again.Ori Bernstein
This code does 2 things: 1) It compares on TID. This shouldn't matter much. 2) It resolves the type in the substitution map. This prevents us from returning the wrong type.
2016-01-29Unify more eagerly.Ori Bernstein
2016-01-29Use a stack of substitution maps.Ori Bernstein
It sucks that I need it.
2016-01-29Clean up type inference a bit.Ori Bernstein
2016-01-24Just fully replace the type in the specialization.Ori Bernstein
Nothing is going to care, and this fixes the problem of handlign more specialization post unification.
2016-01-24Fix recursive types nested inside generics.Ori Bernstein
2016-01-01Fix style.Ori Bernstein
2015-12-15Improve trait error messages.Ori Bernstein
2015-12-14Initial support for void as an expression.Ori Bernstein
2015-11-17MEGAPATCH: Tabification.Ori Bernstein
Tabs > spaces. By 4 spaces, to be precise. Let's use them.
2015-10-01Don't double-insert namespaces.Ori Bernstein
updatens() was changed at some point to register the namespace. We don't need to put it in again after we call it, and in fact, we crash if we do.
2015-09-26Make things that should be global global.Ori Bernstein
2015-09-26Fix up constant initialization a bit.Ori Bernstein
2015-09-24Put the closure at the function level.Ori Bernstein
2015-09-15Allow 'var' in loop statements.Ori Bernstein
2015-07-24Replace snprintf with a variant that asserts when out of buffer.Ori Bernstein
Let's not happy silent truncate.
2015-07-18Don't create duplicate types if we have no parameters.Ori Bernstein
2015-07-12Loop patterns are patterns.Ori Bernstein
As a result, we need to push the scope where the variable is declared. Let's do that.
2015-07-09Refactor namespaces.Ori Bernstein
We no longer store subnamespaces in the stab node; now they're a part of the file.
2015-06-26Mark visibility correctly on init funcs.Ori Bernstein