Verified Commit b12f2142 authored by Camil Staps's avatar Camil Staps 🚀

Use INT everywhere instead of dINT

parent f9725419
Pipeline #32869 failed with stages
in 1 minute and 39 seconds
......@@ -450,7 +450,6 @@ where
"CHAR" -> code_start-4*8+2
"REAL" -> code_start-5*8+2
"INT" -> code_start-6*8+2
"dINT" -> code_start-6*8+2
"_ind" -> code_start-7*8+2
_ -> lookup_symbol_value di mods syms
| otherwise = lookup_symbol_value di mods syms
......@@ -538,7 +537,7 @@ where
| d==array_desc-3*8+2 = (1,True) // BOOL
| d==array_desc-4*8+2 = (1,True) // CHAR
| d==array_desc-5*8+2 = (IF_INT_64_OR_32 1 2,True) // REAL
| d==array_desc-6*8+2 = (1,True) // INT/dINT
| d==array_desc-6*8+2 = (1,True) // INT
| d==array_desc-7*8+2 = (0,True) // _ind
| otherwise = abort "internal error in serialize_for_prelinked_interpretation\n"
# arity = get_D_node_arity d
......
......@@ -53,7 +53,7 @@ void* __STRING__[] = {0, 0, &m____system, (void*) 8, _8chars2int('_','S',
void* BOOL[] = {0, 0, &m____system, (void*) 4, _4chars2int('B','O','O','L')};
void* CHAR[] = {0, 0, &m____system, (void*) 4, _4chars2int('C','H','A','R')};
void* REAL[] = {0, 0, &m____system, (void*) 4, _4chars2int('R','E','A','L')};
void* dINT[] = {0, 0, &m____system, (void*) 3, _3chars2int('I','N','T')};
void* INT[] = {0, 0, &m____system, (void*) 3, _3chars2int('I','N','T')};
# endif
#else /* assuming WORD_WIDTH == 32 */
static BC_WORD m____system[] = { 7, (BC_WORD) _4chars2int ('_','s','y','s'), (BC_WORD) _3chars2int ('t','e','m') };
......@@ -67,7 +67,7 @@ void* __STRING__[] = { 0, 0, &m____system, (void*) 8, _4chars2int ('_','S
void* BOOL[] = { 0, 0, &m____system, (void*) 4, _4chars2int ('B','O','O','L') };
void* CHAR[] = { 0, 0, &m____system, (void*) 4, _4chars2int ('C','H','A','R') };
void* REAL[] = { 0, 0, &m____system, (void*) 4, _4chars2int('R','E','A','L')};
void* dINT[] = { 0, 0, &m____system, (void*) 3, _3chars2int ('I','N','T') };
void* INT[] = { 0, 0, &m____system, (void*) 3, _3chars2int ('I','N','T') };
# endif
#endif /* Word-width dependency */
......
......@@ -65,8 +65,7 @@ extern void* __ARRAY__[];
extern void** ARRAY;
#endif
extern void* d___Nil[];
extern void* dINT[];
#define INT dINT
extern void* INT[];
extern void* BOOL[];
extern void* CHAR[];
extern void* REAL[];
......
s/_BOOL/BOOL/g
s/_CHAR/CHAR/g
s/_REAL/REAL/g
s/_dINT/dINT/g
s/_INT/INT/g
s/_ARRAY@/ARRAY@/g
s/___ARRAY__@/__ARRAY__@/g
s/___STRING__/__STRING__/g
......
......@@ -80,7 +80,6 @@ void init_parser(struct parser *state
#endif
preseed_symbol_matcher(state, "INT", (void*) &INT);
preseed_symbol_matcher(state, "dINT", (void*) &dINT);
preseed_symbol_matcher(state, "BOOL", (void*) &BOOL);
preseed_symbol_matcher(state, "CHAR", (void*) &CHAR);
preseed_symbol_matcher(state, "REAL", (void*) &REAL);
......@@ -503,8 +502,7 @@ int parse_program(struct parser *state, struct char_provider *cp) {
state->program->symbol_table[state->ptr].offset = (BC_WORD) INTERPRETER_OR_PRELINKER(&__ARRAY__,0);
} else if (!strcmp(state->program->symbol_table[state->ptr].name, "__STRING__")) {
state->program->symbol_table[state->ptr].offset = (BC_WORD) INTERPRETER_OR_PRELINKER(&__STRING__,5);
} else if (!strcmp(state->program->symbol_table[state->ptr].name, "INT") ||
!strcmp(state->program->symbol_table[state->ptr].name, "dINT")) {
} else if (!strcmp(state->program->symbol_table[state->ptr].name, "INT")) {
state->program->symbol_table[state->ptr].offset = (BC_WORD) INTERPRETER_OR_PRELINKER(&INT,25);
} else if (!strcmp(state->program->symbol_table[state->ptr].name, "BOOL")) {
state->program->symbol_table[state->ptr].offset = (BC_WORD) INTERPRETER_OR_PRELINKER(&BOOL,10);
......
......@@ -70,7 +70,7 @@ static int export_label(const char *label) {
return 1;
else if (!strcmp(label, "__STRING__"))
return 1;
else if (!strcmp(label, "INT") || !strcmp(label, "dINT"))
else if (!strcmp(label, "INT"))
return 1;
else if (!strcmp(label, "BOOL"))
return 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment