Change noinline to dontinline (#312)

We defined `noinline` as an abbreviation for the longer version
`__attribute__((__noinline__))` which caused name clashes since
third party codebases often write it as `__attribute__((noinline))`.
This commit is contained in:
Gautham 2021-11-13 04:42:18 +05:30 committed by GitHub
parent ca611efc43
commit 6f658f058b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
59 changed files with 122 additions and 122 deletions

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE.
*/
noinline bool IsPrime(int i) {
dontinline bool IsPrime(int i) {
int j, n;
for (j = 3, n = VEIL("r", 3); j <= n; j += 2) {
if (VEIL("r", i) % VEIL("r", j) == 0) {

View file

@ -318,7 +318,7 @@ static char *DisRegMem(struct Dis *d, uint32_t rde, char *p,
}
}
static noinline char *DisE(struct Dis *d, uint32_t rde, char *p,
static dontinline char *DisE(struct Dis *d, uint32_t rde, char *p,
char *f(struct Dis *, uint32_t, char *, bool, int)) {
if (IsModrmRegister(rde)) {
return f(d, rde, p, Rexb(rde), ModrmRm(rde));

View file

@ -53,7 +53,7 @@ static void DecodeInstruction(struct Machine *m, uint8_t *p, unsigned n) {
}
}
static noinline void LoadInstructionSlow(struct Machine *m, uint64_t ip) {
static dontinline void LoadInstructionSlow(struct Machine *m, uint64_t ip) {
unsigned i;
uint8_t *addr;
uint8_t copy[15], *toil;

View file

@ -88,7 +88,7 @@ Keywords={
"forcealignargpointer",
"textexit",
"externinline",
"noinline",
"dontinline",
"noclone",
"donothing",
"printfesque",

View file

@ -132,7 +132,7 @@
"forcealignargpointer"
"textexit"
"externinline"
"noinline"
"dontinline"
"noclone"
"donothing"
"printfesque"

View file

@ -346,7 +346,7 @@ cosmo_kws = frozenset([
"nocallback",
"nodebuginfo",
"nodiscard",
"noinline",
"dontinline",
"noinstrument",
"nointerpose",
"nooptimize",
@ -409,7 +409,7 @@ cosmo_kws = frozenset([
"nocallback",
"nodebuginfo",
"nodiscard",
"noinline",
"dontinline",
"noinstrument",
"nointerpose",
"nooptimize",

View file

@ -4536,7 +4536,7 @@ static int LuaIsAcceptablePort(lua_State *L) {
return LuaIsValid(L, IsAcceptablePort);
}
static noinline int LuaCoderImpl(lua_State *L,
static dontinline int LuaCoderImpl(lua_State *L,
char *C(const char *, size_t, size_t *)) {
void *p;
size_t n;
@ -4547,7 +4547,7 @@ static noinline int LuaCoderImpl(lua_State *L,
return 1;
}
static noinline int LuaCoder(lua_State *L,
static dontinline int LuaCoder(lua_State *L,
char *C(const char *, size_t, size_t *)) {
return LuaCoderImpl(L, C);
}
@ -4612,7 +4612,7 @@ static int LuaVisualizeControlCodes(lua_State *L) {
return LuaCoder(L, VisualizeControlCodes);
}
static noinline int LuaHasherImpl(lua_State *L, size_t k,
static dontinline int LuaHasherImpl(lua_State *L, size_t k,
int H(const void *, size_t, uint8_t *)) {
void *p;
size_t n;
@ -4624,7 +4624,7 @@ static noinline int LuaHasherImpl(lua_State *L, size_t k,
return 1;
}
static noinline int LuaHasher(lua_State *L, size_t k,
static dontinline int LuaHasher(lua_State *L, size_t k,
int H(const void *, size_t, uint8_t *)) {
return LuaHasherImpl(L, k, H);
}
@ -4774,7 +4774,7 @@ static int LuaCrc32c(lua_State *L) {
return LuaHash(L, crc32c);
}
static noinline int LuaProgramInt(lua_State *L, void P(long)) {
static dontinline int LuaProgramInt(lua_State *L, void P(long)) {
P(luaL_checkinteger(L, 1));
return 0;
}
@ -4809,7 +4809,7 @@ static int LuaProgramSslTicketLifetime(lua_State *L) {
return LuaProgramInt(L, ProgramSslTicketLifetime);
}
static noinline int LuaProgramString(lua_State *L, void P(const char *)) {
static dontinline int LuaProgramString(lua_State *L, void P(const char *)) {
P(luaL_checkstring(L, 1));
return 0;
}
@ -4920,7 +4920,7 @@ static int LuaProgramRedirect(lua_State *L) {
return 0;
}
static noinline int LuaProgramBool(lua_State *L, bool *b) {
static dontinline int LuaProgramBool(lua_State *L, bool *b) {
*b = lua_toboolean(L, 1);
return 0;
}

View file

@ -185,7 +185,7 @@ static void float2rgb(unsigned n, unsigned char *u, float *f) {
* This makes subtraction look good by flattening out the bias curve
* that PC display manufacturers like to use.
*/
static noinline void rgb2lin(unsigned n, float *f, const unsigned char *u) {
static dontinline void rgb2lin(unsigned n, float *f, const unsigned char *u) {
unsigned i;
rgb2float(n, f, u);
for (i = 0; i < n; ++i) f[i] = frgb2lin(f[i]);
@ -194,7 +194,7 @@ static noinline void rgb2lin(unsigned n, float *f, const unsigned char *u) {
/**
* Converts linear RGB to standard RGB.
*/
static noinline void rgb2std(unsigned n, unsigned char *u, float *f) {
static dontinline void rgb2std(unsigned n, unsigned char *u, float *f) {
unsigned i;
for (i = 0; i < n; ++i) f[i] = frgb2std(f[i]);
float2rgb(n, u, f);

View file

@ -23,7 +23,7 @@
#include "libc/x/x.h"
#include "tool/viz/lib/stringbuilder.h"
static noinline void StringBuilderGrow(size_t need, struct StringBuilder *sb) {
static dontinline void StringBuilderGrow(size_t need, struct StringBuilder *sb) {
size_t n2;
n2 = MAX(16, sb->n);
while (sb->i + need > n2) n2 += n2 >> 1;

View file

@ -464,7 +464,7 @@ static unsigned char Opacify2(unsigned yw, unsigned xw,
}
}
static noinline void PrintImage2(unsigned yw, unsigned xw,
static dontinline void PrintImage2(unsigned yw, unsigned xw,
unsigned char img[4][yw][xw], unsigned yn,
unsigned xn) {
bool didhalfy;
@ -500,7 +500,7 @@ static noinline void PrintImage2(unsigned yw, unsigned xw,
printf("\e[0m\n");
}
static noinline void *DeblinterlaceRgba2(unsigned yn, unsigned xn,
static dontinline void *DeblinterlaceRgba2(unsigned yn, unsigned xn,
unsigned char D[4][yn][xn],
const unsigned char S[yn][xn][4]) {
unsigned y, x;
@ -587,7 +587,7 @@ void ProcessImageMagikarp(unsigned yn, unsigned xn,
yn, xn, lround(r_));
}
noinline void WithImageFile(const char *path,
dontinline void WithImageFile(const char *path,
void fn(unsigned yn, unsigned xn,
unsigned char img[yn][xn][4])) {
struct stat st;