mirror of
https://github.com/anoma/juvix.git
synced 2024-09-11 08:15:41 +03:00
Update clang formatting (#2465)
Using ``` clang-format --version Homebrew clang-format version 17.0.2 ```
This commit is contained in:
parent
f58c4a6d17
commit
7b7f06f81a
@ -5,7 +5,7 @@
|
||||
# See https://pre-commit.com/hooks.html for more hooks
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.4.0
|
||||
rev: v4.5.0
|
||||
hooks:
|
||||
- id: check-yaml
|
||||
- id: check-added-large-files
|
||||
@ -41,7 +41,7 @@ repos:
|
||||
types_or: [json]
|
||||
|
||||
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||
rev: v16.0.6
|
||||
rev: v17.0.2
|
||||
hooks:
|
||||
- id: clang-format
|
||||
files: runtime/.+\.(c|h)$
|
||||
|
@ -96,7 +96,7 @@ EXTEND_CLOSURE(dest, src, n, {
|
||||
#define DECL_ZEROARG_CLOSURE(name, fuid, largs) \
|
||||
word_t juvix_zeroarg_closure_data_##name[1 + CLOSURE_SKIP]; \
|
||||
word_t juvix_zeroarg_closure_##name = \
|
||||
(word_t)&juvix_zeroarg_closure_data_##name; \
|
||||
(word_t) & juvix_zeroarg_closure_data_##name; \
|
||||
INIT_CLOSURE(juvix_zeroarg_closure_##name, fuid, \
|
||||
LABEL_ADDR(juvix_closure_##name), 0, largs);
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
// The least significant two bits encode object kind
|
||||
#define KIND_MASK 3
|
||||
#define GET_KIND(x) ((word_t)(x)&KIND_MASK)
|
||||
#define GET_KIND(x) ((word_t)(x) & KIND_MASK)
|
||||
|
||||
#define KIND_PTR 0
|
||||
#define KIND_UNBOXED0 1
|
||||
@ -14,7 +14,7 @@
|
||||
#define KIND_HEADER 2
|
||||
|
||||
#define KIND3_MASK 7
|
||||
#define GET_KIND3(x) ((word_t)(x)&KIND3_MASK)
|
||||
#define GET_KIND3(x) ((word_t)(x) & KIND3_MASK)
|
||||
|
||||
static inline bool is_unboxed(word_t x) { return x & 1; }
|
||||
static inline bool is_ptr(word_t x) { return GET_KIND(x) == KIND_PTR; }
|
||||
@ -60,7 +60,7 @@ static inline word_t clear_mark(word_t x) { return x & ~MARK_MASK; }
|
||||
|
||||
#define UID_MASK ((word_t)0x00FFFFF0)
|
||||
#define UID_SHIFT 4U
|
||||
#define GET_UID(x) (((word_t)(x)&UID_MASK) >> UID_SHIFT)
|
||||
#define GET_UID(x) (((word_t)(x) & UID_MASK) >> UID_SHIFT)
|
||||
|
||||
#define NFIELDS_MASK 0xFF000000
|
||||
#define NFIELDS_SHIFT 24U
|
||||
@ -105,16 +105,16 @@ static inline bool is_special_header(word_t x) {
|
||||
|
||||
#define SUID_MASK ((word_t)0x30)
|
||||
#define SUID_SHIFT 4U
|
||||
#define GET_SUID(x) (((word_t)(x)&SUID_MASK) >> SUID_SHIFT)
|
||||
#define GET_SUID(x) (((word_t)(x) & SUID_MASK) >> SUID_SHIFT)
|
||||
|
||||
#define SKIP_MASK ((word_t)0xC0)
|
||||
#define SKIP_SHIFT 6U
|
||||
#define GET_SKIP(x) (((word_t)(x)&SKIP_MASK) >> SKIP_SHIFT)
|
||||
#define GET_SKIP(x) (((word_t)(x) & SKIP_MASK) >> SKIP_SHIFT)
|
||||
#define SKIP_ALL 3U
|
||||
|
||||
#define RESERVED_MASK 0x00FFFF00
|
||||
#define RESERVED_SHIFT 8U
|
||||
#define GET_RESERVED(x) (((word_t)(x)&RESERVED_MASK) >> RESERVED_SHIFT)
|
||||
#define GET_RESERVED(x) (((word_t)(x) & RESERVED_MASK) >> RESERVED_SHIFT)
|
||||
|
||||
static inline word_t make_special_header(word_t suid, word_t nfields,
|
||||
word_t skip, word_t reserved) {
|
||||
|
Loading…
Reference in New Issue
Block a user