From 1585b4c1a94981d6e8c79c3c95872258d269e587 Mon Sep 17 00:00:00 2001 From: Roland Takacs Date: Fri, 26 Oct 2018 13:15:34 +0200 Subject: [PATCH] Fix type conversion errors in case of TizenRT. JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.uszeged@partner.samsung.com --- jerry-core/ecma/operations/ecma-function-object.c | 2 +- jerry-core/parser/js/js-parser-expr.c | 4 ++-- jerry-core/parser/js/js-parser-statm.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jerry-core/ecma/operations/ecma-function-object.c b/jerry-core/ecma/operations/ecma-function-object.c index d6f8f3db84..81785ed32f 100644 --- a/jerry-core/ecma/operations/ecma-function-object.c +++ b/jerry-core/ecma/operations/ecma-function-object.c @@ -666,7 +666,7 @@ 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; + bool is_class_constructor = (bytecode_data_p->status_flags & CBC_CODE_FLAGS_CONSTRUCTOR) ? true : false; if (is_class_constructor && !ecma_op_function_has_construct_flag (arguments_list_p)) { diff --git a/jerry-core/parser/js/js-parser-expr.c b/jerry-core/parser/js/js-parser-expr.c index fb5c04ae0a..472ccfc479 100644 --- a/jerry-core/parser/js/js-parser-expr.c +++ b/jerry-core/parser/js/js-parser-expr.c @@ -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); + bool is_static = (status_flags & PARSER_CLASS_STATIC_FUNCTION) ? true : false; if (is_computed) { @@ -1281,7 +1281,7 @@ parser_parse_unary_expression (parser_context_t *context_p, /**< context */ break; } - bool is_static = context_p->status_flags & PARSER_CLASS_STATIC_FUNCTION; + bool is_static = (context_p->status_flags & PARSER_CLASS_STATIC_FUNCTION) ? true : false; parser_emit_cbc_ext (context_p, is_static ? CBC_EXT_PUSH_STATIC_SUPER : CBC_EXT_PUSH_SUPER); break; } diff --git a/jerry-core/parser/js/js-parser-statm.c b/jerry-core/parser/js/js-parser-statm.c index 45b47a926b..d793a31ddc 100644 --- a/jerry-core/parser/js/js-parser-statm.c +++ b/jerry-core/parser/js/js-parser-statm.c @@ -2055,7 +2055,7 @@ parser_parse_statements (parser_context_t *context_p) /**< context */ bool return_with_literal = (context_p->last_cbc_opcode == CBC_PUSH_LITERAL); #ifndef CONFIG_DISABLE_ES2015_CLASS - return_with_literal &= !PARSER_IS_CLASS_CONSTRUCTOR_SUPER (context_p->status_flags); + return_with_literal = return_with_literal && !PARSER_IS_CLASS_CONSTRUCTOR_SUPER (context_p->status_flags); #endif /* !CONFIG_DISABLE_ES2015_CLASS */ if (return_with_literal)