286N/A * reserved comment block 286N/A * DO NOT REMOVE OR ALTER! 286N/A * Copyright 2001-2004 The Apache Software Foundation. 286N/A * Licensed under the Apache License, Version 2.0 (the "License"); 286N/A * you may not use this file except in compliance with the License. 286N/A * You may obtain a copy of the License at 286N/A * Unless required by applicable law or agreed to in writing, software 286N/A * distributed under the License is distributed on an "AS IS" BASIS, 286N/A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 286N/A * See the License for the specific language governing permissions and 286N/A * limitations under the License. 286N/A * Parse the contents of the variable 286N/A // Parse 'name' and 'select' attributes plus parameter contents 286N/A // Add a ref to this var to its enclosing construct 286N/A // Mark this as a global variable 286N/A // Check if a global variable with this name already exists... 286N/A // ...and if it does we need to check import precedence 286N/A // It is an error if the two have the same import precedence 286N/A // Ignore this if previous definition has higher precedence 286N/A // Add this variable if we have higher precedence 286N/A * Runs a type check on either the variable element body or the 286N/A * expression in the 'select' attribute 286N/A // Type check the 'select' expression if present 286N/A // Type check the element contents otherwise 286N/A // The return type is void as the variable element does not leave 286N/A // anything on the JVM's stack. The '_type' global will be returned 286N/A // by the references to this variable, and not by the variable itself. 286N/A * This method is part of a little trick that is needed to use local 286N/A * variables inside nested for-each loops. See the initializeVariables() 286N/A * method in the ForEach class for an explanation 286N/A // This is only done for local variables that are actually used 286N/A // Create a variable slot if none is allocated 286N/A // Push the default value on the JVM's stack 286N/A // Mark the store as the start of the live range of the variable 286N/A // Don't generate code for unreferenced variables 286N/A // Make sure that a variable instance is only compiled once 286N/A // Compile variable value computation 286N/A // Add a new local variable and store value 286N/A // If the local is just being created, mark the store as the start 286N/A // of its live range. Note that it might have been created by 286N/A // initializeVariables already, which would have set the start of 286N/A // the live range already. 286N/A // Global variables are store in class fields 286N/A // Push a reference to "this" for putfield 286N/A // Compile variable value computation 286N/A // Store the variable in the allocated field