Bug 276163 - valueOf is not executed for Atomics.isLockFree in JIT compiler
Summary: valueOf is not executed for Atomics.isLockFree in JIT compiler
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2024-07-02 20:20 PDT by YuHao Hu
Modified: 2024-07-09 20:21 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description YuHao Hu 2024-07-02 20:20:58 PDT
the test case
```
let count = 0
function opt() {
    Atomics.isLockFree({
        valueOf: function () {
            count++
        }
    });
}
for (let i = 0; i < 140; i++) {
    opt();
}
print(count)
```

run args:
cmake-build-debug/bin/jsc --useConcurrentJIT=0 ./test.js

expected output:
140

actual output:
99

tested in webkit commit id:
31e77e6ca86aa67419cbcf393a5bedcc925d8cf5
Comment 1 Radar WebKit Bug Importer 2024-07-09 20:21:15 PDT
<rdar://problem/131432975>