Commit Graph

9 Commits

Author SHA1 Message Date
Doug Gregor
42b1ab6fbd Introduce a LangOptions class to capture various type-checker-tweaking flags. For now, introduce bits to enable the constraint solver and to enable debugging of the constraint solver, and use those to eliminate the "useConstraintSolver" bit that was threaded through too much of the type checker.
Swift SVN r2836
2012-09-12 20:19:33 +00:00
Doug Gregor
81d8f27bde When dumping constraints via TypeChecker::typeCheckExpression(), don't
rely at all on the existing type checker. Instead, just fold sequence
expressions (which are effectively a delayed parsing phase) and then
hand off the expression to the constraint solver.

Allows us to type-check expressions with operators, e.g., f + 1.


Swift SVN r2793
2012-08-27 18:33:20 +00:00
Doug Gregor
0d7afbe5e0 Introduce an almost completely untested implementation of constraint
generation from an expression that has not been type-checked. One can
see the constraints introduced by an expression by using

  :dump_constraints <expression>

within the REPL. We're still missing several major pieces of
constraint generation:
  - We don't yet "open up" references to polymorphic types
  - We don't print out the child constraint systems in the dump, so
  it's not at all obvious what happens within overloading (and I'm not
  convinced I like my representation anyway)
  - There are no tests whatsoever
  - Member constraints are still very, very weird



Swift SVN r2624
2012-08-13 22:59:41 +00:00
Eli Friedman
837fdf04fb Always type-check immediately after a line is finished in the REPL. This isn't quite the same as how script mode works at the moment, but apparently it's way too confusing to delay type-checking errors. <rdar://problem/11296808>
Swift SVN r1572
2012-04-23 23:53:28 +00:00
Eli Friedman
be602fcd05 Get rid of the implicit BraceStmt for the TranslationUnit; instead, have the TranslationUnit directly store a list of decls.
Swift SVN r1521
2012-04-20 00:17:13 +00:00
Eli Friedman
acc17d69aa Initial implementation of the "print" part of the REPL.
Swift SVN r1484
2012-04-19 01:13:37 +00:00
Eli Friedman
cf10f0096e Make the REPL allow mutually recursive functions spread across multiple lines, like we do in script mode.
Swift SVN r1453
2012-04-18 01:20:38 +00:00
Eli Friedman
dc213bca76 Implement basic REPL under swift -repl. Known demo-blockers: need error recovery, need better brace/paren handling, need to implement the "print" part of REPL.
Swift SVN r1452
2012-04-18 00:52:11 +00:00
Eli Friedman
37de44a35d Implement changes to parsing/sema/etc so that we can implement a REPL and the main module parses the same way as a REPL.
Next step: implement an actual REPL.



Swift SVN r1441
2012-04-16 23:52:01 +00:00