+ Dictionary<TypeSpec, TypeInfo> type_hash;
+ if (type.BuiltinType > 0) {
+ // Don't cache built-in types, they are null in most cases except for
+ // corlib compilation when we need to distinguish between declaration
+ // and referencing
+ type_hash = null;
+ } else {
+ type_hash = context.Module.TypeInfoCache;
+ if (type_hash.TryGetValue (type, out info))
+ return info;
+ }