Jacek Caban
5a90acf59c
jscript: Use global accumulator for storing function call results.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-12 14:08:07 +02:00
Jacek Caban
d72acebd6c
jscript: Properly handle elisions in array literals.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-02 10:54:27 +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
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
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
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
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
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
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
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
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
Jacek Caban
170bb3771f
jscript: Added beginning support for 'automagic' event binding feature.
2015-06-03 14:47:12 +09:00
Jacek Caban
615f6a6e8b
jscript: Move parser related declarations to separated header.
2014-09-30 17:40:10 +02:00
Marcus Meissner
874c66e086
jscript: Fix warning with older compilers.
2013-03-25 13:56:17 +01:00
Jacek Caban
3faeffc5f4
jscript: Use DEFAULT_UNREACHABLE macro where appropriate.
2013-03-13 16:27:49 +01:00
Alexandre Julliard
a27ecc40ba
jscript: Return after assert(0) to silence warnings.
2013-03-08 19:35:20 +01:00
Jacek Caban
324d8b6fa3
jscript: Use jsstr_flush in literal_as_bstr.
2013-03-07 14:56:17 +01:00
Jacek Caban
ee880b28c5
jscript: Fixed BSTR leak.
2013-02-19 19:50:53 +01:00
Piotr Caban
02d63cb312
jscript: Rename jsheap_t to heap_pool_t.
2013-02-15 14:42:58 +01:00
Jacek Caban
0f0f76ce6b
jscript: Allow poping multiple stack values at the time.
2012-12-14 11:54:47 +01:00
Jacek Caban
10c2a2bba4
jscript: Properly handle return value evaluation in comma expression.
2012-12-14 11:54:44 +01:00
Jacek Caban
1000a6bf34
jscript: Ensure correct stack state for non-returning expression evaluation in compile_expression.
2012-12-13 12:24:15 +01:00
Jacek Caban
162f2e6be2
jscript: Moved eval return value logic to specific statement handlers.
2012-12-13 12:24:07 +01:00
Jacek Caban
b568d88815
jscript: Throw an error if return statement is in eval code.
2012-12-12 20:23:13 +01:00
Jacek Caban
ac41380b94
jscript: Fixed some Coverity issues.
2012-11-27 17:00:45 +01:00
Jacek Caban
be885e287b
jscript: Use jsstr_t for compiler constant strings.
2012-10-11 18:53:11 +02:00
Jacek Caban
7f1e3300fe
jscript: Use custom string container instead of BSTR.
2012-10-11 18:53:04 +02:00
Jacek Caban
bf65003271
jscript: Added support for pstrFormalParams argument in ParseProcedureText.
2012-10-04 16:29:24 +02:00
Jacek Caban
fdbd536983
jscript: Don't leave current scope in return statement before evaluating the expression.
2012-09-13 16:47:22 +02:00
Jacek Caban
6ba7a1964a
jscript: Fixed empty cases in the end of switch statement.
2012-09-04 16:15:45 +02:00
Jacek Caban
4cfab07748
jscript: Always store numeric literals as double.
2012-06-20 19:20:57 +02:00
Jacek Caban
35e663425d
jscript: Store double op arg directly instead of by pointer.
2012-05-14 12:04:23 +02:00
Jacek Caban
e273636d4d
jscript: Make flags parameter of OP_regexp unsigned.
2012-05-14 12:04:22 +02:00
Jacek Caban
0d5defafd4
jscipt: Make arg_cnt parameter of OP_new unsigned.
2012-05-14 12:04:22 +02:00
Jacek Caban
ca15adfde6
jscript: Get rid of parser function collecting hack by moving the logic to compiler.
2012-04-26 19:27:36 +02:00
Jacek Caban
474f1152b2
jscript: Moved collecting variable declarations from parser to compiler.
2012-04-25 12:17:08 +02:00
Jacek Caban
b866c7f5e9
jscript: Make parser a temporary compiler object.
2012-04-25 12:17:04 +02:00
Jacek Caban
97b44da746
jscript: Store function parameters in function_code_t.
2012-04-25 12:17:01 +02:00
Jacek Caban
d1a4053953
jscript: Fixed func->funcs leak.
2012-04-25 12:16:56 +02:00
Jacek Caban
64a3f5077f
jscript: Store variable names in function_code_t.
2012-04-25 12:16:52 +02:00
Jacek Caban
375ab889d8
jscript: Store source code range in function_code_t.
2012-04-24 17:45:27 +02:00