public FieldInfo getModuleField(Symbol sym) { assert sym.isModule() || sym.isModuleClass() : Debug.show(sym); FieldInfo moduleField = (FieldInfo) symbols2moduleFields.get(sym); if (moduleField == null) { Symbol s = getTypeSymbol(sym.type()); if (sym != s) { moduleField = getModuleField(s); } else { Type type = getType(sym); if (type instanceof TypeBuilder) { TypeBuilder module = (TypeBuilder) type; moduleField = module.DefineField (MODULE_S, module, (short)(FieldAttributes.Public | FieldAttributes.InitOnly | FieldAttributes.Static)); } else { moduleField = type.GetField(MODULE_S); assert moduleField != null; } } symbols2moduleFields.put(sym, moduleField); } assert moduleField != null : Debug.show(sym); return moduleField;
private FieldInfo getModuleField(Type type) { Symbol sym = (Symbol) types2symbols.get(type); assert sym != null; return getModuleField(sym);
    public FieldInfo getModuleField(Symbol sym) {	assert sym.isModule() || sym.isModuleClass() : Debug.show(sym);	FieldInfo moduleField = (FieldInfo) symbols2moduleFields.get(sym);	if (moduleField == null) {	    Symbol s = getTypeSymbol(sym.type());	    if (sym != s) {		moduleField = getModuleField(s);	    } else {		Type type = getType(sym);		if (type instanceof TypeBuilder) {		    TypeBuilder module = (TypeBuilder) type;		    moduleField = module.DefineField			(MODULE_S,			 module,			 (short)(FieldAttributes.Public				 | FieldAttributes.InitOnly				 | FieldAttributes.Static));		} else {		    moduleField = type.GetField(MODULE_S);		    assert moduleField != null;		}	    }	    symbols2moduleFields.put(sym, moduleField);	}	assert moduleField != null : Debug.show(sym);	return moduleField;    }