/** * The code that is generated by nested for-each loops can appear to some * JVMs as if it is accessing un-initialized variables. We must add some * code that pushes the default variable value on the stack and pops it * into the variable slot. This is done by the Variable.initialize() * method. The code that we compile for this loop looks like this: * * initialize iterator * initialize variables <-- HERE!!! * goto Iterate * Loop: : * : (code for <xsl:for-each> contents) * : * Iterate: node = iterator.next(); * if (node != END) goto Loop */ public void initializeVariables(ClassGenerator classGen, MethodGenerator methodGen) { final int n = elementCount(); for (int i = 0; i < n; i++) { final Object child = getContents().elementAt(i); if (child instanceof Variable) { Variable var = (Variable)child; var.initialize(classGen, methodGen); } } }
/** * The code that is generated by nested for-each loops can appear to some * JVMs as if it is accessing un-initialized variables. We must add some * code that pushes the default variable value on the stack and pops it * into the variable slot. This is done by the Variable.initialize() * method. The code that we compile for this loop looks like this: * * initialize iterator * initialize variables <-- HERE!!! * goto Iterate * Loop: : * : (code for <xsl:for-each> contents) * : * Iterate: node = iterator.next(); * if (node != END) goto Loop */ public void initializeVariables(ClassGenerator classGen, MethodGenerator methodGen) { final int n = elementCount(); for (int i = 0; i < n; i++) { final Object child = getContents().elementAt(i); if (child instanceof Variable) { Variable var = (Variable)child; var.initialize(classGen, methodGen); } } }
/** * The code that is generated by nested for-each loops can appear to some * JVMs as if it is accessing un-initialized variables. We must add some * code that pushes the default variable value on the stack and pops it * into the variable slot. This is done by the Variable.initialize() * method. The code that we compile for this loop looks like this: * * initialize iterator * initialize variables <-- HERE!!! * goto Iterate * Loop: : * : (code for <xsl:for-each> contents) * : * Iterate: node = iterator.next(); * if (node != END) goto Loop */ public void initializeVariables(ClassGenerator classGen, MethodGenerator methodGen) { final int n = elementCount(); for (int i = 0; i < n; i++) { final Object child = getContents().elementAt(i); if (child instanceof Variable) { Variable var = (Variable)child; var.initialize(classGen, methodGen); } } }
/** * The code that is generated by nested for-each loops can appear to some * JVMs as if it is accessing un-initialized variables. We must add some * code that pushes the default variable value on the stack and pops it * into the variable slot. This is done by the Variable.initialize() * method. The code that we compile for this loop looks like this: * * initialize iterator * initialize variables <-- HERE!!! * goto Iterate * Loop: : * : (code for <xsl:for-each> contents) * : * Iterate: node = iterator.next(); * if (node != END) goto Loop */ public void initializeVariables(ClassGenerator classGen, MethodGenerator methodGen) { final int n = elementCount(); for (int i = 0; i < n; i++) { final Object child = getContents().elementAt(i); if (child instanceof Variable) { Variable var = (Variable)child; var.initialize(classGen, methodGen); } } }