diff -r 36961c9a009f -r 22beb858e00a rt/vm/src/main/java/org/apidesign/vm4brwsr/VM.java --- a/rt/vm/src/main/java/org/apidesign/vm4brwsr/VM.java Mon May 13 18:54:50 2013 +0200 +++ b/rt/vm/src/main/java/org/apidesign/vm4brwsr/VM.java Fri May 24 16:45:32 2013 +0200 @@ -34,6 +34,12 @@ private final ExportedSymbols exportedSymbols; private final StringArray invokerMethods; + private static final Class FIXED_DEPENDENCIES[] = { + Class.class, + ArithmeticException.class, + VM.class + }; + private VM(Appendable out, Bck2Brwsr.Resources resources) { super(out); this.resources = resources; @@ -61,9 +67,11 @@ VM vm = extension ? new Extension(out, l, names.toArray()) : new Standalone(out, l); - final StringArray fixedNames = - StringArray.asList(Class.class.getName().replace('.', '/'), - VM.class.getName().replace('.', '/')); + final StringArray fixedNames = new StringArray(); + + for (final Class fixedClass: FIXED_DEPENDENCIES) { + fixedNames.add(fixedClass.getName().replace('.', '/')); + } vm.doCompile(fixedNames.addAndNew(names.toArray())); }