// Collecting mode entry point public AssemblyCompiler(CompilerEnvironment env, CST.AssemblyDef assemblyDef) : this(env) { assmEnv = env.Global.Environment().AddAssembly(assemblyDef); assemblyTrace = null; NameSupply = new JST.NameSupply(Constants.Globals); rootId = NameSupply.GenSym(); assemblyId = NameSupply.GenSym(); }
// Traced mode entry point public AssemblyCompiler(TraceCompiler parent, AssemblyTrace assemblyTrace) : this(parent.Env) { assmEnv = parent.Env.Global.Environment().AddAssembly(assemblyTrace.Assembly); this.assemblyTrace = assemblyTrace; if (assemblyTrace.Parent.Flavor == TraceFlavor.Remainder) { NameSupply = new JST.NameSupply(Constants.Globals); rootId = NameSupply.GenSym(); assemblyId = NameSupply.GenSym(); } else { NameSupply = parent.NameSupply; rootId = parent.RootId; assemblyId = NameSupply.GenSym(); } }