Chris Lattner
f1db6de509
remove the :: token and DCE UnresolvedScopedIdentifierExpr.
...
Swift SVN r1043
2012-01-14 07:00:45 +00:00
Chris Lattner
9d10d231ea
implement support for normal lookup to find module names, and build a
...
ModuleExpr of the right type to represent it. Not tested yet, because
nothing can handle module exprs.
Swift SVN r1041
2012-01-14 06:41:33 +00:00
Chris Lattner
ed47f92c85
remove the ability for a::b to resolve a member 'b' in type 'a'. It now
...
just works for module references like Builtin::int32.
Swift SVN r1028
2012-01-12 21:54:32 +00:00
John McCall
59bed696a5
Introduce a ParenExpr to represent the special case of
...
a tuple with one element and no labels. This form is
treated specially in essentially every case, so it might
as well be its own expression kind.
Swift SVN r1021
2012-01-12 19:55:06 +00:00
John McCall
0138e451a1
Look through extension decls here, too. It's not clear to me why
...
we can't just the normal walker for this top-level walking.
Swift SVN r985
2011-12-23 02:36:14 +00:00
John McCall
6b935588e5
On second thought, components need to be known in the AST.
...
Swift SVN r918
2011-12-07 03:57:41 +00:00
Chris Lattner
a1b7419a36
remove support for looking up global names with dot syntax. "x.y" != "y(x)" now.
...
Swift SVN r917
2011-12-07 00:59:09 +00:00
Chris Lattner
5da9f8ade2
add TinyPtrVector to LLVM.h
...
Swift SVN r905
2011-12-06 01:46:23 +00:00
Chris Lattner
32b248b7e3
[gs]etterize various members of Module, and make them check the invariants they depend on.
...
Swift SVN r903
2011-12-06 01:02:09 +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
John McCall
d716f82984
Getterize ValueDecl.
...
Swift SVN r885
2011-11-18 01:04:12 +00:00
John McCall
9079154ded
Getterize TypeAliasDecl.
...
Swift SVN r884
2011-11-18 00:48:14 +00:00
John McCall
50fb0d63f6
More incremental getterization.
...
.w
Swift SVN r883
2011-11-18 00:29:15 +00:00
John McCall
d74f17259c
Incremental getterization of Decl.h.
...
Swift SVN r882
2011-11-18 00:17:20 +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
cd7a21de83
Introduce support for adding source ranges to diagnostics.
...
We don't yet properly perform the SourceRange -> llvm::SMRange mapping.
Swift SVN r847
2011-11-09 17:53:30 +00:00
Chris Lattner
9e9f421f1a
getAliasType() doesn't need an ASTContext argument anymore.
...
Swift SVN r816
2011-11-01 18:37:05 +00:00
Chris Lattner
d2ed4c2f3f
remove some unneeded ASTContext arguments from subsystem entrypoints
...
now that it is reachable from TU
Swift SVN r815
2011-11-01 18:33:48 +00:00
Chris Lattner
2dcaed352b
tidy up
...
Swift SVN r812
2011-11-01 06:47:50 +00:00
Chris Lattner
164ab0ffee
move lookupTypeName out to Module::lookupGlobalType and have it look in the current
...
module as well for consistency.
Swift SVN r811
2011-11-01 06:27:24 +00:00
Chris Lattner
e0a18996cd
move lookupGlobalValue into Module, making it accessable to all of sema.
...
Swift SVN r810
2011-11-01 06:22:44 +00:00
Chris Lattner
5d8d0fd2f6
Have the name binder publish the list of imported modules into the TranslationUnit,
...
making it a real part of the AST. Also, rework TUModuleCache to do its computation
when it is constructed, instead of trying in each query.
Swift SVN r809
2011-11-01 06:19:36 +00:00
Chris Lattner
1f42ec4679
rename method for consistency.
...
Swift SVN r808
2011-11-01 06:01:45 +00:00
Chris Lattner
623de6cefc
now that ModuleProvider is gone, we can match against the module name
...
instead of the access path. Tracking just the access path in the
imports list greatly simplifies all of the client and means that we
don't have to create a bogus ImportDecl for the builtin module just
to make name lookup work.
Swift SVN r807
2011-11-01 05:40:55 +00:00
Chris Lattner
17fd6242fc
now that Module's have their own cache of name lookup info... including the current
...
module we're working on, eliminate the cloned version of the value lookup code
from NameBinder.
Swift SVN r806
2011-11-01 05:36:57 +00:00
Chris Lattner
69fb3842fc
give name binder the translation unit it is binding.
...
Swift SVN r805
2011-11-01 05:34:18 +00:00
Chris Lattner
dd63b23985
strength reduce.
...
Swift SVN r804
2011-11-01 05:25:54 +00:00
Chris Lattner
e3b53c3b15
move the module-level name lookup stuff out of NameBinding.cpp into the
...
Module class. Add a new Module.cpp file to implement this (along with
the existing caching strategy, if you're curious). This eliminates the
parallel 'ModuleProvider' heirarchy.
Swift SVN r802
2011-11-01 05:19:35 +00:00
Chris Lattner
4933a27098
clean up lookupType/lookupValue to only take an AccessPath instead of an import decl.
...
Strip of the module name implicit in the access path.
Swift SVN r801
2011-11-01 04:43:51 +00:00
Chris Lattner
2ea1e72890
merge two copies of the same predicate into a helper method.
...
Swift SVN r800
2011-11-01 04:30:25 +00:00
Chris Lattner
0ca79b1075
rename ASTContext::BuiltinModule -> TheBuiltinModule for consistency with
...
the other ASTContext members.
Swift SVN r799
2011-11-01 04:18:23 +00:00
Chris Lattner
8e1c6c8ac6
flatten ModuleKind discriminator into DeclContext's one. Now Module is an
...
abstract class and we have an actual AST-level concept of the builtin module.
Swift SVN r798
2011-11-01 04:07:57 +00:00
Chris Lattner
db0fd341de
inline addBuiltinImport.
...
Swift SVN r796
2011-11-01 03:47:06 +00:00
Chris Lattner
e6e58d1390
Have NameBinder ctor set up the implicit import for the builtin
...
module. Heap allocate it for consistency.
Swift SVN r795
2011-11-01 03:46:01 +00:00
Chris Lattner
75e558af9d
rearrange code to group class declaration and implementation together.
...
Swift SVN r794
2011-11-01 03:32:01 +00:00
Chris Lattner
9298082ebb
move Diagnostics header to include/swift/AST to match .cpp files.
...
Swift SVN r782
2011-10-22 00:47:35 +00:00
Chris Lattner
dfd529ce3a
rename diags::foo to diag::foo
...
Swift SVN r779
2011-10-22 00:36:19 +00:00
Chris Lattner
d36e080d5f
switch name binding to the new diagnostics stuffola
...
Swift SVN r771
2011-10-21 23:00:34 +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
Chris Lattner
3d168c4cdc
make sure Type aliases in the builtin module get a declcontext.
...
Swift SVN r754
2011-10-18 22:01:53 +00:00
Chris Lattner
a7c7d64fa0
Switch swift to use SourceLoc instead of SMLoc.
...
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
2011-10-18 01:22:29 +00:00
Chris Lattner
2d43b8812f
update for mainline API changes.
...
Swift SVN r745
2011-10-16 06:17:27 +00:00
John McCall
6b27921ce3
Propagate around l-value-ness. There aren't any interesting invariants
...
here yet.
Swift SVN r740
2011-09-27 23:46:08 +00:00
John McCall
b6f312aea0
Verification should clearly follow each phase rather than coming
...
at the start of the next phase.
Swift SVN r731
2011-09-24 09:32:18 +00:00
John McCall
5fddb24ddc
Basic verifier framework.
...
Swift SVN r728
2011-09-23 23:50:02 +00:00
John McCall
b2facdae4b
Getterize Stmt.h.
...
Swift SVN r720
2011-09-20 07:07:53 +00:00
John McCall
802262a7da
More incremental getterization.
...
Swift SVN r718
2011-09-19 23:37:21 +00:00
John McCall
7a259f4bad
Differentiate between the starting location and caret location of
...
an expression. More incremental getterization.
Swift SVN r717
2011-09-19 22:45:58 +00:00