Commit Graph

161 Commits

Author SHA1 Message Date
Gabriel Ivăncescu 408a912f93 vbscript: Retrieve the vbscode context from the named item directly.
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>
2020-03-20 12:09:23 +01:00
Jacek Caban b4e89eec17 vbscript: Lookup host global object in interp_me instead of storing it in script context.
Inspired by patch by Gabriel Ivăncescu.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-28 19:38:33 +01:00
Gabriel Ivăncescu ba8429e717 vbscript: Implement separate script dispatch objects for each named item.
Each named item should have its own associated script dispatch
object. Identifiers are added to this object, but code does look into the
global script object as well.

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>
2020-02-18 20:28:56 +01:00
Gabriel Ivăncescu 1546aff959 vbscript: Move the named_item_t definition.
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>
2020-02-18 20:28:54 +01:00
Gabriel Ivăncescu 729c9eab58 vbscript: Lookup the named item in compile_script.
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>
2020-02-03 20:48:04 +01:00
Gabriel Ivăncescu 07f902b080 vbscript: Return the named item itself from lookup_named_item.
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>
2020-02-03 20:48:04 +01:00
Jacek Caban e35564b36d vbscript: Support reporting error location to script host.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-23 09:26:33 +01:00
Jacek Caban 5436fc90f4 vbscript: Store source cookie and starting line in vbscode_t.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-23 09:26:24 +01:00
Jacek Caban 7a76856e2d vbscript: Store source location in instr_t.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-23 09:26:21 +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 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 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 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
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 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
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 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 e343fcaf76 vbscript: Add Replace function implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-05 16:17:14 +01:00
Jacek Caban ea7a3953fc vbscript: Store global functions in an array.
Based on patch by Gabriel Ivăncescu.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-04 22:43:01 +01:00
Jacek Caban 5cb1631fe2 vbscript: Add interpreter support for redim statement.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-01 20:30:09 +01:00
Jacek Caban e8b2f85bb1 vbscript: Add support for interpreting statements.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-29 23:30:47 +01:00
Jacek Caban 2d419b7d7b vbscript: Always pass arguments inside parentheses by value.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-28 20:12:38 +01:00
Jacek Caban 25248362ea vbscript: Support non-member calls in compiler.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-28 19:19:34 +01:00
Jacek Caban 1a1292833e vbscript: Get rid of no longer needed ITypeInfo in BuiltinDisp.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-17 22:48:38 +02:00
Jacek Caban d061ba0e35 vbscript: Use separated IDispatch implementation for objects exposing builtin functions.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-17 22:48:26 +02:00
Jacek Caban 4c3e2f2b4f vbscript: Introduce get_builtin_id.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-17 22:48:19 +02:00
Jacek Caban 43dbf3a60e vbscript: Factor out detach_global_objects.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-17 22:48:15 +02:00
Jacek Caban ace3279a26 vbscript: Introduce new type for object with builtin functions.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-17 22:48:10 +02:00
Jacek Caban 581a8adf1f vbscript: Create class description for procedure object in compiler.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-17 22:48:02 +02:00
Jacek Caban 681cee4ed6 vbscript: Call OnScriptError for runtime errors.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-04 22:11:20 +02:00
Jacek Caban e050ff5eb8 vbscript: Move OnEnterScript/OnLeaveScript calls to exec_script.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-04 22:11:20 +02:00
Jacek Caban 0d9f024d6a vbscript: Add err.description implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-03 22:58:07 +02:00
Jacek Caban 8277c24806 vbscript: Store entire EXCEPINFO in script context.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-03 22:58:07 +02:00
Gabriel Ivăncescu 8037b13078 vbscript: Add support for the SCRIPTTEXT_ISEXPRESSION flag in ParseScriptText.
To simplify the amount of special cases both in ParseScriptText and
ParseProcedureText, add a new pseudo statement and opcode to return the
expression and value at the top of the stack, respectively. Script texts
that have this flag will be parsed specially as a single expression with
such a statement at the end.

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-09-17 18:49:47 +02:00
Jacek Caban 9b18772c0b vbscript: Rename OP_long expression to OP_int.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-22 21:56:15 +02:00
Jacek Caban d01d629420 vbscript: Handle long/short distinction in interpreter.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-22 21:56:12 +02:00
Alexandre Julliard 3911e6696a vbscript: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-25 08:46:31 +02:00
Zebediah Figura 3dde8287c6 vbscript: Add stub IActiveScriptDebug interface.
Visual Pinball 9.9.5 expects this interface to be present, and crashes
on teardown trying to Release() it.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-22 21:58:02 +02:00
Jacek Caban 7e10941083 vbscript: Added support for script context in ParseScriptText.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-19 12:35:11 +01:00
Jacek Caban aa5b68ac40 vbscript: Split named item lookup into a helper function.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-19 12:35:11 +01:00
Michael Stefaniuc 6ab10f2eb0 vbscript: Use the global HeapAlloc() wrappers.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-29 20:28:59 +01:00
Piotr Caban a85d12af44 vbscript: Add support for "for each" on arrays.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-08 20:21:52 +01:00
Francois Gouget 8ab8a92d75 vbscript: Add __WINE_ALLOC_SIZE attributes to heap_xxx() functions.
And standardize their parameter names.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-23 13:15:46 +01:00
Jacek Caban 0de7b95c37 vbscript: Added a helper for getting default IDispatch value. 2015-03-06 00:02:08 +09:00
Jacek Caban 571b09ce42 vbscript: Pass DISPATCH_PROPERTYPUTREF flag to InvokeEx when apropriate. 2015-03-03 23:16:48 +09:00