Package org.jnode.vm

Examples of org.jnode.vm.VmSystemClassLoader.loadClass()


    public static void main(String[] args)
        throws Exception {

        final String className = (args.length > 0) ? args[0] : "java.lang.Object";
        final VmSystemClassLoader loader = new VmSystemClassLoader(new File(".").toURL(), new VmX86Architecture32());
        final VmType vmClass = loader.loadClass(className, true);

        for (int i = 0; i < vmClass.getNoDeclaredMethods(); i++) {
            TestCFG(vmClass.getDeclaredMethod(i));
        }
    }
View Full Code Here


            new File("distr/build/classes").toURL(),
            new File("local/classlib").toURL()
        }, arch);
        new VmImpl("?", arch, loader.getSharedStatics(), true, loader, null);
        VmType.initializeForBootImage(loader);
        VmType<?> type = loader.loadClass(className, true);
        VmMethod arithMethod = null;
        int nMethods = type.getNoDeclaredMethods();
        for (int i = 0; i < nMethods; i += 1) {
            VmMethod method1 = type.getDeclaredMethod(i);
            if ("terniary22".equals(method1.getName())) {
View Full Code Here

        VmSystemClassLoader vmc = new VmSystemClassLoader(new URL[]{
            new File("core/build/classes").toURL(),
            new File("local/classlib").toURL()
        }, arch);
        new VmImpl("?", arch, vmc.getSharedStatics(), true, vmc, null);
        VmType<?> type = vmc.loadClass(className, true);
        VmMethod arithMethod = null;
        int nMethods = type.getNoDeclaredMethods();
        for (int i = 0; i < nMethods; i += 1) {
            VmMethod method = type.getDeclaredMethod(i);
            if (methodName.equals(method.getName())) {
View Full Code Here

        final long start = System.currentTimeMillis();
        for (int k = 0; k < clsNames.length; k++) {
            final String clsName = clsNames[k];
            System.out.println("Compiling " + clsName);
            final VmType type = cl.loadClass(clsName, true);

            final Object[] tib = ((VmClassType) type).getTIB();
            final byte[] cimt = (byte[]) tib[TIBLayout.COMPILED_IMT_INDEX];
            if (cimt != null) {
                final String fname = type.getName() + ".imt.bin";
View Full Code Here

        for (int ci = 0; ci < cs.length; ci++) {
            final long start = System.currentTimeMillis();
            for (int k = 0; k < clsNames.length; k++) {
                final String clsName = clsNames[k];
                System.out.println("Compiling " + clsName);
                final VmType type = cl.loadClass(clsName, true);
                final int cnt = type.getNoDeclaredMethods();
                for (int i = 0; i < cnt; i++) {
                    final VmMethod method = type.getDeclaredMethod(i);
                    if (
                        "<init>".equals(method.getName()) ||
View Full Code Here

                }
                out.println();
            } else {

                out.println("; VmClass: " + cn.getClassName());
                VmType<?> vmClass = cl.loadClass(cn.getClassName(), true);
                vmClass.link();
                String cname = vmClass.getName().replace('/', '.');
                int idx = cname.lastIndexOf('.');
                if (idx > 0) {
                    cname = cname.substring(idx + 1);
View Full Code Here

    }

    private static VmByteCode loadByteCode(String className)
        throws MalformedURLException, ClassNotFoundException {
        VmSystemClassLoader vmc = new VmSystemClassLoader(new File(".").toURL(), new VmX86Architecture32());
        VmType type = vmc.loadClass(className, true);
        VmMethod arithMethod = null;
        int nMethods = type.getNoDeclaredMethods();
        for (int i = 0; i < nMethods; i += 1) {
            VmMethod method = type.getDeclaredMethod(i);
            if ("const1".equals(method.getName())) {
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.