Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ext/json/generator/depend
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ext/json/generator/generator.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion ext/json/json.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ typedef unsigned char _Bool;
#endif
#endif

#endif // _JSON_H_
#endif // _JSON_H_
1 change: 1 addition & 0 deletions ext/json/parser/depend
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ext/json/parser/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions ext/json/simd/simd.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
Expand Down