Skip to content

Commit 6faace0

Browse files
Oscar Morantespacepluk
authored andcommitted
add RT flag to prevent instantiation of GenContext
1 parent 13b0fbc commit 6faace0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Clojure/Clojure/CljCompiler/Compiler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1404,7 +1404,7 @@ static GenContext CreateEvalContext(string name, bool createDynInitHelper)
14041404
return c;
14051405
}
14061406

1407-
static GenContext _evalContext = CreateEvalContext("eval", false);
1407+
static GenContext _evalContext = RuntimeBootstrapFlag.DisableEval ? null : CreateEvalContext("eval", false);
14081408
static public GenContext EvalContext { get { return _evalContext; } }
14091409

14101410
static int _saveId = 0;

Clojure/Clojure/Lib/RT.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3695,6 +3695,7 @@ public static class RuntimeBootstrapFlag
36953695
/// Used in production systems when all namespaces are to be found in loaded assemblies.</remarks>
36963696
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2211:NonConstantFieldsShouldNotBeVisible")]
36973697
public static bool DisableFileLoad = false;
3698+
public static bool DisableEval = false;
36983699
}
36993700

37003701
}

0 commit comments

Comments
 (0)