41 Commits

Author SHA1 Message Date
Ilmir Usmanov
3d3da5d481 Preparser: new pass to order var_decls prior to parser 2014-10-07 20:14:41 +04:00
Ilmir Usmanov
d3dc64ca53 Pretty-print native_calls 2014-10-06 14:35:26 +04:00
Ilmir Usmanov
6561c3fe6c Add support of array initialization like [1,,,'4'] 2014-09-30 19:44:45 +04:00
Ilmir Usmanov
9d129e15dc Allocate stack memory by chunks 2014-09-30 18:40:24 +04:00
Ilmir Usmanov
42876bdc8f Add support of native calls 2014-09-25 15:57:57 +04:00
Ilmir Usmanov
0a4616b65f Remove call_0, call_1, func_decl_0, func_decl_1, func_decl_2 opcodes. 2014-09-24 16:33:28 +04:00
Ilmir Usmanov
0738ec6a54 Add generation of prop_setter. 2014-09-24 15:30:37 +04:00
Ilmir Usmanov
d26b7f9f4e Fix reg_var_decl generation. 2014-09-23 20:05:10 +04:00
Ilmir Usmanov
8a5b956e38 Simplify serializer/deserializer. Reduce memory usage in lexer. Create HashTable data structure. Finish preparations for introducing new strings addressation. 2014-09-23 16:45:10 +04:00
Ilmir Usmanov
615903dbf5 Fix call expression without args bytecode generation 2014-09-22 20:21:44 +04:00
Ruben Ayrapetyan
aa6a45962d Reducing scope of variable in deserialize_num_by_id to satisfy cppcheck's requirements. 2014-09-17 15:37:39 +04:00
Ilmir Usmanov
d4cd8be349 Fix asserts in opfunc_*jmp_down functions. 2014-09-16 22:36:26 +04:00
Ilmir Usmanov
e77bd4f4e5 Add try-catch-finally support: parse and generate opcodes for this construct
Fix varg generation: generate *_n opcodes with parameters in following meta opcodes
Add stack internal structure: dimanically allocated stack.
Use dynamically allocated memory in parser: every local and global variables are stored in dinamically allocated stacks.
Use dynamically allocated memory in serializer: opcodes are also stored in stack.
Change is_true_jmp and is_false_jmp opcodes to relative.
Change *jmp* opcodes to be able to store opcode_counter_t instead of idx_t.
2014-09-16 21:32:59 +04:00
Ruben Ayrapetyan
5d2b535cec Implementing 'with' opcode; replacing 'end_with' opcode with 'meta' opcode of corresponding type. 2014-08-27 21:38:53 +04:00
Ruben Ayrapetyan
f08c242156 Implementing 'obj_decl' opcode; replacing 'prop', 'prop_get_decl', 'prop_set_decl' with 'meta' opcodes of corresponding types. 2014-08-27 20:43:31 +04:00
Ruben Ayrapetyan
d286a93e2c Replacing 'varg' opcode with 'meta' opcode with corresponding type. 2014-08-27 19:35:56 +04:00
Ruben Ayrapetyan
76121926d1 Splitting 'delete' opcode to 'delete_var' and 'delete_prop'. Implementing corresponding opcode handlers. 2014-08-27 17:12:59 +04:00
Ruben Ayrapetyan
6f58335f23 Replacing 'varg_list' (3 args) with 'varg' (1 arg). 2014-08-26 20:50:41 +04:00
Ruben Ayrapetyan
02f31fbcfb Adding 'func_expr_n' opcode; replacing arg1 and arg2 of 'func_decl_n' opcode with arg_list. 2014-08-26 15:58:57 +04:00
Ruben Ayrapetyan
7a80b7f4f1 Renaming 'construct_decl' opcode to 'construct_n'. 2014-08-26 12:50:23 +04:00
e.gavrin
4ffbdd2c3f __opcode -> opcode_t 2014-08-23 02:01:56 +04:00
e.gavrin
a99907670b OPCODE define replaced with opcode_t. T_IDX define replaced with idx_t. 2014-08-23 00:53:41 +04:00
e.gavrin
d80cb10361 Refine opcodes OP_LIST macro. Removed ambiguous lists of opcodes in several files. The only list is in opcodes.h 2014-08-23 00:16:56 +04:00
e.gavrin
d4a9d9430e Refactoring of libcoreint part1 2014-08-23 00:16:56 +04:00
e.gavrin
5b2b04f5f9 Various opcode's refinements: obj[0,1, 2, n]->obj_decl, array[0, 1, 2, n]->array_decl, func_expr[0, 1, n]->removed, varg[1_end, 2_end, 3_end, 3]->varg_list. 2014-08-21 15:49:10 +04:00
Ruben Ayrapetyan
284e7fc91b Renaming prop_access opcode to prop_getter; introducing prop_setter opcode; implementing property getter/setter opcode handlers. 2014-08-20 16:34:03 +04:00
Ruben Ayrapetyan
25ae71353d Removing print of opcode in optimizer_reorder_scope. 2014-08-13 20:28:12 +04:00
e.gavrin
350580c49e Fix style in liboptimizer 2014-08-13 16:41:39 +04:00
Ilmir Usmanov
2e1da4cae5 Quickfix N2 2014-08-12 22:48:24 +04:00
Ilmir Usmanov
6f41c1c59b Quickfix 2014-08-12 22:30:24 +04:00
Ilmir Usmanov
0a68baa479 Add support of floating-point literals 2014-08-12 22:27:12 +04:00
e.gavrin
49a809d56f Add optional vera++ support. Add several rules. Fixes for vera compatibility - new lines at EOF 2014-08-08 22:40:17 +04:00
Ruben Ayrapetyan
cd0246bedc Changing size of ecma-array's chunk to fixed 8 bytes. 2014-08-08 18:23:02 +04:00
e.gavrin
0007adce8b Add new line for vera++ compatibility 2014-08-08 18:00:31 +04:00
Ruben Ayrapetyan
99c15ef802 Implementing object model, memory allocators finalization routines. Adding assertion that all memory was freed before exit. 2014-08-07 19:24:32 +04:00
Ilmir Usmanov
5690be49dd Move serializer and deserializer to liboptimizer 2014-08-06 20:32:16 +04:00
Ilmir Usmanov
bfe2293d43 Replace repeated var_decls with nop 2014-08-05 14:52:03 +04:00
Ilmir Usmanov
3b624be051 Fix adjusting jumps 2014-08-05 11:51:49 +04:00
Ilmir Usmanov
0d1935e3a8 Merge 2014-07-31 20:11:31 +04:00
Ilmir Usmanov
2809ffb36d Add scope reordering ("use strict" -> func_decl -> var_decl -> other opcodes); Add --show-opcodes console parameter 2014-07-31 19:30:27 +04:00
Ilmir Usmanov
1f3b5a4c29 Merge 2014-07-24 19:50:37 +04:00