• Pierre Langlois's avatar
    [turbofan] Refactor AssembleMove and AssembleSwap · 16f2bcdb
    Pierre Langlois authored
    The way the code generator's AssembleMove and AssembleSwap methods are written
    makes it easy to forget which sort of move is being implemented when looking at
    a sequence of instructions. This patch is an attempt to address this by
    rewriting those methods using switch/case instead of a string of if/else.
    
    To do this, introduce new utility functions to detect what type of move to
    perform given a pair of InstructionOperands.
    
    Bug: 
    Change-Id: I32b146c86409e595b7b59a66bf43220899024fdd
    Reviewed-on: https://chromium-review.googlesource.com/749201
    Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
    Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#50966}
    16f2bcdb
instruction.h 55.2 KB