Search in sources :

Example 6 with StructureRefCPEntry

use of org.ballerinalang.util.codegen.cpentries.StructureRefCPEntry in project ballerina by ballerina-lang.

the class CPU method createNewStruct.

private static void createNewStruct(WorkerExecutionContext ctx, int[] operands, WorkerData sf) {
    int cpIndex = operands[0];
    int i = operands[1];
    StructureRefCPEntry structureRefCPEntry = (StructureRefCPEntry) ctx.constPool[cpIndex];
    StructInfo structInfo = (StructInfo) structureRefCPEntry.getStructureTypeInfo();
    sf.refRegs[i] = new BStruct(structInfo.getType());
}
Also used : BStruct(org.ballerinalang.model.values.BStruct) StructInfo(org.ballerinalang.util.codegen.StructInfo) StructureRefCPEntry(org.ballerinalang.util.codegen.cpentries.StructureRefCPEntry)

Aggregations

StructureRefCPEntry (org.ballerinalang.util.codegen.cpentries.StructureRefCPEntry)6 TypeRefCPEntry (org.ballerinalang.util.codegen.cpentries.TypeRefCPEntry)3 VarTypeCountAttributeInfo (org.ballerinalang.util.codegen.attributes.VarTypeCountAttributeInfo)2 FunctionRefCPEntry (org.ballerinalang.util.codegen.cpentries.FunctionRefCPEntry)2 TransformerRefCPEntry (org.ballerinalang.util.codegen.cpentries.TransformerRefCPEntry)2 UTF8CPEntry (org.ballerinalang.util.codegen.cpentries.UTF8CPEntry)2 ProgramFileFormatException (org.ballerinalang.util.exceptions.ProgramFileFormatException)2 HashMap (java.util.HashMap)1 BConnectorType (org.ballerinalang.model.types.BConnectorType)1 BType (org.ballerinalang.model.types.BType)1 BConnector (org.ballerinalang.model.values.BConnector)1 BStruct (org.ballerinalang.model.values.BStruct)1 ConnectorInfo (org.ballerinalang.util.codegen.ConnectorInfo)1 StructInfo (org.ballerinalang.util.codegen.StructInfo)1 AttributeInfo (org.ballerinalang.util.codegen.attributes.AttributeInfo)1 CodeAttributeInfo (org.ballerinalang.util.codegen.attributes.CodeAttributeInfo)1 DefaultValueAttributeInfo (org.ballerinalang.util.codegen.attributes.DefaultValueAttributeInfo)1 ErrorTableAttributeInfo (org.ballerinalang.util.codegen.attributes.ErrorTableAttributeInfo)1 LineNumberTableAttributeInfo (org.ballerinalang.util.codegen.attributes.LineNumberTableAttributeInfo)1 LocalVariableAttributeInfo (org.ballerinalang.util.codegen.attributes.LocalVariableAttributeInfo)1