1.1 --- a/rt/vm/src/main/java/org/apidesign/vm4brwsr/VM.java Mon May 13 18:54:50 2013 +0200
1.2 +++ b/rt/vm/src/main/java/org/apidesign/vm4brwsr/VM.java Fri May 24 16:45:32 2013 +0200
1.3 @@ -34,6 +34,12 @@
1.4 private final ExportedSymbols exportedSymbols;
1.5 private final StringArray invokerMethods;
1.6
1.7 + private static final Class<?> FIXED_DEPENDENCIES[] = {
1.8 + Class.class,
1.9 + ArithmeticException.class,
1.10 + VM.class
1.11 + };
1.12 +
1.13 private VM(Appendable out, Bck2Brwsr.Resources resources) {
1.14 super(out);
1.15 this.resources = resources;
1.16 @@ -61,9 +67,11 @@
1.17 VM vm = extension ? new Extension(out, l, names.toArray())
1.18 : new Standalone(out, l);
1.19
1.20 - final StringArray fixedNames =
1.21 - StringArray.asList(Class.class.getName().replace('.', '/'),
1.22 - VM.class.getName().replace('.', '/'));
1.23 + final StringArray fixedNames = new StringArray();
1.24 +
1.25 + for (final Class<?> fixedClass: FIXED_DEPENDENCIES) {
1.26 + fixedNames.add(fixedClass.getName().replace('.', '/'));
1.27 + }
1.28
1.29 vm.doCompile(fixedNames.addAndNew(names.toArray()));
1.30 }