Bug 171421 - [JSC] Add @isUndefinedOrNullIgnoringMasquerade()
Summary: [JSC] Add @isUndefinedOrNullIgnoringMasquerade()
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-28 00:51 PDT by Yusuke Suzuki
Modified: 2017-04-28 00:52 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.