Fix 'op=' assignment bytecode dumping in case of arrays

This commit is contained in:
Ilmir Usmanov 2014-12-10 19:20:33 +03:00
parent dc8ab27900
commit 4b7871bdde
2 changed files with 6 additions and 2 deletions

View File

@ -617,7 +617,7 @@ create_operand_from_tmp_and_lit (idx_t tmp, literal_index_t lit_id)
{
if (tmp != LITERAL_TO_REWRITE)
{
JERRY_ASSERT (lit_id != NOT_A_LITERAL);
JERRY_ASSERT (lit_id == NOT_A_LITERAL);
return (operand)
{
.type = OPERAND_TMP,
@ -626,7 +626,7 @@ create_operand_from_tmp_and_lit (idx_t tmp, literal_index_t lit_id)
}
else
{
JERRY_ASSERT (lit_id == NOT_A_LITERAL);
JERRY_ASSERT (lit_id != NOT_A_LITERAL);
return (operand)
{
.type = OPERAND_LITERAL,

View File

@ -77,3 +77,7 @@ assert (c[0] === 0);
assert (c[1] === undefined);
assert (c[2] === undefined);
assert (c[3] === '3');
b[0] = 1;
c[0] += b[0];
assert (c[0] == 1);