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 -1
View File
@@ -70,9 +70,19 @@ typedef enum
OPCODE_META_TYPE_CATCH_EXCEPTION_IDENTIFIER, /**< literal index containing name of variable with exception object */
OPCODE_META_TYPE_FINALLY, /**< mark of beginning of finally block containing pointer to end of finally block */
OPCODE_META_TYPE_END_TRY_CATCH_FINALLY, /**< mark of end of try-catch, try-finally, try-catch-finally blocks */
OPCODE_META_TYPE_STRICT_CODE /**< mark of beginning of strict code */
OPCODE_META_TYPE_SCOPE_CODE_FLAGS /**< set of flags indicating various properties of the scope's code
* (See also: opcode_scope_code_flags_t) */
} opcode_meta_type;
/**
* Flags indicating various properties of a scope's code
*/
typedef enum : idx_t
{
OPCODE_SCOPE_CODE_FLAGS__NO_FLAGS = (0u), /**< initializer for empty flag set */
OPCODE_SCOPE_CODE_FLAGS_STRICT = (1u << 0), /**< code is strict mode code */
} opcode_scope_code_flags_t;
/**
* Interpreter context
*/