Ilmir Usmanov
bfa186d43a
Generate only one var_decl opcodes for each variable declared in a scope
2014-10-09 15:30:30 +04:00
Ilmir Usmanov
29ffa6f777
Pretty-printer refactoring. Add pretty-printing of metas.
2014-10-09 13:19:36 +04:00
Ilmir Usmanov
1dd94c12b2
Fix insert_semicolon
2014-10-08 19:15:25 +04:00
Ilmir Usmanov
24920cba57
Fix property names parsing
2014-10-08 17:09:02 +04:00
Ilmir Usmanov
c3f493c693
Some minor fixes in parser: Do not warn on escape sequences. Allow 'new' operator without parens. Fix 'var' parsing in preparser. Fix a test.
2014-10-08 16:32:36 +04:00
Ilmir Usmanov
9775d23274
Support 'delete' and 'void' operators in parser.
2014-10-08 14:52:38 +04:00
Ilmir Usmanov
3d3da5d481
Preparser: new pass to order var_decls prior to parser
2014-10-07 20:14:41 +04:00
Ilmir Usmanov
62cc3cc604
Fix && and || parsing
2014-10-06 14:35:26 +04:00
Ilmir Usmanov
17ee2eca50
Warn on escape sequences
2014-10-06 14:35:26 +04:00
Ilmir Usmanov
3d5fd214f3
Add switch-case
2014-10-06 14:35:26 +04:00
Ilmir Usmanov
8c7daf4850
Print ERR_MEMORY on stack
2014-10-06 14:35:26 +04:00
Ilmir Usmanov
d3dc64ca53
Pretty-print native_calls
2014-10-06 14:35:26 +04:00
Ilmir Usmanov
3819883f80
Add human-readable syntax errors
2014-10-03 19:01:45 +04:00
Ilmir Usmanov
c4c713535e
Fix insert_semicolon
2014-10-02 21:35:39 +04:00
Ilmir Usmanov
af00691d1d
Add this_arg dumping in parser
2014-10-02 19:31:29 +04:00
Ilmir Usmanov
eff5e1a80b
Fix stack operations in parser
2014-10-02 15:04:00 +04:00
Ilmir Usmanov
c8b97214fe
Parse undefined as simple
2014-10-01 14:30:04 +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
cde880b1cf
Fix 'break' parsing
2014-09-25 18:06:21 +04:00
Ilmir Usmanov
42876bdc8f
Add support of native calls
2014-09-25 15:57:57 +04:00
Ilmir Usmanov
05a2224faa
Fix parsing of assignment expressions without assignment operator.
2014-09-24 16:53:58 +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
8bcc37d0f8
Fix prop_getter, construct_n, array_n generation.
2014-09-23 22:53:35 +04:00
Ilmir Usmanov
f17ca4c455
Fix post_* opcodes generation
2014-09-23 20:32:22 +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
Ilmir Usmanov
56e6d2a380
Add if_else.js test. Fix bytecode generation.
2014-09-17 20:21:30 +04:00
Ilmir Usmanov
70cc5128cc
Add test try_catch_finally.js. Fix parser and interpreter
2014-09-17 18:58:16 +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
Ilmir Usmanov
a2fe594d0f
Merge branch 'geppetto'
2014-08-19 16:22:39 +04:00
Ilmir Usmanov
126b8814a8
Add rules to check switch-cases
2014-08-19 16:22:05 +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
bbde9f4180
Merge branch 'geppetto'
2014-08-12 22:27:32 +04:00
Ilmir Usmanov
0a68baa479
Add support of floating-point literals
2014-08-12 22:27:12 +04:00
Ilmir Usmanov
bca7f7f095
Merge branch 'geppetto'
2014-08-11 23:18:06 +04:00
Ilmir Usmanov
5373b60955
Reformat
2014-08-11 23:17:45 +04:00
Ilmir Usmanov
32c97b97a7
Merge branch 'master' of git-server:jerry
2014-08-07 15:01:29 +04:00
Ilmir Usmanov
5690be49dd
Move serializer and deserializer to liboptimizer
2014-08-06 20:32:16 +04:00
Ilmir Usmanov
8afbb39df0
Merge branch 'master' of git-server:jerry
2014-08-06 14:21:06 +04:00
Ilmir Usmanov
4a7bb710fa
Add 'assert' intrinsic
2014-08-06 14:17:53 +04:00
Ilmir Usmanov
998a52b416
Merge branch 'geppetto'
2014-08-05 14:52:32 +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
fb86387675
Merge branch 'geppetto'
2014-08-04 22:56:41 +04:00
Ilmir Usmanov
557100059a
Add bytecode pretty-printing
2014-08-04 22:56:26 +04:00
Ilmir Usmanov
97dc322085
Fix assertions in parser
2014-08-04 17:50:08 +04:00
Ilmir Usmanov
084ed7aee4
Add --suppress=sizeofwithnumericparameter param to cppcheck
2014-08-04 17:22:32 +04:00
Ilmir Usmanov
039efcc3ae
Merge branch 'geppetto'
2014-08-04 17:09:22 +04:00
Ilmir Usmanov
eee88ffdc2
Add basic support of 'break' and 'continue' statements (without identifiers)
2014-08-04 17:09:02 +04:00
Ilmir Usmanov
806b4828af
Merge branch 'master' of git-server:jerry
2014-08-01 15:49:57 +04:00
Ilmir Usmanov
59403ac7f2
Parse empty files correctly
2014-08-01 15:49:35 +04:00
Ilmir Usmanov
0ee1b9b54e
Merge branch 'master' into geppetto
2014-08-01 15:25:49 +04:00
Ilmir Usmanov
d15cf8f436
Fix some bugs in lexer
2014-08-01 15:24:48 +04:00
Ilmir Usmanov
dd5f90d50f
Merge branch 'master' of git-server:jerry
2014-07-31 23:16:45 +04:00
Ilmir Usmanov
3f108ec1e7
Add asserts for testing and add test for 'for' loops
2014-07-31 23:16:24 +04:00
Ilmir Usmanov
420d3bf8f5
Merge branch 'master' of git-server:jerry
2014-07-31 21:52:33 +04:00
Ilmir Usmanov
1d41e8a355
Add 'exit' intrinsic
2014-07-31 21:52:25 +04:00
Ilmir Usmanov
2e0a3d4aca
Add support of input several files
2014-07-31 21:23:29 +04:00
Ilmir Usmanov
14f0563d1a
Fix couple of bugs show-opcodes: lexer should not dump lines, serializer must not rewrite a single opcode when dumping
2014-07-31 21:09:42 +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
8c5309d131
Add jump after function declaration and function expression header
2014-07-29 20:22:12 +04:00
Ilmir Usmanov
7d20bb3361
Merge branch 'master' into geppetto
2014-07-29 17:49:23 +04:00
Ilmir Usmanov
e497875c06
Change strings offset size from 8 bits to 16 bits
2014-07-29 17:49:13 +04:00
Ilmir Usmanov
ac22173ddd
Merge branch 'master' of git-server:jerry
2014-07-29 11:55:37 +04:00
Ilmir Usmanov
bc9d80147a
Reduce lexer's memory consumption
2014-07-29 11:55:16 +04:00
Ilmir Usmanov
177a2d1382
Merge branch 'geppetto'
2014-07-28 19:39:25 +04:00
Ilmir Usmanov
1b6638f073
Add ERR_MEMORY exit code to show that there was not enough memory; fix debug.stm build
2014-07-28 19:39:11 +04:00
Ilmir Usmanov
d927d3e320
Fixes after review: simplification
2014-07-28 17:59:46 +04:00
Ilmir Usmanov
306f111a28
Add 'make testparser' option to test parser only
2014-07-28 17:28:18 +04:00
Ilmir Usmanov
24403c618e
Merge branch 'geppetto'
2014-07-28 15:56:56 +04:00
Ilmir Usmanov
06473f0db2
Add Dolphin's .directory files to ignore
2014-07-28 15:56:28 +04:00
Ilmir Usmanov
8745c47192
Merge branch 'geppetto'
2014-07-25 14:16:52 +04:00
Ilmir Usmanov
40007126fa
Fix memory corruptions in lexer, which occured while parsing cse.js; remove lexer.log and parser.log files
2014-07-25 14:16:29 +04:00
Ilmir Usmanov
c9c26251a4
Add savings bytecode in memory on target
2014-07-25 12:37:29 +04:00
Ilmir Usmanov
518ff9a864
Merge branch 'master' into geppetto
2014-07-24 21:51:17 +04:00
Ilmir Usmanov
8fadaf5277
Merge branch 'master' into geppetto
2014-07-24 21:40:59 +04:00
Ilmir Usmanov
c6c2abce0e
Merge
2014-07-24 21:40:30 +04:00
Ilmir Usmanov
1f3b5a4c29
Merge
2014-07-24 19:50:37 +04:00
Ilmir Usmanov
3b0fef6e04
Add opcodes for increment and decrement; add optimizer
2014-07-24 19:27:58 +04:00
Ilmir Usmanov
c837c7d435
Optimize reg_var_decl memory usage
2014-07-24 16:54:59 +04:00
Ilmir Usmanov
1790739b93
Add 'reg_var_decl' opcode
2014-07-24 15:45:55 +04:00
Ilmir Usmanov
b4404578ca
Lazy initialization in deserializer
2014-07-24 15:24:51 +04:00
Ilmir Usmanov
ea4278184c
Rename deserializer_get_* -> deserialize_*
2014-07-24 12:17:59 +04:00
Ilmir Usmanov
60fa1d1178
Add checks of dumped literals and identifiers. Fix deserializer and serializer.
2014-07-24 11:55:14 +04:00
Ilmir Usmanov
597b5fe5c2
Merge branch 'master' of git-server:jerry
2014-07-23 22:56:06 +04:00
Ilmir Usmanov
ed4e2a20e4
Add deserializer
2014-07-23 22:55:45 +04:00
Ilmir Usmanov
b923468720
Merge branch 'geppetto'
2014-07-23 21:34:43 +04:00
Ilmir Usmanov
db9d18bd26
Don't dump trash
2014-07-23 21:34:25 +04:00
Ilmir Usmanov
f1dd405933
Merge
2014-07-23 20:50:29 +04:00
Ilmir Usmanov
764efa41b8
Fix parsing of for-loops.
2014-07-23 20:47:31 +04:00
Ilmir Usmanov
e5cdf93d2d
Dump script line before bytecode (Only on host). Fix parsing literals: assing literal to temp before usage.
2014-07-23 18:43:03 +04:00
Ilmir Usmanov
d57da2aa8a
Num literals outside of assignments (in lists) are not allowed
2014-07-23 17:52:02 +04:00
Ilmir Usmanov
b3b1d485ab
Merge
2014-07-23 17:37:49 +04:00
Ilmir Usmanov
f264d24b5a
Rewrite serializer and lexer: adjust nums' ids, dump strings, nums and rewrites
2014-07-23 17:36:11 +04:00