• bmeurer's avatar
    [stubs] Improve code generation for ToBoolean. · 0abba435
    bmeurer authored
    Introduce a proper CodeStubAssembler::BranchIfToBooleanIsTrue helper
    method, that branches to if_true/if_false labels depending on whether
    the value that is passed would yield true or false when fed to
    ToBoolean. Use this helper to implement the bytecode handlers w/o having
    to materialize the temporary booleans and essentially branching twice.
    The CodeStubAssembler::BranchIfToBooleanIsTrue helper favors the most
    likely case of a Boolean constant now.
    
    Also migrate the ToBooleanStub to a ToBoolean TurboFan builtin, that
    also uses the helper method under the hood.
    
    Remove the now obsolete Oddball::to_boolean field.
    
    R=hpayer@chromium.org, rmcilroy@chromium.org, yangguo@chromium.org
    
    Review-Url: https://codereview.chromium.org/2151163002
    Cr-Commit-Position: refs/heads/master@{#37849}
    0abba435
Name
Last commit
Last update
..
arm Loading commit data...
arm64 Loading commit data...
ia32 Loading commit data...
mips Loading commit data...
mips64 Loading commit data...
ppc Loading commit data...
s390 Loading commit data...
x64 Loading commit data...
x87 Loading commit data...
builtins-array.cc Loading commit data...
builtins-utils.h Loading commit data...
builtins.cc Loading commit data...
builtins.h Loading commit data...