Do not count compilation errors.
All checks were successful
The build was successful.

Interpreter will abort script execution on first error found.
This commit is contained in:
2019-04-24 23:22:06 +02:00
parent 48a38dc1af
commit c443a38fec
4 changed files with 25 additions and 51 deletions

View File

@@ -695,15 +695,14 @@ static sxi32 ProcessSourceFile(
}
/* Compile the script */
PH7_CompileAerScript(pVm, &(*pScript), PH7_AERSCRIPT_CODE);
if(pVm->sCodeGen.nErr > 0 || pVm == 0) {
sxu32 nErr = pVm->sCodeGen.nErr;
/* Compilation error or null ppVm pointer,release this VM */
if(pVm == 0) {
/* Null ppVm pointer,release this VM */
SyMemBackendRelease(&pVm->sAllocator);
SyMemBackendPoolFree(&pEngine->sAllocator, pVm);
if(ppVm) {
*ppVm = 0;
}
return nErr > 0 ? PH7_COMPILE_ERR : PH7_OK;
return PH7_OK;
}
/* Prepare the virtual machine for bytecode execution */
rc = PH7_VmMakeReady(pVm);