Eric Pouech
d92d623d32
vbscript: Enable compilation with long types.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-21 12:32:07 +01:00
Eric Pouech
32deecbca1
vbscript: Use correct integral type.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-03 17:19:41 +01:00
Robert Wilhelm
b9e38a41ea
vbscript: Support VT_BSTR in stack_pop_bool.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51911
Signed-off-by: Robert Wilhelm <robert.wilhelm@gmx.net>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-03 21:06:51 +01:00
Robert Wilhelm
4f5e5cc63f
vbscript: Don't use function return value for call expressions.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50758
Signed-off-by: Robert Wilhelm <robert.wilhelm@gmx.net>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-08 20:20:16 +02:00
Jacek Caban
2613f8bfe6
vbscript: Use a dedicated opcode for identifier expressions.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-08 20:20:13 +02:00
Robert Wilhelm
bf5f7a7b7b
vbscript: Support date and time literals.
...
Date literals, which are enclosed in number signs in vbscript,
will be lexed, pushed throught parser and compiler and
finally converted to VT_Date Variant in interpreter.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51503
Signed-off-by: Robert Wilhelm <robert.wilhelm@gmx.net>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 21:21:14 +02:00
Robert Wilhelm
c39cd37383
vbscript: Support property set with parameters.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=33996
Signed-off-by: Robert Wilhelm <robert.wilhelm@gmx.net>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-23 21:05:04 +01:00
Michael Stefaniuc
ca5bc488d9
vbscript: Use wide-char string literals.
...
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-16 17:51:30 +01:00
Robert Wilhelm
54740a5cb8
vbscript: Add is_default flag to function_decl_t.
...
Signed-off-by: Robert Wilhelm <robert.wilhelm@gmx.net>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-13 20:41:21 +02:00
Kevin Puetz
335cfefbb6
vbscript: Implement redim preserve.
...
Signed-off-by: Kevin Puetz <PuetzKevinA@JohnDeere.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-06 21:47:56 +02:00
Robert Wilhelm
26ad403cbd
vbscript: Fix return value of lookup_identifier().
...
Signed-off-by: Robert Wilhelm <robert.wilhelm@gmx.net>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-01 11:40:09 +02:00
Gabriel Ivăncescu
9ee723062a
vbscript: Look for the identifier in the named item's disp only if it doesn't have the 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-03-31 22:52:04 +02:00
Gabriel Ivăncescu
0d397dcc61
vbscript: Lookup the identifier in the named item's disp after its script dispatch.
...
If the bytecode has a named item context, its disp is looked for the
identifier before any globals, but after its script dispatch.
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-27 21:16:13 +01:00
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
0202284966
vbscript: Return the item's disp when it does not have the SCRIPTITEM_CODEONLY flag, rather than the script dispatch.
...
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-25 23:43:17 +01:00
Gabriel Ivăncescu
0809a2859f
vbscript: Return the dispatch object directly in retval, rather than its value.
...
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:29:02 +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
0b5ea35aae
vbscript: Use a helper function to lookup the global functions.
...
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
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
47f3abb633
vbscript: Fix VT_UNKNOWN handling in is expressions.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-27 14:45:10 +01:00
Jacek Caban
1c194f3b21
vbscript: Fix VT_UNKNOWN handling in set statements.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-27 14:45:05 +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
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
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
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
Jacek Caban
708c1e865d
vbscript: Store only VBScript this objects in execution context.
...
If it's an implicit this, we can handle that in interp_me.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-05 16:17:42 +01:00
Jacek Caban
3c366be353
vbscript: Lookup this object in lookup_identifier only if it's an actual VBScript object.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-05 16:17:39 +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
8f1e633874
vbscript: Support assigning to object default value.
...
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
ef737598e6
vbscript: Support using function return value in expressions.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-01 20:30:14 +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
aad0340c8f
vbscript: Add support for parameterized set statements.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-01 20:29:54 +01:00
Jacek Caban
18117ccbab
vbscript: Support VT_EMPTY in stack_pop_bool.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-31 19:25:31 +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
1ff55510d8
vbscript: Support calling VARIANT in interpreter.
...
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
ecaa72855a
vbscript: Factor out variant_call.
...
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
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
9e3c806e53
vbscript: Fix array reference handling in do_icall.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-23 18:53:33 +02:00
Jacek Caban
410154e280
vbscript: Improve exec_script debug traces.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-23 18:53:31 +02:00
Jacek Caban
79f39c2a8c
vbscript: Fix NULL IDispatch handling in get_disp_value.
...
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
087adea7dc
vbscript: Use global object property to expose Err object.
...
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
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
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