Commit Graph

35 Commits

Author SHA1 Message Date
Dave Abrahams
dd96f5f082 [stdlib] Give ArrayBufferType its own file
Swift SVN r15770
2014-04-02 02:47:39 +00:00
Dave Abrahams
079821c8cc [stdlib] Start generating actual (new) Array types
Swift SVN r15769
2014-04-02 02:47:38 +00:00
Dave Abrahams
004998e63e [stdlib] Move SliceBuffer into its own file
Swift SVN r15766
2014-04-02 02:47:34 +00:00
Dave Abrahams
800cba5125 [stdlib] Bring most of ArrayType into the stdlib
The ArrayType protocol is developed for NewArray is a good basis for
what we want, but the ability to create arrays without value semantics
is adding complexity but questionable value.  It isn't clear that we can
usefully expose a type called SharedArray<T>, even internally, if it
ceases to be truly shared when one copy grows, and therefore has its
buffer reallocated. Therefore, leave the NewArray test with a
ArrayType2, a refinement of ArrayType, that adds the ability to report
on its value semantics.

If we really want the optimizations that can be had in a large-scale
mutation by first unique'ing the array and making mutations in-place
thereafter, we can fall back to operating on NativeArrayBuffer<T>
directly.

Swift SVN r15673
2014-03-31 08:42:55 +00:00
Michael Gottesman
c98c4d54b1 Move Benchmark.swift out of the stdlib now that we can deserialize from the stdlib.
rdar://15797364.

Swift SVN r15636
2014-03-29 22:19:34 +00:00
Dave Abrahams
9ef1ba13c0 [stdlib] Rename file ArrayBridge => ArrayCore
Swift SVN r15618
2014-03-29 10:43:45 +00:00
Dave Abrahams
bfc6cfa5b6 [stdlib] Give Array bridging a home of its own
Also create a simple NSSwiftArray class that DaveZ can use to test our
bridging strategy.

Swift SVN r15081
2014-03-14 22:07:14 +00:00
Jordan Rose
27d1746467 [CMake] Move the install command for the Clang headers to the shims target too.
For consistency with r14968.

Swift SVN r14969
2014-03-12 22:17:02 +00:00
Jordan Rose
1c4d9b78a4 [CMake] Symlink Clang's headers into lib/swift as part of copy_shim_headers.
Turns out CMake's PRE_BUILD mode for custom commands doesn't work with the
Ninja or Makefile generators (not sure about Xcode). Just do it as part of
an earlier target instead.

Swift SVN r14968
2014-03-12 22:11:26 +00:00
Dave Abrahams
a398607c43 [build] Evil hack to make Make make
CMake's Makefile generator is not very smart about sibling dependencies,
apparently.  See the comment in the commit for more details.

Swift SVN r14909
2014-03-11 05:56:09 +00:00
Dave Abrahams
38f68fcba4 [build] stdlib core depends on SwiftShims
We need to make sure the core standard library is rebuilt when the shims
header changes.

Swift SVN r14906
2014-03-11 03:22:12 +00:00
Dave Abrahams
7a91b9f749 [stdlib] Remove *, /, and % from RandomAccessIndex
Before this commit, RandomAccessIndex was a refinement of
NumericOperations, which forced it to support inappropriate operations
such as multiplication.  Many obvious random-access index types can't
support multiplication (e.g. a StridedIndex adapter, which moves its
underlying index by N positions for each increment).

Along the way:

* the addition and subtraction operations on RandomAccessIndex were
  renamed to advancedBy and distanceTo, which prevents nasty ambiguities
  when a type conforms to both RandomAccessIndex and Integer, and allows
  Index DistanceTypes to actually be signed integers even when the Index
  is unsigned.

* Before this commit, using internal interfaces, it was possible to
  request static checking without also getting dynamic checks when
  static checking is impossible.  Now the relationship between static
  and dynamic checking is built into the core protocols.

* NumericOperations.swift was moved into IntegerArithmetic.swift.gyb,
  correcting missing operators by generating them programmatically and
  in preparation for renaming the protocol to something more appropriate

Fixes

  <rdar://problem/16246927> RandomAccessIndex is over-constrained

and possibly:

  <rdar://problem/15605729> Make all operators generic over
  protocols (in particular, get NumericOperations done)

Swift SVN r14854
2014-03-09 19:56:18 +00:00
Dave Abrahams
469f8629c6 [stdlib] OpaqueString is still an essential source
Swift SVN r14852
2014-03-09 19:56:16 +00:00
Dave Abrahams
6732cc1c4d [stdlib] Bugfix for essential sources check
I was using the wrong variable name in CMakeLists.txt

Swift SVN r14851
2014-03-09 19:56:15 +00:00
Dave Abrahams
0ec3ead12b [stdlib] Link an essential core library subset
To support layering improvements, add an (optionally built) "essential
core" library containing the minimum set of files required just to link
successfully.  Right now all those object files are linked again into
swift_stdlib_core; it would probably be better to link the essential
core into the core, but my CMake/Swift Driver fu is not strong enough
and this will at least help during development.

Along the way, removed the obsolete SwiftStdlibSources.txt file, as we
only have to support one build system now.

Swift SVN r14792
2014-03-07 21:01:49 +00:00
Dave Abrahams
c33a59c6a7 [build] Complete gyb support
Remove all gyb-generated files and generate them automatically from .gyb
files.  Rename the proof-of-concept UnsafeArray.swift.gyb back to
UnsafeArray.swift.  Never forget to update the .gyb file or regenerate
again!

Swift SVN r14445
2014-02-27 03:01:16 +00:00
Jordan Rose
0f54c34053 Use -resource-dir for iOS builds and tests instead of -I.
As part of this, have the standard library target be responsible for
symlinking Clang's headers into the resource directory, instead of the
compiler target. This makes sure the headers show up in all copies of
the build directory.

This brings our iOS testing closer to what Xcode will do, which will
hopefully avoid issues like <rdar://problem/16052579>.

Swift SVN r13890
2014-02-14 01:27:16 +00:00
Greg Parker
be878f2503 [build] Remove redundant dependency.
Swift SVN r13522
2014-02-05 23:23:08 +00:00
Michael Gottesman
cc6783cc85 Control whether or not benchmarks are run via CMake/Make argument SWIFT_ENABLE_BENCHMARKS.
This will help to prevent errors like committing a patch that re-enables the
benchmarks for everyone.

Swift SVN r13343
2014-02-03 06:42:34 +00:00
Greg Parker
b2846b546b Make Int a word-size type.
- Int and UInt are now struct types backed by Builtin.Word. Previously they
were typealiases for Int64; Int and Int64 are now distinct types.
- Mangled names 'i' and 'u' are now Int and UInt. Int64 is mangled longhand.
- Word is a typealias for Int. It is expected to go away in the future.
- Builtin.Word is unchanged.
- CLong and CUnsignedLong are typealiases for Int and UInt.
- FixedPoint.swift is now FixedPoint32.swift and FixedPoint64.swift. 
Reunifying these requires better builtins, especially for checked 
conversions (rdar://15472770).
- Updated many tests, mostly because Int is no longer spelled Int64 in sil.
- One check was removed from test decl/operator/operators.swift 
because it changed behavior when Int became a non-typealias 
type (rdar://15934688).



Swift SVN r13109
2014-01-29 12:21:19 +00:00
Chris Lattner
68af974227 Remove 'axle' related code and build machinery. It turns out that we
will not be pursuing this project in the immediate future.



Swift SVN r9901
2013-11-03 16:04:27 +00:00
Greg Parker
beaa56d8e9 Add Builtin.Word and use it to implement swift.Word.
Swift SVN r9864
2013-11-01 00:11:22 +00:00
Dmitri Hrybenko
c216a848b9 stdlib/FloatingPoint: port floating point implementation to gyb
No changes in functionality intended.


Swift SVN r9799
2013-10-30 17:14:12 +00:00
Greg Parker
fbd1c95292 Add support for iOS builds using cmake.
Swift SVN r9499
2013-10-18 21:52:37 +00:00
Mon Ping Wang
00467ba953 Reintroduce "Add support for Axle library." from 9292. Added an dependency to prevent building the
core and axle core at the same time.


Swift SVN r9309
2013-10-14 07:51:19 +00:00
Joe Groff
cf457d2210 Revert "Add support for Axle library." It breaks the build.
This reverts commit r9292.

Swift SVN r9296
2013-10-13 22:38:22 +00:00
Mon Ping Wang
41aca3e7e6 Add support for Axle library. Please note that AxeBuiltins.gyb will be
expanded soon for the other graphics builtins.


Swift SVN r9294
2013-10-13 19:54:01 +00:00
Joe Groff
35e5a1ffbe Link swift_stdlib_core with -all_load so it links in all .o files from swift_runtime.
Swift SVN r8349
2013-09-17 21:04:43 +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
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
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
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
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
29cebdf797 Splitting the standard library: step 1: move stdlib -> stdlib/core
Swift SVN r5864
2013-06-28 02:31:01 +00:00