mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 09:52:24 +00:00
Use SYSTEM.ADDRESS in libraries. Build all with -O2. Support INC(a,b) for any int a,b that support a:=a+b.
This commit is contained in:
parent
f1cbbdba28
commit
22a4f8e263
92 changed files with 2752 additions and 2695 deletions
|
|
@ -2024,7 +2024,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno)
|
|||
p->typ = OPT_notyp;
|
||||
} else {
|
||||
if (x->typ != p->typ) {
|
||||
if ((x->class == 7 && f == 4)) {
|
||||
if ((f == 4 && (x->class == 7 || (p->typ->form == 4 && x->typ->size <= p->typ->size)))) {
|
||||
OPB_Convert(&x, p->typ);
|
||||
} else {
|
||||
OPB_err(111);
|
||||
|
|
|
|||
|
|
@ -1124,8 +1124,8 @@ export void *OPM__init(void)
|
|||
OPM_AddressSize = 8;
|
||||
OPM_Alignment = 8;
|
||||
OPM_ShortintSize = 1;
|
||||
OPM_IntegerSize = 4;
|
||||
OPM_LongintSize = 8;
|
||||
OPM_SetSize = 8;
|
||||
OPM_IntegerSize = 2;
|
||||
OPM_LongintSize = 4;
|
||||
OPM_SetSize = 4;
|
||||
__ENDMOD;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ typedef
|
|||
Platform_ArgPtr (*Platform_ArgVec)[1024];
|
||||
|
||||
typedef
|
||||
int32 (*Platform_ArgVecPtr)[1];
|
||||
address (*Platform_ArgVecPtr)[1];
|
||||
|
||||
typedef
|
||||
CHAR (*Platform_EnvPtr)[1024];
|
||||
|
|
@ -74,8 +74,8 @@ export address Platform_OSAllocate (address size);
|
|||
export void Platform_OSFree (address address);
|
||||
export int16 Platform_OldRO (CHAR *n, LONGINT n__len, int32 *h);
|
||||
export int16 Platform_OldRW (CHAR *n, LONGINT n__len, int32 *h);
|
||||
export int16 Platform_Read (int32 h, address p, address l, address *n);
|
||||
export int16 Platform_ReadBuf (int32 h, SYSTEM_BYTE *b, LONGINT b__len, address *n);
|
||||
export int16 Platform_Read (int32 h, address p, int32 l, int32 *n);
|
||||
export int16 Platform_ReadBuf (int32 h, SYSTEM_BYTE *b, LONGINT b__len, int32 *n);
|
||||
export int16 Platform_Rename (CHAR *o, LONGINT o__len, CHAR *n, LONGINT n__len);
|
||||
export BOOLEAN Platform_SameFile (Platform_FileIdentity i1, Platform_FileIdentity i2);
|
||||
export BOOLEAN Platform_SameFileTime (Platform_FileIdentity i1, Platform_FileIdentity i2);
|
||||
|
|
@ -92,7 +92,7 @@ export BOOLEAN Platform_TimedOut (int16 e);
|
|||
export BOOLEAN Platform_TooManyFiles (int16 e);
|
||||
export int16 Platform_Truncate (int32 h, int32 limit);
|
||||
export int16 Platform_Unlink (CHAR *n, LONGINT n__len);
|
||||
export int16 Platform_Write (int32 h, int32 p, int32 l);
|
||||
export int16 Platform_Write (int32 h, address p, int32 l);
|
||||
static void Platform_YMDHMStoClock (int16 ye, int16 mo, int16 da, int16 ho, int16 mi, int16 se, int32 *t, int32 *d);
|
||||
static void Platform_errch (CHAR c);
|
||||
static void Platform_errint (int32 l);
|
||||
|
|
@ -543,41 +543,43 @@ int16 Platform_Size (int32 h, int32 *l)
|
|||
return _o_result;
|
||||
}
|
||||
|
||||
int16 Platform_Read (int32 h, address p, address l, address *n)
|
||||
int16 Platform_Read (int32 h, address p, int32 l, int32 *n)
|
||||
{
|
||||
int16 _o_result;
|
||||
int16 result;
|
||||
*n = 0;
|
||||
result = Platform_readfile(h, p, l, &*n);
|
||||
int32 lengthread;
|
||||
result = Platform_readfile(h, p, l, &lengthread);
|
||||
if (result == 0) {
|
||||
*n = 0;
|
||||
_o_result = Platform_err();
|
||||
return _o_result;
|
||||
} else {
|
||||
*n = lengthread;
|
||||
_o_result = 0;
|
||||
return _o_result;
|
||||
}
|
||||
__RETCHK;
|
||||
}
|
||||
|
||||
int16 Platform_ReadBuf (int32 h, SYSTEM_BYTE *b, LONGINT b__len, address *n)
|
||||
int16 Platform_ReadBuf (int32 h, SYSTEM_BYTE *b, LONGINT b__len, int32 *n)
|
||||
{
|
||||
int16 _o_result;
|
||||
int16 result;
|
||||
*n = 0;
|
||||
result = Platform_readfile(h, (address)b, b__len, &*n);
|
||||
int32 lengthread;
|
||||
result = Platform_readfile(h, (address)b, b__len, &lengthread);
|
||||
if (result == 0) {
|
||||
*n = 0;
|
||||
_o_result = Platform_err();
|
||||
return _o_result;
|
||||
} else {
|
||||
*n = lengthread;
|
||||
_o_result = 0;
|
||||
return _o_result;
|
||||
}
|
||||
__RETCHK;
|
||||
}
|
||||
|
||||
int16 Platform_Write (int32 h, int32 p, int32 l)
|
||||
int16 Platform_Write (int32 h, address p, int32 l)
|
||||
{
|
||||
int16 _o_result;
|
||||
if (Platform_writefile(h, p, l) == 0) {
|
||||
|
|
|
|||
|
|
@ -58,8 +58,8 @@ import address Platform_OSAllocate (address size);
|
|||
import void Platform_OSFree (address address);
|
||||
import int16 Platform_OldRO (CHAR *n, LONGINT n__len, int32 *h);
|
||||
import int16 Platform_OldRW (CHAR *n, LONGINT n__len, int32 *h);
|
||||
import int16 Platform_Read (int32 h, address p, address l, address *n);
|
||||
import int16 Platform_ReadBuf (int32 h, SYSTEM_BYTE *b, LONGINT b__len, address *n);
|
||||
import int16 Platform_Read (int32 h, address p, int32 l, int32 *n);
|
||||
import int16 Platform_ReadBuf (int32 h, SYSTEM_BYTE *b, LONGINT b__len, int32 *n);
|
||||
import int16 Platform_Rename (CHAR *o, LONGINT o__len, CHAR *n, LONGINT n__len);
|
||||
import BOOLEAN Platform_SameFile (Platform_FileIdentity i1, Platform_FileIdentity i2);
|
||||
import BOOLEAN Platform_SameFileTime (Platform_FileIdentity i1, Platform_FileIdentity i2);
|
||||
|
|
@ -75,7 +75,7 @@ import BOOLEAN Platform_TimedOut (int16 e);
|
|||
import BOOLEAN Platform_TooManyFiles (int16 e);
|
||||
import int16 Platform_Truncate (int32 h, int32 limit);
|
||||
import int16 Platform_Unlink (CHAR *n, LONGINT n__len);
|
||||
import int16 Platform_Write (int32 h, int32 p, int32 l);
|
||||
import int16 Platform_Write (int32 h, address p, int32 l);
|
||||
import BOOLEAN Platform_getEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len);
|
||||
import void *Platform__init(void);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue