[ignition] Improve implementation of unary-minus
For the HeapNumber case, use Float64Neg directly instead of a Float64Mul by -1.0. For the Smi case, logic is added to handle the boundary conditions (0 and Smi::kMinValue), and the general case is handled by a SmiSub from 0. Change-Id: I110916d9d1eb5d22d618fbf358d8d5b63cc71b3a Reviewed-on: https://chromium-review.googlesource.com/663945Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Commit-Queue: Adam Klein <adamk@chromium.org> Cr-Commit-Position: refs/heads/master@{#47995}
Showing
Please
register
or
sign in
to comment