forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 45
Merge upstream/main (46525dbf2abb) — adopt libpas Windows is_symmetric #203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 250 commits
Commits
Show all changes
268 commits
Select commit
Hold shift + click to select a range
10c13e9
[JSC] Refine clobberize rule for ObjectCreate
sosukesuzuki bfab895
[JSC] Add `emitBytecodeInConditionContext` for optional chaining
sosukesuzuki fac0cb3
[Site Isolation] Replace parentFrameSecurityOrigin with precomputed b…
atar13 93f39b4
marketwatch.com: Tapping the “share” button causes the media controls…
sammygill 93bc07f
Use protect() instead of Ref { } in permissions, highlight, and webau…
ruthvikkonda 82c23c3
[Site Isolation] http/tests/security/frameNavigation/not-opener.html …
atar13 bf720cf
[JSC] Adopt truncate-double-to-int infrastructure more in ArrayProtot…
tetsuharuohzeki f6d1b6e
[JSC] Produce flat string from `padStart` / `padEnd` for short results
sosukesuzuki 4c22d31
Use UTR#50 Vertical_Orientation for SVG glyph-orientation-vertical: auto
Ahmad-S792 edcf5f3
[GFC][Cleanup] Add a struct to aggregate data associated with a grid …
sammygill 1fb5ba8
innerText should not emit newlines for visibility:hidden block elements
cdumez 90e427e
[Swift in WebKit] Apply formatting/linting to Tools/TestWebKitAPI
rr-codes 57b25bb
[Site Isolation] http/tests/navigation/redirect-preserves-fragment.ht…
rniwa f3816fe
Harden NSDraggingItem creation in WebViewImpl::startDrag.
megangardner 9e7125f
Unreviewed gardening
csaavedra ce921a9
Add test to show that we properly begin at the top of the document tr…
megangardner c417392
[Site isolation] Swiping over scrollable web content in cross-origin …
lilyspiniolas 05f145f
Event's target can get its JS wrapper GC'ed
rniwa 38a0bdf
Resync `svg` from WPT Upstream
Ahmad-S792 a3c1d3b
Fix wheel event handling in WPEQtView
tusooa d4ee79d
REGRESSION (311908@main): Autoplay button in YouTube controls is misp…
alanbaradlay 71b6443
Update state of WPEToplevelQtQuick when window state changes
tusooa 5e3085d
Remove unused CSS/Style PropertyIdentifier types
weinig 6c0e1dc
[AppKit Gestures] Support gesture recognizer-initiated drag sessions
aprotyas 2a76b69
AX: VoiceOver cannot position the focus ring correctly element is bei…
twilco 9bf4fb6
REGRESSION(290385@main - 290390@main?): [ wk2 arm64 ] imported/w3c/we…
rniwa 49694dd
[CSS Calc] sibling-index() and sibling-count() should set requiresCon…
Ahmad-S792 b7e777f
[Site Isolation] http/tests/navigation/redirect-to-fragment.html and …
rniwa e12a52d
[Site Isolation] http/tests/security/XFrameOptions/x-frame-options-ig…
rniwa 5da32d9
[JSC] Lazily resolve default calendar / numberingSystem in Intl const…
sosukesuzuki 5878eac
[AppKit Gestures] Gesture recognizer driven inputs can stop working a…
aprotyas 0ae1849
[Site Isolation] fast/events/before-unload-navigate-different-window.…
rniwa ee5f807
Sequential focus navigation should not move focus between elements wi…
Ahmad-S792 d1ec7b5
[JSC] Remove createSuppressedError builtin
Constellation 8fb99af
Resync `css/filter-effects` from WPT Upstream
Ahmad-S792 008ce40
[JSC] OMG should only emit WasmBoundsCheck overflow guard for Int64 p…
sosukesuzuki 21ec347
[iOS] Create event regions for dblclick
lilyspiniolas e76b2a2
[Gardening]: REGRESSION(310272@main): [Tahoe] imported/w3c/web-platfo…
karlrackler a776836
[GLIB] Fix flaky test fast/repaint/backgroundSizeRepaint.html
dpino f984a04
[Gardening]: REGRESSION(310272@main): [Tahoe] imported/w3c/web-platfo…
karlrackler 5dbb3ad
Resync `css/css-scroll-snap` from from WPT Upstream
smfr 78682e8
[JSC] Avoid per-edge ModuleLoaderPayload allocation in graph loading
sosukesuzuki 6fde2fd
[Gardening]: REGRESSION(311771@main): [Tahoe] media/media-vp8-webm-wi…
karlrackler 689ebe5
[WebGPU] device.onuncapturederror = ... does not work
mwyrzykowski 0c84b51
[Site Isolation] http/tests/websocket/tests/hybi/contentextensions/up…
rniwa afaad74
[Site Isolation] webarchive/loading/test-loading-archive.html fails
rniwa a413796
Synchronize WPT html/semantics/embedded-content
annevk 64a80d8
[Site Isolation] editing/execCommand/delete-no-scroll.html fails
rniwa b6083e9
[Site Isolation] animations/animation-multiple-callbacks-timestamp.ht…
rniwa a340e58
setAutomaticLinkDetection not working in WebKit2
rniwa 3792899
[Site Isolation] js/dom/dfg-inline-resolve.html fails
rniwa d3fea49
[Site Isolation] editing/pasteboard/copy-text-from-uneditable-element…
rniwa ed753c5
[Site Isolation] http/tests/workers/service/postmessage-after-sw-proc…
rniwa 5fcd169
[Site Isolation] editing/undo/undo-with-disconnected-editable-element…
rniwa c06ceeb
[Gardening]: [Sequoia+] imported/w3c/web-platform-tests/media-source/…
karlrackler 58c70eb
stroke-dasharray interpolation should use LCM for list length matching
Ahmad-S792 9323616
REGRESSION (304469@main): WTR::supportedAttributes() leaks NSMutableA…
fd0db67
[WTF] Fix crash in utf8ForCharacters when string ends with unpaired s…
kmonsen c5b4561
[Site Isolation] Clear CORS preflight cache between tests
rniwa e98d7d8
Handle MessagePort messages in FIFO order
annevk 007d79c
[TestWebKitAPI] Remove Embed Frameworks phase from TestWGSL target
0f86f54
Fix FileSystemDirectoryHandle's resolve()
annevk 9bed770
[Site Isolation] http/tests/xmlhttprequest/abort-should-cancel-load.h…
rniwa 6ee2ef3
[Site Isolation] http/wpt/html/browsers/browsing-the-web/navigating-a…
rniwa edf0a92
[Site Isolation] editing/inserting/insert-list-then-edit-command-cras…
rniwa 163e3c0
[Swift Testing] Make it easy to allow a WebPage to access web process…
rr-codes 9c49484
[GTK][WPE] Skia Compositor: Make *ForChildren transforms transient
zhani 0677ffb
Linux Swift build fixes
adetaylor 8e98c46
Remove accidentally committed file from 312065@main
rr-codes 84a17ea
SkiaCompositingLayer: clip rect should take the accumulated replica t…
fujii 5c4b430
[Swift Testing] Make it easy to allow a WebPage to get and set select…
rr-codes 1d5da19
CoordinatedPlatformLayer::invalidateTarget should be called before de…
fujii 59e1343
[WebXR][OpenXR] Support Equirect layer
svillar a49dbdc
[GTK] fast/forms/placeholder-content-line-height.html is failing
dpino d18deb3
[CMake] Enable AV1 codec support on the macOS port
zakariaridouh 791f050
[GLib] Remove version check in soup/WebKitDirectoryInputStream.cpp
aperezdc e51899f
[GTK][WPE] Skia Compositor: use SkBlendMode::kSrc when copying dirty …
carlosgcampos 429c0af
[GTK][WPE] REGRESSION(312071@main): ASSERTION FAILED: !m_target in ~C…
fujii 70bdcef
[CoordinatedGraphics] Replace bit-shifted Change enum in CoordinatedP…
nikolaszimmermann c04c110
Unreviewed, reverting 312070@main (5c4b4308307b)
karlrackler b55bdc1
Accept anchor-* as aliases of anchors-* in position-visibility
fantasai 47f6224
Fix imported/w3c/web-platform-tests/css/css-sizing/inline-intrinsic-s…
alanbaradlay 78d320c
BFC with margin-start overlaps adjacent float
alanbaradlay 9b61fa3
Float with margin-start overlaps adjacent float
alanbaradlay 2d2f202
Fix imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/block…
alanbaradlay 957846b
Fix imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/flex-…
alanbaradlay 6027938
Fix imported/w3c/web-platform-tests/css/css-sizing/stretch/stretch-bl…
alanbaradlay 791b1c7
[macOS] Restrict sandbox access to file-clone in Networking process a…
pvollan b02f885
[macOS] Limit some sandbox read accesses to internal builds
pvollan d113109
Fix subtest leak in fast/selectors/has-invalidation-traversal-size.html
anttijk 61e2280
[LBSE] Cache local transform for non-layered SVG elements
rwlbuis b5484e5
style checker fails with PNG files
karlcow 0ae02b1
Fix Fetch 301 & 302 redirect behavior
annevk 6176517
AX: ownerParentObject() shows up heavily in samples on Speedometer de…
twilco 3b8f247
[TestWebKitAPI] Use framework-style include for WebCoreTestSupport.h
451e583
[GLIB] Gardening for April 27th 2026
csaavedra 03415ef
[GLIB] Skip IPC tests expected to timeout/crash
csaavedra 00db8e1
Drummer model on various sites has its wind-up key become invisible a…
mwyrzykowski 99f9751
Model stops spinning when leaving and returning to the tab
mwyrzykowski 534592e
Resize handle doesn't work on iframe container when handle overlaps i…
alanbaradlay 9147d34
[model] Correct framework checks
mwyrzykowski 475a14f
[JSC][JSPI] Change the signing scheme of return PCs in EvacuatedStack…
ast-hugger 3cce849
Versioning. WebKit-7625.1.16
108882f
[:has() perf] Remove separate handling of scope breaking selectors
anttijk 24b39d1
[Gardening][iOS] REGRESSION(4/9/2026?): fast/backgrounds/background-r…
diegodelatoba 3e6353a
[Gardening]REGRESSION:(311911@main) [macOS]fonts/font-cache-memory-pr…
diegodelatoba 9b4359d
Adopt LIFETIME_BOUND in the downcast family of functions
geoffreygaren 942019b
Unified sources build fix
pxlcoder ba1f174
Aspect-ratio automatic minimum should not override flex/grid stretch …
alanbaradlay ba55759
Fixed the CMake Swift build with recent toolchains
geoffreygaren b4245e1
[CMake] Adopt -gsimple-template-names and -dwarf-linkage-names=Abstract
geoffreygaren e14f985
[JSC] Move symbolHasInstance to C++
Constellation 370fcab
[JSC] Remove @isArraySlow
Constellation 2a5614a
Revert accidentally committed file
geoffreygaren 08d2ef1
[AppKit Gestures] Gesture recognizer driven drag operations can not c…
aprotyas a91d8f8
[Site Isolation] Make typing work on iOS
RupinMittal d4029d5
[Build Speed] Fix compilation issues in JSC headers
jernoble f9b3622
Use protect() instead of RefPtr { } in ServiceWorkerGlobalScope, XMLH…
jelee53 9070da9
[TSan] GlyphPage::s_count: use std::atomic for the debug counter
DanBlackwell ec0f666
sports.yahoo.com: volume slider baseline is incorrect and it is bit b…
J0pan 20621fe
Replace logging instances in HTMLMediaElement.cpp with the more effic…
pvollan 41ae266
[JSC] Codegen: emit basenames, not absolute paths, in "generated from…
sheeparegreat 04c5285
[Site Isolation] http/tests/misc/willCacheResponse-delegate-callback.…
rniwa 935f187
[Site Isolation] http/tests/navigation/cross-origin-navigation-fires-…
rniwa ea23208
[Site Isolation] Rename focusedLocalFrame to localFocusedFrame
RupinMittal 1689358
Allow the api test parallel allowlist to accept test names individually
Smackteo fe27944
[Site Isolation] http/tests/navigation/cross-site-iframe-nav.html fails
rniwa 4337048
[JSC] Add Map / Set fast iteration
Constellation d2ad355
TestWebKitAPI.ResourceLoadStatistics.EnableResourceLoadStatisticsAfte…
042fe2f
[CMake] Add mac-dev-debug-o3 preset
Constellation daecd76
Assert in processLineBreakingResult when line-start-prohibited charac…
alanbaradlay ced4457
REGRESSION(312044@main): [macOS] http/tests/websocket/tests/hybi/cont…
rniwa f69c4f5
[WTF] Use worklist for WTF::Liveness
Constellation 1fa52a4
Haiku upstreaming; WebCore part 1
pulkomandy 38b6ce2
Expand :is()/:where() optimization beyond tag selectors
nipunshukla21 6bd5ef4
Remove redundant set of sandbox extensions in NetworkResourceLoadPara…
pvollan 3d3f476
[JSC] Delay intlAvailableTimeZoneIndex initialization as normal IANA …
Constellation d9d2138
[CMake] Export ShareableCVPixelBuffer headers as WebCore framework he…
sheeparegreat 0e0e65c
[libpas] Upgrade to gnu++23
Achierius 5a8b1e3
Add preliminary cursor shape support for WPEQtView
tusooa f84460b
API::PageConfiguration::Data::LazyInitializedRef wastefully initializ…
brentfulgham a405f8c
Unified sources build fix
pxlcoder 5a08617
`eventTypeForEventListenerType` has incorrect mappings for `mousemove…
lilyspiniolas 5b2f95f
Enable touch and dblclick event regions on iOS-family regardless of SDK
lilyspiniolas 61a8875
[JSC] Add JSFullPromiseReaction and JSSlimPromiseReaction
Constellation aa6c00c
[JSC] Inline tight loop of String#localeCompare in FTL
Constellation 9f66695
[CMake] Add cmake-build-analysis for ninja whole-build profiling
sheeparegreat 823d636
REGRESSION(311538@main): Unreviewed, skip tests again
Constellation c1bdc51
[TSan] ANGLE: emitMetalCallCount should be std::atomic
DanBlackwell 41727b0
[CMake] swiftc-wrapper: translate -fsanitize=* to -sanitize=*
sheeparegreat a44ee72
[CMake] Add generate-cmake-vscode-project-macos for the cmake-mac build
sheeparegreat 1d70b35
Make fullscreen quirk clearer about what it does
annevk 5ade7c0
[JSC] Remove the overload of printInternal() for JSC::ConstraintVolat…
ast-hugger 0d7053c
Introduced UnbarrieredMonotonicTime.
ebaadb2
[CMake] Follow-up on -gsimple-template-names: Use WEBKIT_PREPEND_GLOB…
geoffreygaren 723db2e
[CMake] Match the Xcode build's approach to bmalloc/WTF/JSC
geoffreygaren c2419dc
WebGL: Some texImage functions use incorrect name when reporting errors
kkinnunen-apple 3b911b2
[CMake] Don't relink WebKit when relinking WebCore (or either when re…
geoffreygaren df46e3a
[Site Isolation] SessionStorage message from cross-site frame fails s…
szewai b1b0e82
REGRESSION(311624@main): LLIntAssembly.h:189:54: error: use of undecl…
cdumez 1af18a1
[Site Isolation] CSP violation reports not sent for frame-ancestors v…
roberto-apple 70e442b
REGRESSION(311771@main): [Tahoe] media/media-vp8-webm-with-preload.ht…
jyavenard 7f42431
Make LayoutTests/fast/repaint/line-flow-* tests runnable outside WebK…
heycam 33ff124
Remove WPT file-system-access
annevk 4476b09
[CMake][Mac] Fail configure if an ASan build dir is reconfigured with…
sheeparegreat dc829e1
[CMake][Mac] WebKitTestRunner/TestWebKitAPI/TestIPC fail to link: WTF…
sheeparegreat 2a0052e
[Mac] Add support for screen reserved
jernoble 16ecd5c
Re-land [Swift Testing] Make it easy to allow a WebPage to get and se…
rr-codes afc2f0f
[CMake][Mac] WebGPU framework fails to link: missing CoreGraphics and…
sheeparegreat 0a2872f
innerText should emit blank lines around <p> elements regardless of C…
cdumez 3d8f24e
[Site Isolation] http/wpt/service-workers/third-party-registration.ht…
rniwa 65f1f3b
[Site Isolation] http/tests/security/mixedContent/redirect-https-to-h…
rniwa 00845d9
git-webkit create-bug --see-also causes cc_radar() to prompt about ov…
c8e987c
Add WebKitAdditions hook for TestWebKitAPILibrary
rr-codes 07fca8a
[Site Isolation] http/tests/security/XFrameOptions/x-frame-options-ig…
atar13 c53a7f9
Create WKRBSAssertion subclass of RBSAssertion to prevent missing inv…
RupinMittal 3086207
[GStreamer][glib] Fix GRefPtr adaptations
calvaris 0f476df
Leak due to retain cycle between LibWebRTCRtp{Sender,Receiver}Transfo…
29826ed
[Media Testing] Add MP4 file generator to media-source layout tests a…
jernoble c479f0f
(REGRESSION): 9 imported/w3c/web-platform-tests/html/dom/elements/req…
vitorroriz 856e446
WebGL: compressedTexImage does not check if the texture format has be…
kkinnunen-apple 3ea8ec0
[Site Isolation] http/wpt/clear-site-data/partitioning.html fails
rniwa be6e7f7
[Skia][GBM] Use gbm_bo_map() fallback when gbm_bo_get_fd_for_plane() …
nikolaszimmermann 703ce78
fonts/font-cache-memory-pressure-crash.html is treated as binary by git
cdumez 466ee71
[Build Speed] Group together source files requiring RenderStyle+Gette…
jernoble 2c58221
Make EventTarget::opaqueRoot and Node::opaqueRoot out-of-line
rniwa a50da55
REGRESSION(309943@main): Drag-and-drop preview does not lift from cor…
aprotyas c529c61
Make AudioNode's ref-counting thread-safe
cdumez ee9f80f
[WebXR Layers] Refactor the composition layers code
svillar 6ff991b
[GStreamer][Rice] Flaky crash in `rice_proto::conncheck::ConnCheckLis…
philn 056c4c5
[GStreamer] 3 new failures on MVT tests hls-hlsjs-test/HLS_FMP4_MP3 a…
ntrrgc 761084d
New Test(294043@main): [ iOS Debug ] ipc/invalid-addSourceBuffer-to-G…
csaavedra 404e188
REGRESSION:(311911@main) [macOS]fonts/font-cache-memory-pressure-cras…
cdumez ddc0a2f
Fix FileSystemDirectoryHandle's removeEntry()
annevk 2fea5de
[GTK][WPE] Skia Compositor: handle empty clip path in mask layers
carlosgcampos 1bcdb2f
Import service worker registrations lazily, one top-level origin at a…
cdumez 253f33f
ImageCapture: queue takePhoto() and applyConstraints() to avoid concu…
eric-carlson 343e13b
Fix imported/w3c/web-platform-tests/css/css-tables/absolute-tables-00…
alanbaradlay e611c7f
CryptoAlgoritmHKDFOpenSSL: fix OpenSSL3 compatibility function
pulkomandy e211768
[Site Isolation] Document::isSecureContext ignores RemoteFrame ancestors
atar13 a888adc
Fix use-after-move in Storage::storeBodyAsBlob()
cdumez 67fc22e
WKMouseTrackingObserver should do a hit test before forwarding mouse …
danae404 36c3761
Improve libatomic test in WebKitCompilerFlags.cmake
bertogg a24949c
Unreviewed, reverting 312184@main (466ee713fc9c)
JonWBedard 4ab1c5a
Fix imported/w3c/web-platform-tests/css/css-tables/absolute-tables-01…
alanbaradlay f55db8d
After spending some time on a page, web content hangs forcing page re…
nipunshukla21 21ca921
Flex container baseline should be clamped to border edge for scroll c…
Ahmad-S792 dfd0483
Fix incorrect nesting of m_glyphsWithComplexColorFormat reset.
fantasai f08993f
LayoutTest streams/pipe-to.html is a flaky failure
brentfulgham ada244d
IPC values to createModel are not validated
mwyrzykowski 576dd92
updateOriginData should avoid updating result if input is empty
szewai ce1c5b0
REGRESSION(305413.31@safari-7624-branch): Broke editing/pasteboard/im…
xeenon 9e45d72
[Site Isolation] prefers-color-scheme doesn't see color-scheme from p…
tuankiet65 91912cb
Use protect() instead of Ref { } in reporting and remoteplayback code
ruthvikkonda 9f4deff
Use protect() instead of Ref { } in notifications code
ruthvikkonda 24f1e6d
Use protect() instead of Ref { } in push-api code
ruthvikkonda 7e49a67
Make CleanGitRepo robust against stale git lock files left by interru…
aj062 21b295c
[Gardening]: [macOS Debug] ASSERTION FAILED: !m_loggingLevel virtual …
martadarbinyan 0e74ad9
[libpas] Clean up Windows implementation
Constellation 8c8ff06
Use protect() instead of Ref { } in storage and speech code
ruthvikkonda 8af021f
[JSC] More aligning module loader to the spec
Constellation 45d24e3
[:has()] Fix failures in css/selectors/invalidation/has-invalidation-…
anttijk cfb69a9
[CMake] Set --std=c++17 for the libatomic probe
zakariaridouh f2a3aa2
Remove all KVO observers before calling [m_objcObserver disconnect] i…
c64f173
[WebGPU] Install libwgsl.a when FORCE_TOOL_INSTALL=YES
779aba8
Unreviewed, reverting 312202@main (36c3761def82)
martadarbinyan dc7238d
[Gardening][iOS] imported/w3c/web-platform-tests/navigation-api/navig…
diegodelatoba e7745af
[WebKit][Main+SU] [3473ae787b8859f0] ASAN_SEGV | WebCore::DocumentLoa…
rwlbuis b05d16f
[JSC] Save source offset for evaluating Wasm constant expressions
syg 42beed9
Use WeakHashSet::forEach to iterate over set where the iterator might…
kmonsen ec1b15d
Unreviewed, reverting 311500@main (61c4954ff80a)
mwyrzykowski 1c19ff8
Clean up stale web extension origin data after migration
szewai 527346d
[MacOS IOS] imported/w3c/web-platform-tests/css/css-viewport/zoom/ifr…
diegodelatoba 80eaeca
Occasional flicker of bad layer offsets when positions are adjusted b…
smfr 3caec83
Use HTTP status codes in more places
fred-wang 8ecfbea
[CMake] Fix CMake -Xcc flag deduplication in native Swift target_comp…
zakariaridouh b4390e8
Fix CSP bypass in sandboxed srcdoc iframes
charliewolfe c7e7785
[WebKit][Main+SU] [73e157cc9e45c104] ASAN_SEGV | WebCore::WebAnimatio…
csaavedra 9fe9df5
[LDM] Ensure temporary pages use the correct Font Parser
brentfulgham 99779db
[libpas] Remove partial views
Achierius 21ce77b
[Build Speed] Group together source files requiring RenderStyle+Gette…
jernoble a7b2ad4
Make line-flow-with-float-* layout tests pass in Site Isolation mode
heycam 6b2ce02
Adjust fuzzy annotation on gradient-analogous-missing-components-003.…
heycam e298509
WebGL provoking vertex with uint16 primitive restart causes GPU OOB a…
ruthvikkonda df8790f
Use protect() instead of RefPtr { } in PlatformMediaSessionManager, A…
jelee53 46525db
Use new, more performant CoreText color glyph check API
fantasai 456a67f
Merge upstream/main (46525dbf2abb) — adopt libpas Windows is_symmetri…
Jarred-Sumner f7b52b0
JSPromise: adapt BUN paths to Slim/Full reaction split — use upstream…
Jarred-Sumner a5bf2e3
pas_thread_local_cache: skip decommitted allocators in for_all on sym…
Jarred-Sumner 9dc26d0
pas_thread_local_cache: use asymmetric decommit for allocator-range p…
Jarred-Sumner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| const map = new Map(); | ||
| for (let i = 0; i < 10; ++i) | ||
| map.set(i, i * 2); | ||
|
|
||
| function test(map) { | ||
| let sum = 0; | ||
| for (let [k, v] of map) | ||
| sum += k + v; | ||
| return sum; | ||
| } | ||
| noInline(test); | ||
|
|
||
| for (let i = 0; i < 1e5; ++i) | ||
| test(map); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| const map = new Map(); | ||
| for (let i = 0; i < 100; ++i) | ||
| map.set(i, i * 2); | ||
|
|
||
| function test(map) { | ||
| let sum = 0; | ||
| for (let [k, v] of map) | ||
| sum += k + v; | ||
| return sum; | ||
| } | ||
| noInline(test); | ||
|
|
||
| for (let i = 0; i < 1e4; ++i) | ||
| test(map); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| const set = new Set(); | ||
| for (let i = 0; i < 10; ++i) | ||
| set.add(i); | ||
|
|
||
| function test(set) { | ||
| let sum = 0; | ||
| for (let x of set) | ||
| sum += x; | ||
| return sum; | ||
| } | ||
| noInline(test); | ||
|
|
||
| for (let i = 0; i < 1e5; ++i) | ||
| test(set); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| const set = new Set(); | ||
| for (let i = 0; i < 100; ++i) | ||
| set.add(i); | ||
|
|
||
| function test(set) { | ||
| let sum = 0; | ||
| for (let x of set) | ||
| sum += x; | ||
| return sum; | ||
| } | ||
| noInline(test); | ||
|
|
||
| for (let i = 0; i < 1e4; ++i) | ||
| test(set); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| function test() { | ||
| let count = 0; | ||
| for (let i = 0; i < 1e4; ++i) | ||
| count += new Intl.Collator("en-US").compare !== undefined; | ||
| return count; | ||
| } | ||
|
|
||
| const result = test(); | ||
| if (result !== 1e4) | ||
| throw new Error("Bad result: " + result); |
10 changes: 10 additions & 0 deletions
10
JSTests/microbenchmarks/intl-constructor-datetimeformat.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| function test() { | ||
| let count = 0; | ||
| for (let i = 0; i < 1e4; ++i) | ||
| count += new Intl.DateTimeFormat("en-US").format !== undefined; | ||
| return count; | ||
| } | ||
|
|
||
| const result = test(); | ||
| if (result !== 1e4) | ||
| throw new Error("Bad result: " + result); |
10 changes: 10 additions & 0 deletions
10
JSTests/microbenchmarks/intl-constructor-durationformat.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| function test() { | ||
| let count = 0; | ||
| for (let i = 0; i < 1e4; ++i) | ||
| count += new Intl.DurationFormat("en").format !== undefined; | ||
| return count; | ||
| } | ||
|
|
||
| const result = test(); | ||
| if (result !== 1e4) | ||
| throw new Error("Bad result: " + result); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| function test() { | ||
| let count = 0; | ||
| for (let i = 0; i < 1e4; ++i) | ||
| count += new Intl.NumberFormat("en-US").format !== undefined; | ||
| return count; | ||
| } | ||
|
|
||
| const result = test(); | ||
| if (result !== 1e4) | ||
| throw new Error("Bad result: " + result); |
10 changes: 10 additions & 0 deletions
10
JSTests/microbenchmarks/intl-constructor-relativetimeformat.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| function test() { | ||
| let count = 0; | ||
| for (let i = 0; i < 1e4; ++i) | ||
| count += new Intl.RelativeTimeFormat("en").format !== undefined; | ||
| return count; | ||
| } | ||
|
|
||
| const result = test(); | ||
| if (result !== 1e4) | ||
| throw new Error("Bad result: " + result); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| function test(o, proto) | ||
| { | ||
| var s = o.a + o.b + o.c + o.d + o.e + o.f; | ||
| Object.create(proto); | ||
| s += o.a + o.b + o.c + o.d + o.e + o.f; | ||
| s += o.a + o.b + o.c + o.d + o.e + o.f; | ||
| s += o.a + o.b + o.c + o.d + o.e + o.f; | ||
| s += o.a + o.b + o.c + o.d + o.e + o.f; | ||
| s += o.a + o.b + o.c + o.d + o.e + o.f; | ||
| s += o.a + o.b + o.c + o.d + o.e + o.f; | ||
| s += o.a + o.b + o.c + o.d + o.e + o.f; | ||
| return s; | ||
| } | ||
| noInline(test); | ||
|
|
||
| var o = { a: 1, b: 2, c: 3, d: 4, e: 5, f: 6 }; | ||
| var result = 0; | ||
| for (var i = 0; i < 2e6; ++i) | ||
| result += test(o, null); | ||
| if (result !== 168 * 2e6) | ||
| throw new Error("bad result: " + result); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| // padEnd a short string and consume the result via charCodeAt. | ||
| function bench() { | ||
| let total = 0; | ||
| const base = "hello"; | ||
| for (let i = 0; i < 1e6; ++i) { | ||
| const s = base.padEnd(80); | ||
| total += s.charCodeAt(79); | ||
| } | ||
| return total; | ||
| } | ||
| noInline(bench); | ||
|
|
||
| bench(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| // padEnd then indexOf forces full rope resolution + linear scan. | ||
| function bench() { | ||
| let total = 0; | ||
| const base = "hello"; | ||
| for (let i = 0; i < 1e6; ++i) { | ||
| const s = base.padEnd(80); | ||
| total += s.indexOf("x"); | ||
| } | ||
| return total; | ||
| } | ||
| noInline(bench); | ||
|
|
||
| bench(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| // Stress the DFG iterator_next fast path for Map iteration under "having a bad time". | ||
| // In that state, the NewArray([key, value]) pair-allocation for Map entries takes | ||
| // the operationNewArray slow path (a C++ call under DECLARE_THROW_SCOPE). This | ||
| // exercises NewArray's ExitsForExceptions classification: if allocation throws, | ||
| // exception unwind must not replay the already-advanced MapIteratorNext. | ||
| // | ||
| // Two phases: | ||
| // (1) warm up with normal allocation so DFG/FTL compiles the fast NewArray path, | ||
| // (2) flip to bad-time (invalidates the havingABadTime watchpoint installed by | ||
| // FixupPhase::watchHavingABadTime on NewArray) to force recompilation through | ||
| // the slow allocation path. | ||
|
|
||
| function shouldBe(actual, expected) { | ||
| if (actual !== expected) | ||
| throw new Error('bad: ' + actual + ' vs ' + expected); | ||
| } | ||
| noInline(shouldBe); | ||
|
|
||
| const map = new Map(); | ||
| for (let i = 0; i < 16; ++i) | ||
| map.set(i, i * 10); | ||
| // 0+0 + 1+10 + ... + 15+150 = sum(0..15) + 10*sum(0..15) = 120 + 1200 = 1320 | ||
| const expectedMapSum = 1320; | ||
|
|
||
| const set = new Set(); | ||
| for (let i = 0; i < 16; ++i) | ||
| set.add(i); | ||
| const expectedSetSum = 120; | ||
|
|
||
| function sumMapEntries(m) { | ||
| let total = 0; | ||
| for (const [k, v] of m) | ||
| total += k + v; | ||
| return total; | ||
| } | ||
| noInline(sumMapEntries); | ||
|
|
||
| function sumSetValues(s) { | ||
| let total = 0; | ||
| for (const v of s) | ||
| total += v; | ||
| return total; | ||
| } | ||
| noInline(sumSetValues); | ||
|
|
||
| // Phase 1: warm up with normal fast allocation. | ||
| for (let i = 0; i < testLoopCount; ++i) { | ||
| shouldBe(sumMapEntries(map), expectedMapSum); | ||
| shouldBe(sumSetValues(set), expectedSetSum); | ||
| } | ||
|
|
||
| // Phase 2: trigger bad-time by installing a getter on a numeric-indexed slot | ||
| // of Object.prototype. This fires the havingABadTime watchpoint, invalidating | ||
| // any compiled code that relied on NewArray taking the fast inline-allocation | ||
| // path. Subsequent runs must still iterate correctly. | ||
| Object.defineProperty(Object.prototype, "0", { | ||
| get() { return "shadow"; }, | ||
| set(v) { }, | ||
| configurable: true, | ||
| }); | ||
|
|
||
| for (let i = 0; i < testLoopCount; ++i) { | ||
| shouldBe(sumMapEntries(map), expectedMapSum); | ||
| shouldBe(sumSetValues(set), expectedSetSum); | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| // Stress the DFG iterator_open / iterator_next fast path when a single | ||
| // call site observes Array, Map, Set, and a Generic user-defined iterable. | ||
| // The seenModes IterationMetadata accumulates FastArray|FastMap|FastSet|Generic, | ||
| // and the DFG parser emits the full chained fast path. This exercises the | ||
| // connectFailedBlock/numberOfRemainingModes bookkeeping across all four modes. | ||
|
|
||
| function shouldBe(actual, expected) { | ||
| if (actual !== expected) | ||
| throw new Error('bad: ' + actual + ' vs ' + expected); | ||
| } | ||
| noInline(shouldBe); | ||
|
|
||
| function sumIterable(iterable) { | ||
| let sum = 0; | ||
| for (const entry of iterable) { | ||
| if (typeof entry === "number") | ||
| sum += entry; // Array / Set yields values | ||
| else if (Array.isArray(entry)) | ||
| sum += entry[0] + entry[1]; // Map yields [key, value] | ||
| else | ||
| sum += entry.val; // Generic iterator yields {val} | ||
| } | ||
| return sum; | ||
| } | ||
| noInline(sumIterable); | ||
|
|
||
| const arr = [1, 2, 3, 4]; | ||
| const map = new Map([[10, 1], [20, 2], [30, 3]]); | ||
| const set = new Set([100, 200, 300]); | ||
|
|
||
| function makeGeneric() { | ||
| let i = 0; | ||
| return { | ||
| [Symbol.iterator]() { return this; }, | ||
| next() { | ||
| if (i >= 4) | ||
| return { value: undefined, done: true }; | ||
| return { value: { val: ++i * 1000 }, done: false }; | ||
| } | ||
| }; | ||
| } | ||
|
|
||
| const arrSum = 1 + 2 + 3 + 4; | ||
| const mapSum = (10 + 1) + (20 + 2) + (30 + 3); | ||
| const setSum = 100 + 200 + 300; | ||
| const genSum = 1000 + 2000 + 3000 + 4000; | ||
|
|
||
| for (let i = 0; i < testLoopCount; i++) { | ||
| const idx = i & 3; | ||
| if (idx === 0) | ||
| shouldBe(sumIterable(arr), arrSum); | ||
| else if (idx === 1) | ||
| shouldBe(sumIterable(map), mapSum); | ||
| else if (idx === 2) | ||
| shouldBe(sumIterable(set), setSum); | ||
| else | ||
| shouldBe(sumIterable(makeGeneric()), genSum); | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial
Clean up
Object.prototype["0"]after the stress phase.Keeping the prototype mutation installed beyond the test body is avoidable global state leakage.
Proposed fix
Object.defineProperty(Object.prototype, "0", { get() { return "shadow"; }, set(v) { }, configurable: true, }); -for (let i = 0; i < testLoopCount; ++i) { - shouldBe(sumMapEntries(map), expectedMapSum); - shouldBe(sumSetValues(set), expectedSetSum); -} +try { + for (let i = 0; i < testLoopCount; ++i) { + shouldBe(sumMapEntries(map), expectedMapSum); + shouldBe(sumSetValues(set), expectedSetSum); + } +} finally { + delete Object.prototype["0"]; +}📝 Committable suggestion
🤖 Prompt for AI Agents