Package org.jruby.runtime.invokedynamic
Class MathLinker
java.lang.Object
org.jruby.runtime.invokedynamic.MathLinker
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int[]private static final CallType[]static final MethodHandlestatic final MethodHandlestatic final MethodHandlestatic final MethodHandlestatic final MethodHandlestatic final MethodHandleprivate static final Loggerprivate static final booleanstatic final MethodHandles.Lookup -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static IRubyObjectcallMethod(ThreadContext context, IRubyObject caller, IRubyObject self, JRubyCallSite site, RubyNumeric value) private static MethodHandlefindTargetImpl(String name, Class<?> returnType, double value) private static MethodHandlefindTargetImpl(String name, Class<?> returnType, long value) static IRubyObjectfixnum_op_and(ThreadContext context, IRubyObject caller, IRubyObject self, long value) static IRubyObjectfixnum_op_cmp(ThreadContext context, IRubyObject caller, IRubyObject self, long value) static IRubyObjectfixnum_op_div(ThreadContext context, IRubyObject caller, IRubyObject self, long value) static IRubyObjectfixnum_op_equal(ThreadContext context, IRubyObject caller, IRubyObject self, long value) static IRubyObjectfixnum_op_ge(ThreadContext context, IRubyObject caller, IRubyObject self, long value) static IRubyObjectfixnum_op_gt(ThreadContext context, IRubyObject caller, IRubyObject self, long value) static IRubyObjectfixnum_op_le(ThreadContext context, IRubyObject caller, IRubyObject self, long value) static IRubyObjectfixnum_op_lshift(ThreadContext context, IRubyObject caller, IRubyObject self, long value) static IRubyObjectfixnum_op_lt(ThreadContext context, IRubyObject caller, IRubyObject self, long value) static IRubyObjectfixnum_op_minus(ThreadContext context, IRubyObject caller, IRubyObject self, long value) static IRubyObjectfixnum_op_minus_one(ThreadContext context, IRubyObject caller, IRubyObject self) static IRubyObjectfixnum_op_minus_two(ThreadContext context, IRubyObject caller, IRubyObject self) static IRubyObjectfixnum_op_mod(ThreadContext context, IRubyObject caller, IRubyObject self, long value) static IRubyObjectfixnum_op_mul(ThreadContext context, IRubyObject caller, IRubyObject self, long value) static IRubyObjectfixnum_op_or(ThreadContext context, IRubyObject caller, IRubyObject self, long value) static IRubyObjectfixnum_op_plus(ThreadContext context, IRubyObject caller, IRubyObject self, long value) static IRubyObjectfixnum_op_plus_one(ThreadContext context, IRubyObject caller, IRubyObject self) static IRubyObjectfixnum_op_plus_two(ThreadContext context, IRubyObject caller, IRubyObject self) static IRubyObjectfixnum_op_rshift(ThreadContext context, IRubyObject caller, IRubyObject self, long value) static IRubyObjectfixnum_op_xor(ThreadContext context, IRubyObject caller, IRubyObject self, long value) static IRubyObjectfixnumOperator(ThreadContext context, IRubyObject caller, IRubyObject self, JRubyCallSite site, long value) static CallSitefixnumOperatorBootstrap(MethodHandles.Lookup lookup, String name, MethodType type, long value, int callType, String file, int line) (package private) static IRubyObjectfixnumOperatorFail(ThreadContext context, IRubyObject caller, IRubyObject self, JRubyCallSite site, RubyFixnum value) (package private) static booleanfixnumTest(IRubyObject self) static IRubyObjectfloat_op_cmp(ThreadContext context, IRubyObject caller, IRubyObject self, double value) static IRubyObjectfloat_op_div(ThreadContext context, IRubyObject caller, IRubyObject self, double value) static IRubyObjectfloat_op_equal(ThreadContext context, IRubyObject caller, IRubyObject self, double value) static IRubyObjectfloat_op_ge(ThreadContext context, IRubyObject caller, IRubyObject self, double value) static IRubyObjectfloat_op_gt(ThreadContext context, IRubyObject caller, IRubyObject self, double value) static IRubyObjectfloat_op_le(ThreadContext context, IRubyObject caller, IRubyObject self, double value) static IRubyObjectfloat_op_lt(ThreadContext context, IRubyObject caller, IRubyObject self, double value) static IRubyObjectfloat_op_minus(ThreadContext context, IRubyObject caller, IRubyObject self, double value) static IRubyObjectfloat_op_mod(ThreadContext context, IRubyObject caller, IRubyObject self, double value) static IRubyObjectfloat_op_mul(ThreadContext context, IRubyObject caller, IRubyObject self, double value) static IRubyObjectfloat_op_plus(ThreadContext context, IRubyObject caller, IRubyObject self, double value) static IRubyObjectfloatOperator(ThreadContext context, IRubyObject caller, IRubyObject self, JRubyCallSite site, double value) static CallSitefloatOperatorBootstrap(MethodHandles.Lookup lookup, String name, MethodType type, double value, int callType, String file, int line) (package private) static booleanfloatTest(IRubyObject self) private static CacheEntrysearchWithCache(String operator, IRubyObject caller, RubyClass selfClass, JRubyCallSite site)
-
Field Details
-
LOG
-
LOOKUP
-
LOG_BINDING
private static final boolean LOG_BINDING -
FIXNUM_TEST
-
FLOAT_TEST
-
FIXNUM_OPERATOR
-
FLOAT_OPERATOR
-
CALL_TYPES
-
ARG_2_TO_0
private static final int[] ARG_2_TO_0 -
FLOAT_TEST_ARG_2_TO_0
-
FIXNUM_TEST_ARG_2_TO_0
-
-
Constructor Details
-
MathLinker
public MathLinker()
-
-
Method Details
-
fixnumOperatorBootstrap
public static CallSite fixnumOperatorBootstrap(MethodHandles.Lookup lookup, String name, MethodType type, long value, int callType, String file, int line) throws NoSuchMethodException, IllegalAccessException -
floatOperatorBootstrap
public static CallSite floatOperatorBootstrap(MethodHandles.Lookup lookup, String name, MethodType type, double value, int callType, String file, int line) throws NoSuchMethodException, IllegalAccessException -
fixnumOperator
public static IRubyObject fixnumOperator(ThreadContext context, IRubyObject caller, IRubyObject self, JRubyCallSite site, long value) throws Throwable - Throws:
Throwable
-
fixnumTest
-
fixnumOperatorFail
static IRubyObject fixnumOperatorFail(ThreadContext context, IRubyObject caller, IRubyObject self, JRubyCallSite site, RubyFixnum value) throws Throwable - Throws:
Throwable
-
fixnum_op_plus
public static IRubyObject fixnum_op_plus(ThreadContext context, IRubyObject caller, IRubyObject self, long value) throws Throwable - Throws:
Throwable
-
fixnum_op_minus
public static IRubyObject fixnum_op_minus(ThreadContext context, IRubyObject caller, IRubyObject self, long value) throws Throwable - Throws:
Throwable
-
fixnum_op_mul
public static IRubyObject fixnum_op_mul(ThreadContext context, IRubyObject caller, IRubyObject self, long value) throws Throwable - Throws:
Throwable
-
fixnum_op_mod
public static IRubyObject fixnum_op_mod(ThreadContext context, IRubyObject caller, IRubyObject self, long value) throws Throwable - Throws:
Throwable
-
fixnum_op_div
public static IRubyObject fixnum_op_div(ThreadContext context, IRubyObject caller, IRubyObject self, long value) throws Throwable - Throws:
Throwable
-
fixnum_op_equal
public static IRubyObject fixnum_op_equal(ThreadContext context, IRubyObject caller, IRubyObject self, long value) throws Throwable - Throws:
Throwable
-
fixnum_op_lt
public static IRubyObject fixnum_op_lt(ThreadContext context, IRubyObject caller, IRubyObject self, long value) throws Throwable - Throws:
Throwable
-
fixnum_op_le
public static IRubyObject fixnum_op_le(ThreadContext context, IRubyObject caller, IRubyObject self, long value) throws Throwable - Throws:
Throwable
-
fixnum_op_gt
public static IRubyObject fixnum_op_gt(ThreadContext context, IRubyObject caller, IRubyObject self, long value) throws Throwable - Throws:
Throwable
-
fixnum_op_ge
public static IRubyObject fixnum_op_ge(ThreadContext context, IRubyObject caller, IRubyObject self, long value) throws Throwable - Throws:
Throwable
-
fixnum_op_cmp
public static IRubyObject fixnum_op_cmp(ThreadContext context, IRubyObject caller, IRubyObject self, long value) throws Throwable - Throws:
Throwable
-
fixnum_op_and
public static IRubyObject fixnum_op_and(ThreadContext context, IRubyObject caller, IRubyObject self, long value) throws Throwable - Throws:
Throwable
-
fixnum_op_or
public static IRubyObject fixnum_op_or(ThreadContext context, IRubyObject caller, IRubyObject self, long value) throws Throwable - Throws:
Throwable
-
fixnum_op_xor
public static IRubyObject fixnum_op_xor(ThreadContext context, IRubyObject caller, IRubyObject self, long value) throws Throwable - Throws:
Throwable
-
fixnum_op_rshift
public static IRubyObject fixnum_op_rshift(ThreadContext context, IRubyObject caller, IRubyObject self, long value) throws Throwable - Throws:
Throwable
-
fixnum_op_lshift
public static IRubyObject fixnum_op_lshift(ThreadContext context, IRubyObject caller, IRubyObject self, long value) throws Throwable - Throws:
Throwable
-
fixnum_op_plus_one
public static IRubyObject fixnum_op_plus_one(ThreadContext context, IRubyObject caller, IRubyObject self) throws Throwable - Throws:
Throwable
-
fixnum_op_minus_one
public static IRubyObject fixnum_op_minus_one(ThreadContext context, IRubyObject caller, IRubyObject self) throws Throwable - Throws:
Throwable
-
fixnum_op_plus_two
public static IRubyObject fixnum_op_plus_two(ThreadContext context, IRubyObject caller, IRubyObject self) throws Throwable - Throws:
Throwable
-
fixnum_op_minus_two
public static IRubyObject fixnum_op_minus_two(ThreadContext context, IRubyObject caller, IRubyObject self) throws Throwable - Throws:
Throwable
-
floatOperator
public static IRubyObject floatOperator(ThreadContext context, IRubyObject caller, IRubyObject self, JRubyCallSite site, double value) throws Throwable - Throws:
Throwable
-
floatTest
-
float_op_plus
public static IRubyObject float_op_plus(ThreadContext context, IRubyObject caller, IRubyObject self, double value) throws Throwable - Throws:
Throwable
-
float_op_minus
public static IRubyObject float_op_minus(ThreadContext context, IRubyObject caller, IRubyObject self, double value) throws Throwable - Throws:
Throwable
-
float_op_mul
public static IRubyObject float_op_mul(ThreadContext context, IRubyObject caller, IRubyObject self, double value) throws Throwable - Throws:
Throwable
-
float_op_mod
public static IRubyObject float_op_mod(ThreadContext context, IRubyObject caller, IRubyObject self, double value) throws Throwable - Throws:
Throwable
-
float_op_div
public static IRubyObject float_op_div(ThreadContext context, IRubyObject caller, IRubyObject self, double value) throws Throwable - Throws:
Throwable
-
float_op_equal
public static IRubyObject float_op_equal(ThreadContext context, IRubyObject caller, IRubyObject self, double value) throws Throwable - Throws:
Throwable
-
float_op_lt
public static IRubyObject float_op_lt(ThreadContext context, IRubyObject caller, IRubyObject self, double value) throws Throwable - Throws:
Throwable
-
float_op_le
public static IRubyObject float_op_le(ThreadContext context, IRubyObject caller, IRubyObject self, double value) throws Throwable - Throws:
Throwable
-
float_op_gt
public static IRubyObject float_op_gt(ThreadContext context, IRubyObject caller, IRubyObject self, double value) throws Throwable - Throws:
Throwable
-
float_op_ge
public static IRubyObject float_op_ge(ThreadContext context, IRubyObject caller, IRubyObject self, double value) throws Throwable - Throws:
Throwable
-
float_op_cmp
public static IRubyObject float_op_cmp(ThreadContext context, IRubyObject caller, IRubyObject self, double value) throws Throwable - Throws:
Throwable
-
findTargetImpl
private static MethodHandle findTargetImpl(String name, Class<?> returnType, long value) throws NoSuchMethodException, IllegalAccessException -
findTargetImpl
private static MethodHandle findTargetImpl(String name, Class<?> returnType, double value) throws NoSuchMethodException, IllegalAccessException -
callMethod
private static IRubyObject callMethod(ThreadContext context, IRubyObject caller, IRubyObject self, JRubyCallSite site, RubyNumeric value) -
searchWithCache
private static CacheEntry searchWithCache(String operator, IRubyObject caller, RubyClass selfClass, JRubyCallSite site)
-