Commit Graph

368 Commits

Author SHA1 Message Date
John McCall
e66c13cfe7 Change the 'walk' APIs to use virtual function dispatch
instead .
1,2d
1i
Change the 'walk' APIs to use virtual dispatch instead of
blocks.  This makes it much easier to thread information
through the API, as well to extend the API to handle
recursive visiting of other structures (e.g., Decls
and Patterns).



Swift SVN r1101
2012-01-26 04:31:38 +00:00
Chris Lattner
212b56afec actually, the ASTStage should be on Translation unit. There can be multiple modules in a context and they can all be in different phases of translation.
Swift SVN r902
2011-12-06 00:51:56 +00:00
Chris Lattner
eaa6fcb12a move prototype for the verifier into Subsystems.
Swift SVN r901
2011-12-06 00:34:16 +00:00
Chris Lattner
02c9d9a3f1 Make the AST "phase" part of ASTContext, this is generally useful for assertions.
Swift SVN r900
2011-12-06 00:32:00 +00:00
Chris Lattner
d9c15ebb9a make ExtensionDecl be a DeclContext, install members into it properly.
Swift SVN r896
2011-12-05 23:22:04 +00:00
John McCall
32736ea2ab Rename hasSingleElement to isTransparentType to better
capture what's being tested.  This also makes IR gen
correctly avoid a discriminator for a non-transparent
single-element oneof.



Swift SVN r887
2011-11-18 01:17:53 +00:00
John McCall
b700f171a2 More getters.
Swift SVN r886
2011-11-18 01:10:03 +00:00
John McCall
de3c3ff04d Build an implicit expression to record the conversion
of a oneof to its underlying type.  Much better.



Swift SVN r881
2011-11-17 11:38:05 +00:00
John McCall
1a948e25a1 We also make TupleElementExprs for trivial oneofs.
Swift SVN r879
2011-11-17 10:18:15 +00:00
John McCall
28f27b25d7 Move the source-range checking out to somewhere that runs
unconditionally so that we don't need to handle delegation
in the checkers just to preserve the standard checks.

Verify the invariants of a TupleElementExpr.



Swift SVN r874
2011-11-17 09:30:00 +00:00
John McCall
91b0675c60 Improve the source-range verifier by introducing layering
violations.  Yay, layering violations!



Swift SVN r871
2011-11-17 05:04:37 +00:00
Doug Gregor
8c8e8f646b Introduce a verifier that ensures that the source range of an expression or statement covers the source ranges of its children. Encountered the bugs addressed in my previous commit.
Swift SVN r862
2011-11-10 17:27:01 +00:00
Doug Gregor
55f635a0c0 Introduce an additional "context" parameter to the expression and
statement walk callback functions, where we can stash additional
information without breaking all of the callers. 

At present, the only information in the context is the parent
statement or expression.


Swift SVN r860
2011-11-10 17:02:43 +00:00
Doug Gregor
2e49b79617 Rename WalkOrder.h to Walk.h, and introduce typedefs for the function
types of the expression and statement walker into it, so we don't end
up typing the same darned things over and over again.


Swift SVN r859
2011-11-10 16:36:56 +00:00
Chris Lattner
3c43cae8b4 now that types can get their astcontext, remove some pointless argument passing.
Swift SVN r757
2011-10-18 23:25:42 +00:00
John McCall
3603e5bab7 Punt on verification if there's an error in the translation unit.
This will be required until there's some sort of error marking
in the AST, at which point that marking will just turn off
shouldVerify for that subtree.



Swift SVN r732
2011-09-24 09:45:02 +00:00
John McCall
709177e000 Simplify adding new verifications by stage. Add a
verification of assignment statements.



Swift SVN r730
2011-09-24 09:28:42 +00:00
John McCall
5fddb24ddc Basic verifier framework.
Swift SVN r728
2011-09-23 23:50:02 +00:00