Alex Martini
33deabab88
Merge pull request #60788 from amartini51/significand_exponent_56184186
...
Make pseudocode look less like real code.
2022-09-02 11:56:28 -07:00
Karoy Lorentey
6eddc2ed42
[stdlib] Don’t do full integer conversions in _roundUp
...
This code is exercised on pretty much every access to ManagedBuffer — let’s keep it as simple as possible.
The overflow case is not expected to ever occur here; this code is used to align offsets within objects, it isn’t expected to get inputs anywhere near Int.max.
2022-09-01 15:25:39 -07:00
Guillaume Lessard
805da6d8ad
[stdlib] improve note about subscripts and initialization
2022-08-31 17:24:23 -06:00
Guillaume Lessard
1f4ed8d976
Update stdlib/public/core/UnsafePointer.swift
...
Co-authored-by: Ben Rimmington <me@benrimmington.com >
2022-08-31 14:19:26 -06:00
Guillaume Lessard
99505d0819
[stdlib] simplify update(from:)
...
- one fewer variable, one fewer return point
- thanks @benrimmington
2022-08-31 11:49:06 -06:00
Guillaume Lessard
aabf2e2843
Update stdlib/public/core/UnsafeBufferPointer.swift.gyb
...
Co-authored-by: YR Chen <stevapple@icloud.com >
2022-08-31 10:50:25 -06:00
Guillaume Lessard
285984e3ae
[stdlib] simplify update(fromContentsOf:)
...
- one fewer variable, one fewer return point
2022-08-31 10:46:36 -06:00
Guillaume Lessard
d24b749ac2
[se-0370] improve silgen names for renamed symbols
2022-08-30 18:44:03 -06:00
Guillaume Lessard
c2c432c9d2
[se-0370] re-implement in accordance with updated proposal
2022-08-30 11:05:41 -06:00
Guillaume Lessard
f5ffe09c53
[se-0370] fix editing errors
2022-08-26 17:36:40 -06:00
Guillaume Lessard
0a78756bf4
[se-0370] add element labels to a returned tuple
...
- this is technically source-breaking,
but the risk seems to be very low.
2022-08-26 17:36:40 -06:00
Guillaume Lessard
26e5c43aa3
[se-0370] update documentation to track proposal
...
for the functions involving `fromContentsOf:`.
2022-08-26 17:36:40 -06:00
Guillaume Lessard
d63747f13d
[stdlib] remove the single-element update functions
...
- as per an update to the proposal
2022-08-26 17:36:40 -06:00
Guillaume Lessard
254a8d4af5
[stdlib] fix inconsistency with storeBytes on slices
2022-08-26 17:36:40 -06:00
Guillaume Lessard
6550fb109c
[stdlib] add loading and storing to and from raw buffer slices
2022-08-26 17:36:40 -06:00
Guillaume Lessard
c78cc93977
[gardening] typo fix
2022-08-26 17:36:40 -06:00
Guillaume Lessard
9cbc9eb000
[stlib] remove Slice<UMRBP>.copyMemory
2022-08-26 17:36:40 -06:00
Guillaume Lessard
75f64e731f
[stdlib] implement slice operations without protocols
2022-08-26 17:36:40 -06:00
Guillaume Lessard
359e69d67e
[stdlib] make more additions non-abi
2022-08-26 17:36:40 -06:00
Guillaume Lessard
00aaa07daf
[stdlib] improve doc-comments
2022-08-26 17:36:40 -06:00
Guillaume Lessard
831a87fd36
[stdlib] make additions non-abi
2022-08-26 17:36:40 -06:00
Guillaume Lessard
fcd10c3efc
[stdlib] partial buffer initialization (better buffer slices)
2022-08-26 17:36:40 -06:00
Guillaume Lessard
cc16a9f997
[stdlib] assign → update
2022-08-26 17:36:40 -06:00
Guillaume Lessard
2e3b5e6655
[stdlib] more memory initialization functions for UMRBP
2022-08-26 17:36:40 -06:00
Guillaume Lessard
bef793dd45
[stdlib] add single-element version of initializeMemory to UMRP
2022-08-26 17:36:40 -06:00
Guillaume Lessard
cff3012b37
[stdlib] additions to UMBP
...
- add initialization from a Collection
- assign to a UMBP from a Sequence or a Collection
- add `moveInitialize` and `moveAssign` to UMBP
- deinitialize UMBP
- add single-element memory state functions in a buffer
2022-08-26 17:36:40 -06:00
Guillaume Lessard
94d53871af
[gardening] remove outdated recommendation
2022-08-26 17:36:39 -06:00
Guillaume Lessard
99d957fa1e
[gardening] improve summary line
2022-08-26 17:36:39 -06:00
Guillaume Lessard
a7326d0353
[gardening] improve doc-comments in UnsafeMutablePointer
2022-08-26 17:36:39 -06:00
Guillaume Lessard
304a422c3e
[stdlib] add single-element assign to UnsafeMutablePointer
2022-08-26 17:36:39 -06:00
Alejandro Alonso
284f8d4fdd
Fix Substring.removeSubrange for entire substring ( #60744 )
...
fix start and end
fix test
2022-08-25 16:08:33 -07:00
Alex Martini
4d53ce470e
Make pseudocode look less like real code.
...
Generalizes the change in aac6d97f3f .
2022-08-25 15:48:36 -07:00
Guillaume Lessard
1bba62ec13
Merge pull request #60613 from glessard/pointer-arithmetic-overflow-checks
...
[stdlib] add overflow checks for some pointer arithmetic
2022-08-25 14:37:44 -06:00
Alex Martini
1a7146fb04
Merge pull request #58867 from amartini51/binaryString_93165742
...
Correct the expected output in an example
2022-08-24 13:56:49 -07:00
Alex Martini
8556e8337a
Merge pull request #60178 from amartini51/doc_fixes
...
Documentation fixes
2022-08-24 13:53:24 -07:00
Guillaume Lessard
fd4e98a51e
Merge pull request #60634 from glessard/rdar98851696-wMR-error-messages
...
@DougGregor approved the identical https://github.com/apple/swift/pull/60632 for the 5.7 branch.
2022-08-24 09:38:24 -06:00
Nate Cook
7ce1f3e722
[stdlib] Document stable sort guarantee
...
Changes the documentation of the stdlib `sort`/`sorted` methods
to provide a stability guarantee. No changes to behavior.
2022-08-23 11:05:30 -05:00
Guillaume Lessard
45b81f6456
[stdlib] add overflow checks for some pointer arithmetic
...
- Overflow checks added for recent additions to pointer arithmetic (rounding and property pointers).
- The basic `advanced(by:)` functions will need to be dealt with separately.
2022-08-22 09:51:10 -06:00
Guillaume Lessard
92087a8f62
[stdlib] add explanations to _debugPrecondition calls
2022-08-18 15:37:25 -06:00
Joe Groff
4ea98f92d2
Merge pull request #39119 from kateinoigakukun/katei/fix-internal-cc-mismatch
...
[stdlib] Fix cc mismatch violation on swift_isClassType
2022-08-18 10:00:01 -07:00
Arnold Schwaighofer
e5a35f9819
Merge pull request #60560 from aschwaighofer/always_inline_sprinkle_range_index_after
...
stdlib: Sprinkle an __always inline onto Range.index(after:)
2022-08-15 17:54:42 -07:00
Arnold Schwaighofer
48b4d3a73d
stdlib: Sprinkle an __always inline onto Range.index(after:)
...
After moving to the new llvm pass pipeline this function no longer gets
inlined. Leading to 150% regressions in ObjectiveCBridge benchmarks.
rdar://98533158
2022-08-15 11:09:42 -07:00
swift-ci
85f48aeb15
Merge remote-tracking branch 'origin/main' into rebranch
2022-08-09 18:53:20 -07:00
swift-ci
7701ddc054
Merge pull request #60428 from Catfish-Man/tag-youre-it
...
Handle long tagged NSStrings
2022-08-09 18:47:39 -07:00
Alex Martini
4d35aae50e
Incorporate tech review from @stephentyrone.
2022-08-09 12:45:36 -07:00
swift-ci
0409774802
Merge remote-tracking branch 'origin/main' into rebranch
2022-08-08 16:56:17 -07:00
Alex Martini
36114194c3
Fix missing word.
...
Co-authored-by: Ben Rimmington <me@benrimmington.com >
2022-08-08 15:40:58 -07:00
Alex Martini
bfba8d17ea
Fix link markup.
...
Co-authored-by: Ben Rimmington <me@benrimmington.com >
2022-08-08 15:40:47 -07:00
Michael Gottesman
366e7ae64d
[move-keyword] Remove the old stdlib entrypoint.
2022-08-08 12:50:42 -07:00
David Smith
e0dd80fe3b
Handle long tagged NSStrings
2022-08-05 19:02:37 -07:00