mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-05 23:22:25 +00:00
Update bootstrap C sources.
This commit is contained in:
parent
a377c7c3bf
commit
d7de570177
185 changed files with 890 additions and 355 deletions
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -19,6 +19,6 @@ export void *Configuration__init(void)
|
|||
__DEFMOD;
|
||||
__REGMOD("Configuration", 0);
|
||||
/* BEGIN */
|
||||
__MOVE("2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75);
|
||||
__MOVE("2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75);
|
||||
__ENDMOD;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef Configuration__h
|
||||
#define Configuration__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
|
||||
|
||||
#ifndef Files__h
|
||||
#define Files__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -68,7 +68,8 @@ static INT32 Heap_freeList[10];
|
|||
static INT32 Heap_bigBlocks;
|
||||
export INT32 Heap_allocated;
|
||||
static BOOLEAN Heap_firstTry;
|
||||
static INT32 Heap_heap, Heap_heapNegMin, Heap_heapNegMax, Heap_heapPosMin, Heap_heapPosMax;
|
||||
export INT32 Heap_heap;
|
||||
static INT32 Heap_heapNegMin, Heap_heapNegMax, Heap_heapPosMin, Heap_heapPosMax;
|
||||
export INT32 Heap_heapsize;
|
||||
static Heap_FinNode Heap_fin;
|
||||
static INT16 Heap_lockdepth;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
|
||||
|
||||
#ifndef Heap__h
|
||||
#define Heap__h
|
||||
|
|
@ -46,7 +46,9 @@ typedef
|
|||
|
||||
|
||||
import SYSTEM_PTR Heap_modules;
|
||||
import INT32 Heap_allocated, Heap_heapsize;
|
||||
import INT32 Heap_allocated;
|
||||
import INT32 Heap_heap;
|
||||
import INT32 Heap_heapsize;
|
||||
import INT16 Heap_FileCount;
|
||||
|
||||
import ADDRESS *Heap_ModuleDesc__typ;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef Modules__h
|
||||
#define Modules__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef OPB__h
|
||||
#define OPB__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef OPC__h
|
||||
#define OPC__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -495,6 +495,10 @@ void OPM_Get (CHAR *ch)
|
|||
OPM_LogWNum((INT16)*ch, 1);
|
||||
OPM_LogW('.');
|
||||
Texts_DumpReader(OPM_inR);
|
||||
OPM_LogWLn();
|
||||
OPM_LogWStr((CHAR*)"Heap dump:", 11);
|
||||
OPM_LogWLn();
|
||||
Out_DumpHeap();
|
||||
}
|
||||
if ((*ch < 0x09 && !OPM_inR.eot)) {
|
||||
*ch = ' ';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef OPM__h
|
||||
#define OPM__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef OPP__h
|
||||
#define OPP__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
|
||||
|
||||
#ifndef OPS__h
|
||||
#define OPS__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef OPT__h
|
||||
#define OPT__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef OPV__h
|
||||
#define OPV__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -14,10 +14,14 @@ export BOOLEAN Out_IsConsole;
|
|||
static CHAR Out_buf[128];
|
||||
static INT16 Out_in;
|
||||
|
||||
static ADDRESS *typedesc__5__typ;
|
||||
static ADDRESS *typedesc__11__typ;
|
||||
static ADDRESS *blockdesc__5__typ;
|
||||
static ADDRESS *chunkdesc__7__typ;
|
||||
|
||||
export void Out_Char (CHAR ch);
|
||||
export void Out_DumpHeap (void);
|
||||
static void Out_DumpModule (Heap_Module m);
|
||||
export void Out_DumpTag (INT32 addr);
|
||||
export void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len);
|
||||
export void Out_Flush (void);
|
||||
export void Out_Hex (INT64 x, INT64 n);
|
||||
|
|
@ -36,6 +40,8 @@ static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i);
|
|||
static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i);
|
||||
|
||||
#define Out_Entier64(x) (INT64)(x)
|
||||
extern ADDRESS Heap_heap;
|
||||
#define Out_getheap() Heap_heap
|
||||
|
||||
void Out_Flush (void)
|
||||
{
|
||||
|
|
@ -209,93 +215,180 @@ void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len)
|
|||
|
||||
static void Out_DumpModule (Heap_Module m)
|
||||
{
|
||||
Out_String((CHAR*)" next: ", 13);
|
||||
Out_String((CHAR*)" next: ", 19);
|
||||
Out_Hex((INT32)(ADDRESS)m->next, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" name: ", 13);
|
||||
Out_String((CHAR*)" name: ", 19);
|
||||
Out_String(m->name, 20);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" refcnt: ", 13);
|
||||
Out_String((CHAR*)" refcnt: ", 19);
|
||||
Out_Hex(m->refcnt, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" cmds: ", 13);
|
||||
Out_String((CHAR*)" cmds: ", 19);
|
||||
Out_Hex((INT32)(ADDRESS)m->cmds, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" types: ", 13);
|
||||
Out_String((CHAR*)" types: ", 19);
|
||||
Out_Hex(m->types, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" enumPtrs: ", 13);
|
||||
Out_String((CHAR*)" enumPtrs: ", 19);
|
||||
Out_Hex((INT32)(ADDRESS)m->enumPtrs, 1);
|
||||
Out_Ln();
|
||||
}
|
||||
|
||||
typedef
|
||||
struct typedesc__5 *tag__4;
|
||||
struct typedesc__11 *tag__10;
|
||||
|
||||
typedef
|
||||
struct typedesc__5 {
|
||||
struct typedesc__11 {
|
||||
INT32 tag, next, level, module;
|
||||
CHAR name[24];
|
||||
INT32 bases[16];
|
||||
INT32 reserved, blksz, ptr0;
|
||||
} typedesc__5;
|
||||
} typedesc__11;
|
||||
|
||||
void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len)
|
||||
void Out_DumpTag (INT32 addr)
|
||||
{
|
||||
INT32 addr;
|
||||
tag__4 desc = NIL;
|
||||
tag__10 desc = NIL;
|
||||
INT16 i;
|
||||
__GET((ADDRESS)o - 4, addr, INT32);
|
||||
Out_String((CHAR*)"obj tag: ", 11);
|
||||
Out_String((CHAR*)" obj tag: ", 17);
|
||||
Out_Hex(addr, 1);
|
||||
Out_Ln();
|
||||
addr -= __MASK(addr, -2);
|
||||
desc = (tag__4)(ADDRESS)(addr - 108);
|
||||
Out_String((CHAR*)"desc at: ", 11);
|
||||
desc = (tag__10)(ADDRESS)(addr - 108);
|
||||
Out_String((CHAR*)" desc at: ", 17);
|
||||
Out_Hex((INT32)(ADDRESS)desc, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)"desc contains:", 15);
|
||||
Out_String((CHAR*)" desc contains:", 21);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)"tag: ", 11);
|
||||
Out_String((CHAR*)" tag: ", 17);
|
||||
Out_Hex(desc->tag, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)"next: ", 11);
|
||||
Out_String((CHAR*)" next: ", 17);
|
||||
Out_Hex(desc->next, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)"level: ", 11);
|
||||
Out_String((CHAR*)" level: ", 17);
|
||||
Out_Hex(desc->level, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)"module: ", 11);
|
||||
Out_String((CHAR*)" module: ", 17);
|
||||
Out_Hex(desc->module, 1);
|
||||
Out_Ln();
|
||||
Out_DumpModule((Heap_Module)(ADDRESS)desc->module);
|
||||
Out_String((CHAR*)"name: ", 11);
|
||||
if (desc->module != 0) {
|
||||
Out_DumpModule((Heap_Module)(ADDRESS)desc->module);
|
||||
}
|
||||
Out_String((CHAR*)" name: ", 17);
|
||||
Out_String(desc->name, 24);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)"bases: ", 11);
|
||||
Out_String((CHAR*)" bases: ", 17);
|
||||
i = 0;
|
||||
while (i < 16) {
|
||||
Out_Hex(desc->bases[__X(i, 16)], 8);
|
||||
if (__MASK(i, -4) == 3) {
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" ", 11);
|
||||
Out_String((CHAR*)" ", 17);
|
||||
} else {
|
||||
Out_Char(' ');
|
||||
}
|
||||
i += 1;
|
||||
}
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)"reserved: ", 11);
|
||||
Out_String((CHAR*)" reserved: ", 17);
|
||||
Out_Hex(desc->reserved, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)"blksz: ", 11);
|
||||
Out_String((CHAR*)" blksz: ", 17);
|
||||
Out_Hex(desc->blksz, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)"ptr0: ", 11);
|
||||
Out_String((CHAR*)" ptr0: ", 17);
|
||||
Out_Hex(desc->ptr0, 1);
|
||||
Out_Ln();
|
||||
}
|
||||
|
||||
void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len)
|
||||
{
|
||||
INT32 addr;
|
||||
__GET((ADDRESS)o - 4, addr, INT32);
|
||||
Out_DumpTag(addr);
|
||||
}
|
||||
|
||||
typedef
|
||||
INT32 (*adrptr__3)[1];
|
||||
|
||||
typedef
|
||||
struct blockdesc__5 *block__4;
|
||||
|
||||
typedef
|
||||
struct blockdesc__5 {
|
||||
INT32 tag, size, sentinel, next;
|
||||
} blockdesc__5;
|
||||
|
||||
typedef
|
||||
struct chunkdesc__7 *chunk__6;
|
||||
|
||||
typedef
|
||||
struct chunkdesc__7 {
|
||||
INT32 next, end, reserved;
|
||||
blockdesc__5 firstblock;
|
||||
} chunkdesc__7;
|
||||
|
||||
void Out_DumpHeap (void)
|
||||
{
|
||||
INT32 caddr;
|
||||
chunk__6 c = NIL;
|
||||
INT32 baddr;
|
||||
block__4 b = NIL;
|
||||
adrptr__3 tag = NIL;
|
||||
caddr = Heap_heap;
|
||||
while (caddr != 0) {
|
||||
Out_String((CHAR*)"Chunk at: ", 11);
|
||||
Out_Hex(caddr, 1);
|
||||
Out_Ln();
|
||||
c = (chunk__6)(ADDRESS)caddr;
|
||||
Out_String((CHAR*)" next: ", 11);
|
||||
Out_Hex(c->next, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" end: ", 11);
|
||||
Out_Hex(c->end, 1);
|
||||
Out_String((CHAR*)" => size: ", 11);
|
||||
Out_Hex(c->end - caddr, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" rsvd: ", 11);
|
||||
Out_Hex(c->reserved, 1);
|
||||
Out_Ln();
|
||||
baddr = (ADDRESS)&c->firstblock;
|
||||
while (baddr < c->end) {
|
||||
Out_String((CHAR*)" Block at: ", 15);
|
||||
Out_Hex(baddr, 1);
|
||||
Out_Ln();
|
||||
b = (block__4)(ADDRESS)baddr;
|
||||
tag = (adrptr__3)(ADDRESS)b->tag;
|
||||
Out_String((CHAR*)" tag: ", 15);
|
||||
Out_Hex(b->tag, 1);
|
||||
if (__MASK(b->tag, -2) != 0) {
|
||||
Out_String((CHAR*)" <--- ODD! ---", 15);
|
||||
}
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" tag^: ", 15);
|
||||
Out_Hex((*tag)[0], 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" size: ", 15);
|
||||
Out_Hex(b->size, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" sentinel: ", 15);
|
||||
Out_Hex(b->sentinel, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" next: ", 15);
|
||||
Out_Hex(b->next, 1);
|
||||
Out_Ln();
|
||||
if (b->tag != (ADDRESS)&b->size) {
|
||||
Out_DumpTag(b->tag);
|
||||
}
|
||||
baddr += (*tag)[0];
|
||||
Out_Ln();
|
||||
}
|
||||
caddr = c->next;
|
||||
Out_Ln();
|
||||
}
|
||||
}
|
||||
|
||||
static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i)
|
||||
{
|
||||
*i -= 1;
|
||||
|
|
@ -473,7 +566,9 @@ void Out_LongReal (LONGREAL x, INT16 n)
|
|||
Out_RealP(x, n, 1);
|
||||
}
|
||||
|
||||
__TDESC(typedesc__5, 1, 0) = {__TDFLDS("typedesc__5", 116), {-4}};
|
||||
__TDESC(typedesc__11, 1, 0) = {__TDFLDS("typedesc__11", 116), {-4}};
|
||||
__TDESC(blockdesc__5, 1, 0) = {__TDFLDS("blockdesc__5", 16), {-4}};
|
||||
__TDESC(chunkdesc__7, 1, 0) = {__TDFLDS("chunkdesc__7", 28), {-4}};
|
||||
|
||||
export void *Out__init(void)
|
||||
{
|
||||
|
|
@ -481,10 +576,13 @@ export void *Out__init(void)
|
|||
__MODULE_IMPORT(Heap);
|
||||
__MODULE_IMPORT(Platform);
|
||||
__REGMOD("Out", 0);
|
||||
__REGCMD("DumpHeap", Out_DumpHeap);
|
||||
__REGCMD("Flush", Out_Flush);
|
||||
__REGCMD("Ln", Out_Ln);
|
||||
__REGCMD("Open", Out_Open);
|
||||
__INITYP(typedesc__5, typedesc__5, 0);
|
||||
__INITYP(typedesc__11, typedesc__11, 0);
|
||||
__INITYP(blockdesc__5, blockdesc__5, 0);
|
||||
__INITYP(chunkdesc__7, chunkdesc__7, 0);
|
||||
/* BEGIN */
|
||||
Out_IsConsole = Platform_IsConsole(1);
|
||||
Out_in = 0;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef Out__h
|
||||
#define Out__h
|
||||
|
|
@ -10,6 +10,8 @@ import BOOLEAN Out_IsConsole;
|
|||
|
||||
|
||||
import void Out_Char (CHAR ch);
|
||||
import void Out_DumpHeap (void);
|
||||
import void Out_DumpTag (INT32 addr);
|
||||
import void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len);
|
||||
import void Out_Flush (void);
|
||||
import void Out_Hex (INT64 x, INT64 n);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef Platform__h
|
||||
#define Platform__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef Reals__h
|
||||
#define Reals__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef Strings__h
|
||||
#define Strings__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef Texts__h
|
||||
#define Texts__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef VT100__h
|
||||
#define VT100__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef extTools__h
|
||||
#define extTools__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -19,6 +19,6 @@ export void *Configuration__init(void)
|
|||
__DEFMOD;
|
||||
__REGMOD("Configuration", 0);
|
||||
/* BEGIN */
|
||||
__MOVE("2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75);
|
||||
__MOVE("2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75);
|
||||
__ENDMOD;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef Configuration__h
|
||||
#define Configuration__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
|
||||
|
||||
#ifndef Files__h
|
||||
#define Files__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -68,7 +68,8 @@ static INT32 Heap_freeList[10];
|
|||
static INT32 Heap_bigBlocks;
|
||||
export INT32 Heap_allocated;
|
||||
static BOOLEAN Heap_firstTry;
|
||||
static INT32 Heap_heap, Heap_heapNegMin, Heap_heapNegMax, Heap_heapPosMin, Heap_heapPosMax;
|
||||
export INT32 Heap_heap;
|
||||
static INT32 Heap_heapNegMin, Heap_heapNegMax, Heap_heapPosMin, Heap_heapPosMax;
|
||||
export INT32 Heap_heapsize;
|
||||
static Heap_FinNode Heap_fin;
|
||||
static INT16 Heap_lockdepth;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
|
||||
|
||||
#ifndef Heap__h
|
||||
#define Heap__h
|
||||
|
|
@ -46,7 +46,9 @@ typedef
|
|||
|
||||
|
||||
import SYSTEM_PTR Heap_modules;
|
||||
import INT32 Heap_allocated, Heap_heapsize;
|
||||
import INT32 Heap_allocated;
|
||||
import INT32 Heap_heap;
|
||||
import INT32 Heap_heapsize;
|
||||
import INT16 Heap_FileCount;
|
||||
|
||||
import ADDRESS *Heap_ModuleDesc__typ;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef Modules__h
|
||||
#define Modules__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef OPB__h
|
||||
#define OPB__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef OPC__h
|
||||
#define OPC__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -495,6 +495,10 @@ void OPM_Get (CHAR *ch)
|
|||
OPM_LogWNum((INT16)*ch, 1);
|
||||
OPM_LogW('.');
|
||||
Texts_DumpReader(OPM_inR);
|
||||
OPM_LogWLn();
|
||||
OPM_LogWStr((CHAR*)"Heap dump:", 11);
|
||||
OPM_LogWLn();
|
||||
Out_DumpHeap();
|
||||
}
|
||||
if ((*ch < 0x09 && !OPM_inR.eot)) {
|
||||
*ch = ' ';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef OPM__h
|
||||
#define OPM__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef OPP__h
|
||||
#define OPP__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
|
||||
|
||||
#ifndef OPS__h
|
||||
#define OPS__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef OPT__h
|
||||
#define OPT__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef OPV__h
|
||||
#define OPV__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -14,10 +14,14 @@ export BOOLEAN Out_IsConsole;
|
|||
static CHAR Out_buf[128];
|
||||
static INT16 Out_in;
|
||||
|
||||
static ADDRESS *typedesc__5__typ;
|
||||
static ADDRESS *typedesc__11__typ;
|
||||
static ADDRESS *blockdesc__5__typ;
|
||||
static ADDRESS *chunkdesc__7__typ;
|
||||
|
||||
export void Out_Char (CHAR ch);
|
||||
export void Out_DumpHeap (void);
|
||||
static void Out_DumpModule (Heap_Module m);
|
||||
export void Out_DumpTag (INT32 addr);
|
||||
export void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len);
|
||||
export void Out_Flush (void);
|
||||
export void Out_Hex (INT64 x, INT64 n);
|
||||
|
|
@ -36,6 +40,8 @@ static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i);
|
|||
static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i);
|
||||
|
||||
#define Out_Entier64(x) (INT64)(x)
|
||||
extern ADDRESS Heap_heap;
|
||||
#define Out_getheap() Heap_heap
|
||||
|
||||
void Out_Flush (void)
|
||||
{
|
||||
|
|
@ -209,93 +215,180 @@ void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len)
|
|||
|
||||
static void Out_DumpModule (Heap_Module m)
|
||||
{
|
||||
Out_String((CHAR*)" next: ", 13);
|
||||
Out_String((CHAR*)" next: ", 19);
|
||||
Out_Hex((INT32)(ADDRESS)m->next, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" name: ", 13);
|
||||
Out_String((CHAR*)" name: ", 19);
|
||||
Out_String(m->name, 20);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" refcnt: ", 13);
|
||||
Out_String((CHAR*)" refcnt: ", 19);
|
||||
Out_Hex(m->refcnt, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" cmds: ", 13);
|
||||
Out_String((CHAR*)" cmds: ", 19);
|
||||
Out_Hex((INT32)(ADDRESS)m->cmds, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" types: ", 13);
|
||||
Out_String((CHAR*)" types: ", 19);
|
||||
Out_Hex(m->types, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" enumPtrs: ", 13);
|
||||
Out_String((CHAR*)" enumPtrs: ", 19);
|
||||
Out_Hex((INT32)(ADDRESS)m->enumPtrs, 1);
|
||||
Out_Ln();
|
||||
}
|
||||
|
||||
typedef
|
||||
struct typedesc__5 *tag__4;
|
||||
struct typedesc__11 *tag__10;
|
||||
|
||||
typedef
|
||||
struct typedesc__5 {
|
||||
struct typedesc__11 {
|
||||
INT32 tag, next, level, module;
|
||||
CHAR name[24];
|
||||
INT32 bases[16];
|
||||
INT32 reserved, blksz, ptr0;
|
||||
} typedesc__5;
|
||||
} typedesc__11;
|
||||
|
||||
void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len)
|
||||
void Out_DumpTag (INT32 addr)
|
||||
{
|
||||
INT32 addr;
|
||||
tag__4 desc = NIL;
|
||||
tag__10 desc = NIL;
|
||||
INT16 i;
|
||||
__GET((ADDRESS)o - 4, addr, INT32);
|
||||
Out_String((CHAR*)"obj tag: ", 11);
|
||||
Out_String((CHAR*)" obj tag: ", 17);
|
||||
Out_Hex(addr, 1);
|
||||
Out_Ln();
|
||||
addr -= __MASK(addr, -2);
|
||||
desc = (tag__4)(ADDRESS)(addr - 108);
|
||||
Out_String((CHAR*)"desc at: ", 11);
|
||||
desc = (tag__10)(ADDRESS)(addr - 108);
|
||||
Out_String((CHAR*)" desc at: ", 17);
|
||||
Out_Hex((INT32)(ADDRESS)desc, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)"desc contains:", 15);
|
||||
Out_String((CHAR*)" desc contains:", 21);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)"tag: ", 11);
|
||||
Out_String((CHAR*)" tag: ", 17);
|
||||
Out_Hex(desc->tag, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)"next: ", 11);
|
||||
Out_String((CHAR*)" next: ", 17);
|
||||
Out_Hex(desc->next, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)"level: ", 11);
|
||||
Out_String((CHAR*)" level: ", 17);
|
||||
Out_Hex(desc->level, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)"module: ", 11);
|
||||
Out_String((CHAR*)" module: ", 17);
|
||||
Out_Hex(desc->module, 1);
|
||||
Out_Ln();
|
||||
Out_DumpModule((Heap_Module)(ADDRESS)desc->module);
|
||||
Out_String((CHAR*)"name: ", 11);
|
||||
if (desc->module != 0) {
|
||||
Out_DumpModule((Heap_Module)(ADDRESS)desc->module);
|
||||
}
|
||||
Out_String((CHAR*)" name: ", 17);
|
||||
Out_String(desc->name, 24);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)"bases: ", 11);
|
||||
Out_String((CHAR*)" bases: ", 17);
|
||||
i = 0;
|
||||
while (i < 16) {
|
||||
Out_Hex(desc->bases[__X(i, 16)], 8);
|
||||
if (__MASK(i, -4) == 3) {
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" ", 11);
|
||||
Out_String((CHAR*)" ", 17);
|
||||
} else {
|
||||
Out_Char(' ');
|
||||
}
|
||||
i += 1;
|
||||
}
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)"reserved: ", 11);
|
||||
Out_String((CHAR*)" reserved: ", 17);
|
||||
Out_Hex(desc->reserved, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)"blksz: ", 11);
|
||||
Out_String((CHAR*)" blksz: ", 17);
|
||||
Out_Hex(desc->blksz, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)"ptr0: ", 11);
|
||||
Out_String((CHAR*)" ptr0: ", 17);
|
||||
Out_Hex(desc->ptr0, 1);
|
||||
Out_Ln();
|
||||
}
|
||||
|
||||
void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len)
|
||||
{
|
||||
INT32 addr;
|
||||
__GET((ADDRESS)o - 4, addr, INT32);
|
||||
Out_DumpTag(addr);
|
||||
}
|
||||
|
||||
typedef
|
||||
INT32 (*adrptr__3)[1];
|
||||
|
||||
typedef
|
||||
struct blockdesc__5 *block__4;
|
||||
|
||||
typedef
|
||||
struct blockdesc__5 {
|
||||
INT32 tag, size, sentinel, next;
|
||||
} blockdesc__5;
|
||||
|
||||
typedef
|
||||
struct chunkdesc__7 *chunk__6;
|
||||
|
||||
typedef
|
||||
struct chunkdesc__7 {
|
||||
INT32 next, end, reserved;
|
||||
blockdesc__5 firstblock;
|
||||
} chunkdesc__7;
|
||||
|
||||
void Out_DumpHeap (void)
|
||||
{
|
||||
INT32 caddr;
|
||||
chunk__6 c = NIL;
|
||||
INT32 baddr;
|
||||
block__4 b = NIL;
|
||||
adrptr__3 tag = NIL;
|
||||
caddr = Heap_heap;
|
||||
while (caddr != 0) {
|
||||
Out_String((CHAR*)"Chunk at: ", 11);
|
||||
Out_Hex(caddr, 1);
|
||||
Out_Ln();
|
||||
c = (chunk__6)(ADDRESS)caddr;
|
||||
Out_String((CHAR*)" next: ", 11);
|
||||
Out_Hex(c->next, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" end: ", 11);
|
||||
Out_Hex(c->end, 1);
|
||||
Out_String((CHAR*)" => size: ", 11);
|
||||
Out_Hex(c->end - caddr, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" rsvd: ", 11);
|
||||
Out_Hex(c->reserved, 1);
|
||||
Out_Ln();
|
||||
baddr = (ADDRESS)&c->firstblock;
|
||||
while (baddr < c->end) {
|
||||
Out_String((CHAR*)" Block at: ", 15);
|
||||
Out_Hex(baddr, 1);
|
||||
Out_Ln();
|
||||
b = (block__4)(ADDRESS)baddr;
|
||||
tag = (adrptr__3)(ADDRESS)b->tag;
|
||||
Out_String((CHAR*)" tag: ", 15);
|
||||
Out_Hex(b->tag, 1);
|
||||
if (__MASK(b->tag, -2) != 0) {
|
||||
Out_String((CHAR*)" <--- ODD! ---", 15);
|
||||
}
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" tag^: ", 15);
|
||||
Out_Hex((*tag)[0], 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" size: ", 15);
|
||||
Out_Hex(b->size, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" sentinel: ", 15);
|
||||
Out_Hex(b->sentinel, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" next: ", 15);
|
||||
Out_Hex(b->next, 1);
|
||||
Out_Ln();
|
||||
if (b->tag != (ADDRESS)&b->size) {
|
||||
Out_DumpTag(b->tag);
|
||||
}
|
||||
baddr += (*tag)[0];
|
||||
Out_Ln();
|
||||
}
|
||||
caddr = c->next;
|
||||
Out_Ln();
|
||||
}
|
||||
}
|
||||
|
||||
static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i)
|
||||
{
|
||||
*i -= 1;
|
||||
|
|
@ -473,7 +566,9 @@ void Out_LongReal (LONGREAL x, INT16 n)
|
|||
Out_RealP(x, n, 1);
|
||||
}
|
||||
|
||||
__TDESC(typedesc__5, 1, 0) = {__TDFLDS("typedesc__5", 116), {-4}};
|
||||
__TDESC(typedesc__11, 1, 0) = {__TDFLDS("typedesc__11", 116), {-4}};
|
||||
__TDESC(blockdesc__5, 1, 0) = {__TDFLDS("blockdesc__5", 16), {-4}};
|
||||
__TDESC(chunkdesc__7, 1, 0) = {__TDFLDS("chunkdesc__7", 28), {-4}};
|
||||
|
||||
export void *Out__init(void)
|
||||
{
|
||||
|
|
@ -481,10 +576,13 @@ export void *Out__init(void)
|
|||
__MODULE_IMPORT(Heap);
|
||||
__MODULE_IMPORT(Platform);
|
||||
__REGMOD("Out", 0);
|
||||
__REGCMD("DumpHeap", Out_DumpHeap);
|
||||
__REGCMD("Flush", Out_Flush);
|
||||
__REGCMD("Ln", Out_Ln);
|
||||
__REGCMD("Open", Out_Open);
|
||||
__INITYP(typedesc__5, typedesc__5, 0);
|
||||
__INITYP(typedesc__11, typedesc__11, 0);
|
||||
__INITYP(blockdesc__5, blockdesc__5, 0);
|
||||
__INITYP(chunkdesc__7, chunkdesc__7, 0);
|
||||
/* BEGIN */
|
||||
Out_IsConsole = Platform_IsConsole(1);
|
||||
Out_in = 0;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef Out__h
|
||||
#define Out__h
|
||||
|
|
@ -10,6 +10,8 @@ import BOOLEAN Out_IsConsole;
|
|||
|
||||
|
||||
import void Out_Char (CHAR ch);
|
||||
import void Out_DumpHeap (void);
|
||||
import void Out_DumpTag (INT32 addr);
|
||||
import void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len);
|
||||
import void Out_Flush (void);
|
||||
import void Out_Hex (INT64 x, INT64 n);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef Platform__h
|
||||
#define Platform__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef Reals__h
|
||||
#define Reals__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef Strings__h
|
||||
#define Strings__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef Texts__h
|
||||
#define Texts__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef VT100__h
|
||||
#define VT100__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef extTools__h
|
||||
#define extTools__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -19,6 +19,6 @@ export void *Configuration__init(void)
|
|||
__DEFMOD;
|
||||
__REGMOD("Configuration", 0);
|
||||
/* BEGIN */
|
||||
__MOVE("2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75);
|
||||
__MOVE("2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75);
|
||||
__ENDMOD;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef Configuration__h
|
||||
#define Configuration__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
|
||||
|
||||
#ifndef Files__h
|
||||
#define Files__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -68,7 +68,8 @@ static INT64 Heap_freeList[10];
|
|||
static INT64 Heap_bigBlocks;
|
||||
export INT64 Heap_allocated;
|
||||
static BOOLEAN Heap_firstTry;
|
||||
static INT64 Heap_heap, Heap_heapNegMin, Heap_heapNegMax, Heap_heapPosMin, Heap_heapPosMax;
|
||||
export INT64 Heap_heap;
|
||||
static INT64 Heap_heapNegMin, Heap_heapNegMax, Heap_heapPosMin, Heap_heapPosMax;
|
||||
export INT64 Heap_heapsize;
|
||||
static Heap_FinNode Heap_fin;
|
||||
static INT16 Heap_lockdepth;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
|
||||
|
||||
#ifndef Heap__h
|
||||
#define Heap__h
|
||||
|
|
@ -46,7 +46,9 @@ typedef
|
|||
|
||||
|
||||
import SYSTEM_PTR Heap_modules;
|
||||
import INT64 Heap_allocated, Heap_heapsize;
|
||||
import INT64 Heap_allocated;
|
||||
import INT64 Heap_heap;
|
||||
import INT64 Heap_heapsize;
|
||||
import INT16 Heap_FileCount;
|
||||
|
||||
import ADDRESS *Heap_ModuleDesc__typ;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef Modules__h
|
||||
#define Modules__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef OPB__h
|
||||
#define OPB__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef OPC__h
|
||||
#define OPC__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -495,6 +495,10 @@ void OPM_Get (CHAR *ch)
|
|||
OPM_LogWNum((INT16)*ch, 1);
|
||||
OPM_LogW('.');
|
||||
Texts_DumpReader(OPM_inR);
|
||||
OPM_LogWLn();
|
||||
OPM_LogWStr((CHAR*)"Heap dump:", 11);
|
||||
OPM_LogWLn();
|
||||
Out_DumpHeap();
|
||||
}
|
||||
if ((*ch < 0x09 && !OPM_inR.eot)) {
|
||||
*ch = ' ';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef OPM__h
|
||||
#define OPM__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef OPP__h
|
||||
#define OPP__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
|
||||
|
||||
#ifndef OPS__h
|
||||
#define OPS__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef OPT__h
|
||||
#define OPT__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef OPV__h
|
||||
#define OPV__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -14,10 +14,14 @@ export BOOLEAN Out_IsConsole;
|
|||
static CHAR Out_buf[128];
|
||||
static INT16 Out_in;
|
||||
|
||||
static ADDRESS *typedesc__5__typ;
|
||||
static ADDRESS *typedesc__11__typ;
|
||||
static ADDRESS *blockdesc__5__typ;
|
||||
static ADDRESS *chunkdesc__7__typ;
|
||||
|
||||
export void Out_Char (CHAR ch);
|
||||
export void Out_DumpHeap (void);
|
||||
static void Out_DumpModule (Heap_Module m);
|
||||
export void Out_DumpTag (INT64 addr);
|
||||
export void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len);
|
||||
export void Out_Flush (void);
|
||||
export void Out_Hex (INT64 x, INT64 n);
|
||||
|
|
@ -36,6 +40,8 @@ static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i);
|
|||
static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i);
|
||||
|
||||
#define Out_Entier64(x) (INT64)(x)
|
||||
extern ADDRESS Heap_heap;
|
||||
#define Out_getheap() Heap_heap
|
||||
|
||||
void Out_Flush (void)
|
||||
{
|
||||
|
|
@ -209,93 +215,180 @@ void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len)
|
|||
|
||||
static void Out_DumpModule (Heap_Module m)
|
||||
{
|
||||
Out_String((CHAR*)" next: ", 13);
|
||||
Out_String((CHAR*)" next: ", 19);
|
||||
Out_Hex((INT64)(ADDRESS)m->next, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" name: ", 13);
|
||||
Out_String((CHAR*)" name: ", 19);
|
||||
Out_String(m->name, 20);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" refcnt: ", 13);
|
||||
Out_String((CHAR*)" refcnt: ", 19);
|
||||
Out_Hex(m->refcnt, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" cmds: ", 13);
|
||||
Out_String((CHAR*)" cmds: ", 19);
|
||||
Out_Hex((INT64)(ADDRESS)m->cmds, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" types: ", 13);
|
||||
Out_String((CHAR*)" types: ", 19);
|
||||
Out_Hex(m->types, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" enumPtrs: ", 13);
|
||||
Out_String((CHAR*)" enumPtrs: ", 19);
|
||||
Out_Hex((INT64)(ADDRESS)m->enumPtrs, 1);
|
||||
Out_Ln();
|
||||
}
|
||||
|
||||
typedef
|
||||
struct typedesc__5 *tag__4;
|
||||
struct typedesc__11 *tag__10;
|
||||
|
||||
typedef
|
||||
struct typedesc__5 {
|
||||
struct typedesc__11 {
|
||||
INT64 tag, next, level, module;
|
||||
CHAR name[24];
|
||||
INT64 bases[16];
|
||||
INT64 reserved, blksz, ptr0;
|
||||
} typedesc__5;
|
||||
} typedesc__11;
|
||||
|
||||
void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len)
|
||||
void Out_DumpTag (INT64 addr)
|
||||
{
|
||||
INT64 addr;
|
||||
tag__4 desc = NIL;
|
||||
tag__10 desc = NIL;
|
||||
INT16 i;
|
||||
__GET((ADDRESS)o - 8, addr, INT64);
|
||||
Out_String((CHAR*)"obj tag: ", 11);
|
||||
Out_String((CHAR*)" obj tag: ", 17);
|
||||
Out_Hex(addr, 1);
|
||||
Out_Ln();
|
||||
addr -= __MASK(addr, -2);
|
||||
desc = (tag__4)(ADDRESS)(addr - 192);
|
||||
Out_String((CHAR*)"desc at: ", 11);
|
||||
desc = (tag__10)(ADDRESS)(addr - 192);
|
||||
Out_String((CHAR*)" desc at: ", 17);
|
||||
Out_Hex((INT64)(ADDRESS)desc, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)"desc contains:", 15);
|
||||
Out_String((CHAR*)" desc contains:", 21);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)"tag: ", 11);
|
||||
Out_String((CHAR*)" tag: ", 17);
|
||||
Out_Hex(desc->tag, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)"next: ", 11);
|
||||
Out_String((CHAR*)" next: ", 17);
|
||||
Out_Hex(desc->next, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)"level: ", 11);
|
||||
Out_String((CHAR*)" level: ", 17);
|
||||
Out_Hex(desc->level, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)"module: ", 11);
|
||||
Out_String((CHAR*)" module: ", 17);
|
||||
Out_Hex(desc->module, 1);
|
||||
Out_Ln();
|
||||
Out_DumpModule((Heap_Module)(ADDRESS)desc->module);
|
||||
Out_String((CHAR*)"name: ", 11);
|
||||
if (desc->module != 0) {
|
||||
Out_DumpModule((Heap_Module)(ADDRESS)desc->module);
|
||||
}
|
||||
Out_String((CHAR*)" name: ", 17);
|
||||
Out_String(desc->name, 24);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)"bases: ", 11);
|
||||
Out_String((CHAR*)" bases: ", 17);
|
||||
i = 0;
|
||||
while (i < 16) {
|
||||
Out_Hex(desc->bases[__X(i, 16)], 16);
|
||||
if (__MASK(i, -4) == 3) {
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" ", 11);
|
||||
Out_String((CHAR*)" ", 17);
|
||||
} else {
|
||||
Out_Char(' ');
|
||||
}
|
||||
i += 1;
|
||||
}
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)"reserved: ", 11);
|
||||
Out_String((CHAR*)" reserved: ", 17);
|
||||
Out_Hex(desc->reserved, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)"blksz: ", 11);
|
||||
Out_String((CHAR*)" blksz: ", 17);
|
||||
Out_Hex(desc->blksz, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)"ptr0: ", 11);
|
||||
Out_String((CHAR*)" ptr0: ", 17);
|
||||
Out_Hex(desc->ptr0, 1);
|
||||
Out_Ln();
|
||||
}
|
||||
|
||||
void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len)
|
||||
{
|
||||
INT64 addr;
|
||||
__GET((ADDRESS)o - 8, addr, INT64);
|
||||
Out_DumpTag(addr);
|
||||
}
|
||||
|
||||
typedef
|
||||
INT64 (*adrptr__3)[1];
|
||||
|
||||
typedef
|
||||
struct blockdesc__5 *block__4;
|
||||
|
||||
typedef
|
||||
struct blockdesc__5 {
|
||||
INT64 tag, size, sentinel, next;
|
||||
} blockdesc__5;
|
||||
|
||||
typedef
|
||||
struct chunkdesc__7 *chunk__6;
|
||||
|
||||
typedef
|
||||
struct chunkdesc__7 {
|
||||
INT64 next, end, reserved;
|
||||
blockdesc__5 firstblock;
|
||||
} chunkdesc__7;
|
||||
|
||||
void Out_DumpHeap (void)
|
||||
{
|
||||
INT64 caddr;
|
||||
chunk__6 c = NIL;
|
||||
INT64 baddr;
|
||||
block__4 b = NIL;
|
||||
adrptr__3 tag = NIL;
|
||||
caddr = Heap_heap;
|
||||
while (caddr != 0) {
|
||||
Out_String((CHAR*)"Chunk at: ", 11);
|
||||
Out_Hex(caddr, 1);
|
||||
Out_Ln();
|
||||
c = (chunk__6)(ADDRESS)caddr;
|
||||
Out_String((CHAR*)" next: ", 11);
|
||||
Out_Hex(c->next, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" end: ", 11);
|
||||
Out_Hex(c->end, 1);
|
||||
Out_String((CHAR*)" => size: ", 11);
|
||||
Out_Hex(c->end - caddr, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" rsvd: ", 11);
|
||||
Out_Hex(c->reserved, 1);
|
||||
Out_Ln();
|
||||
baddr = (ADDRESS)&c->firstblock;
|
||||
while (baddr < c->end) {
|
||||
Out_String((CHAR*)" Block at: ", 15);
|
||||
Out_Hex(baddr, 1);
|
||||
Out_Ln();
|
||||
b = (block__4)(ADDRESS)baddr;
|
||||
tag = (adrptr__3)(ADDRESS)b->tag;
|
||||
Out_String((CHAR*)" tag: ", 15);
|
||||
Out_Hex(b->tag, 1);
|
||||
if (__MASK(b->tag, -2) != 0) {
|
||||
Out_String((CHAR*)" <--- ODD! ---", 15);
|
||||
}
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" tag^: ", 15);
|
||||
Out_Hex((*tag)[0], 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" size: ", 15);
|
||||
Out_Hex(b->size, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" sentinel: ", 15);
|
||||
Out_Hex(b->sentinel, 1);
|
||||
Out_Ln();
|
||||
Out_String((CHAR*)" next: ", 15);
|
||||
Out_Hex(b->next, 1);
|
||||
Out_Ln();
|
||||
if (b->tag != (ADDRESS)&b->size) {
|
||||
Out_DumpTag(b->tag);
|
||||
}
|
||||
baddr += (*tag)[0];
|
||||
Out_Ln();
|
||||
}
|
||||
caddr = c->next;
|
||||
Out_Ln();
|
||||
}
|
||||
}
|
||||
|
||||
static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i)
|
||||
{
|
||||
*i -= 1;
|
||||
|
|
@ -473,7 +566,9 @@ void Out_LongReal (LONGREAL x, INT16 n)
|
|||
Out_RealP(x, n, 1);
|
||||
}
|
||||
|
||||
__TDESC(typedesc__5, 1, 0) = {__TDFLDS("typedesc__5", 208), {-8}};
|
||||
__TDESC(typedesc__11, 1, 0) = {__TDFLDS("typedesc__11", 208), {-8}};
|
||||
__TDESC(blockdesc__5, 1, 0) = {__TDFLDS("blockdesc__5", 32), {-8}};
|
||||
__TDESC(chunkdesc__7, 1, 0) = {__TDFLDS("chunkdesc__7", 56), {-8}};
|
||||
|
||||
export void *Out__init(void)
|
||||
{
|
||||
|
|
@ -481,10 +576,13 @@ export void *Out__init(void)
|
|||
__MODULE_IMPORT(Heap);
|
||||
__MODULE_IMPORT(Platform);
|
||||
__REGMOD("Out", 0);
|
||||
__REGCMD("DumpHeap", Out_DumpHeap);
|
||||
__REGCMD("Flush", Out_Flush);
|
||||
__REGCMD("Ln", Out_Ln);
|
||||
__REGCMD("Open", Out_Open);
|
||||
__INITYP(typedesc__5, typedesc__5, 0);
|
||||
__INITYP(typedesc__11, typedesc__11, 0);
|
||||
__INITYP(blockdesc__5, blockdesc__5, 0);
|
||||
__INITYP(chunkdesc__7, chunkdesc__7, 0);
|
||||
/* BEGIN */
|
||||
Out_IsConsole = Platform_IsConsole(1);
|
||||
Out_in = 0;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#ifndef Out__h
|
||||
#define Out__h
|
||||
|
|
@ -10,6 +10,8 @@ import BOOLEAN Out_IsConsole;
|
|||
|
||||
|
||||
import void Out_Char (CHAR ch);
|
||||
import void Out_DumpHeap (void);
|
||||
import void Out_DumpTag (INT64 addr);
|
||||
import void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len);
|
||||
import void Out_Flush (void);
|
||||
import void Out_Hex (INT64 x, INT64 n);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue