mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 19:12:25 +00:00
Update bootstrap sources.
This commit is contained in:
parent
f5ae1af37d
commit
0049d88a0f
203 changed files with 621 additions and 1873 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -16,6 +16,8 @@
|
|||
/src/test/**/*.sym
|
||||
/src/test/**/*.stackdump
|
||||
/src/test/confidence/**/result
|
||||
/src/test/confidence/**/*.asm
|
||||
/src/test/confidence/**/*.s
|
||||
/.DS_store
|
||||
**/.DS_store
|
||||
**/*.dSYM
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
|
||||
|
||||
|
|
@ -13,6 +13,6 @@ export void *Configuration__init(void)
|
|||
__DEFMOD;
|
||||
__REGMOD("Configuration", 0);
|
||||
/* BEGIN */
|
||||
__MOVE("1.95 [2016/07/22] for gcc LP64 on cygwin", Configuration_versionLong, 41);
|
||||
__MOVE("1.95 [2016/08/12] for gcc LP64 on cygwin", Configuration_versionLong, 41);
|
||||
__ENDMOD;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef Configuration__h
|
||||
#define Configuration__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
#include "Platform.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef Console__h
|
||||
#define Console__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin tspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
#include "Configuration.h"
|
||||
#include "Console.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin tspkaSfF */
|
||||
|
||||
#ifndef Files__h
|
||||
#define Files__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tskSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin tskSfF */
|
||||
#include "SYSTEM.h"
|
||||
|
||||
struct Heap__1 {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tskSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin tskSfF */
|
||||
|
||||
#ifndef Heap__h
|
||||
#define Heap__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
#include "Console.h"
|
||||
#include "Heap.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef Modules__h
|
||||
#define Modules__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
#include "OPM.h"
|
||||
#include "OPS.h"
|
||||
|
|
@ -90,8 +90,8 @@ OPT_Node OPB_NewLeaf (OPT_Object obj)
|
|||
node = OPT_NewNode(9);
|
||||
break;
|
||||
default:
|
||||
OPB_err(127);
|
||||
node = OPT_NewNode(0);
|
||||
OPB_err(127);
|
||||
break;
|
||||
}
|
||||
node->obj = obj;
|
||||
|
|
@ -1596,8 +1596,9 @@ void OPB_SetElem (OPT_Node *x)
|
|||
|
||||
static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode)
|
||||
{
|
||||
OPT_Struct y = NIL;
|
||||
INTEGER f, g;
|
||||
OPT_Struct y = NIL, p = NIL, q = NIL;
|
||||
OPT_Struct p = NIL, q = NIL;
|
||||
if (OPM_Verbose) {
|
||||
OPM_LogWLn();
|
||||
OPM_LogWStr((CHAR*)"PROCEDURE CheckAssign", (LONGINT)22);
|
||||
|
|
@ -1642,14 +1643,8 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode)
|
|||
}
|
||||
break;
|
||||
case 6:
|
||||
if (OPM_LIntSize == 4) {
|
||||
if (!__IN(g, 0x70)) {
|
||||
OPB_err(113);
|
||||
}
|
||||
} else {
|
||||
if (!__IN(g, 0x70)) {
|
||||
OPB_err(113);
|
||||
}
|
||||
if (!__IN(g, 0x70)) {
|
||||
OPB_err(113);
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef OPB__h
|
||||
#define OPB__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
#include "Configuration.h"
|
||||
#include "OPM.h"
|
||||
|
|
@ -315,7 +315,7 @@ void OPC_Andent (OPT_Struct typ)
|
|||
static BOOLEAN OPC_Undefined (OPT_Object obj)
|
||||
{
|
||||
BOOLEAN _o_result;
|
||||
_o_result = (((obj->mnolev >= 0 && obj->linkadr != (LONGINT)(3 + OPM_currFile))) && obj->linkadr != 2) || obj->name[0] == 0x00;
|
||||
_o_result = obj->name[0] == 0x00 || (((obj->mnolev >= 0 && obj->linkadr != (LONGINT)(3 + OPM_currFile))) && obj->linkadr != 2);
|
||||
return _o_result;
|
||||
}
|
||||
|
||||
|
|
@ -1238,8 +1238,8 @@ void OPC_GenHdr (OPT_Node n)
|
|||
static void OPC_GenHeaderMsg (void)
|
||||
{
|
||||
INTEGER i;
|
||||
OPM_WriteString((CHAR*)"/*", (LONGINT)3);
|
||||
OPM_WriteString((CHAR*)" voc ", (LONGINT)6);
|
||||
OPM_WriteString((CHAR*)"/* ", (LONGINT)4);
|
||||
OPM_WriteString((CHAR*)"voc", (LONGINT)4);
|
||||
OPM_Write(' ');
|
||||
OPM_WriteString(Configuration_versionLong, ((LONGINT)(41)));
|
||||
OPM_Write(' ');
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef OPC__h
|
||||
#define OPC__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
#include "Configuration.h"
|
||||
#include "Console.h"
|
||||
|
|
@ -36,6 +36,7 @@ static CHAR OPM_OBERON[1024];
|
|||
static CHAR OPM_MODULES[1024];
|
||||
|
||||
|
||||
export INTEGER OPM_AlignSize (LONGINT size);
|
||||
static void OPM_Append (Files_Rider *R, LONGINT *R__typ, Files_File F);
|
||||
export void OPM_CloseFiles (void);
|
||||
export void OPM_CloseOldSym (void);
|
||||
|
|
@ -57,7 +58,6 @@ export void OPM_LogWNum (LONGINT i, LONGINT len);
|
|||
export void OPM_LogWStr (CHAR *s, LONGINT s__len);
|
||||
static void OPM_MakeFileName (CHAR *name, LONGINT name__len, CHAR *FName, LONGINT FName__len, CHAR *ext, LONGINT ext__len);
|
||||
export void OPM_Mark (INTEGER n, LONGINT pos);
|
||||
static INTEGER OPM_Min (INTEGER a, INTEGER b);
|
||||
export void OPM_NewSym (CHAR *modName, LONGINT modName__len);
|
||||
export void OPM_OldSym (CHAR *modName, LONGINT modName__len, BOOLEAN *done);
|
||||
export void OPM_OpenFiles (CHAR *moduleName, LONGINT moduleName__len);
|
||||
|
|
@ -85,7 +85,7 @@ export void OPM_WriteString (CHAR *s, LONGINT s__len);
|
|||
export void OPM_WriteStringVar (CHAR *s, LONGINT s__len);
|
||||
export BOOLEAN OPM_eofSF (void);
|
||||
export void OPM_err (INTEGER n);
|
||||
static LONGINT OPM_minus (LONGINT i);
|
||||
static LONGINT OPM_minusop (LONGINT i);
|
||||
static LONGINT OPM_power0 (LONGINT i, LONGINT j);
|
||||
|
||||
|
||||
|
|
@ -117,50 +117,38 @@ static void OPM_ScanOptions (CHAR *s, LONGINT s__len, SET *opt)
|
|||
i = 1;
|
||||
while (s[__X(i, s__len)] != 0x00) {
|
||||
switch (s[__X(i, s__len)]) {
|
||||
case 'e':
|
||||
*opt = *opt ^ 0x0200;
|
||||
break;
|
||||
case 's':
|
||||
*opt = *opt ^ 0x10;
|
||||
break;
|
||||
case 'm':
|
||||
*opt = *opt ^ 0x0400;
|
||||
break;
|
||||
case 'x':
|
||||
*opt = *opt ^ 0x01;
|
||||
break;
|
||||
case 'r':
|
||||
*opt = *opt ^ 0x04;
|
||||
break;
|
||||
case 't':
|
||||
*opt = *opt ^ 0x08;
|
||||
break;
|
||||
case 'a':
|
||||
*opt = *opt ^ 0x80;
|
||||
break;
|
||||
case 'k':
|
||||
*opt = *opt ^ 0x40;
|
||||
break;
|
||||
case 'p':
|
||||
*opt = *opt ^ 0x20;
|
||||
break;
|
||||
case 'S':
|
||||
*opt = *opt ^ 0x2000;
|
||||
break;
|
||||
case 'c':
|
||||
*opt = *opt ^ 0x4000;
|
||||
break;
|
||||
case 'M':
|
||||
*opt = *opt ^ 0x8000;
|
||||
case 'e':
|
||||
*opt = *opt ^ 0x0200;
|
||||
break;
|
||||
case 'f':
|
||||
*opt = *opt ^ 0x010000;
|
||||
break;
|
||||
case 'F':
|
||||
*opt = *opt ^ 0x020000;
|
||||
case 'k':
|
||||
*opt = *opt ^ 0x40;
|
||||
break;
|
||||
case 'V':
|
||||
*opt = *opt ^ 0x040000;
|
||||
case 'm':
|
||||
*opt = *opt ^ 0x0400;
|
||||
break;
|
||||
case 'p':
|
||||
*opt = *opt ^ 0x20;
|
||||
break;
|
||||
case 'r':
|
||||
*opt = *opt ^ 0x04;
|
||||
break;
|
||||
case 's':
|
||||
*opt = *opt ^ 0x10;
|
||||
break;
|
||||
case 't':
|
||||
*opt = *opt ^ 0x08;
|
||||
break;
|
||||
case 'x':
|
||||
*opt = *opt ^ 0x01;
|
||||
break;
|
||||
case 'B':
|
||||
if (s[__X(i + 1, s__len)] != 0x00) {
|
||||
|
|
@ -178,6 +166,19 @@ static void OPM_ScanOptions (CHAR *s, LONGINT s__len, SET *opt)
|
|||
__ASSERT(OPM_IntSize == 2 || OPM_IntSize == 4, 0);
|
||||
__ASSERT(OPM_PointerSize == 4 || OPM_PointerSize == 8, 0);
|
||||
__ASSERT(OPM_Alignment == 4 || OPM_Alignment == 8, 0);
|
||||
Files_SetSearchPath((CHAR*)"", (LONGINT)1);
|
||||
break;
|
||||
case 'F':
|
||||
*opt = *opt ^ 0x020000;
|
||||
break;
|
||||
case 'M':
|
||||
*opt = *opt ^ 0x8000;
|
||||
break;
|
||||
case 'S':
|
||||
*opt = *opt ^ 0x2000;
|
||||
break;
|
||||
case 'V':
|
||||
*opt = *opt ^ 0x040000;
|
||||
break;
|
||||
default:
|
||||
OPM_LogWStr((CHAR*)" warning: option ", (LONGINT)19);
|
||||
|
|
@ -575,7 +576,7 @@ static void OPM_GetProperty (Texts_Scanner *S, LONGINT *S__typ, CHAR *name, LONG
|
|||
__DEL(name);
|
||||
}
|
||||
|
||||
static LONGINT OPM_minus (LONGINT i)
|
||||
static LONGINT OPM_minusop (LONGINT i)
|
||||
{
|
||||
LONGINT _o_result;
|
||||
_o_result = -i;
|
||||
|
|
@ -663,17 +664,25 @@ static void OPM_VerboseListSizes (void)
|
|||
OPM_LogWLn();
|
||||
}
|
||||
|
||||
static INTEGER OPM_Min (INTEGER a, INTEGER b)
|
||||
INTEGER OPM_AlignSize (LONGINT size)
|
||||
{
|
||||
INTEGER _o_result;
|
||||
if (a < b) {
|
||||
_o_result = a;
|
||||
return _o_result;
|
||||
INTEGER align;
|
||||
if (size < (LONGINT)OPM_Alignment) {
|
||||
if (size > 8) {
|
||||
align = 16;
|
||||
} else if (size > 4) {
|
||||
align = 8;
|
||||
} else if (size > 2) {
|
||||
align = 4;
|
||||
} else {
|
||||
align = (int)size;
|
||||
}
|
||||
} else {
|
||||
_o_result = b;
|
||||
return _o_result;
|
||||
align = OPM_Alignment;
|
||||
}
|
||||
__RETCHK;
|
||||
_o_result = align;
|
||||
return _o_result;
|
||||
}
|
||||
|
||||
static void OPM_GetProperties (void)
|
||||
|
|
@ -682,24 +691,24 @@ static void OPM_GetProperties (void)
|
|||
OPM_ProcSize = OPM_PointerSize;
|
||||
OPM_LIntSize = __ASHL(OPM_IntSize, 1);
|
||||
OPM_SetSize = OPM_LIntSize;
|
||||
OPM_CharAlign = OPM_Min(OPM_Alignment, OPM_CharSize);
|
||||
OPM_BoolAlign = OPM_Min(OPM_Alignment, OPM_BoolSize);
|
||||
OPM_SIntAlign = OPM_Min(OPM_Alignment, OPM_SIntSize);
|
||||
OPM_RecAlign = OPM_Min(OPM_Alignment, OPM_RecSize);
|
||||
OPM_RealAlign = OPM_Min(OPM_Alignment, OPM_RealSize);
|
||||
OPM_LRealAlign = OPM_Min(OPM_Alignment, OPM_LRealSize);
|
||||
OPM_PointerAlign = OPM_Min(OPM_Alignment, OPM_PointerSize);
|
||||
OPM_ProcAlign = OPM_Min(OPM_Alignment, OPM_ProcSize);
|
||||
OPM_IntAlign = OPM_Min(OPM_Alignment, OPM_IntSize);
|
||||
OPM_LIntAlign = OPM_Min(OPM_Alignment, OPM_LIntSize);
|
||||
OPM_SetAlign = OPM_Min(OPM_Alignment, OPM_SetSize);
|
||||
OPM_CharAlign = OPM_AlignSize(OPM_CharSize);
|
||||
OPM_BoolAlign = OPM_AlignSize(OPM_BoolSize);
|
||||
OPM_SIntAlign = OPM_AlignSize(OPM_SIntSize);
|
||||
OPM_RecAlign = OPM_AlignSize(OPM_RecSize);
|
||||
OPM_RealAlign = OPM_AlignSize(OPM_RealSize);
|
||||
OPM_LRealAlign = OPM_AlignSize(OPM_LRealSize);
|
||||
OPM_PointerAlign = OPM_AlignSize(OPM_PointerSize);
|
||||
OPM_ProcAlign = OPM_AlignSize(OPM_ProcSize);
|
||||
OPM_IntAlign = OPM_AlignSize(OPM_IntSize);
|
||||
OPM_LIntAlign = OPM_AlignSize(OPM_LIntSize);
|
||||
OPM_SetAlign = OPM_AlignSize(OPM_SetSize);
|
||||
base = -2;
|
||||
OPM_MinSInt = __ASH(base, __ASHL(OPM_SIntSize, 3) - 2);
|
||||
OPM_MaxSInt = OPM_minus(OPM_MinSInt + 1);
|
||||
OPM_MaxSInt = OPM_minusop(OPM_MinSInt + 1);
|
||||
OPM_MinInt = __ASH(base, __ASHL(OPM_IntSize, 3) - 2);
|
||||
OPM_MaxInt = OPM_minus(OPM_MinInt + 1);
|
||||
OPM_MaxInt = OPM_minusop(OPM_MinInt + 1);
|
||||
OPM_MinLInt = __ASH(base, __ASHL(OPM_LIntSize, 3) - 2);
|
||||
OPM_MaxLInt = OPM_minus(OPM_MinLInt + 1);
|
||||
OPM_MaxLInt = OPM_minusop(OPM_MinLInt + 1);
|
||||
if (OPM_RealSize == 4) {
|
||||
OPM_MaxReal = 3.40282346000000e+038;
|
||||
} else if (OPM_RealSize == 8) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef OPM__h
|
||||
#define OPM__h
|
||||
|
|
@ -18,6 +18,7 @@ import SET OPM_opt, OPM_glbopt;
|
|||
import BOOLEAN OPM_dontAsm, OPM_dontLink, OPM_mainProg, OPM_mainLinkStat, OPM_notColorOutput, OPM_forceNewSym, OPM_Verbose;
|
||||
|
||||
|
||||
import INTEGER OPM_AlignSize (LONGINT size);
|
||||
import void OPM_CloseFiles (void);
|
||||
import void OPM_CloseOldSym (void);
|
||||
import void OPM_DeleteNewSym (void);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
#include "OPB.h"
|
||||
#include "OPM.h"
|
||||
|
|
@ -438,10 +438,10 @@ static void OPP_TypeDecl (OPT_Struct *typ, OPT_Struct *banned)
|
|||
if (OPP_sym == 38) {
|
||||
OPP_qualident(&id);
|
||||
if (id->mode == 5) {
|
||||
if (id->typ != *banned) {
|
||||
*typ = id->typ;
|
||||
} else {
|
||||
if (id->typ == *banned) {
|
||||
OPP_err(58);
|
||||
} else {
|
||||
*typ = id->typ;
|
||||
}
|
||||
} else {
|
||||
OPP_err(52);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef OPP__h
|
||||
#define OPP__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin tspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
#include "OPM.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin tspkaSfF */
|
||||
|
||||
#ifndef OPS__h
|
||||
#define OPS__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
#include "OPM.h"
|
||||
#include "OPS.h"
|
||||
|
|
@ -1809,6 +1809,7 @@ export void *OPT__init(void)
|
|||
OPT_syslink = OPT_topScope->right;
|
||||
OPT_universe = OPT_topScope;
|
||||
OPT_topScope->right = NIL;
|
||||
OPT_EnterTyp((CHAR*)"BOOLEAN", 2, OPM_BoolSize, &OPT_booltyp);
|
||||
OPT_EnterTyp((CHAR*)"CHAR", 3, OPM_CharSize, &OPT_chartyp);
|
||||
OPT_EnterTyp((CHAR*)"SET", 9, OPM_SetSize, &OPT_settyp);
|
||||
OPT_EnterTyp((CHAR*)"REAL", 7, OPM_RealSize, &OPT_realtyp);
|
||||
|
|
@ -1816,7 +1817,6 @@ export void *OPT__init(void)
|
|||
OPT_EnterTyp((CHAR*)"LONGINT", 6, OPM_LIntSize, &OPT_linttyp);
|
||||
OPT_EnterTyp((CHAR*)"LONGREAL", 8, OPM_LRealSize, &OPT_lrltyp);
|
||||
OPT_EnterTyp((CHAR*)"SHORTINT", 4, OPM_SIntSize, &OPT_sinttyp);
|
||||
OPT_EnterTyp((CHAR*)"BOOLEAN", 2, OPM_BoolSize, &OPT_booltyp);
|
||||
OPT_EnterBoolConst((CHAR*)"FALSE", ((LONGINT)(0)));
|
||||
OPT_EnterBoolConst((CHAR*)"TRUE", ((LONGINT)(1)));
|
||||
OPT_EnterProc((CHAR*)"HALT", 0);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef OPT__h
|
||||
#define OPT__h
|
||||
|
|
@ -59,8 +59,7 @@ typedef
|
|||
INTEGER ref, sysflag;
|
||||
LONGINT n, size, align, txtpos;
|
||||
BOOLEAN allocated, pbused, pvused;
|
||||
char _prvt0[8];
|
||||
LONGINT pbfp, pvfp;
|
||||
char _prvt0[16];
|
||||
OPT_Struct BaseTyp;
|
||||
OPT_Object link, strobj;
|
||||
} OPT_StrDesc;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
#include "OPC.h"
|
||||
#include "OPM.h"
|
||||
|
|
@ -332,7 +332,7 @@ static INTEGER OPV_Precedence (INTEGER class, INTEGER subclass, INTEGER form, IN
|
|||
return _o_result;
|
||||
break;
|
||||
default:
|
||||
OPM_LogWStr((CHAR*)"unhandled case in OPV.Precedence Nmop, subclass = ", (LONGINT)51);
|
||||
OPM_LogWStr((CHAR*)"unhandled case in OPV.Precedence OPM.Nmop, subclass = ", (LONGINT)55);
|
||||
OPM_LogWNum(subclass, ((LONGINT)(0)));
|
||||
OPM_LogWLn();
|
||||
break;
|
||||
|
|
@ -402,7 +402,7 @@ static INTEGER OPV_Precedence (INTEGER class, INTEGER subclass, INTEGER form, IN
|
|||
return _o_result;
|
||||
break;
|
||||
default:
|
||||
OPM_LogWStr((CHAR*)"unhandled case in OPV.Precedence Ndop, subclass = ", (LONGINT)51);
|
||||
OPM_LogWStr((CHAR*)"unhandled case in OPV.Precedence OPM.Ndop, subclass = ", (LONGINT)55);
|
||||
OPM_LogWNum(subclass, ((LONGINT)(0)));
|
||||
OPM_LogWLn();
|
||||
break;
|
||||
|
|
@ -954,7 +954,7 @@ static void OPV_expr (OPT_Node n, INTEGER prec)
|
|||
}
|
||||
break;
|
||||
case 29:
|
||||
if ((((__IN(n->typ->form, 0x6240) && __IN(l->typ->form, 0x6240))) && n->typ->size == l->typ->size) || !__IN(l->class, 0x17)) {
|
||||
if (!__IN(l->class, 0x17) || (((__IN(n->typ->form, 0x6240) && __IN(l->typ->form, 0x6240))) && n->typ->size == l->typ->size)) {
|
||||
OPM_Write('(');
|
||||
OPC_Ident(n->typ->strobj);
|
||||
OPM_Write(')');
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef OPV__h
|
||||
#define OPV__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
|
||||
typedef
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef Platform__h
|
||||
#define Platform__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef Reals__h
|
||||
#define Reals__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef Strings__h
|
||||
#define Strings__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
#include "Files.h"
|
||||
#include "Modules.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef Texts__h
|
||||
#define Texts__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkamSf */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkamSf */
|
||||
#include "SYSTEM.h"
|
||||
#include "Configuration.h"
|
||||
#include "Heap.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
|
||||
typedef
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef errors__h
|
||||
#define errors__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
#include "Configuration.h"
|
||||
#include "Console.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef extTools__h
|
||||
#define extTools__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
#include "Console.h"
|
||||
#include "Strings.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef vt100__h
|
||||
#define vt100__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
|
||||
|
||||
|
|
@ -13,6 +13,6 @@ export void *Configuration__init(void)
|
|||
__DEFMOD;
|
||||
__REGMOD("Configuration", 0);
|
||||
/* BEGIN */
|
||||
__MOVE("1.95 [2016/07/22] for gcc LP64 on cygwin", Configuration_versionLong, 41);
|
||||
__MOVE("1.95 [2016/08/12] for gcc LP64 on cygwin", Configuration_versionLong, 41);
|
||||
__ENDMOD;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef Configuration__h
|
||||
#define Configuration__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
#include "Platform.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef Console__h
|
||||
#define Console__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin tspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
#include "Configuration.h"
|
||||
#include "Console.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin tspkaSfF */
|
||||
|
||||
#ifndef Files__h
|
||||
#define Files__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tskSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin tskSfF */
|
||||
#include "SYSTEM.h"
|
||||
|
||||
struct Heap__1 {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tskSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin tskSfF */
|
||||
|
||||
#ifndef Heap__h
|
||||
#define Heap__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
#include "Console.h"
|
||||
#include "Heap.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef Modules__h
|
||||
#define Modules__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
#include "OPM.h"
|
||||
#include "OPS.h"
|
||||
|
|
@ -90,8 +90,8 @@ OPT_Node OPB_NewLeaf (OPT_Object obj)
|
|||
node = OPT_NewNode(9);
|
||||
break;
|
||||
default:
|
||||
OPB_err(127);
|
||||
node = OPT_NewNode(0);
|
||||
OPB_err(127);
|
||||
break;
|
||||
}
|
||||
node->obj = obj;
|
||||
|
|
@ -1596,8 +1596,9 @@ void OPB_SetElem (OPT_Node *x)
|
|||
|
||||
static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode)
|
||||
{
|
||||
OPT_Struct y = NIL;
|
||||
INTEGER f, g;
|
||||
OPT_Struct y = NIL, p = NIL, q = NIL;
|
||||
OPT_Struct p = NIL, q = NIL;
|
||||
if (OPM_Verbose) {
|
||||
OPM_LogWLn();
|
||||
OPM_LogWStr((CHAR*)"PROCEDURE CheckAssign", (LONGINT)22);
|
||||
|
|
@ -1642,14 +1643,8 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode)
|
|||
}
|
||||
break;
|
||||
case 6:
|
||||
if (OPM_LIntSize == 4) {
|
||||
if (!__IN(g, 0x70)) {
|
||||
OPB_err(113);
|
||||
}
|
||||
} else {
|
||||
if (!__IN(g, 0x70)) {
|
||||
OPB_err(113);
|
||||
}
|
||||
if (!__IN(g, 0x70)) {
|
||||
OPB_err(113);
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef OPB__h
|
||||
#define OPB__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
#include "Configuration.h"
|
||||
#include "OPM.h"
|
||||
|
|
@ -315,7 +315,7 @@ void OPC_Andent (OPT_Struct typ)
|
|||
static BOOLEAN OPC_Undefined (OPT_Object obj)
|
||||
{
|
||||
BOOLEAN _o_result;
|
||||
_o_result = (((obj->mnolev >= 0 && obj->linkadr != (LONGINT)(3 + OPM_currFile))) && obj->linkadr != 2) || obj->name[0] == 0x00;
|
||||
_o_result = obj->name[0] == 0x00 || (((obj->mnolev >= 0 && obj->linkadr != (LONGINT)(3 + OPM_currFile))) && obj->linkadr != 2);
|
||||
return _o_result;
|
||||
}
|
||||
|
||||
|
|
@ -1238,8 +1238,8 @@ void OPC_GenHdr (OPT_Node n)
|
|||
static void OPC_GenHeaderMsg (void)
|
||||
{
|
||||
INTEGER i;
|
||||
OPM_WriteString((CHAR*)"/*", (LONGINT)3);
|
||||
OPM_WriteString((CHAR*)" voc ", (LONGINT)6);
|
||||
OPM_WriteString((CHAR*)"/* ", (LONGINT)4);
|
||||
OPM_WriteString((CHAR*)"voc", (LONGINT)4);
|
||||
OPM_Write(' ');
|
||||
OPM_WriteString(Configuration_versionLong, ((LONGINT)(41)));
|
||||
OPM_Write(' ');
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef OPC__h
|
||||
#define OPC__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
#include "Configuration.h"
|
||||
#include "Console.h"
|
||||
|
|
@ -36,6 +36,7 @@ static CHAR OPM_OBERON[1024];
|
|||
static CHAR OPM_MODULES[1024];
|
||||
|
||||
|
||||
export INTEGER OPM_AlignSize (LONGINT size);
|
||||
static void OPM_Append (Files_Rider *R, LONGINT *R__typ, Files_File F);
|
||||
export void OPM_CloseFiles (void);
|
||||
export void OPM_CloseOldSym (void);
|
||||
|
|
@ -57,7 +58,6 @@ export void OPM_LogWNum (LONGINT i, LONGINT len);
|
|||
export void OPM_LogWStr (CHAR *s, LONGINT s__len);
|
||||
static void OPM_MakeFileName (CHAR *name, LONGINT name__len, CHAR *FName, LONGINT FName__len, CHAR *ext, LONGINT ext__len);
|
||||
export void OPM_Mark (INTEGER n, LONGINT pos);
|
||||
static INTEGER OPM_Min (INTEGER a, INTEGER b);
|
||||
export void OPM_NewSym (CHAR *modName, LONGINT modName__len);
|
||||
export void OPM_OldSym (CHAR *modName, LONGINT modName__len, BOOLEAN *done);
|
||||
export void OPM_OpenFiles (CHAR *moduleName, LONGINT moduleName__len);
|
||||
|
|
@ -85,7 +85,7 @@ export void OPM_WriteString (CHAR *s, LONGINT s__len);
|
|||
export void OPM_WriteStringVar (CHAR *s, LONGINT s__len);
|
||||
export BOOLEAN OPM_eofSF (void);
|
||||
export void OPM_err (INTEGER n);
|
||||
static LONGINT OPM_minus (LONGINT i);
|
||||
static LONGINT OPM_minusop (LONGINT i);
|
||||
static LONGINT OPM_power0 (LONGINT i, LONGINT j);
|
||||
|
||||
|
||||
|
|
@ -117,50 +117,38 @@ static void OPM_ScanOptions (CHAR *s, LONGINT s__len, SET *opt)
|
|||
i = 1;
|
||||
while (s[__X(i, s__len)] != 0x00) {
|
||||
switch (s[__X(i, s__len)]) {
|
||||
case 'e':
|
||||
*opt = *opt ^ 0x0200;
|
||||
break;
|
||||
case 's':
|
||||
*opt = *opt ^ 0x10;
|
||||
break;
|
||||
case 'm':
|
||||
*opt = *opt ^ 0x0400;
|
||||
break;
|
||||
case 'x':
|
||||
*opt = *opt ^ 0x01;
|
||||
break;
|
||||
case 'r':
|
||||
*opt = *opt ^ 0x04;
|
||||
break;
|
||||
case 't':
|
||||
*opt = *opt ^ 0x08;
|
||||
break;
|
||||
case 'a':
|
||||
*opt = *opt ^ 0x80;
|
||||
break;
|
||||
case 'k':
|
||||
*opt = *opt ^ 0x40;
|
||||
break;
|
||||
case 'p':
|
||||
*opt = *opt ^ 0x20;
|
||||
break;
|
||||
case 'S':
|
||||
*opt = *opt ^ 0x2000;
|
||||
break;
|
||||
case 'c':
|
||||
*opt = *opt ^ 0x4000;
|
||||
break;
|
||||
case 'M':
|
||||
*opt = *opt ^ 0x8000;
|
||||
case 'e':
|
||||
*opt = *opt ^ 0x0200;
|
||||
break;
|
||||
case 'f':
|
||||
*opt = *opt ^ 0x010000;
|
||||
break;
|
||||
case 'F':
|
||||
*opt = *opt ^ 0x020000;
|
||||
case 'k':
|
||||
*opt = *opt ^ 0x40;
|
||||
break;
|
||||
case 'V':
|
||||
*opt = *opt ^ 0x040000;
|
||||
case 'm':
|
||||
*opt = *opt ^ 0x0400;
|
||||
break;
|
||||
case 'p':
|
||||
*opt = *opt ^ 0x20;
|
||||
break;
|
||||
case 'r':
|
||||
*opt = *opt ^ 0x04;
|
||||
break;
|
||||
case 's':
|
||||
*opt = *opt ^ 0x10;
|
||||
break;
|
||||
case 't':
|
||||
*opt = *opt ^ 0x08;
|
||||
break;
|
||||
case 'x':
|
||||
*opt = *opt ^ 0x01;
|
||||
break;
|
||||
case 'B':
|
||||
if (s[__X(i + 1, s__len)] != 0x00) {
|
||||
|
|
@ -178,6 +166,19 @@ static void OPM_ScanOptions (CHAR *s, LONGINT s__len, SET *opt)
|
|||
__ASSERT(OPM_IntSize == 2 || OPM_IntSize == 4, 0);
|
||||
__ASSERT(OPM_PointerSize == 4 || OPM_PointerSize == 8, 0);
|
||||
__ASSERT(OPM_Alignment == 4 || OPM_Alignment == 8, 0);
|
||||
Files_SetSearchPath((CHAR*)"", (LONGINT)1);
|
||||
break;
|
||||
case 'F':
|
||||
*opt = *opt ^ 0x020000;
|
||||
break;
|
||||
case 'M':
|
||||
*opt = *opt ^ 0x8000;
|
||||
break;
|
||||
case 'S':
|
||||
*opt = *opt ^ 0x2000;
|
||||
break;
|
||||
case 'V':
|
||||
*opt = *opt ^ 0x040000;
|
||||
break;
|
||||
default:
|
||||
OPM_LogWStr((CHAR*)" warning: option ", (LONGINT)19);
|
||||
|
|
@ -575,7 +576,7 @@ static void OPM_GetProperty (Texts_Scanner *S, LONGINT *S__typ, CHAR *name, LONG
|
|||
__DEL(name);
|
||||
}
|
||||
|
||||
static LONGINT OPM_minus (LONGINT i)
|
||||
static LONGINT OPM_minusop (LONGINT i)
|
||||
{
|
||||
LONGINT _o_result;
|
||||
_o_result = -i;
|
||||
|
|
@ -663,17 +664,25 @@ static void OPM_VerboseListSizes (void)
|
|||
OPM_LogWLn();
|
||||
}
|
||||
|
||||
static INTEGER OPM_Min (INTEGER a, INTEGER b)
|
||||
INTEGER OPM_AlignSize (LONGINT size)
|
||||
{
|
||||
INTEGER _o_result;
|
||||
if (a < b) {
|
||||
_o_result = a;
|
||||
return _o_result;
|
||||
INTEGER align;
|
||||
if (size < (LONGINT)OPM_Alignment) {
|
||||
if (size > 8) {
|
||||
align = 16;
|
||||
} else if (size > 4) {
|
||||
align = 8;
|
||||
} else if (size > 2) {
|
||||
align = 4;
|
||||
} else {
|
||||
align = (int)size;
|
||||
}
|
||||
} else {
|
||||
_o_result = b;
|
||||
return _o_result;
|
||||
align = OPM_Alignment;
|
||||
}
|
||||
__RETCHK;
|
||||
_o_result = align;
|
||||
return _o_result;
|
||||
}
|
||||
|
||||
static void OPM_GetProperties (void)
|
||||
|
|
@ -682,24 +691,24 @@ static void OPM_GetProperties (void)
|
|||
OPM_ProcSize = OPM_PointerSize;
|
||||
OPM_LIntSize = __ASHL(OPM_IntSize, 1);
|
||||
OPM_SetSize = OPM_LIntSize;
|
||||
OPM_CharAlign = OPM_Min(OPM_Alignment, OPM_CharSize);
|
||||
OPM_BoolAlign = OPM_Min(OPM_Alignment, OPM_BoolSize);
|
||||
OPM_SIntAlign = OPM_Min(OPM_Alignment, OPM_SIntSize);
|
||||
OPM_RecAlign = OPM_Min(OPM_Alignment, OPM_RecSize);
|
||||
OPM_RealAlign = OPM_Min(OPM_Alignment, OPM_RealSize);
|
||||
OPM_LRealAlign = OPM_Min(OPM_Alignment, OPM_LRealSize);
|
||||
OPM_PointerAlign = OPM_Min(OPM_Alignment, OPM_PointerSize);
|
||||
OPM_ProcAlign = OPM_Min(OPM_Alignment, OPM_ProcSize);
|
||||
OPM_IntAlign = OPM_Min(OPM_Alignment, OPM_IntSize);
|
||||
OPM_LIntAlign = OPM_Min(OPM_Alignment, OPM_LIntSize);
|
||||
OPM_SetAlign = OPM_Min(OPM_Alignment, OPM_SetSize);
|
||||
OPM_CharAlign = OPM_AlignSize(OPM_CharSize);
|
||||
OPM_BoolAlign = OPM_AlignSize(OPM_BoolSize);
|
||||
OPM_SIntAlign = OPM_AlignSize(OPM_SIntSize);
|
||||
OPM_RecAlign = OPM_AlignSize(OPM_RecSize);
|
||||
OPM_RealAlign = OPM_AlignSize(OPM_RealSize);
|
||||
OPM_LRealAlign = OPM_AlignSize(OPM_LRealSize);
|
||||
OPM_PointerAlign = OPM_AlignSize(OPM_PointerSize);
|
||||
OPM_ProcAlign = OPM_AlignSize(OPM_ProcSize);
|
||||
OPM_IntAlign = OPM_AlignSize(OPM_IntSize);
|
||||
OPM_LIntAlign = OPM_AlignSize(OPM_LIntSize);
|
||||
OPM_SetAlign = OPM_AlignSize(OPM_SetSize);
|
||||
base = -2;
|
||||
OPM_MinSInt = __ASH(base, __ASHL(OPM_SIntSize, 3) - 2);
|
||||
OPM_MaxSInt = OPM_minus(OPM_MinSInt + 1);
|
||||
OPM_MaxSInt = OPM_minusop(OPM_MinSInt + 1);
|
||||
OPM_MinInt = __ASH(base, __ASHL(OPM_IntSize, 3) - 2);
|
||||
OPM_MaxInt = OPM_minus(OPM_MinInt + 1);
|
||||
OPM_MaxInt = OPM_minusop(OPM_MinInt + 1);
|
||||
OPM_MinLInt = __ASH(base, __ASHL(OPM_LIntSize, 3) - 2);
|
||||
OPM_MaxLInt = OPM_minus(OPM_MinLInt + 1);
|
||||
OPM_MaxLInt = OPM_minusop(OPM_MinLInt + 1);
|
||||
if (OPM_RealSize == 4) {
|
||||
OPM_MaxReal = 3.40282346000000e+038;
|
||||
} else if (OPM_RealSize == 8) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef OPM__h
|
||||
#define OPM__h
|
||||
|
|
@ -18,6 +18,7 @@ import SET OPM_opt, OPM_glbopt;
|
|||
import BOOLEAN OPM_dontAsm, OPM_dontLink, OPM_mainProg, OPM_mainLinkStat, OPM_notColorOutput, OPM_forceNewSym, OPM_Verbose;
|
||||
|
||||
|
||||
import INTEGER OPM_AlignSize (LONGINT size);
|
||||
import void OPM_CloseFiles (void);
|
||||
import void OPM_CloseOldSym (void);
|
||||
import void OPM_DeleteNewSym (void);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
#include "OPB.h"
|
||||
#include "OPM.h"
|
||||
|
|
@ -438,10 +438,10 @@ static void OPP_TypeDecl (OPT_Struct *typ, OPT_Struct *banned)
|
|||
if (OPP_sym == 38) {
|
||||
OPP_qualident(&id);
|
||||
if (id->mode == 5) {
|
||||
if (id->typ != *banned) {
|
||||
*typ = id->typ;
|
||||
} else {
|
||||
if (id->typ == *banned) {
|
||||
OPP_err(58);
|
||||
} else {
|
||||
*typ = id->typ;
|
||||
}
|
||||
} else {
|
||||
OPP_err(52);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef OPP__h
|
||||
#define OPP__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin tspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
#include "OPM.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin tspkaSfF */
|
||||
|
||||
#ifndef OPS__h
|
||||
#define OPS__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
#include "OPM.h"
|
||||
#include "OPS.h"
|
||||
|
|
@ -1809,6 +1809,7 @@ export void *OPT__init(void)
|
|||
OPT_syslink = OPT_topScope->right;
|
||||
OPT_universe = OPT_topScope;
|
||||
OPT_topScope->right = NIL;
|
||||
OPT_EnterTyp((CHAR*)"BOOLEAN", 2, OPM_BoolSize, &OPT_booltyp);
|
||||
OPT_EnterTyp((CHAR*)"CHAR", 3, OPM_CharSize, &OPT_chartyp);
|
||||
OPT_EnterTyp((CHAR*)"SET", 9, OPM_SetSize, &OPT_settyp);
|
||||
OPT_EnterTyp((CHAR*)"REAL", 7, OPM_RealSize, &OPT_realtyp);
|
||||
|
|
@ -1816,7 +1817,6 @@ export void *OPT__init(void)
|
|||
OPT_EnterTyp((CHAR*)"LONGINT", 6, OPM_LIntSize, &OPT_linttyp);
|
||||
OPT_EnterTyp((CHAR*)"LONGREAL", 8, OPM_LRealSize, &OPT_lrltyp);
|
||||
OPT_EnterTyp((CHAR*)"SHORTINT", 4, OPM_SIntSize, &OPT_sinttyp);
|
||||
OPT_EnterTyp((CHAR*)"BOOLEAN", 2, OPM_BoolSize, &OPT_booltyp);
|
||||
OPT_EnterBoolConst((CHAR*)"FALSE", ((LONGINT)(0)));
|
||||
OPT_EnterBoolConst((CHAR*)"TRUE", ((LONGINT)(1)));
|
||||
OPT_EnterProc((CHAR*)"HALT", 0);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef OPT__h
|
||||
#define OPT__h
|
||||
|
|
@ -59,8 +59,7 @@ typedef
|
|||
INTEGER ref, sysflag;
|
||||
LONGINT n, size, align, txtpos;
|
||||
BOOLEAN allocated, pbused, pvused;
|
||||
char _prvt0[8];
|
||||
LONGINT pbfp, pvfp;
|
||||
char _prvt0[16];
|
||||
OPT_Struct BaseTyp;
|
||||
OPT_Object link, strobj;
|
||||
} OPT_StrDesc;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
#include "OPC.h"
|
||||
#include "OPM.h"
|
||||
|
|
@ -332,7 +332,7 @@ static INTEGER OPV_Precedence (INTEGER class, INTEGER subclass, INTEGER form, IN
|
|||
return _o_result;
|
||||
break;
|
||||
default:
|
||||
OPM_LogWStr((CHAR*)"unhandled case in OPV.Precedence Nmop, subclass = ", (LONGINT)51);
|
||||
OPM_LogWStr((CHAR*)"unhandled case in OPV.Precedence OPM.Nmop, subclass = ", (LONGINT)55);
|
||||
OPM_LogWNum(subclass, ((LONGINT)(0)));
|
||||
OPM_LogWLn();
|
||||
break;
|
||||
|
|
@ -402,7 +402,7 @@ static INTEGER OPV_Precedence (INTEGER class, INTEGER subclass, INTEGER form, IN
|
|||
return _o_result;
|
||||
break;
|
||||
default:
|
||||
OPM_LogWStr((CHAR*)"unhandled case in OPV.Precedence Ndop, subclass = ", (LONGINT)51);
|
||||
OPM_LogWStr((CHAR*)"unhandled case in OPV.Precedence OPM.Ndop, subclass = ", (LONGINT)55);
|
||||
OPM_LogWNum(subclass, ((LONGINT)(0)));
|
||||
OPM_LogWLn();
|
||||
break;
|
||||
|
|
@ -954,7 +954,7 @@ static void OPV_expr (OPT_Node n, INTEGER prec)
|
|||
}
|
||||
break;
|
||||
case 29:
|
||||
if ((((__IN(n->typ->form, 0x6240) && __IN(l->typ->form, 0x6240))) && n->typ->size == l->typ->size) || !__IN(l->class, 0x17)) {
|
||||
if (!__IN(l->class, 0x17) || (((__IN(n->typ->form, 0x6240) && __IN(l->typ->form, 0x6240))) && n->typ->size == l->typ->size)) {
|
||||
OPM_Write('(');
|
||||
OPC_Ident(n->typ->strobj);
|
||||
OPM_Write(')');
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef OPV__h
|
||||
#define OPV__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
|
||||
typedef
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef Platform__h
|
||||
#define Platform__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef Reals__h
|
||||
#define Reals__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef Strings__h
|
||||
#define Strings__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
#include "Files.h"
|
||||
#include "Modules.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef Texts__h
|
||||
#define Texts__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkamSf */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkamSf */
|
||||
#include "SYSTEM.h"
|
||||
#include "Configuration.h"
|
||||
#include "Heap.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
|
||||
typedef
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef errors__h
|
||||
#define errors__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
#include "Configuration.h"
|
||||
#include "Console.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef extTools__h
|
||||
#define extTools__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
#include "Console.h"
|
||||
#include "Strings.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef vt100__h
|
||||
#define vt100__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#define LARGE
|
||||
#include "SYSTEM.h"
|
||||
|
||||
|
|
@ -14,6 +14,6 @@ export void *Configuration__init(void)
|
|||
__DEFMOD;
|
||||
__REGMOD("Configuration", 0);
|
||||
/* BEGIN */
|
||||
__MOVE("1.95 [2016/07/22] for gcc LP64 on cygwin", Configuration_versionLong, 41);
|
||||
__MOVE("1.95 [2016/08/12] for gcc LP64 on cygwin", Configuration_versionLong, 41);
|
||||
__ENDMOD;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef Configuration__h
|
||||
#define Configuration__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#define LARGE
|
||||
#include "SYSTEM.h"
|
||||
#include "Platform.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef Console__h
|
||||
#define Console__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin tspkaSfF */
|
||||
#define LARGE
|
||||
#include "SYSTEM.h"
|
||||
#include "Configuration.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin tspkaSfF */
|
||||
|
||||
#ifndef Files__h
|
||||
#define Files__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tskSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin tskSfF */
|
||||
#define LARGE
|
||||
#include "SYSTEM.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tskSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin tskSfF */
|
||||
|
||||
#ifndef Heap__h
|
||||
#define Heap__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#define LARGE
|
||||
#include "SYSTEM.h"
|
||||
#include "Console.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef Modules__h
|
||||
#define Modules__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#define LARGE
|
||||
#include "SYSTEM.h"
|
||||
#include "OPM.h"
|
||||
|
|
@ -91,8 +91,8 @@ OPT_Node OPB_NewLeaf (OPT_Object obj)
|
|||
node = OPT_NewNode(9);
|
||||
break;
|
||||
default:
|
||||
OPB_err(127);
|
||||
node = OPT_NewNode(0);
|
||||
OPB_err(127);
|
||||
break;
|
||||
}
|
||||
node->obj = obj;
|
||||
|
|
@ -1597,8 +1597,9 @@ void OPB_SetElem (OPT_Node *x)
|
|||
|
||||
static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode)
|
||||
{
|
||||
OPT_Struct y = NIL;
|
||||
INTEGER f, g;
|
||||
OPT_Struct y = NIL, p = NIL, q = NIL;
|
||||
OPT_Struct p = NIL, q = NIL;
|
||||
if (OPM_Verbose) {
|
||||
OPM_LogWLn();
|
||||
OPM_LogWStr((CHAR*)"PROCEDURE CheckAssign", (LONGINT)22);
|
||||
|
|
@ -1643,14 +1644,8 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode)
|
|||
}
|
||||
break;
|
||||
case 6:
|
||||
if (OPM_LIntSize == 4) {
|
||||
if (!__IN(g, 0x70)) {
|
||||
OPB_err(113);
|
||||
}
|
||||
} else {
|
||||
if (!__IN(g, 0x70)) {
|
||||
OPB_err(113);
|
||||
}
|
||||
if (!__IN(g, 0x70)) {
|
||||
OPB_err(113);
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef OPB__h
|
||||
#define OPB__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#define LARGE
|
||||
#include "SYSTEM.h"
|
||||
#include "Configuration.h"
|
||||
|
|
@ -316,7 +316,7 @@ void OPC_Andent (OPT_Struct typ)
|
|||
static BOOLEAN OPC_Undefined (OPT_Object obj)
|
||||
{
|
||||
BOOLEAN _o_result;
|
||||
_o_result = (((obj->mnolev >= 0 && obj->linkadr != (LONGINT)(3 + OPM_currFile))) && obj->linkadr != 2) || obj->name[0] == 0x00;
|
||||
_o_result = obj->name[0] == 0x00 || (((obj->mnolev >= 0 && obj->linkadr != (LONGINT)(3 + OPM_currFile))) && obj->linkadr != 2);
|
||||
return _o_result;
|
||||
}
|
||||
|
||||
|
|
@ -1239,8 +1239,8 @@ void OPC_GenHdr (OPT_Node n)
|
|||
static void OPC_GenHeaderMsg (void)
|
||||
{
|
||||
INTEGER i;
|
||||
OPM_WriteString((CHAR*)"/*", (LONGINT)3);
|
||||
OPM_WriteString((CHAR*)" voc ", (LONGINT)6);
|
||||
OPM_WriteString((CHAR*)"/* ", (LONGINT)4);
|
||||
OPM_WriteString((CHAR*)"voc", (LONGINT)4);
|
||||
OPM_Write(' ');
|
||||
OPM_WriteString(Configuration_versionLong, ((LONGINT)(41)));
|
||||
OPM_Write(' ');
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef OPC__h
|
||||
#define OPC__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#define LARGE
|
||||
#include "SYSTEM.h"
|
||||
#include "Configuration.h"
|
||||
|
|
@ -37,6 +37,7 @@ static CHAR OPM_OBERON[1024];
|
|||
static CHAR OPM_MODULES[1024];
|
||||
|
||||
|
||||
export INTEGER OPM_AlignSize (LONGINT size);
|
||||
static void OPM_Append (Files_Rider *R, LONGINT *R__typ, Files_File F);
|
||||
export void OPM_CloseFiles (void);
|
||||
export void OPM_CloseOldSym (void);
|
||||
|
|
@ -58,7 +59,6 @@ export void OPM_LogWNum (LONGINT i, LONGINT len);
|
|||
export void OPM_LogWStr (CHAR *s, LONGINT s__len);
|
||||
static void OPM_MakeFileName (CHAR *name, LONGINT name__len, CHAR *FName, LONGINT FName__len, CHAR *ext, LONGINT ext__len);
|
||||
export void OPM_Mark (INTEGER n, LONGINT pos);
|
||||
static INTEGER OPM_Min (INTEGER a, INTEGER b);
|
||||
export void OPM_NewSym (CHAR *modName, LONGINT modName__len);
|
||||
export void OPM_OldSym (CHAR *modName, LONGINT modName__len, BOOLEAN *done);
|
||||
export void OPM_OpenFiles (CHAR *moduleName, LONGINT moduleName__len);
|
||||
|
|
@ -86,7 +86,7 @@ export void OPM_WriteString (CHAR *s, LONGINT s__len);
|
|||
export void OPM_WriteStringVar (CHAR *s, LONGINT s__len);
|
||||
export BOOLEAN OPM_eofSF (void);
|
||||
export void OPM_err (INTEGER n);
|
||||
static LONGINT OPM_minus (LONGINT i);
|
||||
static LONGINT OPM_minusop (LONGINT i);
|
||||
static LONGINT OPM_power0 (LONGINT i, LONGINT j);
|
||||
|
||||
|
||||
|
|
@ -118,50 +118,38 @@ static void OPM_ScanOptions (CHAR *s, LONGINT s__len, SET *opt)
|
|||
i = 1;
|
||||
while (s[__X(i, s__len)] != 0x00) {
|
||||
switch (s[__X(i, s__len)]) {
|
||||
case 'e':
|
||||
*opt = *opt ^ 0x0200;
|
||||
break;
|
||||
case 's':
|
||||
*opt = *opt ^ 0x10;
|
||||
break;
|
||||
case 'm':
|
||||
*opt = *opt ^ 0x0400;
|
||||
break;
|
||||
case 'x':
|
||||
*opt = *opt ^ 0x01;
|
||||
break;
|
||||
case 'r':
|
||||
*opt = *opt ^ 0x04;
|
||||
break;
|
||||
case 't':
|
||||
*opt = *opt ^ 0x08;
|
||||
break;
|
||||
case 'a':
|
||||
*opt = *opt ^ 0x80;
|
||||
break;
|
||||
case 'k':
|
||||
*opt = *opt ^ 0x40;
|
||||
break;
|
||||
case 'p':
|
||||
*opt = *opt ^ 0x20;
|
||||
break;
|
||||
case 'S':
|
||||
*opt = *opt ^ 0x2000;
|
||||
break;
|
||||
case 'c':
|
||||
*opt = *opt ^ 0x4000;
|
||||
break;
|
||||
case 'M':
|
||||
*opt = *opt ^ 0x8000;
|
||||
case 'e':
|
||||
*opt = *opt ^ 0x0200;
|
||||
break;
|
||||
case 'f':
|
||||
*opt = *opt ^ 0x010000;
|
||||
break;
|
||||
case 'F':
|
||||
*opt = *opt ^ 0x020000;
|
||||
case 'k':
|
||||
*opt = *opt ^ 0x40;
|
||||
break;
|
||||
case 'V':
|
||||
*opt = *opt ^ 0x040000;
|
||||
case 'm':
|
||||
*opt = *opt ^ 0x0400;
|
||||
break;
|
||||
case 'p':
|
||||
*opt = *opt ^ 0x20;
|
||||
break;
|
||||
case 'r':
|
||||
*opt = *opt ^ 0x04;
|
||||
break;
|
||||
case 's':
|
||||
*opt = *opt ^ 0x10;
|
||||
break;
|
||||
case 't':
|
||||
*opt = *opt ^ 0x08;
|
||||
break;
|
||||
case 'x':
|
||||
*opt = *opt ^ 0x01;
|
||||
break;
|
||||
case 'B':
|
||||
if (s[__X(i + 1, s__len)] != 0x00) {
|
||||
|
|
@ -179,6 +167,19 @@ static void OPM_ScanOptions (CHAR *s, LONGINT s__len, SET *opt)
|
|||
__ASSERT(OPM_IntSize == 2 || OPM_IntSize == 4, 0);
|
||||
__ASSERT(OPM_PointerSize == 4 || OPM_PointerSize == 8, 0);
|
||||
__ASSERT(OPM_Alignment == 4 || OPM_Alignment == 8, 0);
|
||||
Files_SetSearchPath((CHAR*)"", (LONGINT)1);
|
||||
break;
|
||||
case 'F':
|
||||
*opt = *opt ^ 0x020000;
|
||||
break;
|
||||
case 'M':
|
||||
*opt = *opt ^ 0x8000;
|
||||
break;
|
||||
case 'S':
|
||||
*opt = *opt ^ 0x2000;
|
||||
break;
|
||||
case 'V':
|
||||
*opt = *opt ^ 0x040000;
|
||||
break;
|
||||
default:
|
||||
OPM_LogWStr((CHAR*)" warning: option ", (LONGINT)19);
|
||||
|
|
@ -576,7 +577,7 @@ static void OPM_GetProperty (Texts_Scanner *S, LONGINT *S__typ, CHAR *name, LONG
|
|||
__DEL(name);
|
||||
}
|
||||
|
||||
static LONGINT OPM_minus (LONGINT i)
|
||||
static LONGINT OPM_minusop (LONGINT i)
|
||||
{
|
||||
LONGINT _o_result;
|
||||
_o_result = -i;
|
||||
|
|
@ -664,17 +665,25 @@ static void OPM_VerboseListSizes (void)
|
|||
OPM_LogWLn();
|
||||
}
|
||||
|
||||
static INTEGER OPM_Min (INTEGER a, INTEGER b)
|
||||
INTEGER OPM_AlignSize (LONGINT size)
|
||||
{
|
||||
INTEGER _o_result;
|
||||
if (a < b) {
|
||||
_o_result = a;
|
||||
return _o_result;
|
||||
INTEGER align;
|
||||
if (size < (LONGINT)OPM_Alignment) {
|
||||
if (size > 8) {
|
||||
align = 16;
|
||||
} else if (size > 4) {
|
||||
align = 8;
|
||||
} else if (size > 2) {
|
||||
align = 4;
|
||||
} else {
|
||||
align = (int)size;
|
||||
}
|
||||
} else {
|
||||
_o_result = b;
|
||||
return _o_result;
|
||||
align = OPM_Alignment;
|
||||
}
|
||||
__RETCHK;
|
||||
_o_result = align;
|
||||
return _o_result;
|
||||
}
|
||||
|
||||
static void OPM_GetProperties (void)
|
||||
|
|
@ -683,24 +692,24 @@ static void OPM_GetProperties (void)
|
|||
OPM_ProcSize = OPM_PointerSize;
|
||||
OPM_LIntSize = __ASHL(OPM_IntSize, 1);
|
||||
OPM_SetSize = OPM_LIntSize;
|
||||
OPM_CharAlign = OPM_Min(OPM_Alignment, OPM_CharSize);
|
||||
OPM_BoolAlign = OPM_Min(OPM_Alignment, OPM_BoolSize);
|
||||
OPM_SIntAlign = OPM_Min(OPM_Alignment, OPM_SIntSize);
|
||||
OPM_RecAlign = OPM_Min(OPM_Alignment, OPM_RecSize);
|
||||
OPM_RealAlign = OPM_Min(OPM_Alignment, OPM_RealSize);
|
||||
OPM_LRealAlign = OPM_Min(OPM_Alignment, OPM_LRealSize);
|
||||
OPM_PointerAlign = OPM_Min(OPM_Alignment, OPM_PointerSize);
|
||||
OPM_ProcAlign = OPM_Min(OPM_Alignment, OPM_ProcSize);
|
||||
OPM_IntAlign = OPM_Min(OPM_Alignment, OPM_IntSize);
|
||||
OPM_LIntAlign = OPM_Min(OPM_Alignment, OPM_LIntSize);
|
||||
OPM_SetAlign = OPM_Min(OPM_Alignment, OPM_SetSize);
|
||||
OPM_CharAlign = OPM_AlignSize(OPM_CharSize);
|
||||
OPM_BoolAlign = OPM_AlignSize(OPM_BoolSize);
|
||||
OPM_SIntAlign = OPM_AlignSize(OPM_SIntSize);
|
||||
OPM_RecAlign = OPM_AlignSize(OPM_RecSize);
|
||||
OPM_RealAlign = OPM_AlignSize(OPM_RealSize);
|
||||
OPM_LRealAlign = OPM_AlignSize(OPM_LRealSize);
|
||||
OPM_PointerAlign = OPM_AlignSize(OPM_PointerSize);
|
||||
OPM_ProcAlign = OPM_AlignSize(OPM_ProcSize);
|
||||
OPM_IntAlign = OPM_AlignSize(OPM_IntSize);
|
||||
OPM_LIntAlign = OPM_AlignSize(OPM_LIntSize);
|
||||
OPM_SetAlign = OPM_AlignSize(OPM_SetSize);
|
||||
base = -2;
|
||||
OPM_MinSInt = __ASH(base, __ASHL(OPM_SIntSize, 3) - 2);
|
||||
OPM_MaxSInt = OPM_minus(OPM_MinSInt + 1);
|
||||
OPM_MaxSInt = OPM_minusop(OPM_MinSInt + 1);
|
||||
OPM_MinInt = __ASH(base, __ASHL(OPM_IntSize, 3) - 2);
|
||||
OPM_MaxInt = OPM_minus(OPM_MinInt + 1);
|
||||
OPM_MaxInt = OPM_minusop(OPM_MinInt + 1);
|
||||
OPM_MinLInt = __ASH(base, __ASHL(OPM_LIntSize, 3) - 2);
|
||||
OPM_MaxLInt = OPM_minus(OPM_MinLInt + 1);
|
||||
OPM_MaxLInt = OPM_minusop(OPM_MinLInt + 1);
|
||||
if (OPM_RealSize == 4) {
|
||||
OPM_MaxReal = 3.40282346000000e+038;
|
||||
} else if (OPM_RealSize == 8) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef OPM__h
|
||||
#define OPM__h
|
||||
|
|
@ -19,6 +19,7 @@ import SET OPM_opt, OPM_glbopt;
|
|||
import BOOLEAN OPM_dontAsm, OPM_dontLink, OPM_mainProg, OPM_mainLinkStat, OPM_notColorOutput, OPM_forceNewSym, OPM_Verbose;
|
||||
|
||||
|
||||
import INTEGER OPM_AlignSize (LONGINT size);
|
||||
import void OPM_CloseFiles (void);
|
||||
import void OPM_CloseOldSym (void);
|
||||
import void OPM_DeleteNewSym (void);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#define LARGE
|
||||
#include "SYSTEM.h"
|
||||
#include "OPB.h"
|
||||
|
|
@ -439,10 +439,10 @@ static void OPP_TypeDecl (OPT_Struct *typ, OPT_Struct *banned)
|
|||
if (OPP_sym == 38) {
|
||||
OPP_qualident(&id);
|
||||
if (id->mode == 5) {
|
||||
if (id->typ != *banned) {
|
||||
*typ = id->typ;
|
||||
} else {
|
||||
if (id->typ == *banned) {
|
||||
OPP_err(58);
|
||||
} else {
|
||||
*typ = id->typ;
|
||||
}
|
||||
} else {
|
||||
OPP_err(52);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef OPP__h
|
||||
#define OPP__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin tspkaSfF */
|
||||
#define LARGE
|
||||
#include "SYSTEM.h"
|
||||
#include "OPM.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin tspkaSfF */
|
||||
|
||||
#ifndef OPS__h
|
||||
#define OPS__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/12] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#define LARGE
|
||||
#include "SYSTEM.h"
|
||||
#include "OPM.h"
|
||||
|
|
@ -1810,6 +1810,7 @@ export void *OPT__init(void)
|
|||
OPT_syslink = OPT_topScope->right;
|
||||
OPT_universe = OPT_topScope;
|
||||
OPT_topScope->right = NIL;
|
||||
OPT_EnterTyp((CHAR*)"BOOLEAN", 2, OPM_BoolSize, &OPT_booltyp);
|
||||
OPT_EnterTyp((CHAR*)"CHAR", 3, OPM_CharSize, &OPT_chartyp);
|
||||
OPT_EnterTyp((CHAR*)"SET", 9, OPM_SetSize, &OPT_settyp);
|
||||
OPT_EnterTyp((CHAR*)"REAL", 7, OPM_RealSize, &OPT_realtyp);
|
||||
|
|
@ -1817,7 +1818,6 @@ export void *OPT__init(void)
|
|||
OPT_EnterTyp((CHAR*)"LONGINT", 6, OPM_LIntSize, &OPT_linttyp);
|
||||
OPT_EnterTyp((CHAR*)"LONGREAL", 8, OPM_LRealSize, &OPT_lrltyp);
|
||||
OPT_EnterTyp((CHAR*)"SHORTINT", 4, OPM_SIntSize, &OPT_sinttyp);
|
||||
OPT_EnterTyp((CHAR*)"BOOLEAN", 2, OPM_BoolSize, &OPT_booltyp);
|
||||
OPT_EnterBoolConst((CHAR*)"FALSE", ((LONGINT)(0)));
|
||||
OPT_EnterBoolConst((CHAR*)"TRUE", ((LONGINT)(1)));
|
||||
OPT_EnterProc((CHAR*)"HALT", 0);
|
||||
|
|
|
|||
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