lang: unification: Improve type unification algorithm

The simple type unification algorithm suffered from some serious
performance and memory problems when used with certain code bases. This
adds some crucial optimizations that improve performance drastically.
This commit is contained in:
James Shubin
2019-04-23 20:31:29 -04:00
parent 97d60ac98d
commit d70bbfb5d0
17 changed files with 770 additions and 27 deletions

View File

@@ -32,6 +32,7 @@ import (
// often since we usually know which kind of node we want.
type Node interface {
Apply(fn func(Node) error) error
//Parent() Node // TODO: should we implement this?
}
// Stmt represents a statement node in the language. A stmt could be a resource,