Typehinting merge #50
@ -1715,6 +1715,7 @@ PH7_PRIVATE sxi32 VmExtractDebugTrace(ph7_vm *pVm, SySet *pDebugTrace) {
|
||||
/* Backup current frame */
|
||||
VmFrame *oFrame = pVm->pFrame;
|
||||
while(pVm->pFrame) {
|
||||
if(pVm->pFrame->iFlags & VM_FRAME_ACTIVE) {
|
||||
/* Iterate through all frames */
|
||||
ph7_vm_func *pFunc;
|
||||
pFunc = (ph7_vm_func *)pVm->pFrame->pUserData;
|
||||
@ -1753,6 +1754,7 @@ PH7_PRIVATE sxi32 VmExtractDebugTrace(ph7_vm *pVm, SySet *pDebugTrace) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Roll frame */
|
||||
pVm->pFrame = pVm->pFrame->pParent;
|
||||
}
|
||||
@ -5085,6 +5087,8 @@ static sxi32 VmByteCodeExec(
|
||||
*/
|
||||
PH7_MemObjRelease(pTos);
|
||||
pTos = &pTos[-pInstr->iP1];
|
||||
/* Mark current frame as active */
|
||||
pFrame->iFlags |= VM_FRAME_ACTIVE;
|
||||
/* Allocate a new operand stack and evaluate the function body */
|
||||
pFrameStack = VmNewOperandStack(&(*pVm), SySetUsed(&pVmFunc->aByteCode));
|
||||
if(pFrameStack == 0) {
|
||||
|
@ -1261,9 +1261,10 @@ struct VmFrame {
|
||||
sxi32 iFlags; /* Frame configuration flags (See below) */
|
||||
sxu32 iExceptionJump; /* Exception jump destination */
|
||||
};
|
||||
#define VM_FRAME_EXCEPTION 0x01 /* Special Exception frame */
|
||||
#define VM_FRAME_THROW 0x02 /* An exception was thrown */
|
||||
#define VM_FRAME_CATCH 0x04 /* Catch frame */
|
||||
#define VM_FRAME_ACTIVE 0x01 /* Active call frame */
|
||||
#define VM_FRAME_EXCEPTION 0x02 /* Special Exception frame */
|
||||
#define VM_FRAME_THROW 0x04 /* An exception was thrown */
|
||||
#define VM_FRAME_CATCH 0x08 /* Catch frame */
|
||||
/*
|
||||
* When a debug stacktrace is extracted from Virtual Machine, all information about
|
||||
* calls (file, line, class, method, arguments) are stored in this structure.
|
||||
|
Loading…
Reference in New Issue
Block a user