Implement parse of for-in statement.

JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
This commit is contained in:
Ruben Ayrapetyan
2015-06-25 01:20:31 +03:00
parent b988fe2fce
commit 507411f0a0
6 changed files with 540 additions and 9 deletions
+6
View File
@@ -232,6 +232,7 @@ pp_op_meta (const opcode_t *opcodes_p,
PP_OP (delete_prop, "%s = delete %s.%s;");
PP_OP (typeof, "%s = typeof %s;");
PP_OP (with, "with (%s);");
PP_OP (for_in, "for_in (%s);");
case NAME_TO_ID (is_true_jmp_up): printf ("if (%s) goto %d;", VAR (1), oc - OC (2, 3)); break;
case NAME_TO_ID (is_false_jmp_up): printf ("if (%s == false) goto %d;", VAR (1), oc - OC (2, 3)); break;
case NAME_TO_ID (is_true_jmp_down): printf ("if (%s) goto %d;", VAR (1), oc + OC (2, 3)); break;
@@ -554,6 +555,11 @@ pp_op_meta (const opcode_t *opcodes_p,
printf ("end with;");
break;
}
case OPCODE_META_TYPE_END_FOR_IN:
{
printf ("end for-in;");
break;
}
case OPCODE_META_TYPE_FUNCTION_END:
{
printf ("function end: %d;", oc + OC (2, 3));