• rmcilroy's avatar
    [Interpreter] Optimize code of the form 'if (x === undefined)'. · f4f58e31
    rmcilroy authored
    Translates code of the form 'if (x === undefined)' into the JumpIfUndefined
    bytecode, and similarly for comparisons with null. Also adds bytecodes for
    JumpIfNotUndefined / Null.
    
    Moves the peephole optimization for CompareUndefined out of the peephole
    optimizer and into the BytecodeGenerator, having the side-effect of enabling
    it for comparisons with undefined on both side of the compare operation.
    
    BUG=v8:6107
    
    Review-Url: https://codereview.chromium.org/2793923002
    Cr-Commit-Position: refs/heads/master@{#44341}
    f4f58e31
bytecode-array-builder.cc 43 KB