From 5c9ef62469ebec0d0ad4fae9630f7fdb6e7e3eaf Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Wed, 11 Mar 2015 20:26:05 +0400 Subject: [PATCH] updated OPV Convert to support 64bit type. -- noch Former-commit-id: fb960f552f1298a5f9047c89bfa23cfcff4a597c --- src/voc/OPB.Mod | 6 +++++- src/voc/OPC.Mod | 4 ++++ src/voc/OPP.Mod | 4 ++++ src/voc/OPT.Mod | 4 ++++ src/voc/OPV.Mod | 7 +++++++ voc.REMOVED.git-id | 2 +- vocstatic.linux.gcc.x86_64.REMOVED.git-id | 2 +- 7 files changed, 26 insertions(+), 3 deletions(-) diff --git a/src/voc/OPB.Mod b/src/voc/OPB.Mod index 4f482e35..fb706845 100644 --- a/src/voc/OPB.Mod +++ b/src/voc/OPB.Mod @@ -20,6 +20,10 @@ MODULE OPB; (* RC 6.3.89 / 21.2.94 *) (* object model 17.1.93 *) (* Structure forms *) Undef = 0; Byte = 1; Bool = 2; Char = 3; SInt = 4; Int = 5; LInt = 6; + (*Int8 = 7; Int16 = 8; Int32 = 9; Int64 = 10; + Real = 11; LReal = 12; Set = 13; String = 14; NilTyp = 15; NoTyp = 16; + Pointer = 17; ProcTyp = 18; + Comp = 19;*) Real = 7; LReal = 8; Set = 9; String = 10; NilTyp = 11; NoTyp = 12; Pointer = 13; ProcTyp = 14; Int8 = 16; Int16 = 17; Int32 = 18; Int64 = 19; @@ -161,7 +165,7 @@ MODULE OPB; (* RC 6.3.89 / 21.2.94 *) (* object model 17.1.93 *) ELSIF (OPM.MinInt <= SYSTEM.VAL(LONGINT, v)) & (SYSTEM.VAL(LONGINT, v) <= OPM.MaxInt) THEN node^.typ := OPT.inttyp ELSIF (OPM.MinLInt <= v) & (v <= OPM.MaxLInt) (*bootstrap or cross*) THEN node^.typ := OPT.linttyp - (*ELSIF (OPM.MinInt64 <= v) & (v <= OPM.MaxInt64) THEN + (*ELSIF (OPM.MinInt64) <= v) & (v <= OPM.MaxInt64) THEN node^.typ := OPT.int64typ*) ELSE err(203); node^.typ := OPT.sinttyp; node^.conval^.intval := 1 END diff --git a/src/voc/OPC.Mod b/src/voc/OPC.Mod index 4be53f40..0bfc8e48 100644 --- a/src/voc/OPC.Mod +++ b/src/voc/OPC.Mod @@ -13,6 +13,10 @@ MODULE OPC; (* copyright (c) J. Templ 12.7.95 / 3.7.96 *) (* structure forms *) Byte = 1; Bool = 2; Char = 3; SInt = 4; Int = 5; LInt = 6; + (*Int8 = 7; Int16 = 8; Int32 = 9; Int64 = 10; + Real = 11; LReal = 12; Set = 13; String = 14; NilTyp = 15; NoTyp = 16; + Pointer = 17; ProcTyp = 18; + Comp = 19;*) Real = 7; LReal = 8; Set = 9; String = 10; NilTyp = 11; NoTyp = 12; Pointer = 13; ProcTyp = 14; Int8 = 16; Int16 = 17; Int32 = 18; Int64 = 19; diff --git a/src/voc/OPP.Mod b/src/voc/OPP.Mod index 4b33aaca..3348a9af 100644 --- a/src/voc/OPP.Mod +++ b/src/voc/OPP.Mod @@ -29,6 +29,10 @@ MODULE OPP; (* NW, RC 6.3.89 / 10.2.94 *) (* object model 4.12.93 *) (* Structure forms *) Undef = 0; Byte = 1; Bool = 2; Char = 3; SInt = 4; Int = 5; LInt = 6; + (*Int8 = 7; Int16 = 8; Int32 = 9; Int64 = 10; + Real = 11; LReal = 12; Set = 13; String = 14; NilTyp = 15; NoTyp = 16; + Pointer = 17; ProcTyp = 18; + Comp = 19;*) Real = 7; LReal = 8; Set = 9; String = 10; NilTyp = 11; NoTyp = 12; Pointer = 13; ProcTyp = 14; Int8 = 16; Int16 = 17; Int32 = 18; Int64 = 19; diff --git a/src/voc/OPT.Mod b/src/voc/OPT.Mod index 4f7d2a05..2239dce0 100644 --- a/src/voc/OPT.Mod +++ b/src/voc/OPT.Mod @@ -83,6 +83,10 @@ SProc = 8; CProc = 9; IProc = 10; Mod = 11; Head = 12; TProc = 13; (* structure forms *) Undef = 0; Byte = 1; Bool = 2; Char = 3; SInt = 4; Int = 5; LInt = 6; +(*Int8 = 7; Int16 = 8; Int32 = 9; Int64 = 10; +Real = 11; LReal = 12; Set = 13; String = 14; NilTyp = 15; NoTyp = 16; +Pointer = 17; ProcTyp = 18; +Comp = 19;*) Real = 7; LReal = 8; Set = 9; String = 10; NilTyp = 11; NoTyp = 12; Pointer = 13; ProcTyp = 14; Int8 = 16; Int16 = 17; Int32 = 18; Int64 = 19; diff --git a/src/voc/OPV.Mod b/src/voc/OPV.Mod index 63b91762..e16b35b6 100644 --- a/src/voc/OPV.Mod +++ b/src/voc/OPV.Mod @@ -24,6 +24,10 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 (* structure forms *) Byte = 1; Bool = 2; Char = 3; SInt = 4; Int = 5; LInt = 6; + (*Int8 = 7; Int16 = 8; Int32 = 9; Int64 = 10; + Real = 11; LReal = 12; Set = 13; String = 14; NilTyp = 15; NoTyp = 16; + Pointer = 17; ProcTyp = 18; + Comp = 19;*) Real = 7; LReal = 8; Set = 9; String = 10; NilTyp = 11; Pointer = 13; ProcTyp = 14; Int8 = 16; Int16 = 17; Int32 = 18; Int64 = 19; Comp = (*15*)20; @@ -343,6 +347,9 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 ELSIF form = LInt THEN IF from < LInt THEN OPM.WriteString("(LONGINT)") END ; Entier(n, 9) + ELSIF form = Int64 THEN + IF (from >= SInt) & (from <= LInt) OR (from >= Int8) & (from < Int64) THEN OPM.WriteString("(SYSTEM_INT64)") END; + Entier(n, 9); ELSIF form = Int THEN IF from < Int THEN OPM.WriteString("(int)"); expr(n, 9) ELSE diff --git a/voc.REMOVED.git-id b/voc.REMOVED.git-id index f8e5a954..b1072231 100644 --- a/voc.REMOVED.git-id +++ b/voc.REMOVED.git-id @@ -1 +1 @@ -c40c89b190a3039cd0942a22f6c10e6eceba9ef7 \ No newline at end of file +d2c8d82b7f397b66ebf6a08a17c3a4f294942403 \ No newline at end of file diff --git a/vocstatic.linux.gcc.x86_64.REMOVED.git-id b/vocstatic.linux.gcc.x86_64.REMOVED.git-id index f8e5a954..b1072231 100644 --- a/vocstatic.linux.gcc.x86_64.REMOVED.git-id +++ b/vocstatic.linux.gcc.x86_64.REMOVED.git-id @@ -1 +1 @@ -c40c89b190a3039cd0942a22f6c10e6eceba9ef7 \ No newline at end of file +d2c8d82b7f397b66ebf6a08a17c3a4f294942403 \ No newline at end of file