@@ -498,7 +498,7 @@ private JExpression handleMagicMethodCall(JMethodCall x) {
498
498
*/
499
499
private final Set <JNode > liveFieldsAndMethods = new IdentityHashSet <JNode >();
500
500
501
- private TreeLogger logger ;
501
+ private final TreeLogger logger ;
502
502
private Set <JMethod > magicMethodCalls = new IdentityHashSet <JMethod >();
503
503
private final Map <String , JMethod > methodMap = new HashMap <String , JMethod >();
504
504
private final JJSOptions options ;
@@ -515,8 +515,9 @@ private JExpression handleMagicMethodCall(JMethodCall x) {
515
515
private final Map <String , List <JMethod >> virtualMethodsPending =
516
516
new java .util .HashMap <String , List <JMethod >>();
517
517
518
- public UnifyAst (JProgram program , JsProgram jsProgram , JJSOptions options ,
518
+ public UnifyAst (TreeLogger logger , JProgram program , JsProgram jsProgram , JJSOptions options ,
519
519
RebindPermutationOracle rpo ) {
520
+ this .logger = logger ;
520
521
this .program = program ;
521
522
this .jsProgram = jsProgram ;
522
523
this .options = options ;
@@ -538,8 +539,7 @@ public void addRootTypes(Collection<String> sourceTypeNames) throws UnableToComp
538
539
* Special AST construction, useful for tests. Everything is resolved,
539
540
* translated, and unified.
540
541
*/
541
- public void buildEverything (TreeLogger logger ) throws UnableToCompleteException {
542
- this .logger = logger ;
542
+ public void buildEverything () throws UnableToCompleteException {
543
543
for (String internalName : classFileMap .keySet ()) {
544
544
String typeName = InternalName .toBinaryName (internalName );
545
545
searchForTypeByBinary (typeName );
@@ -568,9 +568,7 @@ public void buildEverything(TreeLogger logger) throws UnableToCompleteException
568
568
* entry points. This reduces memory and improves compile speed. Any
569
569
* unreachable elements are pruned.
570
570
*/
571
- public void exec (TreeLogger logger ) throws UnableToCompleteException {
572
- this .logger = logger ;
573
-
571
+ public void exec () throws UnableToCompleteException {
574
572
// Trace execution from entry points.
575
573
for (JMethod entryMethod : program .getEntryMethods ()) {
576
574
flowInto (entryMethod );
0 commit comments