their ASTContext without bloating everything. Basically, now instead of having
a canonical type point to itself when canonical, it points to the ASTContext
when canonical. This means that Canonical types always have direct access to
their context and non-canonical ones just indirect through the canonical type
pointer to get to it (so it's two jumps away) by using a PointerUnion.
This should make type manipulation more straight-forward.
While we're at it, we actually memoize type canonicalization. Before we
forgot to remember the result in the canonical type pointer in Type.
Swift SVN r755
Also use the new getAdvancedLoc() method instead of hacking
on SMLoc directly.
Also fix the warning/note/error methods to forward through ASTContext
instead of being replicated everywhere.
Swift SVN r750
diagnostics over to it.
There are a few differences between this diagnostic engine and Clang's
engine:
- Diagnostics are specified by a .def file (Diagnostics.def), rather
than via tblgen, which drastically simplifies the build and makes
code completion work when you add a new diagnostic.
- Calls to the "diagnose()" method are safely typed based on the
argument types specified in the .def file, so it's harder to write a
diagnostic whose expected arguments (in the string) and whose actual
arguments (in the code) don't match.
- It uses variadic templates, so it hangs with the cool kids.
Swift SVN r734
have two different ways to represent the same thing. This has the pleasant bonus that stuff
crashes when you do things with unresolved types.
Swift SVN r513
types off of ASTContext onto the types themselves. This
never made sense for clang, and makes the same amount of sense
for swift. Start with function types.
Swift SVN r425
Highlights of this include:
1) most of SemaExpr is gone now, when parsing, all expressions are assigned null types.
2) the introduction of a new TypeChecking pass, which assigns types to expressions, and checks their constraints.
3) ElementRefDecl now properly stores an access path for what it is accessing, and ElementRefDecl's get added to the AST.
4) The parser is much much simpler for expressions now, it just collects lists of primary exprs into SequenceExprs unconditionally.
5) This means that formation of binary expressions, function application etc is now done by TypeChecking. This is actually simpler, though admittedly surprising.
6) This introduces a new -parse-dump mode which just parses but does not perform name binding or type checking.
I've been working on this for a while and it is still quite broken: it still doesn't handle anondecls at all, doesn't perform conversion checking for default tuple elements, has missing pieces of varname name binding etc. However, there is no reason to not crash land it now, it's not like I'm going to break anyone else.
Swift SVN r262