Bug 171421

Summary: [JSC] Add @isUndefinedOrNullIgnoringMasquerade()
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: JavaScriptCoreAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: ashvayka, fpizlo, saam
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Yusuke Suzuki 2017-04-28 00:51:47 PDT
In builtin JS, we have bunch of 


if (object === null || object === @undefined)

thing. Previously, this is written as follows.

if (object == null)

However, the above one recognizes document.all as null/undefined due to its masquerade.
So, they are rewritten.

But the above thing is,

1. From JS developer, it looks very storange because it seems `== null` is better.
2. It bloats bytecodes, effectively prevents us from inlining. Keep builtin JS function small is a bit important in terms of inlining.

So, to make the meaning explicit and tighten bytecode size, we would like to introduce a new bytecode, op_is_undefined_or_null_ignoring_masquerade.
Comment 1 Alexey Shvayka 2021-01-04 11:01:14 PST
(In reply to Yusuke Suzuki from comment #0)
> So, to make the meaning explicit and tighten bytecode size, we would like to
> introduce a new bytecode, op_is_undefined_or_null_ignoring_masquerade.

OpIsUndefinedOrNull was introduced in r239761.

*** This bug has been marked as a duplicate of bug 193127 ***