Ilmir Usmanov
a49b52105e
Fix generation of this_arg. Fix pretty-printing of retval, prop_setter, prop_getter and string assignments
2014-10-15 12:57:11 +04:00
Ilmir Usmanov
c8686d9d9b
Fix test
2014-10-15 10:53:40 +04:00
Ilmir Usmanov
7a156334bb
Fix vargs pretty-printing
2014-10-15 10:53:40 +04:00
Ilmir Usmanov
948c74b4b9
Os by default.
2014-10-14 22:06:04 +04:00
Ilmir Usmanov
562f877328
Remove end-of-file marker and fix lsr's operands.
2014-10-14 22:02:02 +04:00
Ilmir Usmanov
9be0a85c1c
Fix 'while' bytecode generation
2014-10-14 16:55:09 +04:00
Ilmir Usmanov
64e286f766
Enable pretty-printer only on host and debug
2014-10-14 15:06:21 +04:00
Ilmir Usmanov
053cbc769f
Fix alignment: part 2
2014-10-14 15:06:21 +04:00
Ilmir Usmanov
85ad5f8350
Fix alignment
2014-10-13 21:42:25 +04:00
Ilmir Usmanov
8a517ab03e
Add support of octal integer literals
2014-10-13 17:45:20 +04:00
Ilmir Usmanov
c33afca360
Add support of 'default' clause in 'switch' statement
2014-10-13 16:32:17 +04:00
Ilmir Usmanov
18618c6501
Freaking FINALLY: postparser
2014-10-12 20:34:23 +04:00
Ilmir Usmanov
63662dfb35
Postparser landing patch: add tree of scopes
2014-10-12 20:34:23 +04:00
Ilmir Usmanov
cb7e54fe22
Preparser landing patch: refactor linked-list
2014-10-12 20:34:22 +04:00
Ilmir Usmanov
cd67b69bf9
Fix integer overflow while parsing numbers
2014-10-10 20:22:08 +04:00
Ilmir Usmanov
5c6dbd1466
Allow absent of semicolon before '}' token
2014-10-10 19:05:37 +04:00
Ilmir Usmanov
19d0690586
Support properties named 'get' and 'set'
2014-10-10 18:27:28 +04:00
Ilmir Usmanov
e91cb75dcc
Fix locus of strings
2014-10-10 17:14:48 +04:00
Ilmir Usmanov
64a0d8a8b0
Fix error message on for-in loops
2014-10-10 14:57:56 +04:00
Ilmir Usmanov
2c90f8a7f1
Fix break and continue generation
2014-10-09 20:55:16 +04:00
Ilmir Usmanov
9cd4344c4e
Fix for loop parsing
2014-10-09 19:58:13 +04:00
Ilmir Usmanov
eeb497b84b
Fix if-else without braces
2014-10-09 19:41:42 +04:00
Ilmir Usmanov
29c734d95d
Reuse tmps in vargs
2014-10-09 18:28:28 +04:00
Ilmir Usmanov
a902a97025
Add another 'out of memory' error message
2014-10-09 17:49:02 +04:00
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