• 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
..
libplatform Loading commit data...
OWNERS Loading commit data...
v8-debug.h Loading commit data...
v8-experimental.h Loading commit data...
v8-platform.h Loading commit data...
v8-profiler.h Loading commit data...
v8-testing.h Loading commit data...
v8-util.h Loading commit data...
v8-version.h Loading commit data...
v8.h Loading commit data...
v8config.h Loading commit data...