Commit Graph

6 Commits

Author SHA1 Message Date
Ruben Ayrapetyan 005b5370fc Switching to g++ and corresponding changes according to C++ requirements. 2015-01-16 17:27:02 +03:00
Ilmir Usmanov 7e7bdc2aac Rework literal indexes hash table to simple array in order to improve performance 2014-12-15 22:56:22 +03:00
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 8a517ab03e Add support of octal integer literals 2014-10-13 17:45:20 +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