guard access to the Builtin module (on one path), reducing the number
of ways non-stdlib and non-sil files have access to the builtin module.
Swift SVN r5767
library. We use the same (somewhat broken heuristics), they are
just implemented in another way.
The major functionality change is that previously, .sil files would
auto import "swift" if they started with a non-sil decl. Now they
never do.
Swift SVN r5731
Instead of reusing a fixed-size buffer, which causes problems when error messages refer back to previous inputs and corrupts AST references in *LiteralExpr that point back into source buffers, allocate each REPL input into its own buffer with its own SourceMgr entry. Fixes <rdar://problem/13387167>, crashes when using :dump_ast on expressions containing integer/float literal expr nodes, and hopefully sporadic buildbot failures running the Interpreter/repl test.
Swift SVN r5470
Original message:
SIL Parsing: add plumbing to know when we're parsing a .sil file
Enhance the lexer to lex "sil" as a keyword in sil mode.
Swift SVN r4988
logic in Sema (previously, some of it was in tools/Swift/Frontend.cpp) and eliminates
redundancy between expr and pattern printing. This also eliminates most of the invalid
ASTs that the repl was producing (there is still one left).
This commit reenables the disabled REPL testcase from my last big change.
Swift SVN r4622
Unfortunately, this regresses the repl when expressions like (1,2) are entered. This is because the repl is violating some invariants (forming dags out of ASTs, making ASDAG's which upset the type checker). I'm going to fix this next, but can't bring myself to do it in the same commit.
Swift SVN r4617
1) This now works: swift -o foo.o *.swift
2) Errors/warnings are now correct: ".../OutputStream.swift:331:10:"
NOTES:
1) The name of the module is now inferred from -o when available.
2) I had to workaround a unexpected IRGen crash with '&&' in Slice.swift. Weird.
3) "Assemble" is now the default, not "GenerateLL".
4) 'import swift' still requires the 'cat *.swift > swift.swift' hack.
NEXT STEP:
Make 'clang -o foo *.swift' and 'clang -o foo.dylib *.swift' just work.
Swift SVN r4572
Package up some useful REPL context into a header-able REPLContext class. Move the response metavar index there instead of having it as a gross mutable static variable.
Swift SVN r4203
If a REPL input parses to an expression, bind it to the next available variable 'r<n>', and print the result as if it were a name binding. Don't bind a variable if the expression consists of a lone DeclRef, and don't print the binding if it has void type.
Swift SVN r4201
This patch makes it so we substitute 'main' instead of warning. Eventually
we probably want to make this an error in library mode and a pedantic
warning in script mode.
Swift SVN r3516
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
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