Bug 237178 - Begin transition from WTF::Span to std::span
Summary: Begin transition from WTF::Span to std::span
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on: 253377
Blocks:
  Show dependency treegraph
 
Reported: 2022-02-24 19:55 PST by Alex Christensen
Modified: 2023-05-11 20:20 PDT (History)
40 users (show)

See Also:


Attachments
Patch (172.30 KB, patch)
2022-02-24 19:59 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (47.29 KB, patch)
2022-04-22 11:40 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch with explicit conversions (55.00 KB, patch)
2022-04-28 15:48 PDT, Ross Kirsling
no flags Details | Formatted Diff | Diff
Patch (59.80 KB, patch)
2022-04-28 17:39 PDT, Alex Christensen
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2022-02-24 19:55:48 PST
Begin transition from WTF::Span to std::span
Comment 1 Alex Christensen 2022-02-24 19:59:17 PST
Created attachment 453169 [details]
Patch
Comment 2 Alex Christensen 2022-02-25 09:08:38 PST
Comment on attachment 453169 [details]
Patch

Apparently Visual Studio 2019's C++20 implementation doesn't have the span header.
Comment 3 Radar WebKit Bug Importer 2022-03-03 19:56:19 PST
<rdar://problem/89792762>
Comment 4 Alex Christensen 2022-04-22 11:40:26 PDT
Created attachment 458160 [details]
Patch
Comment 5 Ross Kirsling 2022-04-28 15:48:32 PDT
Created attachment 458551 [details]
Patch with explicit conversions

Here's an updated patch that builds on Windows.
Comment 6 Alex Christensen 2022-04-28 17:39:05 PDT
Created attachment 458558 [details]
Patch
Comment 7 Alex Christensen 2022-04-28 22:25:40 PDT
Comment on attachment 458558 [details]
Patch

Looks like std::span requires GCC 10.  Bummer.
Comment 8 Don Olmstead 2022-04-29 10:20:15 PDT
(In reply to Alex Christensen from comment #7)
> Comment on attachment 458558 [details]
> Patch
> 
> Looks like std::span requires GCC 10.  Bummer.

Can you do a check for it in CMake for std::span and if its there use it otherwise use our implementation of std::span?
Comment 9 Alex Christensen 2022-05-02 09:08:57 PDT
I guess we will have to wait another year for this, but my goal is to remove WTF::Span.
Comment 10 David Kilzer (:ddkilzer) 2023-03-05 09:44:45 PST
Bug 253377 started using std::span for all Apple ports (including any port compiling with clang or MSVC, plus ports that compile with GCC that pass a compile test in CMake) behind a WTF::makeSpan() adapter.

Once all ports support std::span, the WTF::makeSpan() adapter will be removed.
Comment 11 Ross Kirsling 2023-03-05 20:16:14 PST
Just for the record, it's not just GCC; PS port needed a fix too:
https://github.com/WebKit/WebKit/commit/f105d6117bd798d28c016d2f2a639e693afbeefa
Comment 12 Alex Christensen 2023-05-03 13:42:21 PDT
Pull request: https://github.com/WebKit/WebKit/pull/13414
Comment 13 EWS 2023-05-11 20:20:14 PDT
Committed 263998@main (0fa955e615eb): <https://commits.webkit.org/263998@main>

Reviewed commits have been landed. Closing PR #13414 and removing active labels.