@@ -410,7 +410,6 @@ static class DefExpr implements Expr{
410
410
public final Expr meta ;
411
411
public final boolean initProvided ;
412
412
public final boolean isDynamic ;
413
- public final boolean shadowsCoreMapping ;
414
413
public final String source ;
415
414
public final int line ;
416
415
public final int column ;
@@ -419,17 +418,15 @@ static class DefExpr implements Expr{
419
418
final static Method setMetaMethod = Method .getMethod ("void setMeta(clojure.lang.IPersistentMap)" );
420
419
final static Method setDynamicMethod = Method .getMethod ("clojure.lang.Var setDynamic(boolean)" );
421
420
final static Method symintern = Method .getMethod ("clojure.lang.Symbol intern(String, String)" );
422
- final static Method internVar = Method .getMethod ("clojure.lang.Var refer(clojure.lang.Symbol, clojure.lang.Var)" );
423
421
424
- public DefExpr (String source , int line , int column , Var var , Expr init , Expr meta , boolean initProvided , boolean isDynamic , boolean shadowsCoreMapping ){
422
+ public DefExpr (String source , int line , int column , Var var , Expr init , Expr meta , boolean initProvided , boolean isDynamic ){
425
423
this .source = source ;
426
424
this .line = line ;
427
425
this .column = column ;
428
426
this .var = var ;
429
427
this .init = init ;
430
428
this .meta = meta ;
431
429
this .isDynamic = isDynamic ;
432
- this .shadowsCoreMapping = shadowsCoreMapping ;
433
430
this .initProvided = initProvided ;
434
431
}
435
432
@@ -475,18 +472,6 @@ public Object eval() {
475
472
476
473
public void emit (C context , ObjExpr objx , GeneratorAdapter gen ){
477
474
objx .emitVar (gen , var );
478
-
479
- if (shadowsCoreMapping )
480
- {
481
- gen .dup ();
482
- gen .getField (VAR_TYPE , "ns" , NS_TYPE );
483
- gen .swap ();
484
- gen .dup ();
485
- gen .getField (VAR_TYPE , "sym" , SYMBOL_TYPE );
486
- gen .swap ();
487
- gen .invokeVirtual (NS_TYPE , internVar );
488
- }
489
-
490
475
if (isDynamic )
491
476
{
492
477
gen .push (isDynamic );
@@ -544,13 +529,11 @@ else if(!(RT.second(form) instanceof Symbol))
544
529
Var v = lookupVar (sym , true );
545
530
if (v == null )
546
531
throw Util .runtimeException ("Can't refer to qualified var that doesn't exist" );
547
- boolean shadowsCoreMapping = false ;
548
532
if (!v .ns .equals (currentNS ()))
549
533
{
550
534
if (sym .ns == null )
551
535
{
552
536
v = currentNS ().intern (sym );
553
- shadowsCoreMapping = true ;
554
537
registerVar (v );
555
538
}
556
539
// throw Util.runtimeException("Name conflict, can't def " + sym + " because namespace: " + currentNS().name +
@@ -594,7 +577,7 @@ else if(!(RT.second(form) instanceof Symbol))
594
577
Expr meta = mm .count ()==0 ? null :analyze (context == C .EVAL ? context : C .EXPRESSION , mm );
595
578
return new DefExpr ((String ) SOURCE .deref (), lineDeref (), columnDeref (),
596
579
v , analyze (context == C .EVAL ? context : C .EXPRESSION , RT .third (form ), v .sym .name ),
597
- meta , RT .count (form ) == 3 , isDynamic , shadowsCoreMapping );
580
+ meta , RT .count (form ) == 3 , isDynamic );
598
581
}
599
582
}
600
583
}
0 commit comments