<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>171421</bug_id>
          
          <creation_ts>2017-04-28 00:51:47 -0700</creation_ts>
          <short_desc>[JSC] Add @isUndefinedOrNullIgnoringMasquerade()</short_desc>
          <delta_ts>2021-01-04 11:01:14 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>193127</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yusuke Suzuki">ysuzuki</reporter>
          <assigned_to name="Yusuke Suzuki">ysuzuki</assigned_to>
          <cc>ashvayka</cc>
    
    <cc>fpizlo</cc>
    
    <cc>saam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1302518</commentid>
    <comment_count>0</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2017-04-28 00:51:47 -0700</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1717168</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Shvayka">ashvayka</who>
    <bug_when>2021-01-04 11:01:14 -0800</bug_when>
    <thetext>(In reply to Yusuke Suzuki from comment #0)
&gt; So, to make the meaning explicit and tighten bytecode size, we would like to
&gt; 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 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>