Bug 173157

Summary: [DFG] Add ArrayIncludes intrinsic
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: JavaScriptCoreAssignee: Yusuke Suzuki <ysuzuki>
Status: NEW    
Severity: Normal CC: saam
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 172421    
Bug Blocks:    

Yusuke Suzuki
Reported 2017-06-09 06:12:33 PDT
We can implement ArrayIncludes intrinsic by using ArrayIndexOf intrinsic.
Attachments
Yusuke Suzuki
Comment 1 2017-06-13 10:00:49 PDT
No, we can share large part of ArrayIndexOf code. However, ArrayIncludes slightly different from ArrayIndexOf. https://tc39.github.io/ecma262/#sec-array.prototype.includes NOTE: The includes method intentionally differs from the similar indexOf method in two ways. First, it uses the SameValueZero algorithm, instead of Strict Equality Comparison, allowing it to detect NaN array elements. Second, it does not skip missing array elements, instead treating them as undefined.
Note You need to log in before you can comment on or make changes to this bug.