You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
598 B

#include "VmCode.h"
_VM_CODE_LINK::_VM_CODE_LINK()
{
Flags = 0;
Next = Prev = NULL;
Label = 0;
HandlerId = 0;
}
_VM_CODE_LINK::_VM_CODE_LINK(UINT LabelId)
: _VM_CODE_LINK()
{
Label = LabelId;
Flags = CODE_FLAG_IS_LABEL;
}
_VM_CODE_BLOCK::_VM_CODE_BLOCK(PVM_CODE_LINK S, PVM_CODE_LINK E)
{
Start = S;
End = E;
}
VOID VcAppendToBlock(PVM_CODE_BLOCK Block, PVM_CODE_LINK Link)
{
if (!Link)
return;
Link->Prev = Block->End;
Link->Next = NULL;
if (!Block->End || !Block->Start)
{
Block->Start = Block->End = Link;
}
else
{
Block->End->Next = Link;
Block->End = Link;
}
}