• Jakob Gruber's avatar
    [ic] Refactor unary op assembler implementations · e1427aea
    Jakob Gruber authored
    This CL brings unary op assembler structure closer to that of binary
    ops assemblers:
    
    - Decrement, Increment, Negate call into UnaryOpWithFeedback,
    - which takes lambdas specifying smi, float, and bigint logic.
    - BitwiseNot is different in that it still dispatches using
      TaggedToWOrd32OrBigIntWithFeedback.
    - These methods are all implemented in the (hidden)
      UnaryOpAssemblerImpl class.
    - The header only exposes UnaryOpAssembler with the bare minimum of
      API.
    
    The last point is the remaining major divergence from binary op
    assemblers. I just like how this avoids useless implementation details
    in the header.
    
    Bug: v8:8888
    Change-Id: I0ac4695483950356885301234d58c1900904aa92
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2214830
    Commit-Queue: Jakob Gruber <jgruber@chromium.org>
    Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
    Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#68004}
    e1427aea
unary-op-assembler.cc 11 KB