preparations for string optimizations
This commit is contained in:
parent
3936587c06
commit
c383e4d35e
3 changed files with 38 additions and 9 deletions
|
|
@ -373,11 +373,13 @@ static N_INLINE(NI32, float32ToInt32)(float x) {
|
|||
|
||||
#define float64ToInt64(x) ((NI64) (x))
|
||||
|
||||
#define NIM_STRLIT_FLAG ((NU)(1) << ((NIM_INTBITS) - 2)) /* This has to be the same as system.strlitFlag! */
|
||||
|
||||
#define STRING_LITERAL(name, str, length) \
|
||||
static const struct { \
|
||||
TGenericSeq Sup; \
|
||||
NIM_CHAR data[(length) + 1]; \
|
||||
} name = {{length, length}, str}
|
||||
static const struct { \
|
||||
TGenericSeq Sup; \
|
||||
NIM_CHAR data[(length) + 1]; \
|
||||
} name = {{length, (NI) ((NU)length | NIM_STRLIT_FLAG)}, str}
|
||||
|
||||
typedef struct TStringDesc* string;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue