Replace vera++ with clang-format (#4518)

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
This commit is contained in:
Robert Fancsik
2021-11-05 14:15:47 +01:00
committed by GitHub
parent bc091e1742
commit badfdf4dba
564 changed files with 10195 additions and 15090 deletions
@@ -19,13 +19,12 @@
#include "ecma-builtins.h"
#include "ecma-exceptions.h"
#include "ecma-function-object.h"
#include "ecma-gc.h"
#include "ecma-helpers.h"
#include "ecma-lex-env.h"
#include "ecma-objects.h"
#include "ecma-function-object.h"
#include "ecma-objects-general.h"
#include "ecma-objects.h"
#include "ecma-reference.h"
/** \addtogroup ecma ECMA
@@ -48,8 +47,7 @@ ecma_op_get_value_lex_env_base (ecma_object_t *lex_env_p, /**< lexical environme
ecma_object_t **ref_base_lex_env_p, /**< [out] reference's base (lexical environment) */
ecma_string_t *name_p) /**< variable name */
{
JERRY_ASSERT (lex_env_p != NULL
&& ecma_is_lexical_environment (lex_env_p));
JERRY_ASSERT (lex_env_p != NULL && ecma_is_lexical_environment (lex_env_p));
while (true)
{
@@ -174,8 +172,7 @@ ecma_op_get_value_object_base (ecma_value_t base_value, /**< base value */
uint32_t index = ecma_string_get_array_index (property_name_p);
if (index != ECMA_STRING_NOT_ARRAY_INDEX
&& index < ecma_string_get_length (string_p))
if (index != ECMA_STRING_NOT_ARRAY_INDEX && index < ecma_string_get_length (string_p))
{
ecma_char_t char_at_idx = ecma_string_get_char_at_pos (string_p, index);
return ecma_make_string_value (ecma_new_ecma_string_from_code_unit (char_at_idx));
@@ -231,8 +228,7 @@ ecma_op_put_value_lex_env_base (ecma_object_t *lex_env_p, /**< lexical environme
bool is_strict, /**< flag indicating strict mode */
ecma_value_t value) /**< ECMA-value */
{
JERRY_ASSERT (lex_env_p != NULL
&& ecma_is_lexical_environment (lex_env_p));
JERRY_ASSERT (lex_env_p != NULL && ecma_is_lexical_environment (lex_env_p));
while (true)
{
@@ -257,11 +253,9 @@ ecma_op_put_value_lex_env_base (ecma_object_t *lex_env_p, /**< lexical environme
#if JERRY_ESNEXT
ecma_property_value_t *property_value_p = ECMA_PROPERTY_VALUE_PTR (property_p);
JERRY_ASSERT (!(*property_p & ECMA_PROPERTY_FLAG_WRITABLE)
|| (*property_p & ECMA_PROPERTY_FLAG_DATA));
JERRY_ASSERT (!(*property_p & ECMA_PROPERTY_FLAG_WRITABLE) || (*property_p & ECMA_PROPERTY_FLAG_DATA));
if ((*property_p & ECMA_PROPERTY_FLAG_WRITABLE)
&& property_value_p->value != ECMA_VALUE_UNINITIALIZED)
if ((*property_p & ECMA_PROPERTY_FLAG_WRITABLE) && property_value_p->value != ECMA_VALUE_UNINITIALIZED)
{
ecma_named_data_property_assign_value (lex_env_p, property_value_p, value);
return ECMA_VALUE_EMPTY;
@@ -296,10 +290,7 @@ ecma_op_put_value_lex_env_base (ecma_object_t *lex_env_p, /**< lexical environme
if (ecma_is_value_true (has_property))
{
ecma_value_t completion = ecma_op_object_put (binding_obj_p,
name_p,
value,
is_strict);
ecma_value_t completion = ecma_op_object_put (binding_obj_p, name_p, value, is_strict);
if (ECMA_IS_VALUE_ERROR (completion))
{
@@ -335,10 +326,7 @@ ecma_op_put_value_lex_env_base (ecma_object_t *lex_env_p, /**< lexical environme
#endif /* JERRY_ERROR_MESSAGES */
}
ecma_value_t completion = ecma_op_object_put (ecma_get_lex_env_binding_object (lex_env_p),
name_p,
value,
false);
ecma_value_t completion = ecma_op_object_put (ecma_get_lex_env_binding_object (lex_env_p), name_p, value, false);
JERRY_ASSERT (ecma_is_value_boolean (completion));