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
b351394b6e
Getterify the rest of Expr.h.
...
Swift SVN r719
2011-09-20 00:18:57 +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
John McCall
02e47ed9ce
Privatize Expr's Ty and Kind members; introduce getters and setters.
...
Swift SVN r716
2011-09-19 22:00:20 +00:00
Chris Lattner
8eaddc1cda
AST support for floating point literals.
...
Swift SVN r707
2011-09-15 21:37:46 +00:00
Chris Lattner
77237852d2
implement a.x syntax for using elements of a protocol.
...
Swift SVN r704
2011-09-11 17:39:45 +00:00
Chris Lattner
da27a650ea
don't reallocate small vectors, just a cleanup.
...
Swift SVN r702
2011-09-09 05:19:08 +00:00
John McCall
37b07c8691
Add builtin bindings for a bunch of primitive LLVM instructions.
...
Swift SVN r698
2011-09-08 00:21:11 +00:00
John McCall
ad8081b02e
Remove the duplicate swift.swift by implementing import search paths.
...
Swift SVN r696
2011-09-07 00:30:20 +00:00
John McCall
97cb2cddd6
Add a comment explaining the trade-off behind using a single builtins
...
cache.
Swift SVN r694
2011-09-06 21:47:02 +00:00
John McCall
54ff2ccf4a
Lop the last word off ModuleDecl and TranslationUnitDecl.
...
Swift SVN r693
2011-09-06 21:43:46 +00:00
Chris Lattner
f2ae02a7b2
switch a couple of files to use AST.h umbrella header. Swift eagerly awaits clang modules...
...
Swift SVN r691
2011-09-06 07:01:03 +00:00
John McCall
1e89b0e274
Remove the __builtin type keywords and make the Builtin
...
module export those types.
Also, document the language changes I've been making in this area.
Swift SVN r688
2011-09-04 07:34:01 +00:00
John McCall
aaf8acee5e
Qualified lookup needs to be a different lookup kind so that
...
having a builtin module around doesn't contaminate unqualified
lookups.
Also, enable name binding in imported modules.
Swift SVN r687
2011-09-04 07:02:42 +00:00
John McCall
ccb2d4e98f
Framework for builtin lookup.
...
Swift SVN r685
2011-09-03 06:51:34 +00:00
John McCall
66b287d3b1
Slow module access down with pointless abstraction.
...
Swift SVN r684
2011-09-03 06:23:56 +00:00
John McCall
6ddc15143b
Support qualified names for types.
...
Swift SVN r683
2011-09-03 06:07:44 +00:00
John McCall
4a0f713e62
Progress towards a builtin module.
...
Swift SVN r682
2011-09-03 05:35:49 +00:00
Chris Lattner
0090c43b80
all members of a protocol have to be NamedDecl's, tighten up
...
typing. Various tidying up.
Swift SVN r678
2011-09-02 00:58:38 +00:00
Chris Lattner
a838f412f4
eliminate ProtocolFuncElementDecl, just use FuncDecl instead.
...
Swift SVN r668
2011-09-01 18:17:12 +00:00
Chris Lattner
70bbb65241
make ProtocolType a DeclContext, add AST and trivial sema support for
...
ProtocolFuncElementDecl, the first thing we will allow in a protocol.
Swift SVN r664
2011-08-31 23:31:42 +00:00
John McCall
6dfa91282d
'float' -> 'float32', 'double' -> 'float64'
...
Swift SVN r654
2011-08-31 19:57:52 +00:00
Chris Lattner
f9b024adb0
implement parser and AST support for trivial (empty) protocol types.
...
Swift SVN r652
2011-08-31 19:43:06 +00:00
John McCall
58b81c8da0
Add builtin float and double types.
...
Swift SVN r650
2011-08-31 18:43:22 +00:00
Chris Lattner
26dfa97027
better QOI for invalid arguments, produce:
...
error: unexpected diagnostic produced: error: operators must have one or two arguments
func %%%() {}
^
instead of:
error: unexpected diagnostic produced: error: operators must be declared 'infix_left'
func %%%() {}
^
Swift SVN r648
2011-08-31 00:52:13 +00:00
Chris Lattner
fd4aefa837
rename the infix attribute to infix_left.
...
Swift SVN r647
2011-08-31 00:32:15 +00:00
Chris Lattner
af4d36f463
Eliminate the 'unary' attribute, instead just know that operators
...
that take a single argument are unary. Move a bunch of semantic
checking of operators from the parser to TypeCheckDecl now that it
has a decent place to hold it.
Swift SVN r646
2011-08-31 00:13:57 +00:00
Chris Lattner
b00ad81340
remove dead prototype
...
Swift SVN r645
2011-08-30 23:36:12 +00:00
Chris Lattner
01ea4fc173
fix a fixme by using ErrorType to potentially improve e rror recovery
...
Swift SVN r644
2011-08-30 23:35:16 +00:00
Chris Lattner
dc257f951c
refactor decl checking logic into a DeclVisitor.
...
Swift SVN r643
2011-08-30 23:34:40 +00:00
Doug Gregor
63ca527a95
Introduce accessors into DeclVarName and eliminate direct mutation by
...
setting all fields on construction. Use this opportunity to save a
pointer of storage for every DeclVarName.
squeeze out a pointer's worth of storage
Swift SVN r639
2011-08-29 19:59:33 +00:00
Chris Lattner
dfa2e0719c
move decl type checking out to TypeCheckDecl.cpp
...
Swift SVN r635
2011-08-26 23:28:44 +00:00
Chris Lattner
c135a64d33
eliminate checkBody now that it is just an ugly wrapper around
...
typeCheckExpression. Change typeCheckExpression to mutate its
argument.
Swift SVN r634
2011-08-26 23:23:24 +00:00
Chris Lattner
e89a22ada9
now that typeCheckExpression is our main entry point for expr type checking,
...
have it do "completeness" checking (also fixing some regressions I introduced
along the way). Exprs are now modularly checked, woo!
Swift SVN r633
2011-08-26 20:57:02 +00:00
Chris Lattner
161b2c83d5
make typeCheckExpression take an optional "convert to type" which comes from context,
...
simplifying a bunch of code.
Swift SVN r632
2011-08-26 20:53:09 +00:00
Chris Lattner
a0a7c2ac36
fix the expression type checker to not recurse down into statements, resolving some type checking issues.
...
Swift SVN r631
2011-08-26 00:48:33 +00:00
Chris Lattner
d7c0076b2f
finish up sema of 'return', force converting the returned expression to the return type of the enclosing func.
...
Swift SVN r629
2011-08-26 00:24:35 +00:00
Chris Lattner
e0ce01906e
split type validation out to its own .cpp file.
...
Swift SVN r628
2011-08-26 00:11:24 +00:00
Chris Lattner
2020470195
rip statement checkout out of the expr checker, allowing us to
...
enable checking of top level var decls etc.
Swift SVN r625
2011-08-25 23:33:30 +00:00
Chris Lattner
cbd84c3f73
split statement type checking out to its own file, detangling some stuff from Expr checking.
...
More to be done.
Swift SVN r624
2011-08-25 19:58:04 +00:00
Chris Lattner
2711ad03c9
now that WalkOrder is in a common header, move the WalkStmt to be a
...
Stmt method, rename it to just 'walk' to follow the naming convention,
and give it an accurate doc comment for good measure.
Swift SVN r622
2011-08-25 18:24:54 +00:00
Chris Lattner
cb59d9c926
split the walkorder enum out to its own header file. This is a silly waste of
...
a file, but is needed to share it between two other heads. Header files seem
so baroque.
Swift SVN r621
2011-08-25 18:18:22 +00:00
Chris Lattner
26cee15cf3
Switch expr walking functionality to take blocks instead of function pointer + void*.
...
Swift SVN r602
2011-08-25 00:51:31 +00:00
Chris Lattner
ea63f11a7b
move expression type coercion out to TypeCheckCoercion,
...
and change terminology to follow that which is understood by
other people.
Swift SVN r590
2011-08-23 19:53:11 +00:00
Chris Lattner
43aae84ae5
pull SemaTupleExpr into the TypeChecker class.
...
Swift SVN r589
2011-08-23 19:48:37 +00:00
Chris Lattner
aae5e303c1
inline SemaDeclRefExpr into its only call site.
...
Swift SVN r588
2011-08-23 19:47:06 +00:00
Chris Lattner
dfbb6b1c91
move "bottom-up" type checking into TypeCheckExpr.cpp, and
...
change terminology to follow directionality that other people
find more natural.
Swift SVN r587
2011-08-23 19:45:31 +00:00
Chris Lattner
63cd4a9566
sketch out the new type checking organization.
...
Swift SVN r586
2011-08-23 19:20:22 +00:00