Commit Graph

6693 Commits

Author SHA1 Message Date
swift-ci
7f1b32c123 Merge remote-tracking branch 'origin/main' into rebranch 2022-08-01 15:33:49 -07:00
DylanPerry5@gmail.com
512b499406 Issue #59903 - Removing _decodeScalar function that isn't being used 2022-07-29 19:51:52 -04:00
swift-ci
c3be41258e Merge remote-tracking branch 'origin/main' into rebranch 2022-07-26 15:54:31 -07:00
Anthony Latsis
6f87d02949 Merge pull request #59933 from AnthonyLatsis/rm-foundation-spi
stdlib: Mark some deprecated corelibs-foundation SPI that are no longer used as unavailable
2022-07-27 01:54:08 +03:00
Anthony Latsis
a12106963b stdlib: Mark some deprecated corelibs-foundation SPI that are no longer used as unavailable
This keeps them around in the ABI while preventing actual usage as we build
up confidence to finally remove them.
2022-07-26 04:29:57 +03:00
Alex Martini
c0abd3a3e8 Remove unused link destination.
See also commit 93c350dff7
2022-07-21 11:31:36 -07:00
swift-ci
d919357e5f Merge remote-tracking branch 'origin/main' into rebranch 2022-07-13 16:13:25 -07:00
Guillaume Lessard
bee4eaefc4 Merge pull request #60025 from glessard/rdar96841899
[stdlib] fix unaligned loads of large SIMD vectors on x86_64
2022-07-13 17:04:32 -06:00
Guillaume Lessard
b5cc4121d7 [stdlib] fix unaligned loads of 16-byte (and up) SIMD types
- this is a temporary workaround
2022-07-13 10:29:58 -06:00
Guillaume Lessard
1b78a1f356 [stdlib] change String’s SIMD bits to load using loadUnaligned 2022-07-13 10:29:58 -06:00
Guillaume Lessard
4f87f0caa8 [gardening] fix code indentation 2022-07-12 14:50:17 -06:00
swift-ci
6eee460618 Merge remote-tracking branch 'origin/main' into rebranch 2022-07-11 12:33:22 -07:00
Karoy Lorentey
5788a2cada Merge pull request #59959 from lorentey/duration-components-crash
[stdlib] Duration: Fix rare overflow trap in Int128.multipliedFullWidth
2022-07-11 12:30:44 -07:00
swift-ci
80161c6d49 Merge remote-tracking branch 'origin/main' into rebranch 2022-07-11 11:53:51 -07:00
David Smith
bcfa805635 Zero trailing bytes of SmallStrings more efficiently (#59823) 2022-07-11 11:46:15 -07:00
swift-ci
02d9592432 Merge remote-tracking branch 'origin/main' into rebranch 2022-07-08 22:53:31 -07:00
Karoy Lorentey
95a45dbc3d [stdlib] Duration: Fix rare overflow trap in Int128.multipliedFullWidth
Int128.multipliedFullWidth fails to account for an overflow case, which lead `Duration.components` trapping when the duration is a multiple of 512s.

rdar://96362510
2022-07-07 18:34:15 -07:00
Erik Eckstein
1fa0120926 stdlib: remove the inout-violation check from Array bounds checking
As we have exclusivity checking since a long time, this "explicit" check for inout violations is not needed anymore.
The `_checkInoutAndNativeTypeCheckedBounds` function must remain in the library for backward compatibility.
The remaining relevant subscript index checking from that function is now simply inlined in into the caller.
2022-07-07 16:53:55 +02:00
Alex Martini
8f6289745b Add per-architecture availability note.
The documentation publication pipeline doesn't have a way to expose
per-architecture availability, like how it it shows per-platform
availability.  So add this in prose instead.

Fixes <rdar://77649895>
2022-07-06 17:18:03 -07:00
Alex Martini
e46a285a98 Reference doesn't allow code voice in abstract.
Fixes <rdar://86212313>
2022-07-06 17:07:45 -07:00
swift-ci
3c548ea858 Merge remote-tracking branch 'origin/main' into rebranch 2022-07-06 14:15:10 -07:00
Karoy Lorentey
64a57e3ade [stdlib] Switch to using unchecked buffer subscript in low-level Unicode helpers
We expect indices to be already validated by the time these are
called, and UBP’s debug-mode checks are compiled into opaque parts
of the stdlib.

(The big exception is that Swift <5.7 used to not do proper index
validation and allowed out-of-bounds accesses. We emulate this
behavior for code that was compiled with such a release, and it turns
out that these UnsafeBufferPointer checks are interfering with the
intended (undefined) behavior.)

rdar://93707276
2022-07-05 18:33:51 -07:00
swift-ci
cfb7f4be53 Merge remote-tracking branch 'origin/main' into rebranch 2022-07-03 13:52:53 -07:00
Jager-yoo
eaff73b15c [stdlib] Fix func signature spacing
- standardizes spacing of an operator(==) func signature in Equatable.swift
2022-07-03 02:16:09 +09:00
Alex Martini
deed208b7b Add an example and cross reference to TSPL.
Fixes <rdar://79689446>
2022-06-30 12:34:47 -07:00
Alex Martini
93c350dff7 Reference style doesn't allow links in abstracts.
Fixes <rdar://93208475>
2022-06-30 12:34:40 -07:00
swift-ci
aeb93f5420 Merge remote-tracking branch 'origin/main' into rebranch 2022-06-29 22:53:27 -07:00
swift-ci
f542ca9a76 Merge pull request #59797 from glessard/aeic-mangled-names
[stdlib] Improve the mangled names of some @_alwaysEmitIntoClient functions
2022-06-29 22:46:23 -07:00
Guillaume Lessard
a74f22dadf [docs] fix a repeated typo 2022-06-29 18:19:34 -06:00
Guillaume Lessard
e353e2f568 [stdlib] document compatibility entry point silgen names better 2022-06-29 16:21:55 -06:00
Guillaume Lessard
6d36a36dd9 [stdlib] improve silgen names and better document intention 2022-06-29 16:20:34 -06:00
swift-ci
2183c1d21a Merge remote-tracking branch 'origin/main' into rebranch 2022-06-29 15:13:35 -07:00
Steven Wu
ea31a9222f stdlib: Fix the name mangling for UnsafeMutableRawPointer.storeBytes
The name mangling for storeBytes is missing `$`.

rdar://96062712
2022-06-29 09:52:51 -07:00
swift-ci
306440cd76 Merge remote-tracking branch 'origin/main' into rebranch 2022-06-24 10:53:37 -07:00
Karoy Lorentey
789545d1be Merge pull request #41843 from lorentey/adopt-primary-associated-types
[SE-0358][stdlib] Adopt primary associated types
2022-06-24 10:46:29 -07:00
swift-ci
89d5dc978f Merge remote-tracking branch 'origin/main' into rebranch 2022-06-23 14:14:59 -07:00
Slava Pestov
2734f3ca05 stdlib: Add SIMDMaskScalar.SIMDMaskScalar == SIMDMaskScalar requirement to SIMDScalar
In theory this is a source break if someone had a weird custom
conforming type, but I suspect in practice conformances to
this protocol are never defined.

The reason we want this requirement is that often you will see
code like the following:

  protocol Point {
    associatedtype Scalar: SIMDScalar
    associatedtype Vector: SIMD where Vector.Scalar == Scalar
  }

  extension Point where Vector == SIMD2<Scalar> { ... }

When `Vector` is equated with `SIMD2<Scalar>`, we get an infinite
sequence of implied same-type requirements:

  Vector.MaskStorage == SIMD2<Scalar.MaskScalar>
  Vector.MaskStorage.MaskStorage == SIMD2<Scalar.MaskScalar.MaskScalar>
  ...

The protocol fails to typecheck with an error because the requirement
machine cannot build a rewrite system.

If SIMDScalar requires that MaskScalar.MaskScalar == MaskScalar, then
we instead get

  Vector.MaskStorage == SIMD2<Scalar.MaskScalar>
  Vector.MaskStorage.MaskStorage == SIMD2<Scalar.MaskScalar>

  Vector.MaskStorage.MaskStorage == Vector.MaskStorage
  ...

Which ties off the recursion.

In theory, a more advanced implementation could represent this kind of
infinite recursion in 'closed form', but we don't have that yet, and I
believe adding this same-type requirement makes sense anyway.

Fixes rdar://problem/95075552.
2022-06-22 21:26:15 -04:00
Karoy Lorentey
2759a710e6 [stdlib] OptionSet: Remove the primary associated type declaration
`Element` is expected to always be `Self`. `RawValue` would be a better choice for the primary type ("option set of UInt32"), but to avoid confusion, it seems better to just omit the declaration, at least for now.
2022-06-22 17:22:18 -07:00
swift-ci
b8f39b56be Merge remote-tracking branch 'origin/main' into rebranch 2022-06-22 09:15:09 -07:00
Alejandro Alonso
95da55b182 [stdlib] Implement String.WordView (#42414)
* Implement String.WordView

* Add isWordAligned bit

* Hide WordView for now (also separate Index type)

add bidirectional conformance

Fix tests

* Address comments from Karoy and Michael

* Remove word view, use index methods

* Address Karoy's comments

aaa
2022-06-22 09:10:09 -07:00
swift-ci
c6d6dc5bc0 Merge remote-tracking branch 'origin/main' into rebranch 2022-06-22 07:54:04 -07:00
Guillaume Lessard
69392a772a Merge pull request #59327 from glessard/rdar46444561-optional-equality-operator
[stdlib] use @_transparent in an appropriate spot
2022-06-22 08:39:42 -06:00
swift-ci
8bc1fbdada Merge remote-tracking branch 'origin/main' into rebranch 2022-06-21 21:53:58 -07:00
Mishal Shah
475ed80c3e Update the SwiftStdlib 5.7 availability 2022-06-21 15:23:10 -07:00
swift-ci
ed378ecae8 Merge remote-tracking branch 'origin/main' into rebranch 2022-06-13 19:54:01 -07:00
Karoy Lorentey
01d7b5799c [stdlib] Fix handling of duplicate items in generic Set.intersection
If the sequence passed to `Set.intersection` has exactly as many duplicate items as items missing from `self`, then the new implementation in 5.6 will mistakenly return `self` unchanged. (It counts duplicate hits as distinct items in the result.)

rdar://94803458
2022-06-13 14:12:48 -07:00
swift-ci
d6fceb79c5 Merge remote-tracking branch 'origin/main' into rebranch 2022-06-13 11:53:47 -07:00
Karoy Lorentey
2da382dc6b Merge pull request #59243 from rctcwyvrn/lily-dictionary-optimization
Optimize Dictionary.filter for native dictionaries
2022-06-13 11:47:12 -07:00
swift-ci
88de6f4757 Merge remote-tracking branch 'origin/main' into rebranch 2022-06-10 13:13:37 -07:00
swift-ci
e78643c08a Merge pull request #59143 from fulldecent/patch-1
Correct complexity statement for Sequence compactMap
2022-06-10 13:03:04 -07:00