82 Commits

Author SHA1 Message Date
Jeremy Schonfeld
63ee09c520
rdar://107321451 (Predicate should support Collection subscripts for Index and Range<Index>) (#49) 2023-04-24 13:30:06 -07:00
Tony Parker
701c89647a
Fix fast-path for [Int] inserting a trailing comma (rdar://108386573) (#51)
* Add some links to known issues to TODOs

* Fix fast-path for [Int] inserting a trailing comma (rdar://108386573)
2023-04-23 11:32:07 -07:00
Jeremy Schonfeld
74559afbea
rdar://104093459 (Adopt the new Reflection Package to AttributedString) (#48) 2023-04-19 11:21:17 -07:00
Tony Parker
d1cc2ea0a2
Add some links to known issues to TODOs (#47) 2023-04-18 14:53:06 -07:00
Charles Hu
0ac5999256
rdar://107847458 (Fix FoundationPreview CalendarTests on Linux) (#36) 2023-04-18 13:59:56 -07:00
Jeremy Schonfeld
ce38824e5a
(108066094) Make PredicateBindings.init variadic (#31) 2023-04-18 11:03:57 -07:00
Charles Hu
9e0cf5c070
JSON Performance Improvements (#35)
* (rdar://106881898) JSONEncoder should only use references for JSON encoding tree

* (rdar://107967520) Initial opportunities for JSONEncoder performance optimization

---------

Co-authored-by: Kevin Perry <kperry@apple.com>
2023-04-18 11:03:30 -07:00
Charles Hu
61d6ca6021
rdar://107729601 (Move Error to FoundationPreview) (#1153) (#28)
* rdar://107729601 (Move Error to FoundationPreview)

* rdar://107729601 -- Use stub URL and regular String Encoding

* rdar://107729601 -- Take out RawRepresentable conformance, because changing it was an ABI break

* rdar://107729601 -- Rename Error.swift to CocoaError.swift

Co-authored-by: Tony Parker <anthony.parker@apple.com>
2023-04-17 18:24:36 -07:00
Charles Hu
c01e9dadee
rdar://107955097 (FoundationPreview: Batch move string API (continued)) (#34)
* rdar://107955097 (FoundationPreview: Batch move string API (continued))

- Move localized uppercase and lowercase to FoundationLocalization
- if-def out of CharacterSet from FoundationPreview. It's not implemented at all there, and having a no-op stub is misleading

* rdar://107955097 (FoundationPreview: Batch move string API (continued))

- Move components separated by string and range of string functions

* rdar://107955097 (FoundationPreview: Batch move string API (continued))

Enable snake case options for JSON encoder and decoder. We haven't been able to enable this option because it needed `CharacterSet`, which hasn't been properly implemented for FoundationPreview. Now that we have `BuiltInUnicodeScalarSet`, which mirrors `CharacterSet`, we can switch to that and enable the options.

* rdar://107955097 (FoundationPreview: Batch move string API (continued))

- Move `StringProtocol.lineRange(for:)` and `paragraphRange(for:)` to FoundationEssentials
- Rename String+Regex.swift to RegexPatternCache.swift
- Consolidate extensions on various String family members and remove one redundant swift file

---------

Co-authored-by: I-Ting Tina Liu <iting_liu@apple.com>
2023-04-17 18:23:51 -07:00
Guillaume Lessard
ecd52ceb38
rdar://108073576 (Don't expose BufferView's baseAddress property) (#32)
* Clarify use of unsafe code and call to memcmp

* Do not expose a BufferView’s `baseAddress`
2023-04-17 16:37:12 -07:00
Guillaume Lessard
450cf1c600
Improve deallocation of copied buffer (#26) 2023-04-14 17:50:37 -07:00
Tony Parker
0f9ef67361
rdar://108059256 -- Use polymorphism instead of a dynamic cast for better performance (#30) 2023-04-14 13:49:17 -07:00
Tony Parker
8c40aefe36
rdar://108022482 (Do more to cache Swift Locales bridged to Objective-C) (#29) 2023-04-14 10:36:30 -07:00
Guillaume Lessard
1c4eacbf54
fix release-mode package build 2023-04-11 16:55:42 -07:00
Guillaume Lessard
9fdb8f2a8b
rename file 2023-04-11 15:45:04 -07:00
Guillaume Lessard
4b8a234a5b
Rename the docStart parameter to fullSource 2023-04-11 15:07:33 -07:00
Guillaume Lessard
bf0990beea
rename cursor to index in 2 more places
# Conflicts:
#	Sources/FoundationEssentials/JSON/JSON5Scanner.swift
2023-04-11 14:43:07 -07:00
Guillaume Lessard
fb332a8b28
pass buffer as context reference
- this prevents what is effectively as an address escape, and allows better control of index bounds.
2023-04-11 14:14:43 -07:00
Guillaume Lessard
47e4910fc0
update two-byte hex decoding
Use the same decoding method for two-byte hex sequences as for four-byte hex sequences.
2023-04-11 10:59:48 -07:00
Guillaume Lessard
aaa9d2cfbd
split out slow path of stringValue() 2023-04-11 10:59:48 -07:00
Guillaume Lessard
5d6ab4a2ab
add helpful labels to more return tuples 2023-04-11 10:59:47 -07:00
Guillaume Lessard
5091f252c2
Rename DocumentReader’s index properties 2023-04-11 10:59:47 -07:00
Guillaume Lessard
679fab1ff2
label a return tuple 2023-04-11 10:59:47 -07:00
Guillaume Lessard
4f7af4851a
update a conditionally-compiled section 2023-04-11 10:59:47 -07:00
Guillaume Lessard
1ab3832106
layer json decoding over bufferview 2023-04-11 10:59:47 -07:00
Guillaume Lessard
bd712abbc3
change sourceLocation to use UnsafeRawPointer 2023-04-11 10:57:45 -07:00
Guillaume Lessard
6a4eeceb41
Merge pull request #24 from glessard/bufferview
Adjust code formatting
2023-04-11 10:45:51 -07:00
Guillaume Lessard
9fe8623124
adjust code formatting
- also incorporates some performance annotations added for the JSON decoder.
2023-04-11 10:26:37 -07:00
Charles Hu
876f320633 Added default styles to Date.IntervalFormatStyle 2023-04-10 17:18:23 -07:00
Charles Hu
3f9105034c Dropped the NS prefix from NSICUDateFormatter, NSICURelativeDateFormatter, NSICULegacyNumberFormatter, and NSICUPatternGenerator 2023-04-10 17:18:23 -07:00
Charles Hu
320a9a0e7a Moved Date.IntervalFormatStyle that's based on ICUDateIntervalFormatter 2023-04-10 17:18:23 -07:00
Charles Hu
2095f3cf69 rdar://107533913 (Move FormatStyles to FoundationPreview) 2023-04-10 17:18:23 -07:00
Jeremy Schonfeld
818b7daea1
Merge pull request #19 from jmschonfeld/sendable-attrstr
rdar://100474708 (Make AttributedString Sendable)
2023-04-10 12:47:04 -07:00
Guillaume Lessard
1b27c1cba7
make initializers from BufferPointer failable 2023-04-05 12:57:06 -07:00
Guillaume Lessard
49cf29f735
remove unnecessary public keywords 2023-04-04 17:20:50 -07:00
Guillaume Lessard
fe89db476a
remove dependsOn parameter
- it is not useful without compiler support.
2023-04-04 17:02:31 -07:00
Guillaume Lessard
c4a08fc971
remove commented-out code 2023-04-03 19:26:30 -07:00
Guillaume Lessard
8095d73d8a
add the copyright notice 2023-04-03 12:48:35 -07:00
Guillaume Lessard
b6d610d626
add internal BufferView prototype 2023-04-03 12:16:27 -07:00
Jeremy Schonfeld
82baceef48 rdar://100474708 (Make AttributedString Sendable) 2023-04-03 10:41:22 -07:00
Tony Parker
a3804f534a
Remove FoundationNetworking stub 2023-03-30 12:59:36 -07:00
Charles Hu
c1f0bfe065 Enabled more tests 2023-03-29 09:56:30 -07:00
Charles Hu
e2c177e867 Rebased on top of the new String APIs 2023-03-29 09:56:22 -07:00
Tina Liu
2f2ae679f6 rdar://107156343 (Rebased JSONEncoder on top of new String changes) 2023-03-29 09:56:15 -07:00
Charles Hu
34c45c169c rdar://107156343 (Move JSONEncoder to FoundationPreview) 2023-03-29 09:56:00 -07:00
Tony Parker
9990c280ed rdar://106190030 (Fix crash) 2023-03-28 19:38:53 -07:00
Tony Parker
1fe6e1f4f4 rdar://106898040 (Fix currency text field) 2023-03-28 19:38:29 -07:00
Tony Parker
4400b9dd52 rdar://106792309 (Fix regression) 2023-03-28 19:38:21 -07:00
Tina Liu
bef6e1bb87 rdar://106555323 (NSLocale countryCode should behave the same as regionCode)
Call through `region.identifier` for `countryCode` whenever possible.
2023-03-28 19:38:14 -07:00
Jeremy Schonfeld
b5d51f44ba rdar://106320664 (Added debug description to UUID) 2023-03-28 19:38:04 -07:00