[turbofan] Prefer memoized JSGraph constants
For numbers, `JSGraph::Constant(Handle<Object> value)` first checks the type of `value`, and then calls `JSGraph::Constant` for its type, which in turn performs some further checks before returning a value. This patch saves a few `if` checks by making the following changes: - JSGraph::Constant(0) → JSGraph::ZeroConstant() - JSGraph::Constant(1) → JSGraph::OneConstant() Change-Id: I6946c280437b7f1fe80d7c45c6fd9b3571907e07 Reviewed-on: https://chromium-review.googlesource.com/840982Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Mathias Bynens <mathias@chromium.org> Cr-Commit-Position: refs/heads/master@{#50288}
Showing
Please
register
or
sign in
to comment