Repository navigation
Commit 7a78d63
committed
Reduce use of std::span::subspan() by leveraging ParsingUtilities
https://bugs.webkit.org/show_bug.cgi?id=285271
Reviewed by Darin Adler.
A lot more code can be ported but this is a step in this direction.
* Source/JavaScriptCore/API/JSScript.mm:
(-[JSScript readCache]):
* Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:
(JSC::CallArguments::CallArguments):
* Source/JavaScriptCore/runtime/CachedTypes.cpp:
(JSC::Encoder::release):
* Source/JavaScriptCore/runtime/IntlLocale.cpp:
(JSC::LocaleIDBuilder::overrideLanguageScriptRegion):
* Source/JavaScriptCore/runtime/IntlObject.cpp:
(JSC::canonicalizeUnicodeExtensionsAfterICULocaleCanonicalization):
* Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructor.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
* Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototype.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
* Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp:
(JSC::jsBinaryIntegerLiteral):
(JSC::jsOctalIntegerLiteral):
(JSC::jsHexIntegerLiteral):
(JSC::toDouble):
(JSC::parseFloat):
* Source/JavaScriptCore/runtime/JSONObject.cpp:
(JSC::bufferMode>::append):
* Source/JavaScriptCore/runtime/JSStringJoiner.cpp:
(JSC::appendStringToDataWithOneCharacterSeparatorRepeatedly):
* Source/JavaScriptCore/runtime/ParseInt.h:
(JSC::isStrWhiteSpace):
* Source/WTF/WTF.xcodeproj/project.pbxproj:
* Source/WTF/wtf/CMakeLists.txt:
* Source/WTF/wtf/DateMath.cpp:
(WTF::parseES5DatePortion):
(WTF::parseES5TimePortion):
(WTF::parseDate):
* Source/WTF/wtf/text/ParsingUtilities.h: Renamed from Source/WebCore/html/parser/ParsingUtilities.h.
(WTF::isNotASCIISpace):
(WTF::skipExactly):
(WTF::characterPredicate):
(WTF::skipUntil):
(WTF::skipWhile):
(WTF::skipExactlyIgnoringASCIICase):
(WTF::skipLettersExactlyIgnoringASCIICase):
(WTF::skipCharactersExactly):
(WTF::consumeSingleElement):
(WTF::consumeSpan):
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneDeserializer::readString):
* Source/WebCore/css/parser/CSSCustomPropertySyntax.cpp:
* Source/WebCore/css/parser/CSSPropertyParser.cpp:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Font.cpp:
* Source/WebCore/html/HTMLFontElement.cpp:
(WebCore::parseFontSize):
* Source/WebCore/html/parser/HTMLDocumentParserFastPath.cpp:
* Source/WebCore/html/parser/HTMLParserIdioms.cpp:
(WebCore::parseHTMLIntegerInternal):
(WebCore::isHTMLSpaceOrDelimiter):
(WebCore::parseHTMLListOfOfFloatingPointNumberValuesInternal):
(WebCore::parseHTTPRefreshInternal):
* Source/WebCore/html/parser/HTMLSrcsetParser.cpp:
* Source/WebCore/html/track/VTTScanner.h:
(WebCore::characterPredicate):
(WebCore::VTTScanner::characterPredicate): Deleted.
* Source/WebCore/loader/LinkHeader.cpp:
* Source/WebCore/loader/ResourceCryptographicDigest.cpp:
* Source/WebCore/loader/SubresourceIntegrity.cpp:
* Source/WebCore/loader/appcache/ApplicationCacheManifestParser.cpp:
* Source/WebCore/page/csp/ContentSecurityPolicy.cpp:
* Source/WebCore/page/csp/ContentSecurityPolicyDirectiveList.cpp:
* Source/WebCore/page/csp/ContentSecurityPolicyMediaListDirective.cpp:
* Source/WebCore/page/csp/ContentSecurityPolicySourceList.cpp:
* Source/WebCore/page/csp/ContentSecurityPolicyTrustedTypesDirective.cpp:
* Source/WebCore/platform/DateComponents.cpp:
* Source/WebCore/platform/network/RFC8941.cpp:
* Source/WebCore/svg/SVGParserUtilities.h:
Canonical link: https://commits.webkit.org/288353@main1 parent 62a01cd commit 7a78d63
38 files changed
Lines changed: 192 additions & 183 deletions
File tree
- Source
- JavaScriptCore
- API
- bytecompiler
- runtime
- WTF
- WTF.xcodeproj
- wtf
- text
- WebCore
- WebCore.xcodeproj
- bindings/js
- css/parser
- html
- parser
- track
- loader
- appcache
- page/csp
- platform
- network
- svg
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
184 | 185 | | |
185 | 186 | | |
186 | 187 | | |
187 | | - | |
| 188 | + | |
188 | 189 | | |
189 | 190 | | |
190 | 191 | | |
191 | 192 | | |
192 | | - | |
| 193 | + | |
193 | 194 | | |
194 | 195 | | |
195 | 196 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1239 | 1239 | | |
1240 | 1240 | | |
1241 | 1241 | | |
1242 | | - | |
| 1242 | + | |
1243 | 1243 | | |
1244 | 1244 | | |
1245 | 1245 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
166 | 167 | | |
167 | 168 | | |
168 | 169 | | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
175 | 173 | | |
176 | 174 | | |
177 | 175 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
351 | 351 | | |
352 | 352 | | |
353 | 353 | | |
354 | | - | |
| 354 | + | |
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
103 | | - | |
| 102 | + | |
104 | 103 | | |
105 | 104 | | |
106 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
265 | 266 | | |
266 | 267 | | |
267 | 268 | | |
268 | | - | |
269 | | - | |
| 269 | + | |
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
290 | | - | |
291 | | - | |
| 290 | + | |
292 | 291 | | |
293 | 292 | | |
294 | 293 | | |
| |||
309 | 308 | | |
310 | 309 | | |
311 | 310 | | |
312 | | - | |
313 | | - | |
| 311 | + | |
314 | 312 | | |
315 | 313 | | |
316 | 314 | | |
| |||
367 | 365 | | |
368 | 366 | | |
369 | 367 | | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
| 368 | + | |
374 | 369 | | |
375 | 370 | | |
376 | 371 | | |
| |||
390 | 385 | | |
391 | 386 | | |
392 | 387 | | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
| 388 | + | |
| 389 | + | |
397 | 390 | | |
398 | 391 | | |
399 | 392 | | |
| |||
445 | 438 | | |
446 | 439 | | |
447 | 440 | | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
| 441 | + | |
452 | 442 | | |
453 | 443 | | |
454 | 444 | | |
| |||
460 | 450 | | |
461 | 451 | | |
462 | 452 | | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
| 453 | + | |
467 | 454 | | |
468 | 455 | | |
469 | 456 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
1306 | 1307 | | |
1307 | 1308 | | |
1308 | 1309 | | |
1309 | | - | |
1310 | | - | |
| 1310 | + | |
1311 | 1311 | | |
1312 | 1312 | | |
1313 | 1313 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
98 | | - | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
0 commit comments