Commit Graph

53 Commits

Author SHA1 Message Date
Ilmir Usmanov 16556eb830 Fix 'switch' bytecode generation. Remove __strtof. Fix opcodes pretty-printing. 2014-10-16 15:33:54 +04:00
Ilmir Usmanov 49d990ad32 Allow some of FutureReservedWords in non-strict mode 2014-10-15 17:53:19 +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 63662dfb35 Postparser landing patch: add tree of scopes 2014-10-12 20:34:23 +04:00
Ilmir Usmanov cd67b69bf9 Fix integer overflow while parsing numbers 2014-10-10 20:22:08 +04:00
Ilmir Usmanov e91cb75dcc Fix locus of strings 2014-10-10 17:14:48 +04:00
Ilmir Usmanov 1dd94c12b2 Fix insert_semicolon 2014-10-08 19:15:25 +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 3d3da5d481 Preparser: new pass to order var_decls prior to parser 2014-10-07 20:14:41 +04:00
Ilmir Usmanov 17ee2eca50 Warn on escape sequences 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 c8b97214fe Parse undefined as simple 2014-10-01 14:30:04 +04:00
Ilmir Usmanov 9d129e15dc Allocate stack memory by chunks 2014-09-30 18:40:24 +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 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 126b8814a8 Add rules to check switch-cases 2014-08-19 16:22:05 +04:00
e.gavrin c5f33d184d fix style errors in libjsparser 2014-08-13 16:23:59 +04:00
e.gavrin 19e71e98e2 fix style error 2014-08-13 15:39:56 +04:00
Ilmir Usmanov 0a68baa479 Add support of floating-point literals 2014-08-12 22:27:12 +04:00
Ilmir Usmanov 5373b60955 Reformat 2014-08-11 23:17:45 +04:00
Ilmir Usmanov 59403ac7f2 Parse empty files correctly 2014-08-01 15:49:35 +04:00
Ilmir Usmanov d15cf8f436 Fix some bugs in lexer 2014-08-01 15:24:48 +04:00
Ruben Ayrapetyan 020325d199 __HOST -> __TARGET_HOST_X64 2014-07-31 22:23:05 +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 bc9d80147a Reduce lexer's memory consumption 2014-07-29 11:55:16 +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 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 764efa41b8 Fix parsing of for-loops. 2014-07-23 20:47:31 +04:00
Ruben Ayrapetyan 26c00acd50 Refinement of src/main.c. 2014-07-23 19:08:06 +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 f264d24b5a Rewrite serializer and lexer: adjust nums' ids, dump strings, nums and rewrites 2014-07-23 17:36:11 +04:00
Ilmir Usmanov 1b2a52da51 Parse blinky 2014-07-23 15:39:01 +04:00
Ruben Ayrapetyan b3b4c74cbe Renaming mem_* identifiers from 'camelCase' to 'underscore_naming'. 2014-07-23 12:54:45 +04:00
e.gavrin 844382be19 Moved scopes of several variables closer to usage; 2014-07-22 21:53:18 +04:00
Ilmir Usmanov efb7009cfb Generate bytecode while parsing 2014-07-22 20:49:51 +04:00
e.gavrin 080fb4aa5a aaa lickser.c 2014-07-17 11:54:31 +04:00
Ilmir Usmanov 87072c6088 Merge with master 2014-07-15 21:42:05 +04:00
Ilmir Usmanov 0647cdd4f1 Add bytecode generator 2014-07-15 19:32:26 +04:00
Ruben Ayrapetyan c9e98171fd Remove inline attributes from src/libjsparser/lexer.c. 2014-07-14 19:53:41 +04:00
Ruben Ayrapetyan 6a27068dbd Move fatal from lexer.c to parser.c, rename it to parser_fatal, replace calls from main.c to parser_fatal with calls to jerry_Exit. 2014-07-10 22:06:09 +04:00
Ruben Ayrapetyan f9ee8960c7 Move fatal from parser.c to lexer.c. 2014-07-10 21:12:26 +04:00
Ruben Ayrapetyan 224c509ff3 Merge with master. 2014-07-10 21:02:48 +04:00
Ruben Ayrapetyan 4cb5fb646e memmove, fprintf. 2014-07-10 19:46:24 +04:00
Ruben Ayrapetyan 76e579d4e1 Remove inclusion of std headers to our headers; move fatal from src/error.h to src/libjsparser/parser.c. 2014-07-10 19:46:24 +04:00
Ilmir Usmanov 1d6aac7839 Fixes in triple-address code parser, 1% tests passed 2014-07-10 18:08:52 +04:00
Ilmir Usmanov 2d4b325d24 Fix warnings 2014-07-10 11:01:40 +04:00