Commit Graph

21434 Commits

Author SHA1 Message Date
Joe Groff
f5bfb870c5 Make -sil-irgen default for stdlib too.
Everything seems to work now.

Swift SVN r4755
2013-04-16 02:56:11 +00:00
Joe Groff
76331b2391 Make -sil-irgen default everywhere (except libs).
Everything can compile and run with SILGen now, but there are a handful of crashing tests when linking against a stdlib built with SIL, so make SWIFT_SIL_IRGEN a CMake option and disable it by default for now. Also tag the IRGen tests with -no-sil-irgen so that I don't have to rewrite their CHECK: lines right now.

Swift SVN r4749
2013-04-16 00:46:59 +00:00
Dave Zarzycki
90f8078ce2 Compile multiple files as one translation unit
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
2013-04-02 08:10:59 +00:00
Dave Abrahams
3f6a40b648 Add swift-level argv access
Swift SVN r4566
2013-04-01 22:47:25 +00:00
Joe Groff
4366f258cf Makefiles: Fix a race in creating lib/swift.
The rules in runtime/Makefile create a lib/swift symlink without a dependency on
lib/swift, but the library rules all create a real directory, creating a race
between making the symlink and making the directory and breaking the build if
the latter wins. Make a formal rule for lib/swift that creates a symlink, and
update all the .dir dependencies on the directory to instead depend on the
symlink.



Swift SVN r4537
2013-03-29 16:33:22 +00:00
Doug Gregor
599d761891 Remove "-constraint-checker" everywhere, since it is now the default.
Swift SVN r4301
2013-03-06 06:38:40 +00:00
Dave Zarzycki
2d8719ac75 Unbreak 'make' on OSX 10.9
Swift SVN r4179
2013-02-25 02:11:37 +00:00
Joe Groff
d78d95b861 stdlib: Add a 'replExit' hook.
In the repl, if a replExit function is defined, call it when the repl is exiting. In the stdlib, add an atREPLExit function that pushes replExit handlers onto a vector and a replExit function that invokes those handlers. In swiftAppKit, have REPLApplicationMain use atREPLExit to terminate the application when the REPL is exited.

Swift SVN r4132
2013-02-21 20:50:15 +00:00
Dave Zarzycki
33b9f245e2 Cleanup: Move Range logic out of Enumeration
Next up: make a generic Range<T> and Series<T> once we can tiptoe around the constraint checker...

Swift SVN r3764
2013-01-15 19:14:55 +00:00
Dave Zarzycki
9232d330c1 Add formal Word and UWord types
These types are meant as _implementation_ details for classes/structs to
save space on 32-bit machines. "Int" is still the one true integer type
between classes/structs.

Use a build system hack to get Word/UWord to be 32 bits in size on
32-bit targets.

Swift SVN r3755
2013-01-12 01:46:21 +00:00
Chris Lattner
7f0663fe6c didn't mean to commit this.
Swift SVN r3690
2013-01-05 00:39:25 +00:00
Chris Lattner
c378beb606 Fix rdar://12951176 - rejecting */, instead of parsing it as an operator.
Swift SVN r3687
2013-01-04 23:21:56 +00:00
Dave Zarzycki
480c1b8f5e Split Char and StringByte out of String.swift
Swift SVN r3678
2013-01-04 17:54:38 +00:00
Dave Zarzycki
c205840079 Add Float16 and Float128 but only typecheck them
Swift SVN r3672
2013-01-04 06:26:15 +00:00
Dave Zarzycki
2ed2aaa3f5 Add Float80 and limit it to x86/x86_64 with a build system hack
Swift SVN r3671
2013-01-04 06:26:13 +00:00
Dave Zarzycki
33076b5b38 Split FloatingPoint.swift into Float32.swift and Float64.swift
Swift SVN r3670
2013-01-04 06:26:11 +00:00
Dave Zarzycki
ef7c502b33 Move policy out of Misc.swift into Policy.swift
Also, until the typechecker improves, be paranoid and concat the Policy
file upfront at build time.

Swift SVN r3649
2013-01-02 22:48:21 +00:00
Dave Zarzycki
ba7f0b0f2c Enable '==' and '!=' for class references
This may not be how we want to implement class equality checks in the
long run, but in the short term this is _very_ handy. See also:
<rdar://problem/12939898> ER: formalize root classes

This also removes support for greater-than/less-than on Vectors, which
makes no sense given that this has everything to do with the randomness
of the memory allocator and nothing intrinsic about Vectors or class
references in general.

Swift SVN r3628
2012-12-31 01:43:58 +00:00
Doug Gregor
d2c40eeccd Move the ObjCBool type into the 'objc' module.
Swift SVN r3533
2012-12-18 22:06:48 +00:00
Dave Zarzycki
c825debf2f Cleanup Enumeration
I tried to transform getEnumeratorType() into a VarDecl, but IRGen hasn't implement this feature yet.

Swift SVN r3527
2012-12-18 02:12:19 +00:00
Doug Gregor
97ea8e66c3 Split the Objective-C types in the standard library into a separate file.
Eventually, the Objective-C types will move to a separate Objective-C
support layer. For now, they sit in the standard library.


Swift SVN r3463
2012-12-13 00:22:28 +00:00
Dave Zarzycki
36fc6a0c27 Make assert() work correctly in debug and release builds respectively
Yay for build system hacks! And thank you Doug for proposing this
instead of my original CPP hack...

Swift SVN r3446
2012-12-12 16:24:44 +00:00
Doug Gregor
3f9b2d0aab Add missing CTypes.swift, since I accidentally committed its use.
Swift SVN r3327
2012-12-03 15:35:34 +00:00
Doug Gregor
a79f61a4a7 Add missing #include to fix compilation with mainline Clang
Swift SVN r3326
2012-12-03 15:34:03 +00:00
Dave Zarzycki
5e7b9928fd Move Range out of Misc.swift into Range.swift
Swift SVN r3299
2012-11-29 21:51:26 +00:00
Dave Zarzycki
ac4ddce56d Move CString out and extend
Swift SVN r3296
2012-11-29 19:33:54 +00:00
Dave Zarzycki
25e83e44b6 Move Slice<T> and UnsafePointer<T> out of Misc.swift
Swift SVN r3294
2012-11-29 19:33:40 +00:00
Dave Zarzycki
fa5c235bff Move crude input shims to InputStream.swift
We need to replace and flush input streaming later with genuine parsing.

Swift SVN r3170
2012-11-13 22:52:00 +00:00
Dave Zarzycki
5e485a91f1 Move I/O logic out of Misc.swift
Also remove contentious [US]{8,16,32,64,128} types

Swift SVN r3169
2012-11-13 22:36:44 +00:00
Dave Zarzycki
e9d2c11710 Workaround lack of modules: fake 'errno'
Swift SVN r3162
2012-11-13 00:24:08 +00:00
Dave Zarzycki
79d61845de Crude filesystem directory support
Swift SVN r3078
2012-10-28 22:11:41 +00:00
Dave Zarzycki
7e8a16a69e Workaround 12202655 -- Rework type resolution
Swift SVN r3070
2012-10-26 18:21:40 +00:00
Dave Zarzycki
18ec3de9f9 Partition POSIX shims and/or API
Swift SVN r3063
2012-10-26 04:31:21 +00:00
Dave Zarzycki
4d8739f083 Accept limitations of LLVM build system
1) Move the low-level runtime code into swift/runtime
2) Move the high-level "standard library" code into swift/stdlib

The key difference is that the 'runtime' contains language support logic
(like retain/release logic) that the compiler assumes to always exist
and may assume intimate details about the implementation. This library
will have intimate knowledge of the swift ABI.

In contrast, the 'stdlib' can be completely rewritten and the
language/compiler make little if any assumptions about it. It is
expected to reexport fundamental types and operators, and implement
fundamental policies (precedence, implicit conversions, etc).

Swift SVN r3045
2012-10-23 21:33:52 +00:00