Preparser: new pass to order var_decls prior to parser

This commit is contained in:
Ilmir Usmanov
2014-10-07 20:14:41 +04:00
parent 7f8f03ad20
commit 3d3da5d481
9 changed files with 374 additions and 98 deletions
+4 -3
View File
@@ -91,10 +91,11 @@ serializer_print_opcodes (void)
void
serializer_adjust_strings (void)
{
for (uint8_t i = 0; i < bytecode_data.strs_count; i++)
for (uint8_t i = 0; i < bytecode_data.strs_count; ++i)
{
const ecma_length_t len = bytecode_data.strings[i].length;
((ecma_char_t *) (bytecode_data.strings[i]).str)[len] = '\0';
ecma_length_t len = bytecode_data.strings[i].length;
ecma_char_t *str = bytecode_data.strings[i].str;
str[len] = '\0';
}
}