Skip to content

Commit

Permalink
CogVM source as per VMMaker.oscog-eem.3488
Browse files Browse the repository at this point in the history
Fix bad bug with scavenging ephemerons. The old code scavenged only the first
slot of a scavenged ephemeron, instead of the correct behaviour which is to
scavenge everything but the first slot of the scavenged ephemeron.

To this end:
  Refactor scavengeReferentsOf: into separate routines fror pointer objects,
  indexable pointer objects (including contexts), weak objects, ephemerons,
  and compiled methods.
  Make all SpurMemoryManager format code accessors macros.
  In copyAndForward:
	Rewrite shouldBeTenured: to be inlinable in an if, and evaluate it only if futureSpace woud not overflow. This is an or so does less work.
	Streamline the testing for weak & ephemeron objects.

Now that ephemerons are being used in anger lose a spurious assert in
updatePointersInSurvivingObjects.
  • Loading branch information
eliotmiranda committed Dec 23, 2024
1 parent 54eb3fa commit 2a562b2
Show file tree
Hide file tree
Showing 35 changed files with 9,511 additions and 6,799 deletions.
2 changes: 1 addition & 1 deletion image/Slang Test Workspace.text

Large diffs are not rendered by default.

694 changes: 405 additions & 289 deletions src/spur32.cog.lowcode/cointerp.c

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/spur32.cog.lowcode/cointerp.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Automatically generated by
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3487 uuid: 0cb5e53f-fb06-4acf-87f3-c6ec09b46e4b
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3488 uuid: 077ba5f9-f78e-4a31-b0e4-9270558f594b
(Compiler-eem.512)
*/

Expand Down Expand Up @@ -197,7 +197,6 @@ extern sqInt maxSlotsForNewSpaceAlloc(void);
extern sqInt maybeMethodClassOfseemsToBeInstantiating(sqInt methodObj, sqInt format);
extern sqInt minSlotsForShortening(void);
extern sqInt nilObject(void);
extern sqInt nonIndexablePointerFormat(void);
extern sqInt numBytesOf(sqInt objOop);
extern usqInt numSlotsOf(sqInt objOop);
extern sqInt objectAfter(sqInt objOop);
Expand Down Expand Up @@ -307,6 +306,7 @@ extern sqInt suppressHeartbeatFlag;
#define identityHashHalfWordMask() 0x3FFFFF
#define indexablePointersFormat() 3
#define isForwardedObjectClassIndexPun() 8
#define nonIndexablePointerFormat() 1
#define numSlotsFullShift() 56
#define numSlotsHalfShift() 24
#define numSlotsMask() 0xFF
Expand Down
694 changes: 405 additions & 289 deletions src/spur32.cog.lowcode/gcc3x-cointerp.c

Large diffs are not rendered by default.

Loading

0 comments on commit 2a562b2

Please sign in to comment.