Examples of GimpleRecordTypeDef


Examples of org.renjin.gcc.gimple.type.GimpleRecordTypeDef

  public ImRecordType resolveStruct(GimpleRecordType recordType) {
    ImRecordType type = map.get(recordType.getId());
    if(type != null) {
      return type;
    } else {
      GimpleRecordTypeDef def = defs.get(recordType.getId());
      if(def == null) {
        throw new RuntimeException("Can't find record type definition for " + recordType);
      }
     
      if(providedTypes.containsKey(def.getName())) {
        ImRecordType providedType = providedTypes.get(def.getName());
        map.put(recordType.getId(), providedType);
        return providedType;

      } else {

        // create a new JVM type to back this array
        JimpleClassBuilder recordClass = context.getJimpleOutput().newClass();
        recordClass.setPackageName(context.getMainClass().getPackageName());
        recordClass.setClassName(context.getMainClass().getClassName() + "$" + def.getName());

        SimpleRecordType struct = new SimpleRecordType(new SyntheticJimpleType(recordClass.getFqcn()));
        map.put(recordType.getId(), struct);

        buildFields(struct, recordClass, def);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.