Skip to content

Commit

Permalink
WIP: update formatting
Browse files Browse the repository at this point in the history
TODO: re-enable CI checker for clangformat
  • Loading branch information
matetokodi committed Nov 21, 2023
1 parent fbaa908 commit 0cb8591
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 21 deletions.
1 change: 0 additions & 1 deletion jerry-core/api/jerry-snapshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ typedef struct
bool class_found;
} snapshot_globals_t;


/**
* Write data into the specified buffer.
*
Expand Down
2 changes: 1 addition & 1 deletion jerry-core/ecma/builtin-objects/ecma-builtin-helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ typedef ecma_value_t (*ecma_builtin_helper_sort_compare_fn_t) (ecma_value_t lhs,
ecma_value_t rhs, /**< right value */
ecma_value_t compare_func, /**< compare function */
ecma_object_t *array_buffer_p /**< arrayBuffer */
);
);

ecma_value_t ecma_builtin_helper_array_merge_sort_helper (ecma_value_t *array_p,
uint32_t length,
Expand Down
5 changes: 3 additions & 2 deletions jerry-core/ecma/operations/ecma-objects.c
Original file line number Diff line number Diff line change
Expand Up @@ -1851,8 +1851,9 @@ ecma_op_object_get_own_property_descriptor (ecma_object_t *object_p, /**< the ob
}

prop_desc_p->flags |= (JERRY_PROP_IS_VALUE_DEFINED | JERRY_PROP_IS_WRITABLE_DEFINED);
prop_desc_p->flags = (uint16_t) (
prop_desc_p->flags | (ecma_is_property_writable (property) ? JERRY_PROP_IS_WRITABLE : JERRY_PROP_NO_OPTS));
prop_desc_p->flags =
(uint16_t) (prop_desc_p->flags
| (ecma_is_property_writable (property) ? JERRY_PROP_IS_WRITABLE : JERRY_PROP_NO_OPTS));
}
else
{
Expand Down
6 changes: 3 additions & 3 deletions jerry-core/include/jerryscript-compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ JERRY_C_API_BEGIN
/*
* Compiler-specific macros relevant for Microsoft Visual C/C++ Compiler.
*/
#define JERRY_ATTR_DEPRECATED __declspec(deprecated)
#define JERRY_ATTR_NOINLINE __declspec(noinline)
#define JERRY_ATTR_NORETURN __declspec(noreturn)
#define JERRY_ATTR_DEPRECATED __declspec (deprecated)
#define JERRY_ATTR_NOINLINE __declspec (noinline)
#define JERRY_ATTR_NORETURN __declspec (noreturn)

/*
* Microsoft Visual C/C++ Compiler doesn't support for VLA, using _alloca
Expand Down
2 changes: 1 addition & 1 deletion jerry-core/jrt/jrt.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ void jerry_jrt_set_log_level (jerry_log_level_t level);
*/
#if defined(__clang__) || defined(__GNUC__)
/* Clang/GCC will not tail call given inline volatile assembly. */
#define JERRY_BLOCK_TAIL_CALL_OPTIMIZATION() __asm__ __volatile__("")
#define JERRY_BLOCK_TAIL_CALL_OPTIMIZATION() __asm__ __volatile__ ("")
#else /* !defined(__clang__) && !defined(__GNUC__) */
/* On GCC 10.x this version also works. */
#define JERRY_BLOCK_TAIL_CALL_OPTIMIZATION() \
Expand Down
8 changes: 4 additions & 4 deletions jerry-ext/include/jerryscript-ext/module.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ typedef struct jerryx_native_module_t
#pragma section(".CRT$XCU", read)
#pragma section(".CRT$XTU", read)

#define JERRYX_MSVC_FUNCTION_ON_SECTION(sec_name, f) \
static void f (void); \
__pragma (JERRYX_MSVC_INCLUDE_SYM (f##_section)) __declspec(allocate (sec_name)) \
JERRYX_MSCV_EXTERN_C void (*f##_section) (void) = f; \
#define JERRYX_MSVC_FUNCTION_ON_SECTION(sec_name, f) \
static void f (void); \
__pragma (JERRYX_MSVC_INCLUDE_SYM (f##_section)) __declspec (allocate (sec_name)) \
JERRYX_MSCV_EXTERN_C void (*f##_section) (void) = f; \
static void f (void)

#define JERRYX_MODULE_CONSTRUCTOR(f) JERRYX_MSVC_FUNCTION_ON_SECTION (".CRT$XCU", f)
Expand Down
18 changes: 9 additions & 9 deletions jerry-main/benchmark/main-benchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,19 +162,19 @@ run (void)
#endif /* !(defined ( __linux__) && __linux__) */

#if defined(__x86_64__)
#define STACK_SAVE(TARGET) \
{ \
__asm volatile("mov %%rsp, %0" : "=m"(TARGET)); \
#define STACK_SAVE(TARGET) \
{ \
__asm volatile ("mov %%rsp, %0" : "=m"(TARGET)); \
}
#elif defined(__i386__)
#define STACK_SAVE(TARGET) \
{ \
__asm volatile("mov %%esp, %0" : "=m"(TARGET)); \
#define STACK_SAVE(TARGET) \
{ \
__asm volatile ("mov %%esp, %0" : "=m"(TARGET)); \
}
#elif defined(__arm__)
#define STACK_SAVE(TARGET) \
{ \
__asm volatile("mov %0, sp" : "=r"(TARGET)); \
#define STACK_SAVE(TARGET) \
{ \
__asm volatile ("mov %0, sp" : "=r"(TARGET)); \
}
#else /* !defined (__x86_64__) && !defined (__i386__) && !defined (__arm__) */
#error "Unsupported stack measurement target!"
Expand Down

0 comments on commit 0cb8591

Please sign in to comment.