Michael Stefaniuc
eb168bcbbf
jscript: 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-02-01 22:24:59 +01:00
Nikolay Sivov
8643a17ff3
jscript/tests: Test for script object creation failure (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>
2018-01-08 22:47:24 +01:00
Jacek Caban
77e27441b2
jscript: Use WARN for exception traces instead of separated debug channel.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-20 17:49:32 +01:00
Jacek Caban
2f9c2186cc
jscript: Do not pass DISPATCH_JSCRIPT_CALLEREXECSSOURCE flag for calls across different script contexts.
...
Fixes regression in calls between different contexts. Spotted by Nikolay.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-12 16:00:08 +01:00
Jacek Caban
d2213e205b
jscript: Support VT_UI8 in variant_to_jsval.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-05 20:31:11 +01:00
Jacek Caban
4fc0f2aa38
jscript: Added support for VT_UI2 VARIANT types.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-01 23:16:07 +01:00
Jacek Caban
8f89e142ec
jscript: Fixed visit_function_expression error handling.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-09 19:54:14 +02:00
Jacek Caban
c25208f2af
jscript: Added support for VT_R4 VARIANT types.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 08:37:43 +09:00
Francois Gouget
5c8c4d92f6
jscript: A spelling fix in a comment.
...
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-06-06 13:08:46 +02:00
Jacek Caban
59c39fa1f0
jscript: Added new debug channel printing details and backtrace of unwinded exceptions.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-05 17:34:09 +02:00
Jacek Caban
4b5291a519
jscript/tests: Added more exception tests.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-01 19:29:15 +02:00
Jacek Caban
60232cc770
jscript: Always jump to finally block from OP_pop_exept when available.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-01 19:29:15 +02:00
Jacek Caban
685cd437c9
jscript: Pass finally offset instead of catch ident to OP_push_except.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-01 19:29:15 +02:00
Jacek Caban
8bd99c363a
jscript: Ensure that OP_pop_except is called with proper stack depth.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-01 19:29:15 +02:00
Jacek Caban
622eb728d7
jscript: Added new opcode to enter catch block and use it to setup the scope.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-01 19:29:15 +02:00
Jacek Caban
b7bb16673c
jscript: Simplify pop_to_stat implementation.
...
We no longer need to do stack pops before return expression evaluation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-01 19:29:15 +02:00
Francois Gouget
1731629fd3
jscript: 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-21 13:57:35 +01:00
Francois Gouget
493659e097
jscript: Make scope_push() static.
...
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-01-10 19:19:15 +01:00
Michael Stefaniuc
7af3f65188
jscript: Add more jsdisp_t to Instance helpers.
...
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-23 20:48:13 +09:00
Michael Stefaniuc
55f6e3c350
jscript: Use the existing helpers to get from a jsdisp_t to an Instance.
...
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-23 20:48:11 +09:00
Jacek Caban
0f21353ac0
jscript: Use wine_rb_tree to store local variables in compiler_ctx_t.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-21 11:40:45 +09:00
Michael Stefaniuc
fc1ae4fc9e
jscript: Use CONTAINING_RECORD() to get from a field to a struct.
...
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-19 23:13:37 +09:00
Sebastian Lackner
57291c4bfd
jscript: Simplify create_utc_string and add basic tests.
...
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-12 22:58:51 +09:00
Sebastian Lackner
20d5bbaa63
jscript: Simplify date_to_string and add basic tests.
...
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-12 22:58:41 +09:00
Sebastian Lackner
4d67ffd57e
jscript: Allocate string of correct size in Date toLocaleDateString method.
...
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-12 22:58:16 +09:00
Sebastian Lackner
79f18d027f
jscript: Properly handle \0 characters in Array join method.
...
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-12 22:58:01 +09:00
Sebastian Lackner
fd07a15727
jscript: Allocate string of correct size in Date toTimeString method.
...
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-09 20:20:53 +09:00
Sebastian Lackner
1c3e0dd3d5
jscript: Properly handle \0 characters in String indexOf method.
...
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-09 20:20:53 +09:00
Sebastian Lackner
54e6736032
jscript: Properly handle \0 characters in String to{Lower,Upper}Case methods.
...
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-09 20:20:53 +09:00
Sebastian Lackner
cd5ea7612e
jscript/tests: Remove an invalid win2k broken() check.
...
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-09 20:20:53 +09:00
Sebastian Lackner
18420826aa
jscript: Do not include terminating \0 in result returned by Date_toLocale{Date,Time}String.
...
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-08 10:06:28 +09:00
Sebastian Lackner
69437afed1
jscript: Change prototype of jsstr_alloc_buf and fix some error handling issues.
...
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-08 10:05:46 +09:00
Sebastian Lackner
d36ae568c1
jscript: Fix definition of JSSTR_MAX_LENGTH.
...
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-06 11:29:13 +09:00
Sebastian Lackner
7369836323
jscript: Simplify jsstr_release implementation.
...
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-06 11:29:00 +09:00
Jacek Caban
afc63fd570
jscript/tests: Added more tests.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-05 10:32:40 -05:00
Jacek Caban
5088828f2a
jscript: Don't create arguments object in pop_call_frame if it wasn't already created.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-05 10:32:27 -05:00
Jacek Caban
403fb41cd1
jscript: Create scope in setup_scope.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-05 10:32:23 -05:00
Jacek Caban
983bbab531
jscript: Replaced OP_ident with static binding when possible.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-04 09:09:20 -05:00
Jacek Caban
04617ddf21
jscript: Replaced OP_identid with static binding when possible.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-04 09:09:18 -05:00
Jacek Caban
765a52e86a
jscript: Store variables on the stack if possible.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-04 09:09:16 -05:00
Jacek Caban
7694afff4b
jscript: Don't use OP_var_set.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-04 09:09:14 -05:00
Jacek Caban
713051d027
jscript: Store local functions in locals map.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-04 09:09:12 -05:00
Jacek Caban
2e06686ef9
jscript: Use locals map for local variables.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-04 09:09:10 -05:00
Jacek Caban
1857cdf57d
jscript: More arguments object tests.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-03 11:13:50 -05:00
Jacek Caban
2f63a1e009
jscript: Delay arguments object until it's accessed and properly detach it after function exits.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-03 11:13:50 -05:00
Jacek Caban
5a7327d21d
jscript: Setup arguments object by interpreter and store all arguments inside the object on call exit.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-03 11:13:50 -05:00
Jacek Caban
9daafa87bc
jscript: Access arguments directly from stack in arguments object if possible.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-03 11:13:50 -05:00
Jacek Caban
b652a9787c
jscript: Build local references map in compiler and use it to search the scope.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-03 11:13:50 -05:00
Jacek Caban
da02140b43
jscript: Allow accessing arguments values directly from stack.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-02 16:18:05 -05:00
Jacek Caban
abba963006
jscript: Use exprval_t to represent property references passed on JS stack.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-02 16:18:04 -05:00
Jacek Caban
7af8330e93
jscript: Store exception code in exprval_t.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-02 16:18:04 -05:00
Jacek Caban
e641469f9f
jscript: Set output to undefined in jsval_copy on failure.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-29 11:59:34 +09:00
Jacek Caban
9fc2863ebd
jscript: Fixed potential leak in RegExp lastIndex setter.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-29 11:59:32 +09:00
Jacek Caban
b0dcbbdbee
jscipt: Use passed copy of arguments if they are alread at the top of the stack.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-29 11:59:30 +09:00
Jacek Caban
5e4d3826ec
jscript: Store function arguments on JS stack and transfer them to variable object only when needed.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-29 11:59:27 +09:00
Jacek Caban
798ba715e3
jscript: Optimize iface_to_jsdisp by using vtbl comparison.
...
This is 14% win on SunSpider 0.9 benchmark.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-20 23:05:14 +09:00
Jacek Caban
be37b894a4
jscript: Use IDispatch* as iface_to_jsdisp argument type.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-20 23:04:53 +09:00
Sebastian Lackner
b2e58b4c7c
jscript: Use list_head get first entry of list.
...
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-07 19:58:00 +09:00
Jacek Caban
68dddd8d89
jscript: Properly handle arguments in Object constructor.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-21 11:23:42 +09:00
Jacek Caban
db6b86cbbd
jscript: Allow Function.apply() to be called on non-jscript objects.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-17 00:09:18 +09:00
Jacek Caban
b5aeb661b9
jscript: Added non-zero timezone offset tests.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-25 22:05:26 +09:00
Jacek Caban
a8b5dc84bd
jscript: Removed obsolete FIXME comments in tests and add relevant tests.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-25 22:05:24 +09:00
Jacek Caban
b1773131ac
jscript: Added RegExp.global getter implementation.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-25 22:05:22 +09:00
Jacek Caban
81cb13af7a
jscript: Added RegExp.multiline getter implementation.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-25 22:05:20 +09:00
Jacek Caban
2db1666096
jscript: Added RegExp.ignoreCase getter implementation.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-25 22:05:18 +09:00
Markus Heidelberg
74257d5940
jscript: Date.parse: make "UTC"/"GMT" optional before the timezone offset.
...
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-24 22:17:38 +09:00
Jacek Caban
e1970c8547
jscript: Properly handle function expressions with identifiers.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-06 21:09:04 +09:00
Piotr Caban
756c604d9a
jscript: Fix handling of numbers starting with decimal separator.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-29 00:54:12 +09:00
Jacek Caban
6a03b38f33
jscript: Use already running interpreter for eval() execution.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-30 11:54:44 +09:00
Jacek Caban
889f2657dd
jscript: Use already running interpreter for Function.call() execution.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-30 11:54:42 +09:00
Jacek Caban
813609b843
jscript: Use already running interpreter for Function.apply() execution.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-30 11:54:40 +09:00
Jacek Caban
fa726bed4d
jscript: Use already running interpreter for execution new expressions.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-30 11:54:37 +09:00
Jacek Caban
2d35954adb
jscript: Use already running interpreter for execution expressions that are source functions.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-30 11:54:35 +09:00
Jacek Caban
66632091bf
jscript: Use already running interpreter for execution of member source function.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-30 11:54:33 +09:00
Jacek Caban
35133dbe58
jscript: Find Function.arguments on the stack instead of storing it in FunctionInstance object.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-29 10:40:06 +09:00
Jacek Caban
42e90ca592
jscript: Moved arguments object destuction to interpreter.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-29 10:40:04 +09:00
Jacek Caban
cb317ed5b8
jscript: Moved more return object logic to enter_bytecode loop.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-29 10:40:01 +09:00
Jacek Caban
8c1526a865
jscript: Keep reference to bytecode in call_frame_t.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-29 10:39:59 +09:00
Jacek Caban
db0fee5e9d
jscript: Merge setup_call_frame into exec_source.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-29 10:39:57 +09:00
Jacek Caban
d66b5bf4cb
jscript: Moved constructor return logic to interpreter.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-29 10:39:55 +09:00
Jacek Caban
2bb824b7c9
jscript: Sore is_global as a flag.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-29 10:39:53 +09:00
Jacek Caban
4bef35fd48
jscript: Clear stack outside OP_call* handlers.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-29 10:39:51 +09:00
Jacek Caban
51f65ec974
jscript: Clear stack outside OP_new handler.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-29 10:39:49 +09:00
Jacek Caban
d08036120a
jscript: Don't assume that ret value is cleared when it's not set explicitly.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-29 10:39:47 +09:00
Sebastian Lackner
19777292a3
jscript: Fix off-by-one error in decode_dword.
...
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-28 18:41:01 +09:00
Jacek Caban
32d9c59868
jscript: Get rid of no longer needed exec_ctx_t.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-26 12:07:17 +09:00
Jacek Caban
00ce4419b4
jscript: Store is_global flag in call_frame_t.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-26 12:07:15 +09:00
Jacek Caban
932ffa0de9
jscript: Store return value in call_frame_t.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-26 12:07:12 +09:00
Jacek Caban
b8fb19f160
jscript: Store variable object in call_frame_t.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-26 12:07:10 +09:00
Jacek Caban
0db7059663
jscript: Store this object in call_frame_t.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-26 12:07:07 +09:00
Jacek Caban
0224f1829b
jscript: Moved stack from execution context to script context.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-26 12:07:05 +09:00
Jacek Caban
9e03bb2ece
jscript: Pass script context instead of execution context to op handlers.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-26 12:07:02 +09:00
Jacek Caban
400435dbe3
jscript: Store entry scope chain in call_frame_t.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-25 20:09:50 +09:00
Jacek Caban
49ecfa950b
jscript: Store current scope chain in call_frame_t.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-25 20:09:45 +09:00
Jacek Caban
0e32c09901
jscript: Store stack base in call_frame_t.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-25 20:09:38 +09:00
Jacek Caban
a120ecbefc
jscript: Store instruction pointer in call_frame_t.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-25 20:09:31 +09:00
Jacek Caban
fa5d9b3db1
jscript: Store exception frame in call_frame_t.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-25 20:09:26 +09:00
Jacek Caban
53ecdb6549
jscript: Added new helpers for jumps.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-25 20:09:20 +09:00
Jacek Caban
132ff14d37
jscript: Store function description in call_frame_t.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-25 20:09:15 +09:00
Jacek Caban
89ad1094ea
jscript: Store bytecode pointer in call_frame_t.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-25 20:09:11 +09:00
Jacek Caban
8a17cf89fb
jscript: Keep track of active call in a separated structure.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-25 20:09:07 +09:00
Jacek Caban
47cf3fe36d
jscript: Added a few more arguments tests.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-25 00:52:09 +09:00
Jacek Caban
061592a205
jscript: Removed no longer used argument from exec_source.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-24 23:02:20 +09:00
Jacek Caban
45b3334757
jscript: Fixed tests on some old jscript versions.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-01 17:53:35 +09:00
Jacek Caban
2cbb757abe
jscript: Added JSON tests.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-28 13:43:41 +09:00
Jacek Caban
95bdd084a1
jscript: Added JSON.stringify implementation.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-28 13:43:35 +09:00
Jacek Caban
f0be56e17c
jscript: Added JSON.parse implementation.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-28 13:43:27 +09:00
Jacek Caban
4e1e2ee451
jscript: Added JSON object stub implementation.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-28 13:43:10 +09:00
Jacek Caban
e00708e3aa
jscript: Added new is_finite helper.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-28 13:42:57 +09:00
Jacek Caban
b1197a15ec
jscript: Make parse_decimal a more generic helper.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-28 13:42:41 +09:00
Jacek Caban
d7e4193df2
jscript: Added support for Function constructor called as a function.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-06 18:14:44 +01:00
Jacek Caban
79361d3bc0
jscript: Added a test of DeleteMembedByDispID returning an error.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-15 20:00:42 +09:00
Nikolay Sivov
fca682435d
jscript: Return error code disp_delete() failed with (PVS-Studio).
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-15 19:47:55 +09:00
Jacek Caban
326c1e61b4
jscript: Added 'automagic' test.
2015-06-03 14:47:15 +09:00
Jacek Caban
170bb3771f
jscript: Added beginning support for 'automagic' event binding feature.
2015-06-03 14:47:12 +09:00
Jacek Caban
ccccd1c435
jscript: Correctly handle pvarResult in ParseScriptText.
2015-06-01 14:43:28 +09:00
Alexandre Julliard
f324ae7f09
jscript: Avoid UINT32_MAX.
2015-05-14 17:15:14 +09:00
Thomas Faller
fdd22f197a
jscript: Date.parse: long date with '/' or '-'.
2015-05-04 20:20:26 +09:00
Francois Gouget
f0584081c9
jscript: Mark internal symbols with hidden visibility.
2015-03-18 19:39:04 +09:00
Jacek Caban
a1543a3f7b
jscript: Fixed handling VT_VARIANT|VY_BYREF types.
2015-02-06 22:20:39 +09:00
Jacek Caban
1316403770
jscript: Pass 'this' as jsdisp_t to setters.
2015-02-06 22:20:36 +09:00
Jacek Caban
d541b525e4
jscript: Pass 'this' as jsdisp_t to getters.
2015-02-06 22:20:34 +09:00
Jacek Caban
b7fae52964
jscript: Use separated functions for implementing builtin call, get and set operation.
2015-02-06 00:28:35 +09:00
Jacek Caban
90d3569c62
jscript: Don't use builtin property for *Error constructors.
2015-02-06 00:28:35 +09:00
Jacek Caban
b7a27333e3
jscript: Don't use builtin property for a few more constructors.
2015-02-06 00:28:34 +09:00
Jacek Caban
6eb49669aa
jscript: Don't use builtin property for exposing Boolean constructor.
2015-02-05 00:23:14 +09:00
Jacek Caban
b0632af980
jscript: Added support for VT_UI4 variants.
2015-02-04 21:32:50 +09:00
Jacek Caban
a2a57791cd
jscript: Added more SCRIPTSTATE_STARTED tests.
2015-01-14 13:18:27 +01:00
Jacek Caban
091738ffdf
jscript: Don't allow function execution if script engine is not in started state.
2015-01-14 13:18:24 +01:00
Francois Gouget
861f02b5d1
jscript: Add a trailing '\n' to an ok() call.
2015-01-05 20:16:05 +01:00
Jacek Caban
ceaf8bfd83
jscript: Added test of Date object default value.
2014-12-15 14:20:50 +01:00
Alistair Leslie-Hughes
6e8490a582
jscript: Support PROPERTYGET in Date Value.
2014-12-15 14:20:45 +01:00
Michael Stefaniuc
59af425d53
jscript: Merge two if blocks with identical condition (PVS-Studio).
2014-12-05 11:24:14 +01:00
Jacek Caban
7e43408eaa
jscript: Use DISPATCH_PROPERTYPUTREF flag when setting a property to VT_DISPATCH.
2014-11-28 17:05:50 +01:00
André Hentschel
dec5bbbec4
jscript: Remove unused code (Clang).
2014-11-25 19:49:40 +01:00
Jacek Caban
0eec97e29b
jscript: Don't use builtin property for exposing ActiveXObject constructor.
2014-10-13 19:43:28 +09:00
Qian Hong
66ba778cad
jscript: Ignore BOM mark in next_token.
2014-10-02 20:34:10 +02:00
Jacek Caban
e7b8459bc3
jscript: Added support for relational CC expressions.
2014-10-02 16:59:24 +02:00
Jacek Caban
d9e8c013c6
jscript: Added support for '==' CC expression.
2014-10-02 16:59:22 +02:00
Jacek Caban
a0f038963b
jscript: Added parser rules for missing expressions.
2014-10-02 16:59:20 +02:00
Jacek Caban
9b41bb0345
jscript: Added support for '-' CC expression.
2014-10-01 10:53:52 +02:00
Jacek Caban
fcd9817581
jscript: Implicitly turn CC on for @if instruction.
2014-10-01 10:53:49 +02:00
Jacek Caban
8b36388797
jscript: Implicitly turn CC on for @set instruction.
2014-10-01 10:53:47 +02:00
Jacek Caban
68c61d17e0
jscript: Added tests for @if/@elif/@else/@end.
2014-10-01 10:53:45 +02:00
Jacek Caban
afba44d324
jscript: Added support for conditional compilation @if/@elif/@else/@end.
2014-10-01 10:53:43 +02:00
Jacek Caban
ad842c42f0
jscript/tests: Added @set tests.
2014-09-30 18:15:16 +02:00
Jacek Caban
5ec69474cf
jscript: Added conditional compilation @set support.
2014-09-30 18:15:14 +02:00
Jacek Caban
77d0c2a44c
jscript: Moved skipping spaces to separated function.
2014-09-30 17:40:12 +02:00
Jacek Caban
79dc3bc72e
jscript: Added new ccval_t type for CC variable values.
2014-09-30 17:40:11 +02:00
Jacek Caban
166c97d549
jscript: Return double from parse_numeric_literal and parse_double_literal.
2014-09-30 17:40:11 +02:00