Commit Graph

77 Commits

Author SHA1 Message Date
Gabriel Ivăncescu 3750c5b066 vbscript: Don't create script dispatches for items with the SCRIPTITEM_GLOBALMEMBERS flag.
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-28 19:38:37 +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 d604fdbdd1 vbscript: Implement the SCRIPTITEM_CODEONLY flag.
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-13 20:30:35 +01:00
Jacek Caban ddfae943e6 vbscript: Silence QueryInterface FIXME.
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 1c6649d443 vbscript: Add SetScriptState(SCRIPTSTATE_CLOSED) implementation.
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 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
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
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 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 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
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
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 9e2700b2fc vbscript: Support changing script state to SCRIPTSTATE_INITIALIZED.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-05 16:17:22 +01:00
Jacek Caban 706898dcbb vbscript: Don't allow changing script state when script site is not set.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-05 16:17:18 +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 cef14ac338 vbscript: Move init_global call to CreateInstance.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-18 18:05:32 +02:00
Jacek Caban 229a583c54 vbscript: Move create_script_disp call to SetScriptSite.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-18 18:05:32 +02:00
Jacek Caban cbf620491b vbscript: Store script site only in script context.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-18 18:05:32 +02:00
Jacek Caban 7665051d67 vbscript: Store lcid only in script context.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-18 18:05:32 +02:00
Jacek Caban ad8917c6b7 vbscript: Store safety options only in script context.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-18 18:05:32 +02:00
Jacek Caban 271819e750 vbscript: Create script context in CreateInstance.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-18 18:05:32 +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 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 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
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
Piotr Caban a2438ce810 vbscript: Don't return error on VBScript_SetScriptState(SCRIPTSTATE_DISCONNECTED) call.
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:22:03 +01:00
Jacek Caban 9eed654e05 vbscript: Use DEFAULT_UNREACHABLE macro where appropriate. 2013-03-13 16:27:49 +01:00
Piotr Caban fb29bf7d2f vbscript: Rename vbsheap to heap_pool. 2013-02-15 16:26:30 +01:00
Jacek Caban 290f563199 vbscript: Added support for HTML comments. 2012-10-18 19:21:24 +02:00
Jacek Caban 8121f73273 vbscript: Use separated IDispatchEx implementation for script dispatch. 2012-09-07 16:44:21 +02:00
Jacek Caban bac5fdc85f vbscript: Fixed class_desc_t leak. 2012-09-07 16:44:10 +02:00
Jacek Caban cf0faf1d3c vbscript: Added IActiveScriptParseProcedure2::ParseProcedureText implementation. 2012-09-06 18:23:39 +02:00
Jacek Caban 9e3f75cfb1 vbscript: Renamed vbscode_t's variables to not suggest that they are global code-only. 2012-09-06 18:23:39 +02:00
Jacek Caban 552db7aade vbscript: Added IActiveScriptParseProcedure2 stub implementation. 2012-08-13 11:53:19 +02:00
Jacek Caban 6f0e215fb5 vbscript: Properly release global variables. 2011-10-14 20:26:43 +02:00
Jacek Caban b1c7f544ed vbscript: Keep script context alive after Close call, but make it reusable. 2011-10-14 20:26:43 +02:00