New procedure REFERENCE-BARRIER.
authorTaylor R Campbell <campbell@mumble.net>
Mon, 16 Aug 2010 22:51:45 +0000 (22:51 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Mon, 16 Aug 2010 22:51:45 +0000 (22:51 +0000)
(REFERENCE-BARRIER <x>) guarantees that the garbage collector will
assume <x> to be live at least until the call to REFERENCE-BARRIER,
if control can ever reach it.

This is implemented as an alias for the identity procedure currently,
but a more efficient implementation not involving a general procedure
call is conceivable for the future.

src/runtime/runtime.pkg

index f011108e04b6bae1b816b99e3a3d646c273a7114..88dd9dc8c96c4e0238077fd5d1ef2279d3bf467d 100644 (file)
@@ -368,6 +368,7 @@ USA.
          primitive-procedure-documentation
          pwd
          quit
+         (reference-barrier identity-procedure)
          remove-hook-from-list
          run-hooks-in-list
          scode-eval