Commit Graph

228 Commits

Author SHA1 Message Date
Jacek Caban 150b7391b8 jscript: Add GetSourceLineText implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-04 21:30:27 +01:00
Jacek Caban bcba07229a jscript: Support propagating error message.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-03 20:48:03 +01:00
Jacek Caban 0f4d4f7184 jscript: Store error location in jsexcept_t.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-03 20:48:03 +01:00
Jacek Caban 33984c390d jscript: Use enter_script and leave_script to call script site notifications.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-30 16:22:33 +01:00
Jacek Caban 9855c248f8 jscript: Store error code in jsexcept_t.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-30 16:22:33 +01:00
Jacek Caban 3c9b7011ff jscript: Store separated flag indicating if current exception value is valid.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-30 15:58:42 +01:00
Jacek Caban 63683b42f7 jscript: Use separated jsexcept_t instance for each external call.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-30 15:58:40 +01:00
Jacek Caban ba500a6a9e jscript: Store source context and starting line in bytecode_t.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-30 15:58:36 +01:00
Jacek Caban 78853e3853 jscript: Store source position in instr_t.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-24 21:23:56 +01:00
Gabriel Ivăncescu c70c10564a jscript: Keep a pointer to the bytecode in function_code_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-11 21:51:28 +01:00
Gabriel Ivăncescu a42666f590 jscript: 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-07 19:49:04 +01:00
Gabriel Ivăncescu 5e4f0f4086 jscript: Use standard list for the queued code.
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:01 +01:00
Jacek Caban e70825b014 jscript: Use jsstr_t as string argument type in OP_obj_prop.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-04 13:07:07 +01:00
Jacek Caban 0cc68cf82a jscript: Add interpreter support for getters and setters in object initializer.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-03 10:50:28 +01:00
Jacek Caban 56be97fd5d jscript: Add parser support for getters and setters in object initializer.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-03 10:50:24 +01:00
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 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 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
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
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 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 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 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 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 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 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 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 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 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