@@ -2383,6 +2383,14 @@ dump_variable_declaration (literal_index_t lit_id)
2383
2383
serializer_dump_op_meta (create_op_meta_100 (opcode, lit_id));
2384
2384
}
2385
2385
2386
+ /* *
2387
+ * Dump template of 'meta' instruction for scope's code flags.
2388
+ *
2389
+ * Note:
2390
+ * the instruction's flags field is written later (see also: rewrite_scope_code_flags).
2391
+ *
2392
+ * @return position of dumped instruction
2393
+ */
2386
2394
opcode_counter_t
2387
2395
dump_scope_code_flags_for_rewrite (void )
2388
2396
{
@@ -2392,19 +2400,27 @@ dump_scope_code_flags_for_rewrite (void)
2392
2400
serializer_dump_op_meta (create_op_meta_000 (opcode));
2393
2401
2394
2402
return oc;
2395
- }
2403
+ } /* dump_scope_code_flags_for_rewrite */
2396
2404
2405
+ /* *
2406
+ * Write scope's code flags to specified 'meta' instruction template,
2407
+ * dumped earlier (see also: dump_scope_code_flags_for_rewrite).
2408
+ */
2397
2409
void
2398
- rewrite_scope_code_flags (opcode_counter_t scope_code_flags_oc,
2399
- opcode_scope_code_flags_t scope_flags)
2410
+ rewrite_scope_code_flags (opcode_counter_t scope_code_flags_oc, /* *< position of instruction to rewrite */
2411
+ opcode_scope_code_flags_t scope_flags) /* *< scope's code properties flags set */
2400
2412
{
2401
2413
JERRY_ASSERT ((idx_t ) scope_flags == scope_flags);
2402
2414
2403
2415
op_meta opm = serializer_get_op_meta (scope_code_flags_oc);
2404
2416
JERRY_ASSERT (opm.op .op_idx == OPCODE (meta));
2417
+ JERRY_ASSERT (opm.op .data .meta .type == OPCODE_META_TYPE_SCOPE_CODE_FLAGS);
2418
+ JERRY_ASSERT (opm.op .data .meta .data_1 == INVALID_VALUE);
2419
+ JERRY_ASSERT (opm.op .data .meta .data_2 == INVALID_VALUE);
2420
+
2405
2421
opm.op .data .meta .data_1 = (idx_t ) scope_flags;
2406
2422
serializer_rewrite_op_meta (scope_code_flags_oc, opm);
2407
- }
2423
+ } /* rewrite_scope_code_flags */
2408
2424
2409
2425
void
2410
2426
dump_ret (void )
0 commit comments