@@ -49,8 +49,6 @@ func LinkGlobals(
4949 globals := make ([]Variable , len (program .Globals ))
5050 indexedGlobals := activations .NewActivation [Variable ](memoryGauge , nil )
5151
52- visitedLocations := map [common.Location ]struct {}{}
53-
5452 // NOTE: ensure both the context and the mapping are updated
5553
5654 for _ , global := range program .Globals {
@@ -110,7 +108,6 @@ func LinkGlobals(
110108 typedGlobal ,
111109 context ,
112110 linkedGlobalsCache ,
113- visitedLocations ,
114111 )
115112 globals [index ] = importedGlobal
116113
@@ -148,7 +145,6 @@ func linkImportedGlobal(
148145 importedGlobal * bbq.ImportedGlobal ,
149146 context * Context ,
150147 linkedGlobalsCache map [common.Location ]LinkedGlobals ,
151- visitedLocations map [common.Location ]struct {},
152148) Variable {
153149 importLocation := importedGlobal .Location
154150
@@ -174,18 +170,6 @@ func linkImportedGlobal(
174170 context ,
175171 linkedGlobalsCache ,
176172 )
177-
178- if _ , ok := visitedLocations [importLocation ]; ! ok {
179- // add the imported program's sema type cache to the context's sema type cache
180- // TODO: Maybe this is excessive, balance size and performance
181- for typeID , semaType := range importedProgram .SemaTypeCache { //nolint:maprange
182- if _ , ok := context .semaTypeCache [typeID ]; ok {
183- continue
184- }
185- context .semaTypeCache [typeID ] = semaType
186- }
187- visitedLocations [importLocation ] = struct {}{}
188- }
189173 }
190174
191175 indexedGlobals = linkedGlobals .indexedGlobals
0 commit comments