Fix reg_var_decl generation.

This commit is contained in:
Ilmir Usmanov
2014-09-23 20:05:10 +04:00
parent 6c422fec2e
commit d26b7f9f4e
2 changed files with 10 additions and 29 deletions
+3 -12
View File
@@ -19,29 +19,20 @@
const ecma_char_t *
deserialize_string_by_id (uint8_t id)
{
JERRY_ASSERT (id < bytecode_data.strs_count);
JERRY_ASSERT (bytecode_data.strings[id].str[bytecode_data.strings[id].length] == '\0');
if (id >= bytecode_data.strs_count)
{
return NULL;
}
return ((const ecma_char_t *) bytecode_data.strings[id].str);
}
ecma_number_t
deserialize_num_by_id (uint8_t id)
{
if (id < bytecode_data.strs_count)
{
return 0;
}
JERRY_ASSERT (id >= bytecode_data.strs_count);
id = (uint8_t) (id - bytecode_data.strs_count);
if (id >= bytecode_data.nums_count)
{
return 0;
}
JERRY_ASSERT (id < bytecode_data.nums_count);
return bytecode_data.nums[id];
}