All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jruby.ir.targets.UnresolvedSuperInvokeSite Maven / Gradle / Ivy

package org.jruby.ir.targets;

import org.jruby.RubyClass;
import org.jruby.ir.runtime.IRRuntimeHelpers;
import org.jruby.runtime.Block;
import org.jruby.runtime.ThreadContext;
import org.jruby.runtime.builtin.IRubyObject;

import java.lang.invoke.MethodType;

/**
* Created by headius on 10/23/14.
*/
public class UnresolvedSuperInvokeSite extends SuperInvokeSite {
    public UnresolvedSuperInvokeSite(MethodType type, String name, String splatmapString, String file, int line) {
        super(type, name, splatmapString, file, line);
    }

    public IRubyObject invoke(ThreadContext context, IRubyObject caller, IRubyObject self, RubyClass definingModule, IRubyObject[] args, Block block) throws Throwable {
        // TODO: get rid of caller
        // TODO: caching
        return IRRuntimeHelpers.unresolvedSuperSplatArgs(context, self, args, block, splatMap);
    }

    public IRubyObject fail(ThreadContext context, IRubyObject caller, IRubyObject self, RubyClass definingModule, IRubyObject[] args, Block block) throws Throwable {
        return invoke(context, caller, self, definingModule, args, block);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy