Skip to content

Commit 6203b2e

Browse files
refactor: make temporarily disabling hashconsing safer
1 parent a884109 commit 6203b2e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/rule.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -480,10 +480,7 @@ function (acr::ACRule)(term)
480480
end
481481
# this is temporary and only constructed so the rule can
482482
# try and match it - no need to hashcons it.
483-
old_hc = ENABLE_HASHCONSING[]
484-
ENABLE_HASHCONSING[] = false
485-
tempterm = Term{T}(f, args_buf)
486-
ENABLE_HASHCONSING[] = old_hc
483+
tempterm = BSImpl.Term{T}(f, args_buf; unsafe = true)
487484
# this term will be hashconsed regardless
488485
result = r(tempterm)
489486
if result !== nothing

0 commit comments

Comments
 (0)