[PATCH v6 3/6] vbscript: Append to the global lists when the code is executed, rather than compiled.

Jacek Caban jacek at codeweavers.com
Fri Nov 8 11:22:32 CST 2019

Hi Gabriel,

On 11/8/19 4:48 PM, Gabriel Ivăncescu wrote:
> Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
> ---
> Unfortunately we still need the 'global_vars' field in vbscode_t, because we
> have to allocate it only once, but the script can be executed multiple times.
> It is still created when compiling the script. An alternative is to create
> it on first execution, but I don't think it's worth it, as it complicates
> the code slightly. We'd still need the field though, for possible subsequent
> executions.

Why can't we do that on each execution? We'd need to free it when going 
to unintialized state, but that seems fine.

> +    dynamic_var_t *global_vars;

As above, I still don't see why you need it.

> +    function_t *funcs;
> +    class_desc_t *classes;

With those being here, there is no point in having it duplicated in 
compiler context. I think we could remove it from there.



More information about the wine-devel mailing list