Fix 'op=' assignment bytecode dumping in case of arrays
This commit is contained in:
@@ -617,7 +617,7 @@ create_operand_from_tmp_and_lit (idx_t tmp, literal_index_t lit_id)
|
|||||||
{
|
{
|
||||||
if (tmp != LITERAL_TO_REWRITE)
|
if (tmp != LITERAL_TO_REWRITE)
|
||||||
{
|
{
|
||||||
JERRY_ASSERT (lit_id != NOT_A_LITERAL);
|
JERRY_ASSERT (lit_id == NOT_A_LITERAL);
|
||||||
return (operand)
|
return (operand)
|
||||||
{
|
{
|
||||||
.type = OPERAND_TMP,
|
.type = OPERAND_TMP,
|
||||||
@@ -626,7 +626,7 @@ create_operand_from_tmp_and_lit (idx_t tmp, literal_index_t lit_id)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
JERRY_ASSERT (lit_id == NOT_A_LITERAL);
|
JERRY_ASSERT (lit_id != NOT_A_LITERAL);
|
||||||
return (operand)
|
return (operand)
|
||||||
{
|
{
|
||||||
.type = OPERAND_LITERAL,
|
.type = OPERAND_LITERAL,
|
||||||
|
|||||||
@@ -77,3 +77,7 @@ assert (c[0] === 0);
|
|||||||
assert (c[1] === undefined);
|
assert (c[1] === undefined);
|
||||||
assert (c[2] === undefined);
|
assert (c[2] === undefined);
|
||||||
assert (c[3] === '3');
|
assert (c[3] === '3');
|
||||||
|
|
||||||
|
b[0] = 1;
|
||||||
|
c[0] += b[0];
|
||||||
|
assert (c[0] == 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user