Repository: jerryscript-project/jerryscript
File: jerry-core/ecma/base/ecma-globals.h (C/C++)

Code before:
 * Return the size of a BigInt value in ecma_bigint_data_t units.
 */
#define ECMA_BIGINT_GET_SIZE(value_p) \
  ((value_p)->u.bigint_sign_and_size & ~(uint32_t) (sizeof (ecma_bigint_digit_t) - 1))

/**
 * Size of memory needs to be allocated for the digits of a BigInt.
 * The value is rounded up for two digits.
 */
#define ECMA_BIGINT_GET_BYTE_SIZE(size) \
  (size_t) (((size) + sizeof (ecma_bigint_digit_t)) & ~(2 * sizeof (ecma_bigint_digit_t) - 1))

#endif /* JERRY_BUILTIN_BIGINT */

/**
 * Struct for counting the different types properties in objects
 */
typedef struct
{
  uint32_t array_index_named_props; /**< number of array index named properties */
  uint32_t string_named_props; /**< number of string named properties */
  uint32_t symbol_named_props; /**< number of symbol named properties */
  uint32_t lazy_string_named_props; /**< number of lazy instantiated string properties */
  uint32_t lazy_symbol_named_props; /**< number of lazy instantiated symbol properties */
} ecma_property_counter_t;

/**
 * Arguments object related status flags
 */
typedef enum
{
  ECMA_ARGUMENTS_OBJECT_NO_FLAGS = 0,                    /* unmapped arguments object */
  ECMA_ARGUMENTS_OBJECT_MAPPED = (1 << 0),               /* mapped arguments object */
  ECMA_ARGUMENTS_OBJECT_STATIC_BYTECODE = (1 << 1),      /* static mapped arguments object */
  ECMA_ARGUMENTS_OBJECT_CALLEE_INITIALIZED = (1 << 2),   /* 'callee' property has been lazy initialized */
  ECMA_ARGUMENTS_OBJECT_CALLER_INITIALIZED = (1 << 3),   /* 'caller' property has been lazy initialized */
  ECMA_ARGUMENTS_OBJECT_LENGTH_INITIALIZED = (1 << 4),   /* 'length' property has been lazy initialized */
  ECMA_ARGUMENTS_OBJECT_ITERATOR_INITIALIZED = (1 << 5), /* 'Symbol.iterator' property has been lazy initialized */
} ecma_arguments_object_flags_t;

/**
 * Definition of unmapped arguments object
 */
typedef struct
{
  ecma_extended_object_t header; /**< object header */
  ecma_value_t callee; /**< 'callee' property */
} ecma_unmapped_arguments_t;

/**
 * Definition of mapped arguments object

Review comment (bug):
Oh, sorry comment at the wrong place. it's should be here.
```
#define ECMA_CHECK_STACK_USAGE() \
JERRY_BLOCK_TAIL_CALL_OPTIMIZATION (); \
ECMA_CHECK_STACK_USAGE_RETURN(ECMA_VALUE_ERROR)
```



Code after:

/**
 * Bitshift index for the symbol hash property
 */
#define ECMA_SYMBOL_HASH_SHIFT 2

#if (JERRY_STACK_LIMIT != 0)
/**
 * Check the current stack usage. If the limit is reached a RangeError is raised.
 * The macro argument specifies the return value which is usally ECMA_VALUE_ERROR or NULL.
 */
#define ECMA_CHECK_STACK_USAGE_RETURN(RETURN_VALUE) \
do \
{ \
  if (ecma_get_current_stack_usage () > CONFIG_MEM_STACK_LIMIT) \
  { \
    ecma_raise_range_error (ECMA_ERR_MSG ("Maximum call stack size exceeded")); \
    return RETURN_VALUE; \
  } \
} while (0)

/**
 * Specialized version of ECMA_CHECK_STACK_USAGE_RETURN which returns ECMA_VALUE_ERROR.
 * This version should be used in most cases.
 */
#define ECMA_CHECK_STACK_USAGE() ECMA_CHECK_STACK_USAGE_RETURN(ECMA_VALUE_ERROR)
#else /* JERRY_STACK_LIMIT == 0) */
/**
 * If the stack limit is unlimited, this check is an empty macro.
 */
#define ECMA_CHECK_STACK_USAGE_RETURN(RETURN_VALUE)

/**
 * If the stack limit is unlimited, this check is an empty macro.
 */
#define ECMA_CHECK_STACK_USAGE()
#endif /* (JERRY_STACK_LIMIT != 0) */

/**
 * Invalid object pointer which represents abrupt completion
 */
#define ECMA_OBJECT_POINTER_ERROR ((ecma_object_t *) 0x01)

/**
 * Invalid property pointer which represents abrupt completion
 */
#define ECMA_PROPERTY_POINTER_ERROR ((ecma_property_t *) 0x01)

#if JERRY_BUILTIN_PROXY

/**