Commit Graph

4421 Commits

Author SHA1 Message Date
Max Moiseev
d610fa0d1c Merge remote-tracking branch 'origin' into swift-3-api-guidelines 2015-12-10 10:29:52 -08:00
Arnold Schwaighofer
365588da12 Fix OptimizerEffects.rst 2015-12-10 06:37:10 -08:00
Stephen Canon
d502094568 Merge pull request #387 from vicky002/master
removed duplications
2015-12-10 09:13:05 -05:00
Stephen Canon
01f5290a93 Merge pull request #394 from StevenMaude/patch-1
Fix typos in OptimizerDesign.md
2015-12-10 09:11:09 -05:00
Stephen Canon
4fbdbdf6e9 Merge pull request #392 from jutaz/bugfix/typos-in-docs
Bugfix - Typos in docs
2015-12-10 09:10:18 -05:00
Steven Maude
74572b96ca Fix typos in OptimizerDesign.md 2015-12-10 13:42:54 +00:00
Justas Brazauskas
7b941a6e9e Fixed typos in ./docs 2015-12-10 10:11:21 +02:00
vicky002
cb1e4edf2b removed duplications 2015-12-10 09:45:00 +05:30
vicky002
8f21af71ca typo and spelling fixes 2015-12-10 06:56:55 +05:30
Dmitri Gribenko
727f011314 RangeReplaceableCollection.insert(_:atIndex:) => .insert(_:at:) 2015-12-09 17:17:41 -08:00
Dmitri Gribenko
9a9ff305f1 RangeReplaceableCollection.replaceRange() => .replaceSubrange() 2015-12-09 17:17:34 -08:00
Dmitri Gribenko
feacbc4433 Rename ErrorType to ErrorProtocol 2015-12-09 17:12:19 -08:00
Dmitri Gribenko
1c0047829a Rename SequenceType.generate() to SequenceType.iterator() 2015-12-09 17:11:17 -08:00
Dmitri Gribenko
2cf172160c Rename SequenceType.Generator associated type to SequenceType.Iterator 2015-12-09 17:11:05 -08:00
John McCall
5fddd4a704 Remove the autorelease_return and strong_retain_autoreleased instructions.
There's a buggy SIL verifier check that was previously tautological,
and it turns out that it's violated, apparently harmlessly.  Since it
was already doing nothing, I've commented it out temporarily while
I figure out the right way to fix SILGen to get the invariant right.
2015-12-09 14:50:20 -08:00
Ted Kremenek
5d0dc90ac8 Merge pull request #136 from zachpanz88/patch-2 2015-12-09 00:32:44 -08:00
Slava Pestov
65a5a03f26 IRGen: Add a new destructiveInjectEnumTag value witness function
This value witness function takes an address of an enum value where the
payload has already been initialized, together with a case index, and
forms the enum value.

The formal behavior can be thought of as satisfying an identity in
relation to the existing two enum value witnesses. For any enum
value, the following is to leave the value unchanged:

  tag = getEnumTag(value)
  destructiveProjectEnumData(value)
  destructiveInjectEnumData(value, tag)

This is the last missing piece for the inject_enum_addr SIL instruction
to handle resilient enums, allowing the implementation of an enum to be
decoupled from its uses. Also, it should be useful for dynamically
constructing enum cases with write reflection, once we get around to
doing such a thing.

The body of the value witness is emitted by a new emitStoreTag() method
on EnumImplStrategy. This is similar to the existing storeTag(), except
the case index is a value instead of a contant.

This is implemented as follows for the different enum strategies:

1) For enums consisting of a single case, this is trivial.

2) For enums where all cases are empty, stores the case index into the
   payload area.

3) For enums with a single payload case, emits a call to a runtime
   function. Note that for non-generic single payload enums, this could
   be open-coded more efficiently, but the function still has the
   correct behavior since it supports extra inhabitants and so on.
   A follow-up patch will make this more efficient.

4) For multi-payload enums, there are two cases:

   a) If one of the payloads is generic or resilient, the enum is
      dynamically-sized, and a call to a runtime function is emitted.

   b) If the entire enum is fixed-size, the value witness checks if
      the case is empty or not.

      If the case has a payload, the case index is swizzled into
      spare bits of the payload, if any, with remaining bits going
      into the extra tag area.

      If the case is empty, the case index is swizzled into the
      spare bits of the payload, the remaining bits of the payload,
      and the extra tag area.

The implementations of emitStoreTag() duplicate existing logic in the
enum strategies, in particular case 4)b) is rather complicated.

Code cleanups are welcome here!
2015-12-08 15:43:55 -08:00
Joe Groff
e55a3e1538 AllocBoxToStack: Update for box-only captures.
Change the logic to handle transforming @box T parameters into @inout_aliased T indirect parameters, instead of just dead-stripping boxes.
2015-12-08 14:35:48 -08:00
Joe Groff
307828169d SIL.rst: Describe @inout_aliasable arg semantics
and clarify `@inout`.
2015-12-08 14:35:48 -08:00
Baptiste HAUDEGAND
6b8ad8077e fix typos in AccessControl doc 2015-12-08 22:57:27 +01:00
TheGiantPanda
38402b8f81 Fixed spelling and grammar
The word “fullfill” was changed to “fulfill”. Formatting for other
lines was also fixed.
2015-12-07 18:19:24 -08:00
Sukolsak Sakshuwong
5fc4690717 Fix typos and formatting in TypeChecker.rst 2015-12-07 17:34:14 -08:00
Dmitri Gribenko
31598d41bf Rename GeneratorType to IteratorProtocol 2015-12-07 17:08:32 -08:00
Maxim Moiseev
7372e9e045 COpaquePointer => OpaquePointer 2015-12-07 16:52:45 -08:00
Maxim Moiseev
886d2fc63b Merge pull request #240 from Viewtiful/doc-literals/change-protocols-impl
Literals.rst: change protocols location
2015-12-07 09:02:16 -08:00
Max Ovtsin
2e020bb7a3 Fix docs 2015-12-07 18:53:16 +03:00
Greg Heo
7bbf54bce7 Fix docs and comments around optional intrinsics
docs/archive/LangRef.html is flagged as unmaintained, but I didn't see
much else about optionals in the docs so why not update it now.

`emitPreconditionOptionalHasValue` had the switch logic moved from the
standard library to lib/SILGen/SILGenConvert.cpp back in 9c7417edc2
and there's no _preconditionOptionalHasValue intrinsic anymore. Updated
the comment in the headers to clarify.
2015-12-06 16:39:48 -05:00
Dmitri Gribenko
d1c315ce39 Merge pull request #285 from nuts23/patch-4
Fix typo in SIL.rst
2015-12-06 13:35:36 -08:00
Kanstantsin Linou
41d4c0c67e Fix typo in SIL.rst
'funtion' -> 'function'
2015-12-06 23:34:02 +03:00
TheGiantPanda
e42724defa Fixed spelling and formatting
The spelling of “undesireable” was changed to “undesirable”. Formatting
for other lines was also fixed.
2015-12-06 11:41:45 -08:00
Mihir Waknis
03381e0467 Fixed spelling errors. 2015-12-05 21:31:29 -08:00
TheGiantPanda
a1c3ebd090 Fixed formatting and spelling
The word “referes” was corrected to “refers”. Formatting for other
lines was also fixed.
2015-12-05 20:53:06 -08:00
rjmccall
4489fa2699 Merge pull request #249 from diejmon/master
Fix typos in ErrorHandlingRationale.rst
2015-12-05 16:48:57 -08:00
binkdotli
3e5c0120e0 Fix AccessControlInStdlib SPI example 2015-12-05 23:32:47 +01:00
Alexander Belyavskiy
154c2445f2 Fix typo in ErrorHandlingRationale.rst 2015-12-06 01:17:08 +03:00
Chris Lattner
262d001fda Remove a really obsolete document which could be misleading - this isn't what led to the swift 2 error handling model. 2015-12-05 08:42:34 -08:00
Stephen Canon
480c9c2993 Merge pull request #122 from kentya6/master
Fix typo
2015-12-05 09:58:03 -05:00
Baptiste HAUDEGAND
059688aac7 Literals.rst: change protocols location
While reading the documentation, I found out that the
`StringLiteralConvertible` and `_BuiltinStringLiteralConvertible`
protocols where not present anymore inside the `Policy.swift`
source code file. They are now defined inside the
`CompilerProtocols.swift` source code file.
2015-12-05 13:29:04 +01:00
Leo Shimonaka
70e66973ee Fix spelling error in documentation / comments / method name 2015-12-05 00:28:08 -05:00
Steven Schmatz
99edb08cab Fix typo in TypeChecker.rst 2015-12-04 18:33:40 -05:00
Steven Schmatz
daf3080fa0 Fix typos/formatting in TextFormatting.rst
Makes it a bit easier to read.
2015-12-04 18:11:28 -05:00
Baptiste HAUDEGAND
861a176d8d fix typo in TypeChecker doc 2015-12-04 20:50:44 +01:00
Nadav Rotem
872dc69d58 Document the motivation and use of delete notifications. 2015-12-04 07:37:12 -08:00
Nadav Rotem
c60e19f2f8 Merge pull request #178 from wide-aze/patch-1
Fix punctuation
2015-12-04 06:41:11 -08:00
Nadav Rotem
a7f2fbd000 Merge pull request #176 from DaGopherboy/typo-fix
Typo in DebuggingTheCompiler.rst
2015-12-04 06:39:39 -08:00
wide-aze
8f7b064b2c Fix punctuation 2015-12-04 15:39:20 +01:00
Nadav Rotem
ab4e8c27a9 Merge pull request #172 from ohkawa/master
Fix typo
2015-12-04 06:37:47 -08:00
Stefan Natchev
5eaa3c43d0 Fix typos in documentation 2015-12-04 09:29:24 -05:00
J. Gavin Ray
c08685d3bf Typo in Documentation
afer -> after
2015-12-04 06:22:20 -08:00
DaKnOb
2277735774 Optimize Documentation Images to Save Bandwidth
This commit optimizes the images available in the
docs folder in order to  save  on  bandwidth  and
also decrease page loading time.

Images updated:
- docs/Array.png
- docs/ArrayBridge.png
- docs/ArrayCast.png
- docs/ArrayImplementation.png
- docs/ContiguousArray.png
- docs/Slice.png
2015-12-04 15:39:16 +02:00