[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
#1824: Change locatives representation
From: |
Chicken Trac |
Subject: |
#1824: Change locatives representation |
Date: |
Tue, 27 Jun 2023 07:24:25 -0000 |
#1824: Change locatives representation
----------------------------+---------------------------------
Reporter: sjamaan | Owner: sjamaan
Type: enhancement | Status: assigned
Priority: minor | Milestone: 6.0.0
Component: core libraries | Version: 5.3.0
Keywords: | Estimated difficulty: medium
----------------------------+---------------------------------
As pointed out [https://lists.nongnu.org/archive/html/chicken-
hackers/2023-06/msg00029.html here], we can change the representation of
locatives such that they take up less space, and we only have to traverse
the live '''weak''' locatives for update during GC.
The idea is to drop the extra "object" slot, and store it in the pointer
slot instead. When the locative is weak, set {{{C_SPECIALBLOCK_BIT}}}.
When it is strong, do not set it (so that the object is referenced
normally). For weak locatives, we traverse the live ones using the
"chained" approach and update the object.
We don't need to do the pointer recalculation on every GC. Instead, we
calculate the pointer on-the-fly during {{{locative_ref}}}.
NOTE: Perhaps we also want to expose a version of locative-ref that
doesn't error out when the object has been collected, but returns {{{bwp-
object}}} instead? This means handling of such locatives is a bit simpler
and doesn't require exception handling.
--
Ticket URL: <https://bugs.call-cc.org/ticket/1824>
CHICKEN Scheme <https://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- #1824: Change locatives representation,
Chicken Trac <=