BUG-1485: optimize primitive range checks
When we are dealing with a primitive type, we can force unboxing of the
type by declaring the range checker method's argument as the primitive
type. This will result in the stack not containing references for the
fast path (e.g. successful check) as well as reduce the number of
virtual calls to one. Checks will then be performed using primitive
manipulation instructions, which should result in better fast-path
execution.
The slow path will take a hit, as for throwing the exception, we will
end up re-boxing the primitive type.
Change-Id: I7e6b0e25790f9a43dc99f2fc7426bb9fe25c505c
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit
9b5366d775b93f0e2a37f028cda11832ba65ce6d)