Commit Graph

8541 Commits

Author SHA1 Message Date
Michael Gottesman
76d1053768 Revert "Add prims to Benchmark.swift."
This reverts commit r15164. I need to reduce the size of the test case and run
it more times instead. I am reverting this for now to unblock Nadav. When it is
fixed I will recommit it.

Swift SVN r15200
2014-03-18 20:42:41 +00:00
Michael Gottesman
997356fdd4 Add prims to Benchmark.swift.
We are actually doing a pretty good job optimizing this (even though I
am sure it could be better). The test case is a 5000 node prim run. IIRC
when I ran the cpp version of this on my local cpu it was instantaneous.
The swift version is ~1.5 seconds.

Swift SVN r15164
2014-03-17 23:03:06 +00:00
Michael Gottesman
0629b9def7 Add in small data case for prims and a driver.
Swift SVN r15157
2014-03-17 20:39:02 +00:00
Michael Gottesman
444efcb8f8 Update the non-driver part of the swift implementation of prim to match
the cpp implementation. The driver still needs to be implemented.

Swift SVN r15153
2014-03-17 20:05:13 +00:00
Chris Lattner
7adbe981e9 implement <rdar://problem/14524409> Support empty collection literals when context provides type information
These are spelled as [] and [:] for empty array and dictionary, respectively.



Swift SVN r15020
2014-03-14 00:37:45 +00:00
Ted Kremenek
3add29cca2 Remove CMake Xcode warning options from builbot-script, and where appropriate at toe CMake file.
Swift SVN r15015
2014-03-14 00:27:35 +00:00
Greg Parker
e9577215bb Release-note nil as Selector value.
Swift SVN r15010
2014-03-13 22:15:11 +00:00
Ted Kremenek
6b5f1a2b4d Enable a bunch of useful warnings (e.g., -Wuninitialized) when building using Xcode.
Swift SVN r14987
2014-03-13 00:49:04 +00:00
Chris Lattner
4d28ecd2b5 rename the default argument for "set" and "willSet" to "newValue" instead of
being "oldValue".


Swift SVN r14950
2014-03-12 05:11:14 +00:00
Joe Groff
b8d48dd7bb Change 'x.type' to 'x.dynamicType'.
It's not a common operation, so it doesn't need a terse name that occupies valuable identifier real estate.

Swift SVN r14932
2014-03-11 23:18:33 +00:00
Jordan Rose
7a3c451372 Retroactively release-note string macro importing (r14664-5).
Put it at the top of the old release notes so that people have a chance of
seeing it when reading the new ones.

Swift SVN r14822
2014-03-08 02:37:30 +00:00
Chris Lattner
4005246316 release note didChange.
Swift SVN r14820
2014-03-08 02:17:41 +00:00
Chris Lattner
a65efec87e AnyClass too
Swift SVN r14814
2014-03-08 01:12:12 +00:00
Chris Lattner
1fe8025fd8 add warning to the release notes.
Swift SVN r14812
2014-03-08 00:54:05 +00:00
Joe Groff
86d7d81e6a Release note 'foo.bar:bas:'.
Swift SVN r14798
2014-03-07 22:43:07 +00:00
Greg Parker
b623972f10 [test] Enable 32-bit iOS simulator tests on the buildbot.
Swift SVN r14775
2014-03-07 08:15:04 +00:00
Greg Parker
ccc11fedb7 [build] Move the "tests failed" message in order to clean up sh -x output.
Swift SVN r14718
2014-03-06 03:52:36 +00:00
Joe Groff
2448f33ffc Parser: Record the compound name of selector-style func decls.
Collect the identifiers for the selector pieces we parsed and use them to build a compound DeclName for the func decl. Currently this only manifests when __FUNCTION__ is used inside a selector-style function definition, where we now correctly produce the compound 'foo:bar:' name.

Swift SVN r14717
2014-03-06 03:36:49 +00:00
Joe Groff
9e5bc637ae Add __FUNCTION__ as a magic literal identifier.
Add __FUNCTION__ to the repertoire of magic source-location-identifying tokens. Inside a function, it gives the function name; inside a property accessor, it gives the property name; inside special members like 'init', 'subscript', and 'deinit', it gives the keyword name, and at top level, it gives the module name. As a bit of future-proofing, stringify the full DeclName, even though we only ever give declarations simple names currently.

Swift SVN r14710
2014-03-06 01:06:06 +00:00
Joe Groff
424187e482 Lexer: Lex escaped identifier tokens.
Lex a backtick-enclosed `[:identifier_start:][:identifier_cont:]+` as an identifier, even if it's a Swift keyword. For now, require that the escaped name still be a valid identifier, keyword collisions notwithstanding. (We could in theory allow an arbitrary string, but we'd have to invent a mangling for non-identifier characters and do other tooling which doesn't seem productive.)

Swift SVN r14671
2014-03-05 03:47:12 +00:00
Doug Gregor
692850fa95 Release notes for designated initializers, convenience initializers, required initializers.
Swift SVN r14634
2014-03-04 06:03:12 +00:00
Chris Lattner
c437dcbf06 remove 'val' compatibility support.
Swift SVN r14543
2014-03-01 00:11:09 +00:00
Daniel Dunbar
dad30f14fe Restore buildbot performance tests.
Swift SVN r14536
2014-02-28 21:37:37 +00:00
Michael Gottesman
f4f42e50f1 Updates to Prims so that the c++ code actually works. Now it has a test harness/test cases/test data generator/etc. Still need to make the relevant swift modifications.
Swift SVN r14523
2014-02-28 17:47:57 +00:00
Joe Groff
67ca7ce1e9 SIL: Rename 'protocol_metatype' to 'existential_metatype'.
It's not forming the metatype for the protocol type (exists t: P. t).metatype, it's forming the existential of a metatype of a conforming type, exists t: P. (t.metatype).

Swift SVN r14520
2014-02-28 16:14:00 +00:00
Joe Groff
9424de6787 SIL: Rename 'archetype_metatype' to 'value_metatype'.
Since it can grab a metatype from any value now.

Swift SVN r14500
2014-02-28 06:33:05 +00:00
Joe Groff
545f173507 SIL: Fold 'archetype_metatype' and 'class_metatype'.
Having one instruction to get the dynamic metatype of a (non-existential) value makes more sense from a generic specialization standpoint and should stave off inevitable crashers when archetype_metatypes get specialized. protocol_metatype remains separate because metatype existentials are more interesting.

Swift SVN r14499
2014-02-28 06:32:58 +00:00
Joe Groff
59d2a169f6 SIL: Rename 'archetype_method' to 'witness_method'.
It has been generalized to get a witness out of an arbitrary protocol conformance, not just for archetypes.

Swift SVN r14497
2014-02-28 05:09:11 +00:00
Joe Groff
855ea99063 SIL: Combine 'archetype_ref_to_super' and 'upcast'.
We were wantonly applying 'upcast' to archetypes in some cases, and really, that's OK, since these instructions do the same thing (and generic specialization could turn archetype_ref_to_super into upcast). Make everyone's life easier by folding archetype_to_super into upcast. Fixes <rdar://problem/16192324>.

Swift SVN r14496
2014-02-28 04:33:18 +00:00
John McCall
8ed996ff40 Add the SuccessorMap test generator to source control.
There's no real need for this to be included in the
standard build, or even to avoid bit-rot; but if
someone messes around with the data structure, this is a
good way to stress-test it.

Swift SVN r14494
2014-02-28 02:47:42 +00:00
Dave Abrahams
930ba7b65f [build] Always self-test gyb when we run it
This is fast enough to do all the time and will prevent problems like
  the one noted as fixed below.

Also, fix a gyb self-test that had drifted out-of-date.

Swift SVN r14484
2014-02-27 23:16:08 +00:00
Dave Abrahams
03d2ce75d5 [utils] gyb: use % instead of @
It was hard to decide on a replacement character for @, which is a
particularly bad choice for gyb ever since we started using it for
attributes in Swift, since attributes often start a line.  Only
graphically-dense characters seem to look right.  '%' has the
disadvantage of clashing with SIL, where it begins many lines, but we're
not using gyb to generate any SIL files today, so I optimized for the
common case.

Swift SVN r14483
2014-02-27 23:16:07 +00:00
Joe Groff
8e6b353542 Derive conformances of Equatable and Hashable for simple enums.
If an enum has no cases with payloads, make it implicitly Equatable and Hashable, and derive default implementations of '==' and 'hashValue'. Insert the derived '==' into module context wrapped in a new DerivedFileUnit kind, and arrange for it to be codegenned with the deriving EnumDecl by adding a 'DerivedOperatorDecls' array to NominalTypeDecls that gets visited at SILGen time.

Swift SVN r14471
2014-02-27 20:28:38 +00:00
Jordan Rose
1753c0cf64 Add a release note about Objective-C protocol properties.
Swift SVN r14469
2014-02-27 19:28:40 +00:00
Dave Zarzycki
5b0b709b3a Buildbot: Temporarily disable performance tests, they used 'make' (now gone)
Swift SVN r14452
2014-02-27 05:28:36 +00:00
Joe Groff
4e87971d81 Disallow bare type references.
Diagnose a metatype reference that doesn't appear as part of a call or member reference, offering fixits to either default-construct the type or get at the metatype explicitly using '.self'. Also diagnose an attempt to refer to 'T.type' by fixiting it to '.self'.

Swift SVN r14433
2014-02-27 00:22:02 +00:00
Doug Gregor
dd143263eb Accept the "deinit { }" syntax, but don't require it.
Improve the Fix-It for the older "destructor" syntax so that it
replaces "destructor ()" with "deinit".

Swift SVN r14419
2014-02-26 22:42:14 +00:00
Ted Kremenek
028f9d0561 Remove rest of Makefile build except for 'docs' and 'www'.
For 'docs' and 'www' it is possible these are still being used,
as they work independent of the Makefile build.  Keeping them for now.

Swift SVN r14418
2014-02-26 22:21:25 +00:00
Chris Lattner
339c0ead0a rotate out some history to the wiki page.
Swift SVN r14399
2014-02-26 18:19:44 +00:00
Doug Gregor
230c8a4982 Introduce the 'override' attribute and start requiring it on all overrides.
The 'override' attribute indicates that the given declaration, which
may be a method, property, or subscript, overrides a declaration in
its superclass. Per today's discussion, the 'override' attribute must
be present if and only if the corresponding declaration overrides a
declaration in its superclass. 

This implements most of <rdar://problem/14798539>. There's still more
work to do to on property and subscript overrides.



Swift SVN r14388
2014-02-26 08:53:06 +00:00
Doug Gregor
b20a360f95 Add release note for the improvements in @objc metatype handling.
Swift SVN r14383
2014-02-26 06:52:35 +00:00
Doug Gregor
981f8f6509 Rename "destructor" -> "deinit" (as a keyword) and -> "deinitializer" (in diagnostics).
Swift SVN r14380
2014-02-26 05:51:45 +00:00
Joe Groff
5096abcaa6 Expose MetatypeExpr again as 'expr.type'.
And drop the 'typeof' stdlib function.

Swift SVN r14378
2014-02-26 05:10:19 +00:00
Doug Gregor
0bde325327 Collapse 'DynamicSelf' into 'Self'.
Swift SVN r14377
2014-02-26 05:04:05 +00:00
Chris Lattner
aa5a42cb95 accept 'let' as an alias for 'val' this week, and release note it.
Swift SVN r14376
2014-02-26 04:40:34 +00:00
Joe Groff
98d6fecc99 '.metatype' -> '.Type'
Also, reserve 'type' as a keyword for ensuing syntax changes.

Swift SVN r14375
2014-02-26 04:23:21 +00:00
Chris Lattner
5c76ec21ac various typographical edits. NFC :-)
Swift SVN r14374
2014-02-26 04:17:52 +00:00
Joe Pamer
9dbc59e8ed Add buildbot note detailing support target configurations.
I've updated the text to remove any mention of '-D' or build configurations, and updated the descriptions of the various supported target configuration values.

Swift SVN r14372
2014-02-26 02:06:31 +00:00
Joe Pamer
70f637242f Revert "Add buildbot note detailing support for build and target configurations."
This reverts commit 1ccb219df519c232afe7bc1dd76a77e288706f4c.

Swift SVN r14345
2014-02-25 18:13:24 +00:00
Joe Pamer
7693b6d708 Add buildbot note detailing support for build and target configurations.
Swift SVN r14344
2014-02-25 18:07:03 +00:00