Skip to content

Commit 79132d5

Browse files
committed
Format them all
JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
1 parent 4213eac commit 79132d5

29 files changed

+59
-100
lines changed

jerry-core/api/jerryscript.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6583,10 +6583,8 @@ typedef struct
65836583
* List of TypedArray mappings
65846584
*/
65856585
static jerry_typedarray_mapping_t jerry_typedarray_mappings[] = {
6586-
#define TYPEDARRAY_ENTRY(NAME, LIT_NAME, SIZE_SHIFT) \
6587-
{ \
6588-
JERRY_TYPEDARRAY_##NAME, ECMA_BUILTIN_ID_##NAME##ARRAY_PROTOTYPE, ECMA_##LIT_NAME##_ARRAY, SIZE_SHIFT \
6589-
}
6586+
#define TYPEDARRAY_ENTRY(NAME, LIT_NAME, SIZE_SHIFT) \
6587+
{ JERRY_TYPEDARRAY_##NAME, ECMA_BUILTIN_ID_##NAME##ARRAY_PROTOTYPE, ECMA_##LIT_NAME##_ARRAY, SIZE_SHIFT }
65906588

65916589
TYPEDARRAY_ENTRY (UINT8, UINT8, 0), TYPEDARRAY_ENTRY (UINT8CLAMPED, UINT8_CLAMPED, 0),
65926590
TYPEDARRAY_ENTRY (INT8, INT8, 0), TYPEDARRAY_ENTRY (UINT16, UINT16, 1),

jerry-core/ecma/base/ecma-globals.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ typedef struct
569569
* Checks whether a property is raw data property (should only be used in assertions)
570570
*/
571571
#define ECMA_PROPERTY_IS_RAW_DATA(property) \
572-
(((property) &ECMA_PROPERTY_FLAG_DATA) && (property) < ECMA_PROPERTY_INTERNAL)
572+
(((property) & ECMA_PROPERTY_FLAG_DATA) && (property) < ECMA_PROPERTY_INTERNAL)
573573

574574
/**
575575
* Create internal property.
@@ -1337,7 +1337,7 @@ typedef double ecma_number_t;
13371337
/**
13381338
* Value '-1' of ecma_number_t
13391339
*/
1340-
#define ECMA_NUMBER_MINUS_ONE ((ecma_number_t) -1.0f)
1340+
#define ECMA_NUMBER_MINUS_ONE ((ecma_number_t) - 1.0f)
13411341

13421342
/**
13431343
* Maximum number of characters in string representation of ecma-number
@@ -1603,7 +1603,7 @@ typedef struct
16031603
* Set the size of an ecma ASCII string
16041604
*/
16051605
#define ECMA_ASCII_STRING_SET_SIZE(string_p, size) \
1606-
(*((lit_utf8_byte_t *) (string_p) + sizeof (ecma_string_t)) = (uint8_t) ((size) -1))
1606+
(*((lit_utf8_byte_t *) (string_p) + sizeof (ecma_string_t)) = (uint8_t) ((size) - 1))
16071607

16081608
/**
16091609
* Get the start position of the string buffer of an ecma ASCII string

jerry-core/ecma/base/ecma-helpers-number.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ ecma_number_t ecma_number_create (bool sign, uint32_t biased_exp, uint64_t fract
130130
*
131131
* See also: ECMA_262 v6, 20.1.2.8
132132
*/
133-
#define ECMA_NUMBER_MIN_SAFE_INTEGER ((ecma_number_t) -0x1FFFFFFFFFFFFF)
133+
#define ECMA_NUMBER_MIN_SAFE_INTEGER ((ecma_number_t) - 0x1FFFFFFFFFFFFF)
134134

135135
/**
136136
* Number.MAX_VALUE exponent part

jerry-core/ecma/base/ecma-property-hashmap.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,19 @@ static const uint8_t ecma_property_hashmap_steps[ECMA_PROPERTY_HASHMAP_NUMBER_OF
5151
/**
5252
* Get the value of a bit in a bitmap.
5353
*/
54-
#define ECMA_PROPERTY_HASHMAP_GET_BIT(byte_p, index) ((byte_p)[(index) >> 3] & (1 << ((index) &0x7)))
54+
#define ECMA_PROPERTY_HASHMAP_GET_BIT(byte_p, index) ((byte_p)[(index) >> 3] & (1 << ((index) & 0x7)))
5555

5656
/**
5757
* Clear the value of a bit in a bitmap.
5858
*/
5959
#define ECMA_PROPERTY_HASHMAP_CLEAR_BIT(byte_p, index) \
60-
((byte_p)[(index) >> 3] = (uint8_t) ((byte_p)[(index) >> 3] & ~(1 << ((index) &0x7))))
60+
((byte_p)[(index) >> 3] = (uint8_t) ((byte_p)[(index) >> 3] & ~(1 << ((index) & 0x7))))
6161

6262
/**
6363
* Set the value of a bit in a bitmap.
6464
*/
6565
#define ECMA_PROPERTY_HASHMAP_SET_BIT(byte_p, index) \
66-
((byte_p)[(index) >> 3] = (uint8_t) ((byte_p)[(index) >> 3] | (1 << ((index) &0x7))))
66+
((byte_p)[(index) >> 3] = (uint8_t) ((byte_p)[(index) >> 3] | (1 << ((index) & 0x7))))
6767

6868
/**
6969
* Create a new property hashmap for the object.

jerry-core/ecma/builtin-objects/ecma-builtin-async-generator-prototype.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ enum
6363
* Convert routine type to operation type.
6464
*/
6565
#define ECMA_ASYNC_GENERATOR_ROUTINE_TO_OPERATION(type) \
66-
((ecma_async_generator_operation_type_t) ((type) -ECMA_ASYNC_GENERATOR_PROTOTYPE_ROUTINE_NEXT))
66+
((ecma_async_generator_operation_type_t) ((type) - ECMA_ASYNC_GENERATOR_PROTOTYPE_ROUTINE_NEXT))
6767

6868
JERRY_STATIC_ASSERT (ECMA_ASYNC_GENERATOR_ROUTINE_TO_OPERATION (ECMA_ASYNC_GENERATOR_PROTOTYPE_ROUTINE_NEXT)
6969
== ECMA_ASYNC_GENERATOR_DO_NEXT,

jerry-core/ecma/builtin-objects/ecma-builtin-date-prototype.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
* Checks whether the function uses UTC time zone.
4040
*/
4141
#define BUILTIN_DATE_FUNCTION_IS_UTC(builtin_routine_id) \
42-
(((builtin_routine_id) -ECMA_DATE_PROTOTYPE_GET_FULL_YEAR) & 0x1)
42+
(((builtin_routine_id) - ECMA_DATE_PROTOTYPE_GET_FULL_YEAR) & 0x1)
4343

4444
/**
4545
* List of built-in routine identifiers.

jerry-core/ecma/builtin-objects/ecma-builtin-generator-prototype.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ enum
6161
* Convert routine type to operation type.
6262
*/
6363
#define ECMA_GENERATOR_ROUTINE_TO_OPERATION(type) \
64-
((ecma_iterator_command_type_t) ((type) -ECMA_GENERATOR_PROTOTYPE_ROUTINE_NEXT))
64+
((ecma_iterator_command_type_t) ((type) - ECMA_GENERATOR_PROTOTYPE_ROUTINE_NEXT))
6565

6666
JERRY_STATIC_ASSERT (ECMA_GENERATOR_ROUTINE_TO_OPERATION (ECMA_GENERATOR_PROTOTYPE_ROUTINE_NEXT) == ECMA_ITERATOR_NEXT,
6767
convert_ecma_generator_routine_next_to_ecma_iterator_next_failed);

jerry-core/ecma/builtin-objects/ecma-builtins.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ typedef enum
5757
/**
5858
* Get routine length
5959
*/
60-
#define ECMA_GET_ROUTINE_LENGTH(value) ((uint8_t) ((value) &0xf))
60+
#define ECMA_GET_ROUTINE_LENGTH(value) ((uint8_t) ((value) & 0xf))
6161

6262
/**
6363
* Get routine ID
@@ -72,7 +72,7 @@ typedef enum
7272
/**
7373
* Get accessor setter ID
7474
*/
75-
#define ECMA_ACCESSOR_READ_WRITE_GET_SETTER_ID(value) ((uint8_t) ((value) &0xff))
75+
#define ECMA_ACCESSOR_READ_WRITE_GET_SETTER_ID(value) ((uint8_t) ((value) & 0xff))
7676

7777
/**
7878
* Get accessor getter ID

jerry-core/ecma/operations/ecma-big-uint.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ typedef enum
7575
/**
7676
* Returns with the type of the operation.
7777
*/
78-
#define ECMA_BIGINT_BITWISE_GET_OPERATION_TYPE(operation_and_options) ((operation_and_options) &0xf)
78+
#define ECMA_BIGINT_BITWISE_GET_OPERATION_TYPE(operation_and_options) ((operation_and_options) & 0xf)
7979

8080
/**
8181
* Options for bitwise operations.

jerry-core/ecma/operations/ecma-bigint.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ ecma_bigint_to_string (ecma_value_t value, /**< BigInt value */
250250
/**
251251
* Get the size of zero digits from the result of ecma_bigint_number_to_digits
252252
*/
253-
#define ECMA_BIGINT_NUMBER_TO_DIGITS_GET_ZERO_SIZE(value) (((value) &0xffff) * (uint32_t) sizeof (ecma_bigint_digit_t))
253+
#define ECMA_BIGINT_NUMBER_TO_DIGITS_GET_ZERO_SIZE(value) (((value) & 0xffff) * (uint32_t) sizeof (ecma_bigint_digit_t))
254254

255255
/**
256256
* Get the number of digits from the result of ecma_bigint_number_to_digits

0 commit comments

Comments
 (0)