• bmeurer's avatar
    [turbofan] Utilize the fact that empty string is canonicalized. · cd9724d4
    bmeurer authored
    Since the empty string is canonical HeapObject now, we can use
    this fact to optimize
    
      - strict equality comparisons with the empty string to a
        simple ReferenceEqual operation, and
      - optimize ToBoolean to avoid instance type checks completely.
    
    Drive-by-fix: Allow InternalizedString for Type::HeapConstant
    in the type system. This is safe, since InternalizedStrings
    can be compared to other heap constants by reference (except
    for non-InternalizedStrings, which are excluded from the
    HeapConstant type).
    
    BUG=v8:5267
    R=yangguo@chromium.org
    
    Review-Url: https://codereview.chromium.org/2681273002
    Cr-Commit-Position: refs/heads/master@{#43050}
    cd9724d4
typer.h 1.68 KB