Top Fields Constructors Methods
org.jruby.runtime.invokedynamic

public Class MathLinker

extends Object
Class Inheritance
Imports
java.lang.invoke.CallSite, .MethodHandle, .MethodType, .SwitchPoint, com.headius.invokebinder.Binder, org.jruby.Ruby, .RubyClass, .RubyFixnum, .RubyFloat, .RubyNumeric, org.jruby.ir.targets.indy.Bootstrap, org.jruby.ir.targets.simple.NormalInvokeSite, org.jruby.runtime.CallType, .MethodIndex, .ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.callsite.CacheEntry, org.jruby.util.JavaNameMangler, .StringSupport, org.jruby.util.cli.Options, org.jruby.util.log.Logger, .LoggerFactory, org.objectweb.asm.Handle, .Opcodes

Field Summary

Modifier and TypeField and Description
private static final int[]
private static final CallType[]
public static final MethodHandle
public static final Handle
public static final MethodHandle
public static final MethodHandle
public static final MethodHandle
public static final Handle
public static final MethodHandle
public static final MethodHandle
private static final Logger
private static final boolean
public static final MethodHandles.Lookup

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static IRubyObject
private static MethodHandle
findTargetImpl(final String name, Class<?> returnType, final long value)

private static MethodHandle
findTargetImpl(final String name, Class<?> returnType, final double value)

public static IRubyObject
fixnum_op_and(ThreadContext context, IRubyObject caller, IRubyObject self, long value)

public static IRubyObject
fixnum_op_cmp(ThreadContext context, IRubyObject caller, IRubyObject self, long value)

public static IRubyObject
fixnum_op_div(ThreadContext context, IRubyObject caller, IRubyObject self, long value)

public static IRubyObject
fixnum_op_equal(ThreadContext context, IRubyObject caller, IRubyObject self, long value)

public static IRubyObject
fixnum_op_ge(ThreadContext context, IRubyObject caller, IRubyObject self, long value)

public static IRubyObject
fixnum_op_gt(ThreadContext context, IRubyObject caller, IRubyObject self, long value)

public static IRubyObject
fixnum_op_le(ThreadContext context, IRubyObject caller, IRubyObject self, long value)

public static IRubyObject
fixnum_op_lshift(ThreadContext context, IRubyObject caller, IRubyObject self, long value)

public static IRubyObject
fixnum_op_lt(ThreadContext context, IRubyObject caller, IRubyObject self, long value)

public static IRubyObject
fixnum_op_minus(ThreadContext context, IRubyObject caller, IRubyObject self, long value)

public static IRubyObject
public static IRubyObject
public static IRubyObject
fixnum_op_mod(ThreadContext context, IRubyObject caller, IRubyObject self, long value)

public static IRubyObject
fixnum_op_mul(ThreadContext context, IRubyObject caller, IRubyObject self, long value)

public static IRubyObject
fixnum_op_not_equal(ThreadContext context, IRubyObject caller, IRubyObject self, long value)

public static IRubyObject
fixnum_op_or(ThreadContext context, IRubyObject caller, IRubyObject self, long value)

public static IRubyObject
fixnum_op_plus(ThreadContext context, IRubyObject caller, IRubyObject self, long value)

public static IRubyObject
public static IRubyObject
public static IRubyObject
fixnum_op_rshift(ThreadContext context, IRubyObject caller, IRubyObject self, long value)

public static IRubyObject
fixnum_op_xor(ThreadContext context, IRubyObject caller, IRubyObject self, long value)

public static IRubyObject
fixnumOperator(ThreadContext context, IRubyObject caller, IRubyObject self, JRubyCallSite site, long value)

public static CallSite
fixnumOperatorBootstrap(MethodHandles.Lookup lookup, String name, MethodType type, long value, int callType, String file, int line)

pack-priv static IRubyObject
pack-priv static boolean
public static IRubyObject
float_op_cmp(ThreadContext context, IRubyObject caller, IRubyObject self, double value)

public static IRubyObject
float_op_div(ThreadContext context, IRubyObject caller, IRubyObject self, double value)

public static IRubyObject
float_op_equal(ThreadContext context, IRubyObject caller, IRubyObject self, double value)

public static IRubyObject
float_op_ge(ThreadContext context, IRubyObject caller, IRubyObject self, double value)

public static IRubyObject
float_op_gt(ThreadContext context, IRubyObject caller, IRubyObject self, double value)

public static IRubyObject
float_op_le(ThreadContext context, IRubyObject caller, IRubyObject self, double value)

public static IRubyObject
float_op_lt(ThreadContext context, IRubyObject caller, IRubyObject self, double value)

public static IRubyObject
float_op_minus(ThreadContext context, IRubyObject caller, IRubyObject self, double value)

public static IRubyObject
float_op_mod(ThreadContext context, IRubyObject caller, IRubyObject self, double value)

public static IRubyObject
float_op_mul(ThreadContext context, IRubyObject caller, IRubyObject self, double value)

public static IRubyObject
float_op_plus(ThreadContext context, IRubyObject caller, IRubyObject self, double value)

public static IRubyObject
floatOperator(ThreadContext context, IRubyObject caller, IRubyObject self, JRubyCallSite site, double value)

public static CallSite
floatOperatorBootstrap(MethodHandles.Lookup lookup, String name, MethodType type, double value, int callType, String file, int line)

pack-priv static boolean
private static CacheEntry
searchWithCache(final String operator, IRubyObject caller, RubyClass selfClass, JRubyCallSite site)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ARG_2_TO_0back to summary
private static final int[] ARG_2_TO_0
CALL_TYPESback to summary
private static final CallType[] CALL_TYPES
FIXNUM_OPERATORback to summary
public static final MethodHandle FIXNUM_OPERATOR
FIXNUM_OPERATOR_BOOTSTRAPback to summary
public static final Handle FIXNUM_OPERATOR_BOOTSTRAP
FIXNUM_TESTback to summary
public static final MethodHandle FIXNUM_TEST
FIXNUM_TEST_ARG_2_TO_0back to summary
public static final MethodHandle FIXNUM_TEST_ARG_2_TO_0
FLOAT_OPERATORback to summary
public static final MethodHandle FLOAT_OPERATOR
FLOAT_OPERATOR_BOOTSTRAPback to summary
public static final Handle FLOAT_OPERATOR_BOOTSTRAP
FLOAT_TESTback to summary
public static final MethodHandle FLOAT_TEST
FLOAT_TEST_ARG_2_TO_0back to summary
public static final MethodHandle FLOAT_TEST_ARG_2_TO_0
LOGback to summary
private static final Logger LOG
LOG_BINDINGback to summary
private static final boolean LOG_BINDING
LOOKUPback to summary
public static final MethodHandles.Lookup LOOKUP

Constructor Detail

MathLinkerback to summary
public MathLinker()

Method Detail

callMethodback to summary
private static IRubyObject callMethod(ThreadContext context, IRubyObject caller, IRubyObject self, JRubyCallSite site, RubyNumeric value)
findTargetImplback to summary
private static MethodHandle findTargetImpl(final String name, Class<?> returnType, final long value) throws NoSuchMethodException, IllegalAccessException
findTargetImplback to summary
private static MethodHandle findTargetImpl(final String name, Class<?> returnType, final double value) throws NoSuchMethodException, IllegalAccessException
fixnum_op_andback to summary
public static IRubyObject fixnum_op_and(ThreadContext context, IRubyObject caller, IRubyObject self, long value) throws Throwable
fixnum_op_cmpback to summary
public static IRubyObject fixnum_op_cmp(ThreadContext context, IRubyObject caller, IRubyObject self, long value) throws Throwable
fixnum_op_divback to summary
public static IRubyObject fixnum_op_div(ThreadContext context, IRubyObject caller, IRubyObject self, long value) throws Throwable
fixnum_op_equalback to summary
public static IRubyObject fixnum_op_equal(ThreadContext context, IRubyObject caller, IRubyObject self, long value) throws Throwable
fixnum_op_geback to summary
public static IRubyObject fixnum_op_ge(ThreadContext context, IRubyObject caller, IRubyObject self, long value) throws Throwable
fixnum_op_gtback to summary
public static IRubyObject fixnum_op_gt(ThreadContext context, IRubyObject caller, IRubyObject self, long value) throws Throwable
fixnum_op_leback to summary
public static IRubyObject fixnum_op_le(ThreadContext context, IRubyObject caller, IRubyObject self, long value) throws Throwable
fixnum_op_lshiftback to summary
public static IRubyObject fixnum_op_lshift(ThreadContext context, IRubyObject caller, IRubyObject self, long value) throws Throwable
fixnum_op_ltback to summary
public static IRubyObject fixnum_op_lt(ThreadContext context, IRubyObject caller, IRubyObject self, long value) throws Throwable
fixnum_op_minusback to summary
public static IRubyObject fixnum_op_minus(ThreadContext context, IRubyObject caller, IRubyObject self, long value) throws Throwable
fixnum_op_minus_oneback to summary
public static IRubyObject fixnum_op_minus_one(ThreadContext context, IRubyObject caller, IRubyObject self) throws Throwable
fixnum_op_minus_twoback to summary
public static IRubyObject fixnum_op_minus_two(ThreadContext context, IRubyObject caller, IRubyObject self) throws Throwable
fixnum_op_modback to summary
public static IRubyObject fixnum_op_mod(ThreadContext context, IRubyObject caller, IRubyObject self, long value) throws Throwable
fixnum_op_mulback to summary
public static IRubyObject fixnum_op_mul(ThreadContext context, IRubyObject caller, IRubyObject self, long value) throws Throwable
fixnum_op_not_equalback to summary
public static IRubyObject fixnum_op_not_equal(ThreadContext context, IRubyObject caller, IRubyObject self, long value) throws Throwable
fixnum_op_orback to summary
public static IRubyObject fixnum_op_or(ThreadContext context, IRubyObject caller, IRubyObject self, long value) throws Throwable
fixnum_op_plusback to summary
public static IRubyObject fixnum_op_plus(ThreadContext context, IRubyObject caller, IRubyObject self, long value) throws Throwable
fixnum_op_plus_oneback to summary
public static IRubyObject fixnum_op_plus_one(ThreadContext context, IRubyObject caller, IRubyObject self) throws Throwable
fixnum_op_plus_twoback to summary
public static IRubyObject fixnum_op_plus_two(ThreadContext context, IRubyObject caller, IRubyObject self) throws Throwable
fixnum_op_rshiftback to summary
public static IRubyObject fixnum_op_rshift(ThreadContext context, IRubyObject caller, IRubyObject self, long value) throws Throwable
fixnum_op_xorback to summary
public static IRubyObject fixnum_op_xor(ThreadContext context, IRubyObject caller, IRubyObject self, long value) throws Throwable
fixnumOperatorback to summary
public static IRubyObject fixnumOperator(ThreadContext context, IRubyObject caller, IRubyObject self, JRubyCallSite site, long value) throws Throwable
fixnumOperatorBootstrapback to summary
public static CallSite fixnumOperatorBootstrap(MethodHandles.Lookup lookup, String name, MethodType type, long value, int callType, String file, int line) throws NoSuchMethodException, IllegalAccessException
fixnumOperatorFailback to summary
pack-priv static IRubyObject fixnumOperatorFail(ThreadContext context, IRubyObject caller, IRubyObject self, JRubyCallSite site, RubyFixnum value) throws Throwable
fixnumTestback to summary
pack-priv static boolean fixnumTest(IRubyObject self)
float_op_cmpback to summary
public static IRubyObject float_op_cmp(ThreadContext context, IRubyObject caller, IRubyObject self, double value) throws Throwable
float_op_divback to summary
public static IRubyObject float_op_div(ThreadContext context, IRubyObject caller, IRubyObject self, double value) throws Throwable
float_op_equalback to summary
public static IRubyObject float_op_equal(ThreadContext context, IRubyObject caller, IRubyObject self, double value) throws Throwable
float_op_geback to summary
public static IRubyObject float_op_ge(ThreadContext context, IRubyObject caller, IRubyObject self, double value) throws Throwable
float_op_gtback to summary
public static IRubyObject float_op_gt(ThreadContext context, IRubyObject caller, IRubyObject self, double value) throws Throwable
float_op_leback to summary
public static IRubyObject float_op_le(ThreadContext context, IRubyObject caller, IRubyObject self, double value) throws Throwable
float_op_ltback to summary
public static IRubyObject float_op_lt(ThreadContext context, IRubyObject caller, IRubyObject self, double value) throws Throwable
float_op_minusback to summary
public static IRubyObject float_op_minus(ThreadContext context, IRubyObject caller, IRubyObject self, double value) throws Throwable
float_op_modback to summary
public static IRubyObject float_op_mod(ThreadContext context, IRubyObject caller, IRubyObject self, double value) throws Throwable
float_op_mulback to summary
public static IRubyObject float_op_mul(ThreadContext context, IRubyObject caller, IRubyObject self, double value) throws Throwable
float_op_plusback to summary
public static IRubyObject float_op_plus(ThreadContext context, IRubyObject caller, IRubyObject self, double value) throws Throwable
floatOperatorback to summary
public static IRubyObject floatOperator(ThreadContext context, IRubyObject caller, IRubyObject self, JRubyCallSite site, double value) throws Throwable
floatOperatorBootstrapback to summary
public static CallSite floatOperatorBootstrap(MethodHandles.Lookup lookup, String name, MethodType type, double value, int callType, String file, int line) throws NoSuchMethodException, IllegalAccessException
floatTestback to summary
pack-priv static boolean floatTest(IRubyObject self)
searchWithCacheback to summary
private static CacheEntry searchWithCache(final String operator, IRubyObject caller, RubyClass selfClass, JRubyCallSite site)