Fixes for interpreter.*
This commit is contained in:
@@ -24,7 +24,8 @@
|
|||||||
#include "jerry-libc.h"
|
#include "jerry-libc.h"
|
||||||
|
|
||||||
#define INIT_OP_FUNC(name) [ __op__idx_##name ] = opfunc_##name,
|
#define INIT_OP_FUNC(name) [ __op__idx_##name ] = opfunc_##name,
|
||||||
static const opfunc __opfuncs[LAST_OP] = {
|
static const opfunc __opfuncs[LAST_OP] =
|
||||||
|
{
|
||||||
OP_LIST (INIT_OP_FUNC)
|
OP_LIST (INIT_OP_FUNC)
|
||||||
};
|
};
|
||||||
#undef INIT_OP_FUNC
|
#undef INIT_OP_FUNC
|
||||||
@@ -134,7 +135,8 @@ run_int_from_pos (opcode_counter_t start_pos,
|
|||||||
|
|
||||||
JERRY_ASSERT (!ecma_is_completion_value_normal (completion)
|
JERRY_ASSERT (!ecma_is_completion_value_normal (completion)
|
||||||
|| ecma_is_empty_completion_value (completion));
|
|| ecma_is_empty_completion_value (completion));
|
||||||
} while ( completion.type == ECMA_COMPLETION_TYPE_NORMAL );
|
}
|
||||||
|
while (completion.type == ECMA_COMPLETION_TYPE_NORMAL);
|
||||||
|
|
||||||
if (completion.type == ECMA_COMPLETION_TYPE_BREAK)
|
if (completion.type == ECMA_COMPLETION_TYPE_BREAK)
|
||||||
{
|
{
|
||||||
@@ -176,7 +178,8 @@ try_get_string_by_idx(T_IDX idx, /**< literal id */
|
|||||||
const ecma_char_t *str_p = deserialize_string_by_id (idx);
|
const ecma_char_t *str_p = deserialize_string_by_id (idx);
|
||||||
JERRY_ASSERT (str_p != NULL);
|
JERRY_ASSERT (str_p != NULL);
|
||||||
|
|
||||||
FIXME( strlen for ecma_char_t );
|
FIXME (ecma_char_t strlen);
|
||||||
|
|
||||||
ssize_t req_length = (ssize_t)__strlen ((const char*)str_p) + 1;
|
ssize_t req_length = (ssize_t)__strlen ((const char*)str_p) + 1;
|
||||||
|
|
||||||
if (buffer_size < req_length)
|
if (buffer_size < req_length)
|
||||||
@@ -184,7 +187,8 @@ try_get_string_by_idx(T_IDX idx, /**< literal id */
|
|||||||
return -req_length;
|
return -req_length;
|
||||||
}
|
}
|
||||||
|
|
||||||
FIXME( strncpy for ecma_char_t );
|
FIXME (ecma_char_t strncpy);
|
||||||
|
|
||||||
__strncpy ((char*)buffer_p, (const char*)str_p, (size_t)req_length);
|
__strncpy ((char*)buffer_p, (const char*)str_p, (size_t)req_length);
|
||||||
|
|
||||||
return req_length;
|
return req_length;
|
||||||
|
|||||||
Reference in New Issue
Block a user