1515using System . Collections . Generic ;
1616using System . ComponentModel ;
1717using System . IO ;
18- using System . Linq ;
1918using System . Reflection ;
2019using System . Reflection . Emit ;
2120using System . Runtime . Serialization ;
2221using System . Text ;
2322using System . Text . RegularExpressions ;
2423using System . Threading ;
2524
25+
2626namespace clojure . lang
2727{
2828 public static class Compiler
@@ -223,9 +223,9 @@ internal static int ColumnVarDeref()
223223 internal static readonly Var ConstantIdsVar = Var . create ( ) . setDynamic ( ) ; // IdentityHashMap
224224 internal static readonly Var KeywordsVar = Var . create ( ) . setDynamic ( ) ; //keyword->constid
225225
226- internal static readonly Var KeywordCallsitesVar = Var . create ( ) . setDynamic ( ) ; // vector<keyword>
227- internal static readonly Var ProtocolCallsitesVar = Var . create ( ) . setDynamic ( ) ; // vector<var>
228- internal static readonly Var VarCallsitesVar = Var . create ( ) . setDynamic ( ) ; // set<var>
226+ internal static readonly Var KeywordCallsitesVar = Var . create ( null ) . setDynamic ( ) ; // vector<keyword>
227+ internal static readonly Var ProtocolCallsitesVar = Var . create ( null ) . setDynamic ( ) ; // vector<var>
228+ // internal static readonly Var VarCallsitesVar = Var.create().setDynamic(); // set<var>
229229
230230 internal static readonly Var CompileStubSymVar = Var . create ( null ) . setDynamic ( ) ;
231231 internal static readonly Var CompileStubClassVar = Var . create ( null ) . setDynamic ( ) ;
@@ -757,9 +757,6 @@ internal static KeywordExpr RegisterKeyword(Keyword keyword)
757757
758758 internal static int RegisterKeywordCallsite ( Keyword keyword )
759759 {
760- if ( ! KeywordCallsitesVar . isBound )
761- throw new InvalidOperationException ( "KEYWORD_CALLSITES is not bound" ) ;
762-
763760 IPersistentVector keywordCallsites = ( IPersistentVector ) KeywordCallsitesVar . deref ( ) ;
764761 keywordCallsites = keywordCallsites . cons ( keyword ) ;
765762 KeywordCallsitesVar . set ( keywordCallsites ) ;
@@ -768,25 +765,22 @@ internal static int RegisterKeywordCallsite(Keyword keyword)
768765
769766 internal static int RegisterProtocolCallsite ( Var v )
770767 {
771- if ( ! ProtocolCallsitesVar . isBound )
772- throw new InvalidOperationException ( "PROTOCOL_CALLSITES is not bound" ) ;
773-
774768 IPersistentVector protocolCallsites = ( IPersistentVector ) ProtocolCallsitesVar . deref ( ) ;
775769 protocolCallsites = protocolCallsites . cons ( v ) ;
776770 ProtocolCallsitesVar . set ( protocolCallsites ) ;
777771 return protocolCallsites . count ( ) - 1 ;
778772 }
779773
780- internal static void RegisterVarCallsite ( Var v )
781- {
782- if ( ! VarCallsitesVar . isBound )
783- throw new InvalidOperationException ( "VAR_CALLSITES is not bound" ) ;
774+ // internal static void RegisterVarCallsite(Var v)
775+ // {
776+ // if (!VarCallsitesVar.isBound)
777+ // throw new InvalidOperationException("VAR_CALLSITES is not bound");
784778
785- IPersistentCollection varCallsites = ( IPersistentCollection ) VarCallsitesVar . deref ( ) ;
786- varCallsites = varCallsites . cons ( v ) ;
787- VarCallsitesVar . set ( varCallsites ) ;
788- //return varCallsites.count() - 1;
789- }
779+ // IPersistentCollection varCallsites = (IPersistentCollection)VarCallsitesVar.deref();
780+ // varCallsites = varCallsites.cons(v);
781+ // VarCallsitesVar.set(varCallsites);
782+ // //return varCallsites.count() - 1;
783+ // }
790784
791785 internal static IPersistentCollection EmptyVarCallSites ( ) => PersistentHashSet . EMPTY ;
792786
@@ -1655,6 +1649,8 @@ public static object Compile(GenContext context, TextReader rdr, string sourceDi
16551649 RT . CurrentNSVar , RT . CurrentNSVar . deref ( ) ,
16561650 ConstantsVar , PersistentVector . EMPTY ,
16571651 ConstantIdsVar , new IdentityHashMap ( ) ,
1652+ KeywordCallsitesVar , null ,
1653+ ProtocolCallsitesVar , null ,
16581654 KeywordsVar , PersistentHashMap . EMPTY ,
16591655 VarsVar , PersistentHashMap . EMPTY ,
16601656 RT . UncheckedMathVar , RT . UncheckedMathVar . deref ( ) ,
0 commit comments