Examples of ldc()


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

            int j = 0;
            for (i = 0; i < len; i++) {
                if (!RemoteException.class.isAssignableFrom(exceptions[i])) {
                    init.dup();
                    init.iconst(j);
                    init.ldc(exceptions[i].getName());
                    init.aastore();
                    j++;
                }
            }
View Full Code Here

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

                }
            }

            // Push fourth argument for StubStrategy constructor:
            // abbreviated name of the return value marshaller
            init.ldc(CDRStream.abbrevFor(returnType));

            // Push fifth argument for StubStrategy constructor:
            // null (no ClassLoader specified)
            init.aconstNull();
View Full Code Here

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

        clinit.iconst(ids.length);
        clinit.anewarray(String.class.getName());
        for (int i = 0; i < ids.length; i++) {
            clinit.dup();
            clinit.iconst(i);
            clinit.ldc(ids[i]);
            clinit.aastore();
        }
        clinit.putstatic(stubClassName, ID_FIELD_NAME, "[Ljava/lang/String;");

        int n = methodIndex; // last methodIndex + 1
View Full Code Here

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

        throw new RuntimeException("Unsupported method signature for dynamic call: " + site.type());
    }
   
    public static void installBytecode(MethodVisitor method, String classname) {
        SkinnyMethodAdapter clinitMethod = new SkinnyMethodAdapter(method);
        clinitMethod.ldc(c(classname));
        clinitMethod.invokestatic(p(Class.class), "forName", sig(Class.class, params(String.class)));
        clinitMethod.ldc(Type.getType(InvokeDynamicSupport.class));
        clinitMethod.ldc("bootstrap");
        clinitMethod.getstatic(p(Linkage.class), "BOOTSTRAP_METHOD_TYPE", ci(MethodType.class));
        clinitMethod.invokestatic(p(MethodHandles.class), "findStatic", sig(MethodHandle.class, Class.class, String.class, MethodType.class));
View Full Code Here

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

   
    public static void installBytecode(MethodVisitor method, String classname) {
        SkinnyMethodAdapter clinitMethod = new SkinnyMethodAdapter(method);
        clinitMethod.ldc(c(classname));
        clinitMethod.invokestatic(p(Class.class), "forName", sig(Class.class, params(String.class)));
        clinitMethod.ldc(Type.getType(InvokeDynamicSupport.class));
        clinitMethod.ldc("bootstrap");
        clinitMethod.getstatic(p(Linkage.class), "BOOTSTRAP_METHOD_TYPE", ci(MethodType.class));
        clinitMethod.invokestatic(p(MethodHandles.class), "findStatic", sig(MethodHandle.class, Class.class, String.class, MethodType.class));
        clinitMethod.invokestatic(p(Linkage.class), "registerBootstrapMethod", sig(void.class, Class.class, MethodHandle.class));
    }
View Full Code Here

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

    public static void installBytecode(MethodVisitor method, String classname) {
        SkinnyMethodAdapter clinitMethod = new SkinnyMethodAdapter(method);
        clinitMethod.ldc(c(classname));
        clinitMethod.invokestatic(p(Class.class), "forName", sig(Class.class, params(String.class)));
        clinitMethod.ldc(Type.getType(InvokeDynamicSupport.class));
        clinitMethod.ldc("bootstrap");
        clinitMethod.getstatic(p(Linkage.class), "BOOTSTRAP_METHOD_TYPE", ci(MethodType.class));
        clinitMethod.invokestatic(p(MethodHandles.class), "findStatic", sig(MethodHandle.class, Class.class, String.class, MethodType.class));
        clinitMethod.invokestatic(p(Linkage.class), "registerBootstrapMethod", sig(void.class, Class.class, MethodHandle.class));
    }
View Full Code Here

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

                    mv.pop();
                    // exit monitor before making call
                    // FIXME: this not being in a finally is a little worrisome
                    mv.aload(0);
                    mv.getfield(pathName, "self", ci(IRubyObject.class));
                    mv.ldc(simpleName);
                    coerceArgumentsToRuby(mv, paramTypes, pathName);
                    mv.invokestatic(p(RuntimeHelpers.class), "invokeMethodMissing", sig(IRubyObject.class, IRubyObject.class, String.class, IRubyObject[].class));
                    mv.go_to(end);
               
                    // perform the dispatch
View Full Code Here

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

               
                    // load self, class, and name
                    mv.aload(0);
                    mv.getfield(pathName, "self", ci(IRubyObject.class));
                    mv.getstatic(pathName, "rubyClass", ci(RubyClass.class));
                    mv.ldc(simpleName);
               
                    // coerce arguments
                    coerceArgumentsToRuby(mv, paramTypes, pathName);
               
                    // load null block
View Full Code Here

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

                mv.getstatic(name, simpleName, ci(DynamicMethod.class));
                mv.dup();
                mv.ifnonnull(dispatch);
                mv.pop();
                mv.getstatic(name, "rubyClass", ci(RubyClass.class));
                mv.ldc("method_missing");
                mv.invokevirtual(p(RubyClass.class), "searchMethod", sig(DynamicMethod.class, String.class));
                mv.label(dispatch);
               
                // get current context
                mv.getstatic(name, "ruby", ci(Ruby.class));
View Full Code Here

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

               
                // load self, class, and name
                mv.aload(0);
                mv.getfield(name, "self", ci(IRubyObject.class));
                mv.getstatic(name, "rubyClass", ci(RubyClass.class));
                mv.ldc(simpleName);
               
                // load arguments into IRubyObject[] for dispatch
                if (method.getParameterTypes().length != 0) {
                    mv.pushInt(method.getParameterTypes().length);
                    mv.anewarray(p(IRubyObject.class));
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.