Commit Graph

655 Commits

Author SHA1 Message Date
Nikolay Sivov e04c168c30 vbscript/tests: Add missing checks for Close() calls (Coverity).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-03 21:40:59 +01:00
Gabriel Ivăncescu a79bde8591 vbscript/tests: Add more tests for the script TypeInfo.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-11 21:51:28 +01:00
Gabriel Ivăncescu 4bca2a33c7 vbscript: Implement ScriptTypeInfo_GetMops.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-11 21:51:28 +01:00
Gabriel Ivăncescu 16ccc06d22 vbscript: Implement ScriptTypeInfo_CreateInstance.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-11 21:51:28 +01:00
Gabriel Ivăncescu 313d6de3fb vbscript: Implement ScriptTypeInfo_AddressOfMember.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-11 21:51:28 +01:00
Gabriel Ivăncescu 5376e792c5 vbscript: Implement ScriptTypeInfo_GetDllEntry.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-11 21:51:28 +01:00
Gabriel Ivăncescu 0fee1c759b vbscript: Implement ScriptTypeInfo_GetDocumentation.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-11 21:51:28 +01:00
Gabriel Ivăncescu 5e912f2869 vbscript: Implement ScriptTypeInfo_Invoke.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-11 21:51:28 +01:00
Gabriel Ivăncescu 09b9da5bba vbscript: Implement ScriptTypeInfo_GetImplTypeFlags.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-11 21:51:28 +01:00
Gabriel Ivăncescu 3dc54aa79d vbscript: Implement ScriptTypeInfo_GetRefTypeInfo.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-11 21:51:28 +01:00
Gabriel Ivăncescu 8ce9855256 vbscript: Implement ScriptTypeInfo_GetRefTypeOfImplType.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-11 21:51:28 +01:00
Gabriel Ivăncescu c4819437da vbscript: Implement ScriptTypeInfo_GetNames.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-11 21:51:28 +01:00
Francois Gouget 975bc319d5 vbscript/tests: Fix the spelling of a vbscript comment.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-11 21:51:28 +01:00
Gabriel Ivăncescu 2dfcb31cf3 vbscript: Remove unused field.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-10 20:59:19 +01:00
Gabriel Ivăncescu d393681e41 vbscript/tests: Add tests for the script TypeInfo's TypeComp binds.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-09 23:47:46 +01:00
Gabriel Ivăncescu 422c66a671 vbscript: Implement ScriptTypeComp_BindType.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-09 23:47:46 +01:00
Gabriel Ivăncescu 8707572669 vbscript: Implement ScriptTypeComp_Bind.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-09 23:47:46 +01:00
Gabriel Ivăncescu c47dfe45c7 vbscript: Don't free procs allocated in the heap pool.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-09 23:47:46 +01:00
Gabriel Ivăncescu 46ccea7649 vbscript/tests: Add initial tests for the script TypeInfo.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 22:30:23 +01:00
Gabriel Ivăncescu c2e141f77c vbscript: Implement ScriptTypeInfo_GetTypeComp.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 22:30:23 +01:00
Gabriel Ivăncescu cde38841d3 vbscript: Implement ScriptTypeInfo_GetIDsOfNames.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 22:30:23 +01:00
Gabriel Ivăncescu efab3751f6 vbscript: Implement ScriptTypeInfo_GetVarDesc.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 22:30:23 +01:00
Gabriel Ivăncescu 2d753e2aa2 vbscript: Implement ScriptTypeInfo_GetFuncDesc.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 22:30:23 +01:00
Gabriel Ivăncescu ddceb911f1 vbscript: Implement ScriptTypeInfo_GetTypeAttr.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 22:30:23 +01:00
Gabriel Ivăncescu 3d148b8d6f vbscript: Store the necessary function and variable info in the script TypeInfo.
The TypeInfo is built when it is retrieved and frozen at that moment, even
if the script changes after that and more identifiers are added to it,
or existing ones replaced.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 22:30:23 +01:00
Gabriel Ivăncescu 99af868d7c vbscript: Copy the variable names into the script dispatch's heap.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 22:30:23 +01:00
Gabriel Ivăncescu 6c2f99c84e vbscript: Reference count the vbscode_t.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 22:30:23 +01:00
Gabriel Ivăncescu cdc5ac52fc vbscript: Move the global lists to the script dispatch object.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 22:30:23 +01:00
Francois Gouget 67d1321c2b vbscript/tests: Fix the name of a vbscript variable in the run test.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 18:19:25 +01:00
Alexandre Julliard 003a5f7c98 vbscript: Use %define api.pure instead of %pure-parser.
The latter is deprecated and causes warnings.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-25 20:47:43 +01:00
Gabriel Ivăncescu d729df0bb8 vbscript: Trace the pstrItemName parameter.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-22 13:31:08 +01:00
Gabriel Ivăncescu 0a121bdddd vbscript: Add script TypeInfo stub.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-22 13:30:52 +01:00
Jacek Caban 107bba1563 vbscript: Always treat keywords after dot as identifiers.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-12 21:39:40 +01:00
Gabriel Ivăncescu e109351261 vbscript/tests: Add tests for pending and executed code persistence.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-11 22:58:00 +01:00
Gabriel Ivăncescu 2d45f49fe8 vbscript/tests: Use integers instead of booleans for counting call expectations.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-11 22:58:00 +01:00
Gabriel Ivăncescu f9613711aa vbscript: Change release_dynamic_vars to release a single variable.
We need to free them while iterating an array as well as a linked list.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-11 22:58:00 +01:00
Gabriel Ivăncescu b7eb693e7f vbscript: Append to the global lists when the code is executed, rather than compiled.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-11 22:58:00 +01:00
Gabriel Ivăncescu 9933c776c7 vbscript: Store the compiled functions list head into vbscode_t.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-11 22:58:00 +01:00
Gabriel Ivăncescu 8b30b86765 vbscript: Store the compiled classes list head into vbscode_t.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-11 22:58:00 +01:00
Jacek Caban a35adb1950 vbscript: Treat only ASCII digits as digits.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-08 23:38:09 +01:00
Michael Stefaniuc 8b7e38c542 vbscript: Remove redundant NULL checks before SysFreeString().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-08 23:38:01 +01:00
Gabriel Ivăncescu e2eb099a94 vbscript: Implement script persistence.
Persistent code has to be re-executed if the script is uninitialized and
then reinitialized and restarted.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-08 18:27:30 +01:00
Gabriel Ivăncescu 71ce853032 vbscript: Avoid special casing the global function when compiling a function's variables.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-08 18:27:27 +01:00
Jacek Caban fcc01c3095 vbscript: Move detach_global_objects call to VBScript destructor.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 19:49:15 +01:00
Gabriel Ivăncescu d481efee39 vbscript: Release the code list when the script is closed.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 19:49:13 +01:00
Jacek Caban 664d8d1e13 vbscript: Fix destroying safearrays in release_exec.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 14:09:58 +01:00
Gabriel Ivăncescu f2058389ad vbscript: Get rid of ident_map.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-06 22:00:10 +01:00
Gabriel Ivăncescu 4699d36656 vbscript: Store global variables in an array.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-06 22:00:08 +01:00
Jacek Caban 3dea7bd7fc vbscript: Store global static arrays together with global variables.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-06 22:00:05 +01:00
Jacek Caban ae1291cbe0 vbscript: Clean up lookup_identifier.
Be more explicit about what applies only to non-global code.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-05 16:17:47 +01:00