Package org.jruby.lexer.yacc

Examples of org.jruby.lexer.yacc.SimpleSourcePosition


        StaticScope scope = createScopeForClass(context, scopeString);
       
        MethodFactory factory = MethodFactory.createFactory(compiledClass.getClassLoader());
        DynamicMethod method = constructNormalMethod(
                factory, javaName,
                name, containingClass, new SimpleSourcePosition(filename, line), arity, scope, visibility, scriptObject,
                callConfig,
                parameterDesc);
       
        addInstanceMethod(containingClass, name, method, visibility,context, runtime);
       
View Full Code Here


        StaticScope scope = createScopeForClass(context, scopeString);
       
        MethodFactory factory = MethodFactory.createFactory(compiledClass.getClassLoader());
        DynamicMethod method = constructSingletonMethod(
                factory, javaName, rubyClass,
                new SimpleSourcePosition(filename, line), arity, scope,
                scriptObject, callConfig, parameterDesc);
       
        rubyClass.addMethod(name, method);
       
        callSingletonMethodHook(receiver,context, runtime.fastNewSymbol(name));
View Full Code Here

        performNormalMethodChecks(containingClass, runtime, name);
       
        MethodFactory factory = MethodFactory.createFactory(compiledClass.getClassLoader());
        DynamicMethod method = constructNormalMethod(
                factory, javaName,
                name, containingClass, new SimpleSourcePosition(filename, line), arity, scope, visibility, scriptObject,
                callConfig,
                parameterDesc);
       
        addInstanceMethod(containingClass, name, method, visibility,context, runtime);
       
View Full Code Here

        RubyClass rubyClass = performSingletonMethodChecks(runtime, receiver, name);
       
        MethodFactory factory = MethodFactory.createFactory(compiledClass.getClassLoader());
        DynamicMethod method = constructSingletonMethod(
                factory, javaName, rubyClass,
                new SimpleSourcePosition(filename, line), arity, scope,
                scriptObject, callConfig, parameterDesc);
       
        rubyClass.addMethod(name, method);
       
        callSingletonMethodHook(receiver,context, runtime.fastNewSymbol(name));
View Full Code Here

            }
        }
    }

    public static void defineAttrReader(Graph graph, String name) {
        ISourcePosition pos = new SimpleSourcePosition("(generated)", 0);
        graph.createVertex(new DefnNode(pos,
                                        new ArgumentNode(pos, name),
                                        new ArgsNoArgNode(pos),
                                        new LocalStaticScope(null),
                                        new InstVarNode(pos, "@" + name)));
View Full Code Here

                                        new LocalStaticScope(null),
                                        new InstVarNode(pos, "@" + name)));
    }

    public static void defineAttrWriter(Graph graph, String name) {
        ISourcePosition pos = new SimpleSourcePosition("(generated)", 0);
        graph.createVertex(new DefnNode(pos,
                                        new ArgumentNode(pos, name + "="),
                                        new ArgsPreOneArgNode(pos, new ListNode(null, new ArgumentNode(null, name))),
                                        new LocalStaticScope(null),
                                        new InstAsgnNode(pos, "@" + name, new LocalVarNode(null, 0, name))));
View Full Code Here

    private Instr decodeLambda() {
        Variable v = d.decodeVariable();
        WrappedIRClosure c = (WrappedIRClosure) d.decodeOperand();

        return new BuildLambdaInstr(v, c, new SimpleSourcePosition(d.decodeString(), d.decodeInt()));
    }
View Full Code Here

        Visibility newVisibility = performNormalMethodChecksAndDetermineVisibility(runtime, null, rubyName, currVisibility);

        MethodFactory factory = MethodFactory.createFactory(compiledClass.getClassLoader());
        DynamicMethod method = constructNormalMethod(
                factory, javaName,
                rubyName, null, new SimpleSourcePosition(filename, line), arity, scope, newVisibility, scriptObject,
                callConfig,
                parameterDesc,
                methodNodes);

        // TODO(CS): The MethodNodes don't pass through to the method object correctly - bypass.
View Full Code Here

        RubyClass rubyClass = performSingletonMethodChecks(runtime, receiver, rubyName);
       
        MethodFactory factory = MethodFactory.createFactory(compiledClass.getClassLoader());
        DynamicMethod method = constructSingletonMethod(
                factory, rubyName, javaName, rubyClass,
                new SimpleSourcePosition(filename, line), arity, scope,
                scriptObject, callConfig, parameterDesc, methodNodes);

        // TODO(CS): The MethodNodes don't pass through to the method object correctly - bypass.

        if (method instanceof CompiledMethod) {
View Full Code Here

    public static IRScopeType createScopeType(String type) {
        return IRScopeType.valueOf(type);
    }

    public static ISourcePosition createSourcePosition(String fileName, int line) {
        return new SimpleSourcePosition(fileName, line);
    }
View Full Code Here

TOP

Related Classes of org.jruby.lexer.yacc.SimpleSourcePosition

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.