diff --git a/ext/json/generator/depend b/ext/json/generator/depend index aee4ab94ebcce8..3ba4acfdd26156 100644 --- a/ext/json/generator/depend +++ b/ext/json/generator/depend @@ -178,6 +178,7 @@ generator.o: $(hdrdir)/ruby/ruby.h generator.o: $(hdrdir)/ruby/st.h generator.o: $(hdrdir)/ruby/subst.h generator.o: $(srcdir)/../fbuffer/fbuffer.h +generator.o: $(srcdir)/../json.h generator.o: $(srcdir)/../simd/simd.h generator.o: $(srcdir)/../vendor/fpconv.c generator.o: $(srcdir)/../vendor/jeaiii-ltoa.h diff --git a/ext/json/generator/generator.c b/ext/json/generator/generator.c index 56aa636ef87cc0..8930213b939a0d 100644 --- a/ext/json/generator/generator.c +++ b/ext/json/generator/generator.c @@ -418,7 +418,7 @@ static ALWAYS_INLINE() unsigned char sse2_next_match(search_state *search) #define TARGET_SSE2 #endif -static inline TARGET_SSE2 ALWAYS_INLINE() unsigned char search_escape_basic_sse2(search_state *search) +static TARGET_SSE2 ALWAYS_INLINE() unsigned char search_escape_basic_sse2(search_state *search) { if (RB_UNLIKELY(search->has_matches)) { // There are more matches if search->matches_mask > 0. diff --git a/ext/json/json.h b/ext/json/json.h index 873440527dec60..20e7101de7b0da 100644 --- a/ext/json/json.h +++ b/ext/json/json.h @@ -82,4 +82,4 @@ typedef unsigned char _Bool; #endif #endif -#endif // _JSON_H_ \ No newline at end of file +#endif // _JSON_H_ diff --git a/ext/json/parser/depend b/ext/json/parser/depend index b780afb5f94546..d4737b1dfb5b63 100644 --- a/ext/json/parser/depend +++ b/ext/json/parser/depend @@ -175,6 +175,7 @@ parser.o: $(hdrdir)/ruby/ruby.h parser.o: $(hdrdir)/ruby/st.h parser.o: $(hdrdir)/ruby/subst.h parser.o: $(srcdir)/../fbuffer/fbuffer.h +parser.o: $(srcdir)/../json.h parser.o: $(srcdir)/../simd/simd.h parser.o: $(srcdir)/../vendor/ryu.h parser.o: parser.c diff --git a/ext/json/parser/parser.c b/ext/json/parser/parser.c index 25eeb89e773f1b..20754249e2ca39 100644 --- a/ext/json/parser/parser.c +++ b/ext/json/parser/parser.c @@ -513,7 +513,7 @@ json_eat_comments(JSON_ParserState *state) } } -static inline void +static ALWAYS_INLINE() void json_eat_whitespace(JSON_ParserState *state) { while (true) { diff --git a/ext/json/simd/simd.h b/ext/json/simd/simd.h index 194baee51c3475..a4f917fd0ae518 100644 --- a/ext/json/simd/simd.h +++ b/ext/json/simd/simd.h @@ -136,7 +136,7 @@ static inline uint8x16x4_t load_uint8x16_4(const unsigned char *table) #define _mm_cmpgt_epu8(a, b) _mm_xor_si128(_mm_cmple_epu8(a, b), _mm_set1_epi8(-1)) #define _mm_cmplt_epu8(a, b) _mm_cmpgt_epu8(b, a) -static inline TARGET_SSE2 ALWAYS_INLINE() int compute_chunk_mask_sse2(const char *ptr) +static TARGET_SSE2 ALWAYS_INLINE() int compute_chunk_mask_sse2(const char *ptr) { __m128i chunk = _mm_loadu_si128((__m128i const*)ptr); // Trick: c < 32 || c == 34 can be factored as c ^ 2 < 33 @@ -147,7 +147,7 @@ static inline TARGET_SSE2 ALWAYS_INLINE() int compute_chunk_mask_sse2(const char return _mm_movemask_epi8(needs_escape); } -static inline TARGET_SSE2 ALWAYS_INLINE() int string_scan_simd_sse2(const char **ptr, const char *end, int *mask) +static TARGET_SSE2 ALWAYS_INLINE() int string_scan_simd_sse2(const char **ptr, const char *end, int *mask) { while (*ptr + sizeof(__m128i) <= end) { int chunk_mask = compute_chunk_mask_sse2(*ptr);