Chris Lattner
70028d1ab8
implement conversions from arithmetic types to Strings. Fix integer promotions to
...
be sign extend instead of zext since they are signed types.
Swift SVN r1554
2012-04-23 00:24:28 +00:00
Chris Lattner
cd8f3e257d
add some sqrt implementations, to be used by the demo.
...
Swift SVN r1553
2012-04-22 23:51:40 +00:00
Chris Lattner
1403d0a9ba
implement print(String) in swift.
...
Swift SVN r1547
2012-04-21 21:44:14 +00:00
Chris Lattner
ab0b5e8b5c
- Add integer <-> integer conversion functions for Int32 and Int64.
...
- add a top level abort() method.
- add an assert() implementation
- Add a "Char" typedef for Int32, switch printChar to use it.
- Add a method to String to extract an element out of it (currently named
getElement, to be named [] eventually)
- Implement String.replPrint in terms of string operations.
Swift SVN r1545
2012-04-21 21:36:28 +00:00
Chris Lattner
ea84f6ebd5
add a new UnsafePointerInt8 type, use it to implement String.size in swift instead of in C++.
...
Swift SVN r1544
2012-04-21 21:16:46 +00:00
Chris Lattner
c7922be1e5
on entering the repl, print a welcome message to stderr when it isatty().
...
Also, have the repl auto-indent the continuation prompt according to the # braces we're in.
Swift SVN r1542
2012-04-21 21:03:28 +00:00
Eli Friedman
a2c6150c13
Error recovery for the REPL. Seems to be working reasonably well. <rdar://problem/11269380>.
...
Swift SVN r1523
2012-04-20 01:14:39 +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
d6a92095f9
Make the REPL handle unbalanced braces, so multi-line function definitions work. <rdar://problem/11269371>.
...
Swift SVN r1514
2012-04-19 22:54:24 +00:00
Eli Friedman
4848072285
Add a hack which makes us run the initializers for "true" and "false" in script mode and REPL mode. <rdar://problem/11256886>
...
Swift SVN r1494
2012-04-19 19:04:28 +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
dd17ba6324
A few minor bugfixes for REPL.
...
Swift SVN r1477
2012-04-18 21:49:27 +00:00
Howard Hinnant
77bcc0f9b6
Primative + operator for String
...
Swift SVN r1473
2012-04-18 17:24:26 +00:00
Chris Lattner
f136b16cb3
eliminate gratuitous lambda that crashes Xcode 4.3 clang.
...
Swift SVN r1456
2012-04-18 03:53:46 +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
Howard Hinnant
8528c79819
Rename types to first-letter-upper-case try #2 . The test suite is now passing for me.
...
Swift SVN r1447
2012-04-17 01:27:23 +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
Eli Friedman
6348a5a372
A bit of minor hacking to get print("hello") working.
...
Swift SVN r1355
2012-04-10 02:06:33 +00:00
Eli Friedman
22b7cd05f5
Some minor incremental improvements for module import. Allow explicitly importing Builtin, and implicitly import swift for any module which doesn't explicitly import Builtin or swift. Fixes <rdar://problem/11185519>.
...
Swift SVN r1323
2012-04-04 21:56:40 +00:00
Eli Friedman
15bc5df608
Rename Interpret* to immediate mode, which should be a bit more intuitive.
...
Swift SVN r1322
2012-04-04 20:47:21 +00:00