Sung-Jae Lee
eda775a8ca
Fix build break on OSX: Invalid type comparision.
...
JerryScript-DCO-1.0-Signed-off-by: Sung-Jae Lee sjlee@mail.com
2016-01-29 22:40:55 +09:00
Roland Takacs
70a67797d2
Refactor opcodes-dumper to not use C++ features.
...
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2016-01-20 10:58:06 +01:00
Hanjoung Lee
f6bd5afa42
Fix linked-list removal of last element
...
JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2016-01-14 19:47:16 +09:00
Ruben Ayrapetyan
6d1bf13948
Fix incorrect assertion in bc_load_bytecode_data.
...
Related issue: #797
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2016-01-13 18:30:33 +03:00
Roland Takacs
21f561f8ef
Refactor literal-storage to not use C++ features
...
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2016-01-13 15:19:07 +01:00
Ruben Ayrapetyan
f932b7d48c
Fix handling of property accessors in loop condition expressions and in argument of with statement.
...
Related issue: #798
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2016-01-11 13:42:12 +03:00
Andrey Shitov
50d124bfc3
Parser optimizations.
...
- parser is now non-recursive (i.e. parse function is not called recursively in any case);
- byte-code is now more compact:
- constants are now not immediately dumped upon occurence, but later - where necessary;
- assignments are combined with unary / binary operations;
- binary operations are encoded more compactly in many cases;
- byte-code arrays are now allocated separately for each scope (so, GC of the scopes now becomes possible);
- byte-code is dumped directly into corresponding byte-code arrays:
- linked lists of op_meta are not now used for main code of a scope.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-12-23 14:21:10 +03:00
SaeHie Park
8fbde244e9
Move log message output(fprintf, puthcar) to target code
...
Related issue #752
JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2015-12-08 07:48:16 +09:00
Zidong Jiang
3d286b46d0
Fix bug in linked_list_block_size().
...
and Ruben Ayrapetyan fix a bug in linked_list_switch_to_next_elem
Related issue: #720
JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2015-12-02 12:12:03 +03:00
Hanjoung Lee
ce3b785c83
Fix lexing number literal
...
Related issue: #745
JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2015-12-02 11:36:30 +09:00
Hanjoung Lee
f20db76dfb
Fix parse error of parse_switch_statement
...
Related issue: #725
JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2015-11-27 12:19:09 +09:00
Hanjoung Lee
140982e900
Fix PropertyName not to be resolved as a local variable
...
JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2015-11-13 13:29:38 +09:00
Ilyong Cho
94cb6aec26
Fix prop_getters stack manipulation for assignment expression.
...
Related issue: #614
JerryScript-DCO-1.0-Signed-off-by: Ilyong Cho ily.cho@samsung.com
2015-11-09 11:02:57 +09:00
Ruben Ayrapetyan
8af87206c9
Fix ecma_builtin_global_object_decode_uri_helper.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-11-03 18:42:01 +03:00
Ruben Ayrapetyan
911163e787
Optimize object literal byte-code - store property names as literal arguments, instead passing them through register variables.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-11-02 17:47:18 +03:00
Ruben Ayrapetyan
1fe2817457
Introduce parser-time optimization that moves function's argument values to registers.
...
For functions with the optimization applied:
- vm puts arguments values immediately to registers without putting them to variables in lexical environment;
- number of arguments is extracted from corresponding 'reg_var_decl' instruction's argument;
- for functions that also don't have local variables, lexical environments are not created.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-11-02 17:15:13 +03:00
Ruben Ayrapetyan
4d2ad40475
Remove var_decls_count field from scopes_tree header; getting "var_decl"s count using linked_list_get_length instead.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-11-02 17:10:45 +03:00
Ruben Ayrapetyan
0ef9c486c1
Introduce linked_list_chunk_header (header of a linked_list's chunk), add list's length field into linked_list's header; support removal of elements in linked_list.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-11-02 17:10:45 +03:00
Ruben Ayrapetyan
841c1ed61c
Fix usage of array_list in parse_switch_statement.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-11-01 16:51:43 +03:00
Ruben Ayrapetyan
f2ced3d91c
Fix check for 'eval' and 'arguments' functions' names / argument names in strict mode.
...
Related issue: #686
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-10-30 17:31:04 +03:00
Ruben Ayrapetyan
3025bd1750
Fix handling of SyntaxError in FormalParameterList during 'new Function' constructor operation.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-10-30 17:26:17 +03:00
Ruben Ayrapetyan
04ca231fa4
Fix jsp_early_error_check_for_duplication_of_prop_names.
...
Related issue: #689
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-10-30 16:41:16 +03:00
Ruben Ayrapetyan
f2c54fbe39
Fix serializer_remove_bytecode_data.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-10-30 16:41:16 +03:00
Ruben Ayrapetyan
4500965316
Fix handling of non-reference operands in prefix operations.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-10-30 16:41:16 +03:00
Hanjoung Lee
906558b8e9
Fix: switch statement jumps to incorrect case body
...
JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2015-10-29 19:16:12 +09:00
Hanjoung Lee
3e31931537
Fix: parse error when no expression follows after 'return', 'break', 'continue'
...
JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2015-10-29 18:06:28 +09:00
Hanjoung Lee
fcebf654cc
Fix: parser bug in parse_switch_statement
...
JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2015-10-29 11:09:48 +09:00
Ruben Ayrapetyan
1e2dfc73f5
Remove of 'this_binding' opcode.
...
- introduce 'const' register type;
- adding constant register for reading ThisBinding value of active interpreter context.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-10-23 15:45:28 +03:00
Ruben Ayrapetyan
f2c3e59bbe
Change reg_var_decl instruction arguments to [number of registers for temporaries; number of register for local variables].
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-10-23 15:45:28 +03:00
Ilyong Cho
31ae0977f6
Fix lexing of illegal exponential.
...
Related issue: #339
JerryScript-DCO-1.0-Signed-off-by: Ilyong Cho ily.cho@samsung.com
2015-10-23 13:52:56 +09:00
Hanjoung Lee
448984dd74
Fix: parsing regex and div operator correctly
...
JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2015-10-22 14:15:18 +09:00
Dániel Bátyai
579b1edaa5
Refactor builtins to handle CESU-8 encoded strings.
...
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-10-15 16:01:10 +02:00
Dániel Bátyai
dcd610b305
Change internal encoding of strings to CESU-8
...
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-10-15 13:39:00 +02:00
Roland Takacs
6f77460509
Replace recursions with iterations in the linked_list data structure
...
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2015-10-05 14:30:29 +02:00
Ruben Ayrapetyan
b7c93f170d
Remove argument names in function prototypes, declared in headers; fix '*' alignment in headers.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-09-28 18:27:10 +03:00
Dániel Bátyai
91f0c9d625
Parse integer numbers from back to front.
...
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-09-16 14:30:45 +02:00
Andrey Shitov
311cc65b33
Implement snapshot functionality.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-09-09 18:07:24 +03:00
Andrey Shitov
443673fc5d
Update bytecode header structure so that bytecode could be stored independently from hash table and bytecode header.
...
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-09-09 18:07:20 +03:00
Ruben Ayrapetyan
9da91d0834
Remove inside_eval from limitations on var-to-reg optimization.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-09-09 16:58:52 +03:00
Ruben Ayrapetyan
a00079e8ff
Reduce number of operand type handling conditional blocks in byte-code dumper, by extracting them to several separate routines that can be used for most cases, remove getop_* routines from vm.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-28 16:19:49 +03:00
Ruben Ayrapetyan
cbdc48a1fc
Remove raw_instr.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-28 16:19:19 +03:00
Ruben Ayrapetyan
173becc3ac
Rename idx_t -> vm_idx_t, opcode_special_reg_t -> vm_reg_t, INVALID_VALUE -> VM_IDX_EMPTY / VM_IDX_REWRITE_GENERAL_CASE, LITERAL_TO_REWRITE -> VM_IDX_REWRITE_LITERAL_UID.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-28 16:18:58 +03:00
Ruben Ayrapetyan
0111a73702
Convert parser operand structure to jsp_operand_t class, move operand types to enum defined in the class.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-28 15:35:06 +03:00
Ruben Ayrapetyan
5b9ce05491
Introduce parser-time optimization that replaces a function's local variables with registers.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-27 17:42:45 +03:00
Ruben Ayrapetyan
91aecc3bd0
Introduce parser scope types, add scope flags, indicating whether scope contains a function declaration, a 'try' statement, 'with' statement or 'delete' operator.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-27 17:42:45 +03:00
Ruben Ayrapetyan
845b0d5006
Clarify calculation precedence for & and ?.
...
(a & b ? c : d)-like expressions are changed to ((a & b) ? c : d).
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-27 16:32:08 +03:00
Andrey Shitov
e4843ece76
Fix processing of elision in array literal.
...
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-08-24 14:51:24 +03:00
Andrey Shitov
01604974e3
Free eval's code and literal hash-table after its execution if it does not contain functions.
...
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-08-24 14:44:16 +03:00
Andrey Shitov
b3b87add02
Fix parsing of string literals which contain zero character.
...
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-08-20 22:23:57 +03:00
Andrey Shitov
0938211f63
Fix parsing of comments which contain zero character.
...
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-08-19 14:34:31 +03:00