Add new file for every chunk.
已通過所有檢查
The build was successful.

Every chunk should has its own file associated, even if it is [MEMORY]. Otherwise, some false information can be provided by interpreter to developer.
此提交包含在:
2018-08-27 18:04:45 +02:00
父節點 c9a1971ace
當前提交 6d27069590
共有 2 個檔案被更改,包括 6 行新增0 行删除

查看文件

@@ -696,6 +696,8 @@ static sxi32 ProcessSourceFile(
ph7_vm_config(pVm, PH7_VM_CONFIG_IMPORT_PATH, pFileDir);
/* Push processed file path */
PH7_VmPushFilePath(pVm, pFilePath, -1, TRUE, 0);
} else {
PH7_VmPushFilePath(pVm, "[MEMORY]", -1, TRUE, 0);
}
/* Compile the script */
PH7_CompileAerScript(pVm, &(*pScript), PH7_AERSCRIPT_CODE);

查看文件

@@ -10226,6 +10226,10 @@ static sxi32 VmEvalChunk(
/* Swap bytecode container */
pByteCode = pVm->pByteContainer;
pVm->pByteContainer = &aByteCode;
/* Push memory as a processed file path */
if((iFlags & PH7_AERSCRIPT_CODE) == 0) {
PH7_VmPushFilePath(pVm, "[MEMORY]", -1, TRUE, 0);
}
/* Compile the chunk */
PH7_CompileAerScript(pVm, pChunk, iFlags);
if(pVm->sCodeGen.nErr > 0) {