Package org.jruby.truffle.runtime.methods

Examples of org.jruby.truffle.runtime.methods.MethodLike


        final MaterializedFrame frame = activation.getMaterializedFrame();

        final Object[] arguments = frame.getArguments();

        final MethodLike method = RubyArguments.getMethod(arguments);
        lines.add(String.format("      method = %s", method));

        if (method instanceof RubyMethod) {
            final RubyMethod rubyMethod = (RubyMethod) method;
View Full Code Here


public abstract class RubyCallStack {

    public static RubyMethod getCurrentMethod() {
        CompilerAsserts.neverPartOfCompilation();

        MethodLike method;

        final FrameInstance currentFrame = Truffle.getRuntime().getCurrentFrame();

        method = getMethod(currentFrame);

        if (method instanceof RubyMethod) {
            return (RubyMethod) method;
        }

        return Truffle.getRuntime().iterateFrames(new FrameInstanceVisitor<RubyMethod>() {

            @Override
            public RubyMethod visitFrame(FrameInstance frameInstance) {
                final MethodLike maybeMethod = getMethod(frameInstance);

                if (maybeMethod instanceof RubyMethod) {
                    return (RubyMethod) maybeMethod;
                } else {
                    return null;
View Full Code Here

    public static RubyMethod getCallingMethod() {
        CompilerAsserts.neverPartOfCompilation();

        final Memo<Boolean> seenCurrent = new Memo<Boolean>();

        MethodLike method;

        final FrameInstance currentFrame = Truffle.getRuntime().getCurrentFrame();

        method = getMethod(currentFrame);

        if (method instanceof RubyMethod) {
            seenCurrent.set(true);
        }

        return Truffle.getRuntime().iterateFrames(new FrameInstanceVisitor<RubyMethod>() {

            @Override
            public RubyMethod visitFrame(FrameInstance frameInstance) {
                final MethodLike maybeMethod = getMethod(frameInstance);

                if (maybeMethod instanceof RubyMethod) {
                    if (seenCurrent.get()) {
                        return (RubyMethod) maybeMethod;
                    } else {
View Full Code Here

TOP

Related Classes of org.jruby.truffle.runtime.methods.MethodLike

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.