Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ ecma_builtin_number_prototype_object_to_fixed (ecma_value_t this_arg, /**< this
num_digits + 1,
exponent + frac_digits,
&exponent,
ecma_number_is_zero (this_num) ? true : false);
ecma_number_is_zero (this_num));

/* Buffer that is used to construct the string. */
int buffer_size = (exponent > 0) ? exponent + frac_digits + 2 : frac_digits + 3;
Expand Down
8 changes: 4 additions & 4 deletions jerry-core/ecma/operations/ecma-function-object.c
Original file line number Diff line number Diff line change
Expand Up @@ -666,16 +666,16 @@ ecma_op_function_call (ecma_object_t *func_obj_p, /**< Function object */
const ecma_compiled_code_t *bytecode_data_p = ecma_op_function_get_compiled_code (ext_func_p);

#ifndef CONFIG_DISABLE_ES2015_CLASS
bool is_class_constructor = (bytecode_data_p->status_flags & CBC_CODE_FLAGS_CONSTRUCTOR) ? true : false;
bool is_class_constructor = (bool) (bytecode_data_p->status_flags & CBC_CODE_FLAGS_CONSTRUCTOR);

if (is_class_constructor && !ecma_op_function_has_construct_flag (arguments_list_p))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Class constructor cannot be invoked without 'new'."));
}
#endif /* !CONFIG_DISABLE_ES2015_CLASS */

bool is_strict = (bytecode_data_p->status_flags & CBC_CODE_FLAGS_STRICT_MODE) ? true : false;
bool is_no_lex_env = (bytecode_data_p->status_flags & CBC_CODE_FLAGS_LEXICAL_ENV_NOT_NEEDED) ? true : false;
bool is_strict = (bool) (bytecode_data_p->status_flags & CBC_CODE_FLAGS_STRICT_MODE);
bool is_no_lex_env = (bool) (bytecode_data_p->status_flags & CBC_CODE_FLAGS_LEXICAL_ENV_NOT_NEEDED);

/* 1. */
if (!is_strict)
Expand Down Expand Up @@ -775,7 +775,7 @@ ecma_op_function_call (ecma_object_t *func_obj_p, /**< Function object */

const ecma_compiled_code_t *bytecode_data_p = ecma_op_arrow_function_get_compiled_code (arrow_func_p);

is_no_lex_env = (bytecode_data_p->status_flags & CBC_CODE_FLAGS_LEXICAL_ENV_NOT_NEEDED) ? true : false;
is_no_lex_env = (bool) (bytecode_data_p->status_flags & CBC_CODE_FLAGS_LEXICAL_ENV_NOT_NEEDED);

ecma_object_t *local_env_p = scope_p;

Expand Down
2 changes: 1 addition & 1 deletion jerry-core/parser/js/js-lexer.c
Original file line number Diff line number Diff line change
Expand Up @@ -2175,7 +2175,7 @@ lexer_construct_regexp_object (parser_context_t *context_p, /**< context */
current_flags);
ecma_deref_ecma_string (pattern_str_p);

bool is_throw = ECMA_IS_VALUE_ERROR (completion_value) ? true : false;
bool is_throw = (bool) ECMA_IS_VALUE_ERROR (completion_value);

ecma_free_value (completion_value);

Expand Down
4 changes: 2 additions & 2 deletions jerry-core/parser/js/js-parser-expr.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ parser_parse_class_literal (parser_context_t *context_p) /**< context */
JERRY_ASSERT (context_p->last_cbc_opcode == CBC_PUSH_LITERAL);

cbc_ext_opcode_t opcode;
bool is_static = (status_flags & PARSER_CLASS_STATIC_FUNCTION) ? true : false;
bool is_static = (bool) (status_flags & PARSER_CLASS_STATIC_FUNCTION);

if (is_computed)
{
Expand Down Expand Up @@ -1334,7 +1334,7 @@ parser_parse_unary_expression (parser_context_t *context_p, /**< context */
break;
}

bool is_static = (context_p->status_flags & PARSER_CLASS_STATIC_FUNCTION) ? true : false;
bool is_static = (bool) (context_p->status_flags & PARSER_CLASS_STATIC_FUNCTION);
parser_emit_cbc_ext (context_p, is_static ? CBC_EXT_PUSH_STATIC_SUPER : CBC_EXT_PUSH_SUPER);
break;
}
Expand Down