mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
Fix native_call opcode dumping
This commit is contained in:
parent
4b7871bdde
commit
6aee69d6df
@ -342,6 +342,29 @@ create_op_meta_for_obj (opcode_t (*getop) (idx_t, idx_t), operand *obj)
|
||||
return res;
|
||||
}
|
||||
|
||||
static op_meta
|
||||
create_op_meta_for_native_call (operand res, operand obj)
|
||||
{
|
||||
JERRY_ASSERT (is_native_call (obj));
|
||||
op_meta ret;
|
||||
switch (res.type)
|
||||
{
|
||||
case OPERAND_TMP:
|
||||
{
|
||||
const opcode_t opcode = getop_native_call (res.data.uid, name_to_native_call_id (obj), INVALID_VALUE);
|
||||
ret = create_op_meta_000 (opcode);
|
||||
break;
|
||||
}
|
||||
case OPERAND_LITERAL:
|
||||
{
|
||||
const opcode_t opcode = getop_native_call (LITERAL_TO_REWRITE, name_to_native_call_id (obj), INVALID_VALUE);
|
||||
ret = create_op_meta_100 (opcode, res.data.lit_id);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static op_meta
|
||||
create_op_meta_for_vlt (varg_list_type vlt, operand *res, operand *obj)
|
||||
{
|
||||
@ -355,7 +378,7 @@ create_op_meta_for_vlt (varg_list_type vlt, operand *res, operand *obj)
|
||||
JERRY_ASSERT (obj != NULL);
|
||||
if (is_native_call (*obj))
|
||||
{
|
||||
ret = create_op_meta_for_res_and_obj (getop_native_call, res, obj);
|
||||
ret = create_op_meta_for_native_call (*res, *obj);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user