Commit Graph

10 Commits

Author SHA1 Message Date
Ilmir Usmanov dc8ab27900 Split parser into parser itself, opcodes dumper and syntax errors checker.
Add internal hash map of literal indexes:
  In this hash map key is pair of block number and literal's unique identifier in the block, and the value is a literal index that unique in the whole program.
  Block is a continues array of opcodes. So, bytecode is splitted into blocks.
  Each block has its own uid counter. To get literal index the interpreter looks up it in the hash map.
  Thus, now JS program is able to have more than 255 identifiers/string literals.
  The first 128 (0-127) uids are reserved for block's uid counter, the other 128 (128-255) are reserved for tmp variables.
2014-12-10 18:31:59 +03:00
Ilmir Usmanov 8c7dc08d93 Add literals - replacements of strings and numbers in parser. 2014-10-31 21:22:52 +04:00
Ilmir Usmanov 64e286f766 Enable pretty-printer only on host and debug 2014-10-14 15:06:21 +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
e.gavrin a99907670b OPCODE define replaced with opcode_t. T_IDX define replaced with idx_t. 2014-08-23 00:53:41 +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
Ilmir Usmanov 5690be49dd Move serializer and deserializer to liboptimizer 2014-08-06 20:32:16 +04:00