This adds builtin types Builtin.VecNxT, where N is a natural number
and T is a builtin type, which map down to the LLVM type <N x T>.
Update varous builtins to support vector arguments, e.g., binary
operations, comparisons, negation. Add InsertElement and
ExtractElement builtins for vectors.
On top of these builtins, add Vec4f and Vec4b structs to the standard
library, which provide 4xFloat and 4xBool vectors, respectively, with
basic support for arithmetic. These are mostly straw men, to be burned
down at our leisure.
Some issues as yet unresolved:
- Comparisons of Vec4f'ss are producing bogus Vec4b's, which I
haven't tracked down yet.
- We still don't support the shuffle builtin, although it should be
easy
- More testing!
Swift SVN r5820
of swift vs builtin module (moving towards rdar://11187080). When
swift ultimately has "project files", this bit will come from there,
until then it is best to come from the command line.
Swift SVN r5739
This is needed to ensure that the objects are not deallocated when they are
passed as UnsafePointers to C APIs.
Also clean up our String <-> CString <-> UnsafePointer<UInt8> conversion
routines. Clean up all users and refactor users poking into CString's
internals whenever possible.
Swift SVN r5656
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
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
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
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
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
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