From 7bc2c69147c8337a1386eba702a086c784a31e7b Mon Sep 17 00:00:00 2001 From: Ruben Ayrapetyan Date: Mon, 13 Jul 2015 21:22:57 +0300 Subject: [PATCH] Temporary workaround (until parser is refactored) for fixing parse of expressions like '1 = 1'. JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com --- jerry-core/parser/js/opcodes-dumper.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/jerry-core/parser/js/opcodes-dumper.cpp b/jerry-core/parser/js/opcodes-dumper.cpp index 3c0586e1e..d55006d05 100644 --- a/jerry-core/parser/js/opcodes-dumper.cpp +++ b/jerry-core/parser/js/opcodes-dumper.cpp @@ -658,6 +658,15 @@ dump_prop_setter_or_triple_address_res (void (*dumper) (operand, operand, operan } else { + if (res.type == OPERAND_TMP) + { + /* + * FIXME: + * Implement correct handling of references through parser operands + */ + PARSE_ERROR (JSP_EARLY_ERROR_REFERENCE, "Invalid left-hand-side expression", LIT_ITERATOR_POS_ZERO); + } + dumper (res, res, op); } STACK_DROP (prop_getters, 1); @@ -2072,6 +2081,14 @@ dump_prop_setter_or_variable_assignment_res (operand res, operand op) } else { + if (res.type == OPERAND_TMP) + { + /* + * FIXME: + * Implement correct handling of references through parser operands + */ + PARSE_ERROR (JSP_EARLY_ERROR_REFERENCE, "Invalid left-hand-side expression", LIT_ITERATOR_POS_ZERO); + } dump_variable_assignment (res, op); } STACK_DROP (prop_getters, 1);