78 Commits

Author SHA1 Message Date
Ilmir Usmanov
64e286f766 Enable pretty-printer only on host and debug 2014-10-14 15:06:21 +04:00
Ruben Ayrapetyan
c4ba033970 Renaming ERR_MEMORY -> ERR_OUT_OF_MEMORY. 2014-10-14 14:08:38 +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
Ruben Ayrapetyan
30008f8dc5 Splitting ERR_GENERAL error code in ERR_FAILED_INTERNAL_ASSERTION and ERR_UNIMPLEMENTED_CASE; introducing ERR_FAILED_ASSERTION_IN_SCRIPT error code for handling non-zero script's exit values. 2014-09-18 14:02:34 +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
cd41b236d9 Statistics of memory usage during interpretation. 2014-09-16 21:19:07 +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
Ruben Ayrapetyan
0cd5fbfd81 Adding src/main.c to cppcheck and vera++ source list. 2014-08-14 17:55:46 +04:00
Ruben Ayrapetyan
6553daa22b Limiting data and stack size by setrlimit. 2014-08-14 16:08:06 +04:00
Ilmir Usmanov
0a68baa479 Add support of floating-point literals 2014-08-12 22:27:12 +04:00
e.gavrin
3a388b07a1 Add several checking rules. Add some fixes. Force vera++ to produce error 2014-08-09 00:41:24 +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
Ruben Ayrapetyan
137ace24db Handling return value of run_int by setting exit code. 2014-08-06 13:06:55 +04:00
e.gavrin
f247162255 add out dir to git ignore. clean up main.c 2014-08-05 14:23:17 +04:00
Ilmir Usmanov
806b4828af Merge branch 'master' of git-server:jerry 2014-08-01 15:49:57 +04:00
Ruben Ayrapetyan
61dd7a5dd9 nostdlib under libc_raw=1 option. 2014-08-01 15:49:27 +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
Ruben Ayrapetyan
f4a4c91a98 Fixing read_sources: buffer and buffer_size were filled incorrectly. 2014-08-01 14:37:23 +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
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
e.gavrin
7ff82e63c4 fix stm build 2014-07-31 17:58:29 +04:00
e.gavrin
6f7e2ecdbc add --mem-stats flag to print memory usage statistics at exit 2014-07-31 17:56:17 +04:00
e.gavrin
0709c3d07c fix main 2014-07-31 13:35:41 +04:00
e.gavrin
454744d816 add counters to MCU version 2014-07-31 00:26:58 +04:00
e.gavrin
c25db6d7b9 refine peripherals processing. Use libs 2014-07-30 21:57:41 +04:00
Ruben Ayrapetyan
52495b2cc1 Generating version info without header file. 2014-07-30 15:08:02 +04:00
e.gavrin
ab4e59700f add message on top main with info about branch/revision data 2014-07-30 14:43:02 +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
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
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
Ruben Ayrapetyan
5e4078095a Print heap memory usage statistics before exit (host version). 2014-07-25 19:09:10 +04:00
e.gavrin
5da1df37de add led_on, led_off, led_toggle, led_blink_one to lib 2014-07-25 16:29:12 +04:00
e.gavrin
1d42426fa4 Merge branch 'master' of git-server:jerry 2014-07-25 13:18:44 +04:00
e.gavrin
8094de86d1 add wait for stm, move fake_exit to peripheraks 2014-07-25 13:18:31 +04:00
Ilmir Usmanov
c9c26251a4 Add savings bytecode in memory on target 2014-07-25 12:37:29 +04:00
Ilmir Usmanov
1f3b5a4c29 Merge 2014-07-24 19:50:37 +04:00
e.gavrin
c2f82eefc0 add blink_toggle_once 2014-07-24 19:27:19 +04:00
Ilmir Usmanov
ea4278184c Rename deserializer_get_* -> deserialize_* 2014-07-24 12:17:59 +04:00
Ilmir Usmanov
ed4e2a20e4 Add deserializer 2014-07-23 22:55:45 +04:00
Ruben Ayrapetyan
26c00acd50 Refinement of src/main.c. 2014-07-23 19:08:06 +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
Ruben Ayrapetyan
d17e28b7bf Fixing *.stm32f4 builds. 2014-07-23 14:57:37 +04:00