rt/vm/src/main/java/org/apidesign/vm4brwsr/VM.java
branchclosure
changeset 1493 234fea368401
parent 1491 4a1398eff4fb
child 1495 d5dd07b45f79
     1.1 --- a/rt/vm/src/main/java/org/apidesign/vm4brwsr/VM.java	Sat Apr 26 21:30:06 2014 +0200
     1.2 +++ b/rt/vm/src/main/java/org/apidesign/vm4brwsr/VM.java	Sun Apr 27 22:40:17 2014 +0200
     1.3 @@ -64,15 +64,14 @@
     1.4      }
     1.5      
     1.6      static void compile(Appendable out, 
     1.7 -        Bck2Brwsr.Resources l, 
     1.8 -        StringArray rootNames, 
     1.9 -        StringArray names, 
    1.10 -        boolean extension
    1.11 +        Bck2Brwsr config
    1.12      ) throws IOException {
    1.13 -        StringArray both = names.addAndNew(rootNames.toArray());
    1.14 +        String[] both = config.allClasses();
    1.15          
    1.16 -        VM vm = extension ? new Extension(out, l, both.toArray(), rootNames)
    1.17 -                          : new Standalone(out, l, rootNames);
    1.18 +        VM vm = config.isExtension() ? 
    1.19 +            new Extension(out, config.getResources(), both, config.rootClasses())
    1.20 +            : 
    1.21 +            new Standalone(out, config.getResources(), config.rootClasses());
    1.22  
    1.23          final StringArray fixedNames = new StringArray();
    1.24  
    1.25 @@ -80,7 +79,7 @@
    1.26              fixedNames.add(fixedClass.getName().replace('.', '/'));
    1.27          }
    1.28  
    1.29 -        vm.doCompile(fixedNames.addAndNew(both.toArray()));
    1.30 +        vm.doCompile(fixedNames.addAndNew(both));
    1.31      }
    1.32  
    1.33      private void doCompile(StringArray names) throws IOException {