Commit Graph

1387 Commits

Author SHA1 Message Date
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