Keep source file descriptors stable for the lifetime of the VM and execute included fragments in the enclosing method and closure context
Build / AerScript (push) Successful in 40s
Build / AerScript (push) Successful in 40s
This commit is contained in:
+12
-1
@@ -902,6 +902,16 @@ typedef struct ph7_vm_func_static_var ph7_vm_func_static_var;
|
||||
typedef struct ph7_vm_func_arg ph7_vm_func_arg;
|
||||
typedef struct ph7_vm_func ph7_vm_func;
|
||||
typedef struct VmFrame VmFrame;
|
||||
/* Lexical exit bridges in the bytecode containing an include statement. */
|
||||
typedef struct ph7_include ph7_include;
|
||||
struct ph7_include {
|
||||
char *zPath;
|
||||
sxu32 nBreak;
|
||||
sxu32 nContinue;
|
||||
SySet aLabel;
|
||||
ph7_vm_func *pFunc;
|
||||
sxbool bException;
|
||||
};
|
||||
/*
|
||||
* Each collected function argument is recorded in an instance
|
||||
* of the following structure.
|
||||
@@ -1205,7 +1215,7 @@ struct ph7_vm {
|
||||
SyBlob sArgv; /* $argv[] collector [refer to the [getopt()] implementation for more information] */
|
||||
SySet aModules; /* Set of loaded modules */
|
||||
SySet aModuleHandles; /* Libraries retained after initialization attempts */
|
||||
SySet aFiles; /* Stack of processed files */
|
||||
SySet aFiles; /* SyString pointers, VM-owned until release */
|
||||
SySet aPaths; /* Set of import paths */
|
||||
SySet aIncluded; /* Set of included files */
|
||||
SyHash hRequired; /* Resolved require paths, including pending evaluations */
|
||||
@@ -1730,6 +1740,7 @@ PH7_PRIVATE sxi32 PH7_InitCodeGenerator(ph7_vm *pVm, ProcConsumer xErr, void *pE
|
||||
PH7_PRIVATE sxi32 PH7_ResetCodeGenerator(ph7_vm *pVm, ProcConsumer xErr, void *pErrData);
|
||||
PH7_PRIVATE sxi32 PH7_GenCompileError(ph7_gen_state *pGen, sxi32 nErrType, sxu32 nLine, const char *zFormat, ...);
|
||||
PH7_PRIVATE sxi32 PH7_CompileAerScript(ph7_vm *pVm, SyString *pScript, sxi32 iFlags);
|
||||
PH7_PRIVATE sxi32 PH7_CompileIncludedChunk(ph7_vm *pVm, SyString *pScript, ph7_vm_func *pFunc, ph7_include *pInclude);
|
||||
/* constant.c function prototypes */
|
||||
PH7_PRIVATE void PH7_RegisterBuiltInConstant(ph7_vm *pVm);
|
||||
/* builtin.c function prototypes */
|
||||
|
||||
Reference in New Issue
Block a user