use of org.wso2.ballerinalang.programfile.PackageVarInfo in project ballerina by ballerina-lang.
the class CodeGenerator method createPackageVarInfo.
// Create info entries
private void createPackageVarInfo(BLangVariable varNode) {
BVarSymbol varSymbol = varNode.symbol;
varSymbol.varIndex = getPVIndex(varSymbol.type.tag);
int varNameCPIndex = addUTF8CPEntry(currentPkgInfo, varSymbol.name.value);
int typeSigCPIndex = addUTF8CPEntry(currentPkgInfo, varSymbol.type.getDesc());
PackageVarInfo pkgVarInfo = new PackageVarInfo(varNameCPIndex, typeSigCPIndex, varSymbol.flags, varSymbol.varIndex.value);
currentPkgInfo.pkgVarInfoMap.put(varSymbol.name.value, pkgVarInfo);
LocalVariableInfo localVarInfo = getLocalVarAttributeInfo(varSymbol);
LocalVariableAttributeInfo pkgVarAttrInfo = (LocalVariableAttributeInfo) currentPkgInfo.getAttributeInfo(AttributeInfo.Kind.LOCAL_VARIABLES_ATTRIBUTE);
pkgVarAttrInfo.localVars.add(localVarInfo);
// TODO Populate annotation attribute
}
Aggregations