Jacek Caban (@jacek) commented about dlls/jscript/engine.h:
int func_id; /* -1 if not a function */ } *variables;
- unsigned param_cnt;
- unsigned param_cnt, shadowed_param_cnt; BSTR *params;
- unsigned *shadowed_params_idx; /* index for each param into arguments object's shadowed_params, ~0 if not shadowed */
That all seems a workaround. The actual problem is that arguments object stores arguments from detached scopes in variable object, but it doesn't have to. It could just allocate an array and store them there. It may need extra care to make sure that lookup by name keeps working correctly, but it should be doable unless I'm missing something.