Examples of dup()


Examples of org.jboss.classfilewriter.code.CodeAttribute.dup()

            String[] params = method.getParameters();
            ca.iconst(params.length);
            ca.anewarray("java/lang/Object");
            int loadPosition = 1;
            for (int i = 0; i < params.length; ++i) {
                ca.dup();
                ca.iconst(i);
                String type = params[i];
                if (type.length() == 1) { // primitive
                    char typeChar = type.charAt(0);
                    switch (typeChar) {
View Full Code Here

Examples of org.jruby.RubyString.dup()

        if (str.getByteList().indexOf('\0') != -1) {
            throw context.runtime.newArgumentError("pathname contains null byte");
        }

        infectBy(str);
        this.setPath((RubyString) str.dup());
        return this;
    }

    @JRubyMethod(visibility = Visibility.PRIVATE)
    public IRubyObject initialize_copy(ThreadContext context, IRubyObject pathname) {
View Full Code Here

Examples of org.jruby.compiler.impl.SkinnyMethodAdapter.dup()

                    mv.getfield(pathName, "self", ci(IRubyObject.class));
                    for (String eachName : nameSet) {
                        mv.ldc(eachName);
                    }
                    mv.invokestatic(p(MiniJava.class), "searchMethod", sig(DynamicMethod.class, params(IRubyObject.class, String.class, nameSet.size())));
                    mv.dup();
               
                    // if it's not undefined...
                    mv.getstatic(p(UndefinedMethod.class), "INSTANCE", ci(UndefinedMethod.class));
                    Label noStore = new Label();
                    mv.if_acmpeq(noStore);
View Full Code Here

Examples of org.jruby.runtime.builtin.IRubyObject.dup()

        subclassSingleton.addReadWriteAttribute(context, "java_proxy_class");
        subclassSingleton.addMethod("java_interfaces", new JavaMethodZero(subclassSingleton, Visibility.PUBLIC) {
            @Override
            public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name) {
                IRubyObject javaInterfaces = self.getInstanceVariables().fastGetInstanceVariable("@java_interfaces");
                if (javaInterfaces != null) return javaInterfaces.dup();
                return context.getRuntime().getNil();
            }
        });

        rubySubclass.addMethod("__jcreate!", new JavaMethodNoBlock(subclassSingleton, Visibility.PUBLIC) {
View Full Code Here

Examples of org.objectweb.asm.commons.GeneratorAdapter.dup()

          clinit.push(Type.getType(itf));
          clinit.push(m.getName());
          clinit.push(formals.length);
          clinit.newArray(CLASS);
          for (int j = 0; j < formals.length; ++j) {
            clinit.dup();
            clinit.push(j);
            clinit.push(formals[j]);
            clinit.arrayStore(CLASS);
          }
          clinit.invokeVirtual(CLASS, GET_METHOD);
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNMergeRangeList.dup()

    private Map appendToMergedFroms(Map mergeInfo, String pathComponent) {
        Map result = new TreeMap();
        for (Iterator pathsIter = mergeInfo.keySet().iterator(); pathsIter.hasNext();) {
            String path = (String) pathsIter.next();
            SVNMergeRangeList rangeList = (SVNMergeRangeList) mergeInfo.get(path);
            result.put(SVNPathUtil.append(path, pathComponent), rangeList.dup());
        }
        return result;
    }
   
}
View Full Code Here

Examples of serp.bytecode.Code.dup()

        m = bc.declareMethod("copy", Object.class, new Class[] {Object.class});
        m.makePublic();
        code = m.getCode(true);

        code.anew().setType(type);
        code.dup();
        if (params.length == 1) {
            code.aload().setParam(0);
            if (params[0] == Comparator.class) {
                code.checkcast().setType(SortedSet.class);
                code.invokeinterface().setMethod(SortedSet.class, "comparator",
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.