2696 return; 2697 } 2698 2699 // Add this$n (if needed) in front of and free variables behind 2700 // constructor parameter list. 2701 tree.params = tree.params.appendList(fvdefs); 2702 if (currentClass.hasOuterInstance()) 2703 tree.params = tree.params.prepend(otdef); 2704 2705 // If this is an initial constructor, i.e., it does not start with 2706 // this(...), insert initializers for this$n and proxies 2707 // before (pre-1.4, after) the call to superclass constructor. 2708 JCStatement selfCall = translate(tree.body.stats.head); 2709 2710 List<JCStatement> added = List.nil(); 2711 if (fvs.nonEmpty()) { 2712 List<Type> addedargtypes = List.nil(); 2713 for (List<VarSymbol> l = fvs; l.nonEmpty(); l = l.tail) { 2714 if (TreeInfo.isInitialConstructor(tree)) { 2715 final Name pName = proxyName(l.head.name); 2716 m.extraParams = 2717 m.extraParams.append((VarSymbol) 2718 (proxies.lookup(pName).sym)); 2719 added = added.prepend( 2720 initField(tree.body.pos, pName)); 2721 } 2722 addedargtypes = addedargtypes.prepend(l.head.erasure(types)); 2723 } 2724 Type olderasure = m.erasure(types); 2725 m.erasure_field = new MethodType( 2726 olderasure.getParameterTypes().appendList(addedargtypes), 2727 olderasure.getReturnType(), 2728 olderasure.getThrownTypes(), 2729 syms.methodClass); 2730 } 2731 if (currentClass.hasOuterInstance() && 2732 TreeInfo.isInitialConstructor(tree)) 2733 { 2734 added = added.prepend(initOuterThis(tree.body.pos)); 2735 } 2736 2737 // pop local variables from proxy stack | 2696 return; 2697 } 2698 2699 // Add this$n (if needed) in front of and free variables behind 2700 // constructor parameter list. 2701 tree.params = tree.params.appendList(fvdefs); 2702 if (currentClass.hasOuterInstance()) 2703 tree.params = tree.params.prepend(otdef); 2704 2705 // If this is an initial constructor, i.e., it does not start with 2706 // this(...), insert initializers for this$n and proxies 2707 // before (pre-1.4, after) the call to superclass constructor. 2708 JCStatement selfCall = translate(tree.body.stats.head); 2709 2710 List<JCStatement> added = List.nil(); 2711 if (fvs.nonEmpty()) { 2712 List<Type> addedargtypes = List.nil(); 2713 for (List<VarSymbol> l = fvs; l.nonEmpty(); l = l.tail) { 2714 if (TreeInfo.isInitialConstructor(tree)) { 2715 final Name pName = proxyName(l.head.name); 2716 m.capturedLocals = 2717 m.capturedLocals.append((VarSymbol) 2718 (proxies.lookup(pName).sym)); 2719 added = added.prepend( 2720 initField(tree.body.pos, pName)); 2721 } 2722 addedargtypes = addedargtypes.prepend(l.head.erasure(types)); 2723 } 2724 Type olderasure = m.erasure(types); 2725 m.erasure_field = new MethodType( 2726 olderasure.getParameterTypes().appendList(addedargtypes), 2727 olderasure.getReturnType(), 2728 olderasure.getThrownTypes(), 2729 syms.methodClass); 2730 } 2731 if (currentClass.hasOuterInstance() && 2732 TreeInfo.isInitialConstructor(tree)) 2733 { 2734 added = added.prepend(initOuterThis(tree.body.pos)); 2735 } 2736 2737 // pop local variables from proxy stack |