Dave Abrahams
0d34c37048
[stdlib] FixedPoint.gyb/.swift: factor out more of the boilerplate repetition
...
Swift SVN r7805
2013-08-30 22:07:14 +00:00
Dave Zarzycki
d1e19306c0
Email feedback from DaveA
...
Swift SVN r7784
2013-08-30 17:07:05 +00:00
Dave Zarzycki
32c305949a
'-=' is valid on both signed/unsigned types
...
Also, make the output easier to review output "tables" of operators.
Swift SVN r7780
2013-08-30 16:28:33 +00:00
Dave Zarzycki
2da92327c4
Adopt [transparent] in a bunch of places
...
Swift SVN r7779
2013-08-30 16:28:13 +00:00
Dave Abrahams
930f786725
[stdlib] Add regeneration instructions to FixedPoint.swift
...
Swift SVN r7761
2013-08-29 23:00:52 +00:00
Dave Abrahams
40d3f9e022
[stdlib] Add "gyb" templating engine; use it to generate FixedPoint.swift
...
Eventually gyb should be integrated with the build system, but for now
we are only using it to generate one Swift file.
Swift SVN r7759
2013-08-29 22:57:09 +00:00
John McCall
6de3df22c2
Define _getBool purely in swift.
...
Swift SVN r7738
2013-08-29 20:34:34 +00:00
Jordan Rose
e1f346b342
Update comment for print_double to mention that NaNs don't need ".0" either.
...
Swift SVN r7655
2013-08-28 00:21:12 +00:00
Jordan Rose
9b42f8f81f
Don't append ".0" to "inf" and "-inf".
...
We may want a prettier representation of floating-point infinities, but
"inf.0" is a particularly bad one.
Swift SVN r7638
2013-08-27 22:41:01 +00:00
Jordan Rose
45fba0438f
Autoconf build: add missing source file to swiftObjectiveC library.
...
Swift SVN r7592
2013-08-26 21:05:37 +00:00
Jordan Rose
3e992a64fa
Use -module-link-name to encode library names in standard library modules.
...
...which allows us to drop the hardcoded logic to load specific libraries
in immediate modes.
Swift SVN r7585
2013-08-26 18:57:50 +00:00
Jordan Rose
940d53c864
Fix definition of "nil": it has to be null, not a default-initialized NSObject.
...
This ended up being easiest with a runtime function. I couldn't push this
into the standard library because the standard library doesn't know about
NSObject, and I couldn't compile the ObjectiveC module as -parse-stdlib
because it uses standard library types and doesn't otherwise know how to
find the "swift" module.
Swift SVN r7581
2013-08-26 18:57:45 +00:00
Chris Lattner
087b035414
Refactor assign lowering out to a helper function.
...
Make sure that all assigns are lowered by the memory promotion pass, even those
that don't refer to a box. These are always assignments, not initializations.
Swift SVN r7543
2013-08-23 23:36:30 +00:00
Joe Groff
46fd1c91b3
IRGen: Emit metadata and value witness tables for nongeneric unions.
...
And remove the hokey hardcoded metadata for Bool from the runtime.
Swift SVN r7541
2013-08-23 23:09:26 +00:00
Chris Lattner
d4a0c16baa
revert my r7505 patch to 'assign'. It turns out that changing
...
assign in this way doesn't actually make things simpler, and the
former model for assign is simpler to work with.
Swift SVN r7537
2013-08-23 22:40:56 +00:00
Chris Lattner
f6a5c78df2
Per John's advice (a few weeks ago), rework the 'assign' instruction
...
to being a semantic assign. The functional difference here is only
for unowned pointers, where now the conversion from strong to unowned
is implicit in the assign.
The logic behind this is that 'assign' is really part of SILGen, that
is only moved later to make it easier to make it be flow sensitive.
Since it is part of SILGen and will be using some of the type lowering
functionality used by SILGen, we should play by its rules.
No functionality change.
Swift SVN r7507
2013-08-23 18:15:21 +00:00
Adrian Prantl
97cdb29f5d
Turn on (swift) debug symbols for debug builds. This gives us a bunch of
...
additional test coverage for free.
Swift SVN r7468
2013-08-22 18:36:05 +00:00
Jordan Rose
bee99803b2
Build modules alongside object files for the standard library.
...
...rather than as a separate step. This avoids duplicating Parse and Sema
work for these. (This is the new and correct version of r7377.)
Also, remove leftover code for building "swift.swift" and friends in lieu
of proper modules. We're not going back to those days. :-)
Swift SVN r7420
2013-08-21 20:15:00 +00:00
Jordan Rose
beb743aa53
[runtime] Push swift_getObjectType down into the runtime.
...
It's used for class-bounded protocols, not just Foundation objects.
No test because I couldn't figure out how to write a non-compilation test.
Swift SVN r7367
2013-08-20 20:37:00 +00:00
Dave Abrahams
c27b447edb
Delete unintentionally-committed files
...
Swift SVN r7186
2013-08-12 23:21:41 +00:00
Dave Abrahams
128e69d934
[docs] Revise TextFormatting.* to reflect posted proposal
...
Swift SVN r7178
2013-08-12 21:13:03 +00:00
John McCall
14cb7001b3
Implement basic support for [weak].
...
Swift SVN r7041
2013-08-08 04:04:51 +00:00
John McCall
b77c430848
Add SIL-gen and some missing runtime support for [unowned].
...
Swift SVN r6881
2013-08-03 08:46:54 +00:00
Jordan Rose
674a03b085
Replace "oneof" with "union"...everywhere.
...
We haven't fully updated references to union cases, and enums still are not
their own thing yet, but "oneof" is gone. Long live "union"!
Swift SVN r6783
2013-07-31 21:33:33 +00:00
Peter O'Gorman
b62ebbbcd0
fix build on case-sensitive fs
...
Swift SVN r6772
2013-07-31 04:01:18 +00:00
Chris Lattner
fa49d75eb4
Add bool, int8, and float vectors of size 2 definitions and some supported operations.
...
Swift SVN r6768
2013-07-30 23:54:18 +00:00
Joe Groff
6e00dbf9b9
Remove the Swift version of the demangler.
...
This creates a regression in REPL printing for class instances, which now will print the mangled class name of the instance, since Object.className was using the Swift demangler to demangle the type name. REPL printing is getting an overhaul so I think this is OK for now.
Swift SVN r6704
2013-07-29 20:50:06 +00:00
Jordan Rose
2341903bb0
[Makefiles] Convert autoconf build to use modules.
...
Note that if you already have an autoconf build, you will need to erase
build/*/lib/*.swift (the first * being "all configurations").
Swift SVN r6534
2013-07-24 00:01:47 +00:00
Dave Zarzycki
af4e485b81
14443393 stdlib fails to build with different -o option
...
Somebody should verify that I didn't break the CMake build. Thanks!
Swift SVN r6346
2013-07-18 06:42:00 +00:00
Argyrios Kyrtzidis
d02ac70be2
[CMake] Pass "-isysroot ${MODULES_SDK}" for building stdlib/runtime.
...
This is because objc/NSObject.h, included by SwiftObject.mm, only exists in the 10.9 SDK.
Swift SVN r6343
2013-07-18 01:12:54 +00:00
Argyrios Kyrtzidis
341962ce92
[CMake] Introduce add_swift_compiler_flags() and add_swift_optimization_flags() to reduce copy-pasting.
...
Swift SVN r6342
2013-07-18 01:12:53 +00:00
Dmitri Hrybenko
0791041eb4
Revert the API change of r5893
...
This commit merges EnvironmentVariables and CommandLineArguments into a single
swift.Process global variable. POSIX-dependent parts are available as
extension with "import POSIX".
Original message:
stdlib: split the Process class into a POSIX-dependent (EnvironmentVariables)
and POSIX-independent (CommandLineArguments) parts
Swift SVN r6331
2013-07-17 17:55:24 +00:00
John McCall
7b86817b3c
Basic value structure for [weak] and [unowned] references.
...
Add a bunch of new entrypoints and give them terrible
implementations.
Swift SVN r6322
2013-07-17 09:20:20 +00:00
Doug Gregor
5240e9a442
Remove Vec4b/Vec4f. They can be added back when someone gives them more thought.
...
Swift SVN r6026
2013-07-05 22:57:08 +00:00
Dmitri Hrybenko
16d8ddc093
Revert wrong changes, did not intend to commit all that
...
Swift SVN r6010
2013-07-05 17:13:07 +00:00
Dmitri Hrybenko
b1b1c63be5
Add a comment for r6001
...
Swift SVN r6009
2013-07-05 17:11:38 +00:00
Dmitri Hrybenko
e662ec5bf8
Re-export libobjc from swift_stdlib_core
...
This fixes rdar://14265543 Building a program with a class requires Cocoa at
link time
Swift SVN r5982
2013-07-04 00:06:23 +00:00
Dmitri Hrybenko
8df5ab7998
stdlib/core/Assert*: prevent recursive assertions
...
Swift SVN r5935
2013-07-01 18:20:36 +00:00
Dmitri Hrybenko
260ac15f10
stdlib: split the Process class into a POSIX-dependent (EnvironmentVariables)
...
and POSIX-independent (CommandLineArguments) parts
Swift SVN r5895
2013-06-29 01:28:26 +00:00
Dmitri Hrybenko
8b7b85f769
stdlib/POSIX: add getopt() bindings
...
Swift SVN r5891
2013-06-28 23:54:18 +00:00
Dmitri Hrybenko
0e26015bb2
Splitting the standard library: move POSIX declarations from stdlib/core/Misc.swift to stdlib/POSIX
...
Swift SVN r5890
2013-06-28 23:46:01 +00:00
Dmitri Hrybenko
6dcaaa9b0d
Splitting the standard library: rename IS_STDLIB -> IS_STDLIB_CORE to reflect the reality
...
Swift SVN r5889
2013-06-28 23:10:38 +00:00
Dmitri Hrybenko
ea43c46262
Splitting the standard library: move runtime -> stdlib/runtime
...
Swift SVN r5887
2013-06-28 22:41:38 +00:00
Dmitri Hrybenko
77e43c2a1a
Splitting the standard library: move objc -> stdlib/objc
...
Swift SVN r5883
2013-06-28 22:15:07 +00:00
Dmitri Hrybenko
2d9233862a
Splitting the standard library: rename swift_stdlib.dylib ->
...
swift_stdlib_core.dylib according to the directory name.
Swift SVN r5881
2013-06-28 21:47:12 +00:00
Dmitri Hrybenko
a4589b1c51
Splitting the standard library: push the build system down to stdlib/{core,POSIX}
...
Now the Makefile-based build system builds a separate dylib for POSIX.
Swift SVN r5880
2013-06-28 21:13:56 +00:00
Dmitri Hrybenko
a4acfafe12
Splitting the standard library: build the POSIX library separately
...
Swift SVN r5868
2013-06-28 04:01:56 +00:00
Dmitri Hrybenko
387f08b1a7
Splitting the standard library: move stdlib/core/POSIX/ -> stdlib/POSIX/
...
Swift SVN r5867
2013-06-28 02:50:07 +00:00
Dmitri Hrybenko
bc2d7e6240
Splitting the standard library: move stdlib/core/{Makefile,CMakeLists.txt} -> stdlib/{Makefile,CMakeLists.txt}
...
We can not build recursively now because stdlib must be a single TU.
Swift SVN r5866
2013-06-28 02:46:00 +00:00
Dmitri Hrybenko
4bc9ac4ea7
Splitting the standard library: add stdlib/Makefile, stdlib/CMakeLists.txt
...
Swift SVN r5865
2013-06-28 02:34:07 +00:00