@@ -38,9 +38,6 @@ public class DefExpr : Expr
3838 readonly bool _isDynamic ;
3939 public bool IsDynamic { get { return _isDynamic ; } }
4040
41- readonly bool _shadowsCoreMapping ;
42- public bool ShadowsCoreMapping { get { return _shadowsCoreMapping ; } }
43-
4441 readonly string _source ;
4542 public string Source { get { return _source ; } }
4643
@@ -54,7 +51,7 @@ public class DefExpr : Expr
5451
5552 #region Ctors
5653
57- public DefExpr ( string source , int line , int column , Var var , Expr init , Expr meta , bool initProvided , bool isDyanamic , bool shadowsCoreMapping )
54+ public DefExpr ( string source , int line , int column , Var var , Expr init , Expr meta , bool initProvided , bool isDyanamic )
5855 {
5956 _source = source ;
6057 _line = line ;
@@ -63,7 +60,6 @@ public DefExpr(string source, int line, int column, Var var, Expr init, Expr met
6360 _init = init ;
6461 _meta = meta ;
6562 _isDynamic = isDyanamic ;
66- _shadowsCoreMapping = shadowsCoreMapping ;
6763 _initProvided = initProvided ;
6864 }
6965
@@ -115,14 +111,11 @@ public Expr Parse(ParserContext pcon, object form)
115111 if ( v == null )
116112 throw new ParseException ( "Can't refer to qualified var that doesn't exist" ) ;
117113
118- bool shadowsCoreMapping = false ;
119-
120114 if ( ! v . Namespace . Equals ( Compiler . CurrentNamespace ) )
121115 {
122116 if ( sym . Namespace == null )
123117 {
124118 v = Compiler . CurrentNamespace . intern ( sym ) ;
125- shadowsCoreMapping = true ;
126119 Compiler . RegisterVar ( v ) ;
127120 }
128121
@@ -183,7 +176,7 @@ public Expr Parse(ParserContext pcon, object form)
183176 ( string ) Compiler . SourceVar . deref ( ) ,
184177 Compiler . LineVarDeref ( ) ,
185178 Compiler . ColumnVarDeref ( ) ,
186- v , init , meta , initProvided , isDynamic , shadowsCoreMapping ) ;
179+ v , init , meta , initProvided , isDynamic ) ;
187180 }
188181 }
189182
@@ -226,27 +219,6 @@ public void Emit(RHC rhc, ObjExpr objx, CljILGen ilg)
226219 {
227220 objx . EmitVar ( ilg , _var ) ;
228221
229- if ( _shadowsCoreMapping )
230- {
231- LocalBuilder locNs = ilg . DeclareLocal ( typeof ( Namespace ) ) ;
232- GenContext . SetLocalName ( locNs , "ns" ) ;
233-
234- ilg . Emit ( OpCodes . Dup ) ;
235- ilg . EmitFieldGet ( VarNsFI ) ;
236- ilg . Emit ( OpCodes . Stloc , locNs ) ;
237-
238- LocalBuilder locSym = ilg . DeclareLocal ( typeof ( Symbol ) ) ;
239- GenContext . SetLocalName ( locSym , "sym" ) ;
240-
241- ilg . Emit ( OpCodes . Dup ) ;
242- ilg . EmitFieldGet ( VarSymFI ) ;
243- ilg . Emit ( OpCodes . Stloc , locSym ) ;
244-
245- ilg . Emit ( OpCodes . Ldloc , locNs ) ;
246- ilg . Emit ( OpCodes . Ldloc , locSym ) ;
247- ilg . Emit ( OpCodes . Call , NamespaceReferMI ) ;
248- }
249-
250222 if ( _isDynamic )
251223 {
252224 ilg . Emit ( OpCodes . Call , Compiler . Method_Var_setDynamic0 ) ;
0 commit comments