Fix reg_var_decl generation.
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user