{
// TODO: Should be passed to parser as an argument
RootContext.ToplevelTypes = new ModuleCompiled (ctx, RootContext.Unsafe);
+ var ctypes = TypeManager.InitCoreTypes ();
+ TypeManager.InitExpressionTypes ();
Parse ();
if (Report.Errors > 0)
if (timestamps)
ShowTime ("Loading references");
+ Import.Initialize ();
LoadReferences ();
if (modules.Count > 0) {
if (timestamps)
ShowTime ("References loaded");
- if (!TypeManager.InitCoreTypes (ctx) || Report.Errors > 0)
+ if (!TypeManager.InitCoreTypes (ctx, ctypes))
return false;
TypeManager.InitOptionalCoreTypes (ctx);
return false;
if (timestamps)
ShowTime ("Populate tree");
- if (!RootContext.StdLib)
- RootContext.BootCorlib_PopulateCoreTypes ();
+
RootContext.PopulateTypes ();
if (Report.Errors == 0 &&
if (RootContext.VerifyClsCompliance) {
if (CodeGen.Assembly.IsClsCompliant) {
AttributeTester.VerifyModulesClsCompliance (ctx);
- TypeManager.LoadAllImportedTypes ();
}
}
if (Report.Errors > 0)
{
Driver.Reset ();
CSharpParser.yacc_verbose_flag = 0;
- RootContext.Reset (full_flag);
Location.Reset ();
+
+ if (!full_flag)
+ return;
+
+ RootContext.Reset (full_flag);
TypeManager.Reset ();
PredefinedAttributes.Reset ();
- TypeHandle.Reset ();
-
- if (full_flag)
- GlobalRootNamespace.Reset ();
+ ArrayContainer.Reset ();
+ ReferenceContainer.Reset ();
+ PointerContainer.Reset ();
+ Parameter.Reset ();
+
+ GlobalRootNamespace.Reset ();
+ Unary.Reset ();
+ Binary.Reset ();
+ ConstantFold.Reset ();
+ CastFromDecimal.Reset ();
NamespaceEntry.Reset ();
CodeGen.Reset ();
Attribute.Reset ();
- AttributeTester.Reset ();
AnonymousTypeClass.Reset ();
AnonymousMethodBody.Reset ();
AnonymousMethodStorey.Reset ();