Remove unnecessary cbc_code_flag (#2443)

The removed flag can be substituted with the combination of two existing ones.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2018-07-31 20:15:27 +02:00
committed by Dániel Bátyai
parent ba76b506f5
commit 1f20bb3fe5
7 changed files with 24 additions and 23 deletions
+6 -6
View File
@@ -420,7 +420,7 @@ static_snapshot_add_compiled_code (ecma_compiled_code_t *compiled_code_p, /**< c
}
}
if (compiled_code_p->status_flags & CBC_CODE_FLAGS_NON_STRICT_ARGUMENTS_NEEDED)
if (CBC_NON_STRICT_ARGUMENTS_NEEDED (compiled_code_p))
{
buffer_p += ((size_t) compiled_code_p->size) << JMEM_ALIGNMENT_LOG;
literal_start_p = ((ecma_value_t *) buffer_p) - argument_end;
@@ -492,7 +492,7 @@ jerry_snapshot_set_offsets (uint32_t *buffer_p, /**< buffer */
}
}
if (bytecode_p->status_flags & CBC_CODE_FLAGS_NON_STRICT_ARGUMENTS_NEEDED)
if (CBC_NON_STRICT_ARGUMENTS_NEEDED (bytecode_p))
{
uint8_t *byte_p = (uint8_t *) bytecode_p;
byte_p += ((size_t) bytecode_p->size) << JMEM_ALIGNMENT_LOG;
@@ -585,7 +585,7 @@ snapshot_load_compiled_code (const uint8_t *base_addr_p, /**< base address of th
uint8_t *byte_p = (uint8_t *) bytecode_p;
cbc_uint16_arguments_t *args_p = (cbc_uint16_arguments_t *) byte_p;
if (bytecode_p->status_flags & CBC_CODE_FLAGS_NON_STRICT_ARGUMENTS_NEEDED)
if (CBC_NON_STRICT_ARGUMENTS_NEEDED (bytecode_p))
{
argument_end = args_p->argument_end;
}
@@ -599,7 +599,7 @@ snapshot_load_compiled_code (const uint8_t *base_addr_p, /**< base address of th
uint8_t *byte_p = (uint8_t *) bytecode_p;
cbc_uint8_arguments_t *args_p = (cbc_uint8_arguments_t *) byte_p;
if (bytecode_p->status_flags & CBC_CODE_FLAGS_NON_STRICT_ARGUMENTS_NEEDED)
if (CBC_NON_STRICT_ARGUMENTS_NEEDED (bytecode_p))
{
argument_end = args_p->argument_end;
}
@@ -1092,7 +1092,7 @@ scan_snapshot_functions (const uint8_t *buffer_p, /**< snapshot buffer start */
}
}
if (bytecode_p->status_flags & CBC_CODE_FLAGS_NON_STRICT_ARGUMENTS_NEEDED)
if (CBC_NON_STRICT_ARGUMENTS_NEEDED (bytecode_p))
{
uint8_t *byte_p = (uint8_t *) bytecode_p;
byte_p += ((size_t) bytecode_p->size) << JMEM_ALIGNMENT_LOG;
@@ -1170,7 +1170,7 @@ update_literal_offsets (uint8_t *buffer_p, /**< snapshot buffer start */
}
}
if (bytecode_p->status_flags & CBC_CODE_FLAGS_NON_STRICT_ARGUMENTS_NEEDED)
if (CBC_NON_STRICT_ARGUMENTS_NEEDED (bytecode_p))
{
uint8_t *byte_p = (uint8_t *) bytecode_p;
byte_p += ((size_t) bytecode_p->size) << JMEM_ALIGNMENT_LOG;
+1 -1
View File
@@ -41,7 +41,7 @@ typedef struct
/**
* Jerry snapshot format version.
*/
#define JERRY_SNAPSHOT_VERSION (15u)
#define JERRY_SNAPSHOT_VERSION (16u)
/**
* Snapshot configuration flags.