Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

(Re-)add NIECZA_FORCE_SAVE for debugging code generation problems wit…

…h eval and BEGIN. Works better now than it did pre-serialize!
  • Loading branch information...
commit ac863e41e69bedaf17df59dcd500a30a291a14f7 1 parent a1c7d29
Stefan O'Rear authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/Kernel.cs
5 lib/Kernel.cs
View
@@ -403,10 +403,13 @@ sealed class EmitUnit {
public EmitUnit(string uname, string asm_name, string dll_name, bool is_mainish) {
+ if (Config.CGForceSave && dll_name == null)
+ dll_name = asm_name + ".exe";
this.dll_name = dll_name;
asm_builder = AppDomain.CurrentDomain.DefineDynamicAssembly(
new AssemblyName(asm_name),
(dll_name == null ? AssemblyBuilderAccess.Run :
+ Config.CGForceSave ? AssemblyBuilderAccess.RunAndSave :
AssemblyBuilderAccess.Save),
Backend.obj_dir);
@@ -6068,6 +6071,8 @@ public class Config {
int.Parse(Environment.GetEnvironmentVariable("NIECZA_CODEGEN_TRACE") ?? "0");
public static readonly bool CGVerifiable =
Environment.GetEnvironmentVariable("NIECZA_CODEGEN_UNVERIFIABLE") != null ? false : true;
+ public static readonly bool CGForceSave =
+ Environment.GetEnvironmentVariable("NIECZA_FORCE_SAVE") != null;
public static readonly bool C3Trace =
Environment.GetEnvironmentVariable("NIECZA_C3_TRACE") != null;
public static readonly bool SerTrace =
Please sign in to comment.
Something went wrong with that request. Please try again.