Introducing 'scope flags' opcode containing set of flags that indicate various properties of a scope; replacing 'strict mode' meta opcode with a flag in the flags set.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
This commit is contained in:
Ruben Ayrapetyan
2015-05-26 16:54:18 +03:00
parent e984bc30ea
commit cb600da269
10 changed files with 81 additions and 25 deletions
+11 -2
View File
@@ -625,9 +625,18 @@ pp_op_meta (opcode_counter_t oc, op_meta opm, bool rewrite)
printf ("end try");
break;
}
case OPCODE_META_TYPE_STRICT_CODE:
case OPCODE_META_TYPE_SCOPE_CODE_FLAGS:
{
printf ("use strict;");
idx_t scope_flags = opm.op.data.meta.data_1;
if (scope_flags & OPCODE_SCOPE_CODE_FLAGS_STRICT)
{
printf ("[use strict] ");
scope_flags &= (idx_t) ~(OPCODE_SCOPE_CODE_FLAGS_STRICT);
}
JERRY_ASSERT (scope_flags == 0);
break;
}
default: