mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 13:22:26 +00:00
Base expression casting on C int size, remove dependencies on form=LInt.
This commit is contained in:
parent
b3c71fb2f0
commit
0508097ffe
199 changed files with 6800 additions and 6540 deletions
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/08/30] for gcc LP64 on cygwin tskSfF */
|
||||
/* voc 1.95 [2016/08/31] for gcc LP64 on cygwin tskSfF */
|
||||
#define LARGE
|
||||
#include "SYSTEM.h"
|
||||
|
||||
|
|
@ -117,7 +117,7 @@ void Heap_Unlock (void)
|
|||
{
|
||||
Heap_lockdepth -= 1;
|
||||
if ((Heap_interrupted && Heap_lockdepth == 0)) {
|
||||
Heap_PlatformHalt(((LONGINT)(-9)));
|
||||
Heap_PlatformHalt(-9);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -132,7 +132,7 @@ SYSTEM_PTR Heap_REGMOD (Heap_ModuleName name, Heap_EnumProc enumPtrs)
|
|||
}
|
||||
m->types = 0;
|
||||
m->cmds = NIL;
|
||||
__COPY(name, m->name, ((LONGINT)(20)));
|
||||
__COPY(name, m->name, 20);
|
||||
m->refcnt = 0;
|
||||
m->enumPtrs = enumPtrs;
|
||||
m->next = (Heap_Module)(SYSTEM_ADRINT)Heap_modules;
|
||||
|
|
@ -149,7 +149,7 @@ void Heap_REGCMD (Heap_Module m, Heap_CmdName name, Heap_Command cmd)
|
|||
} else {
|
||||
__NEW(c, Heap_CmdDesc);
|
||||
}
|
||||
__COPY(name, c->name, ((LONGINT)(24)));
|
||||
__COPY(name, c->name, 24);
|
||||
c->cmd = cmd;
|
||||
c->next = m->cmds;
|
||||
m->cmds = c;
|
||||
|
|
@ -327,12 +327,12 @@ SYSTEM_PTR Heap_NEWBLK (LONGINT size)
|
|||
SYSTEM_PTR new;
|
||||
Heap_Lock();
|
||||
blksz = __ASHL(__ASHR(size + 63, 5), 5);
|
||||
new = Heap_NEWREC((LONGINT)(SYSTEM_ADRINT)&blksz);
|
||||
tag = ((LONGINT)(SYSTEM_ADRINT)new + blksz) - 24;
|
||||
new = Heap_NEWREC((SYSTEM_ADRINT)&blksz);
|
||||
tag = (__VAL(LONGINT, new) + blksz) - 24;
|
||||
__PUT(tag - 8, 0, LONGINT);
|
||||
__PUT(tag, blksz, LONGINT);
|
||||
__PUT(tag + 8, -8, LONGINT);
|
||||
__PUT((LONGINT)(SYSTEM_ADRINT)new - 8, tag, LONGINT);
|
||||
__PUT(__VAL(LONGINT, new) - 8, tag, LONGINT);
|
||||
Heap_Unlock();
|
||||
_o_result = new;
|
||||
return _o_result;
|
||||
|
|
@ -361,7 +361,7 @@ static void Heap_Mark (LONGINT q)
|
|||
__GET(tag, offset, LONGINT);
|
||||
fld = q + offset;
|
||||
p = Heap_FetchAddress(fld);
|
||||
__PUT(fld, (SYSTEM_PTR)(SYSTEM_ADRINT)n, SYSTEM_PTR);
|
||||
__PUT(fld, __VAL(SYSTEM_PTR, n), SYSTEM_PTR);
|
||||
} else {
|
||||
fld = q + offset;
|
||||
n = Heap_FetchAddress(fld);
|
||||
|
|
@ -370,7 +370,7 @@ static void Heap_Mark (LONGINT q)
|
|||
if (!__ODD(tagbits)) {
|
||||
__PUT(n - 8, tagbits + 1, LONGINT);
|
||||
__PUT(q - 8, tag + 1, LONGINT);
|
||||
__PUT(fld, (SYSTEM_PTR)(SYSTEM_ADRINT)p, SYSTEM_PTR);
|
||||
__PUT(fld, __VAL(SYSTEM_PTR, p), SYSTEM_PTR);
|
||||
p = q;
|
||||
q = n;
|
||||
tag = tagbits;
|
||||
|
|
@ -385,7 +385,7 @@ static void Heap_Mark (LONGINT q)
|
|||
|
||||
static void Heap_MarkP (SYSTEM_PTR p)
|
||||
{
|
||||
Heap_Mark((LONGINT)(SYSTEM_ADRINT)p);
|
||||
Heap_Mark(__VAL(LONGINT, p));
|
||||
}
|
||||
|
||||
static void Heap_Scan (void)
|
||||
|
|
@ -554,7 +554,7 @@ static void Heap_Finalize (void)
|
|||
} else {
|
||||
prev->next = n->next;
|
||||
}
|
||||
(*n->finalize)((SYSTEM_PTR)(SYSTEM_ADRINT)n->obj);
|
||||
(*n->finalize)(__VAL(SYSTEM_PTR, n->obj));
|
||||
if (prev == NIL) {
|
||||
n = Heap_fin;
|
||||
} else {
|
||||
|
|
@ -573,7 +573,7 @@ void Heap_FINALL (void)
|
|||
while (Heap_fin != NIL) {
|
||||
n = Heap_fin;
|
||||
Heap_fin = Heap_fin->next;
|
||||
(*n->finalize)((SYSTEM_PTR)(SYSTEM_ADRINT)n->obj);
|
||||
(*n->finalize)(__VAL(SYSTEM_PTR, n->obj));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -590,9 +590,9 @@ static void Heap_MarkStack (LONGINT n, LONGINT *cand, LONGINT cand__len)
|
|||
}
|
||||
if (n == 0) {
|
||||
nofcand = 0;
|
||||
sp = (LONGINT)(SYSTEM_ADRINT)&frame;
|
||||
sp = (SYSTEM_ADRINT)&frame;
|
||||
stack0 = Heap_PlatformMainStackFrame();
|
||||
inc = (LONGINT)(SYSTEM_ADRINT)&align.p - (LONGINT)(SYSTEM_ADRINT)&align;
|
||||
inc = (SYSTEM_ADRINT)&align.p - (SYSTEM_ADRINT)&align;
|
||||
if (sp > stack0) {
|
||||
inc = -inc;
|
||||
}
|
||||
|
|
@ -681,7 +681,7 @@ void Heap_GC (BOOLEAN markStack)
|
|||
i22 += 23;
|
||||
i23 += 24;
|
||||
if ((i0 == -99 && i15 == 24)) {
|
||||
Heap_MarkStack(((LONGINT)(32)), (void*)cand, ((LONGINT)(10000)));
|
||||
Heap_MarkStack(32, (void*)cand, 10000);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -700,7 +700,7 @@ void Heap_RegisterFinalizer (SYSTEM_PTR obj, Heap_Finalizer finalize)
|
|||
{
|
||||
Heap_FinNode f;
|
||||
__NEW(f, Heap_FinDesc);
|
||||
f->obj = (LONGINT)(SYSTEM_ADRINT)obj;
|
||||
f->obj = __VAL(LONGINT, obj);
|
||||
f->finalize = finalize;
|
||||
f->marked = 1;
|
||||
f->next = Heap_fin;
|
||||
|
|
@ -709,7 +709,7 @@ void Heap_RegisterFinalizer (SYSTEM_PTR obj, Heap_Finalizer finalize)
|
|||
|
||||
void Heap_InitHeap (void)
|
||||
{
|
||||
Heap_heap = Heap_NewChunk(((LONGINT)(256000)));
|
||||
Heap_heap = Heap_NewChunk(256000);
|
||||
Heap_heapend = Heap_FetchAddress(Heap_heap + 8);
|
||||
__PUT(Heap_heap, 0, LONGINT);
|
||||
Heap_allocated = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue