MethodHandle getHandle(IRubyObject self, RubyClass dispatchClass, DynamicMethod method) throws Throwable { boolean blockGiven = signature.lastArgType() == Block.class; MethodHandle mh = buildNewInstanceHandle(method, self); if (mh == null) mh = buildNotEqualHandle(method, self); if (mh == null) mh = Bootstrap.buildNativeHandle(this, method, blockGiven); if (mh == null) mh = buildJavaFieldHandle(this, method, self); if (mh == null) mh = Bootstrap.buildIndyHandle(this, method, method.getImplementationClass()); if (mh == null) mh = Bootstrap.buildJittedHandle(this, method, blockGiven); if (mh == null) mh = Bootstrap.buildAttrHandle(this, method, self, dispatchClass); if (mh == null) mh = buildAliasHandle(method, self, dispatchClass); if (mh == null) mh = buildStructHandle(method, self, dispatchClass); if (mh == null) mh = Bootstrap.buildGenericHandle(this, method, dispatchClass); assert mh != null : "we should have a method handle of some sort by now"; return mh; }
MethodHandle getHandle(IRubyObject self, RubyClass dispatchClass, DynamicMethod method) throws Throwable { boolean blockGiven = signature.lastArgType() == Block.class; MethodHandle mh = buildNewInstanceHandle(method, self); if (mh == null) mh = buildNotEqualHandle(method, self); if (mh == null) mh = Bootstrap.buildNativeHandle(this, method, blockGiven); if (mh == null) mh = buildJavaFieldHandle(this, method, self); if (mh == null) mh = Bootstrap.buildIndyHandle(this, method, method.getImplementationClass()); if (mh == null) mh = Bootstrap.buildJittedHandle(this, method, blockGiven); if (mh == null) mh = Bootstrap.buildAttrHandle(this, method, self, dispatchClass); if (mh == null) mh = buildAliasHandle(method, self, dispatchClass); if (mh == null) mh = buildStructHandle(method, self, dispatchClass); if (mh == null) mh = Bootstrap.buildGenericHandle(this, method, dispatchClass); assert mh != null : "we should have a method handle of some sort by now"; return mh; }