introduce CutPoint heap tag so that they can be offset by call_continuation/1

This commit is contained in:
Mark
2023-06-29 12:14:06 -06:00
parent 83f352b95e
commit c36bd4dc07
7 changed files with 54 additions and 21 deletions

View File

@@ -30,6 +30,7 @@ pub enum HeapCellValueTag {
Atom = 0b010111,
PStr = 0b011001,
CStr = 0b011011,
CutPoint = 0b011111,
}
#[derive(BitfieldSpecifier, Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
@@ -50,13 +51,15 @@ pub enum HeapCellValueView {
Atom = 0b010111,
PStr = 0b011001,
CStr = 0b011011,
CutPoint = 0b011111,
// trail elements.
TrailedHeapVar = 0b011101,
TrailedStackVar = 0b011111,
TrailedHeapVar = 0b101111,
TrailedStackVar = 0b101011,
TrailedAttrVar = 0b100001,
TrailedAttrVarListLink = 0b100011,
TrailedAttachedValue = 0b100101,
TrailedBlackboardEntry = 0b100111,
TrailedBlackboardOffset = 0b101001,
TrailedBlackboardOffset = 0b110011,
}
#[derive(BitfieldSpecifier, Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
@@ -189,13 +192,13 @@ pub enum TrailRef {
#[derive(BitfieldSpecifier, Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
#[bits = 6]
pub(crate) enum TrailEntryTag {
TrailedHeapVar = 0b011110,
TrailedStackVar = 0b011111,
TrailedAttrVar = 0b101110,
TrailedAttrVarListLink = 0b100011,
TrailedAttachedValue = 0b101010,
TrailedBlackboardEntry = 0b100110,
TrailedBlackboardOffset = 0b100111,
TrailedHeapVar = 0b101111,
TrailedStackVar = 0b101011,
TrailedAttrVar = 0b100001,
TrailedAttrVarListLink = 0b100011,
TrailedAttachedValue = 0b100101,
TrailedBlackboardEntry = 0b100111,
TrailedBlackboardOffset = 0b110011,
}
#[bitfield]