summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 251568e)
raw | patch | inline | side by side (parent: 251568e)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Mon, 22 Jul 2019 15:24:00 +0000 (18:24 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Mon, 22 Jul 2019 15:24:00 +0000 (18:24 +0300) |
diff --git a/src/cpfront/posix/generic/System/Mod/Kernel.cp b/src/cpfront/posix/generic/System/Mod/Kernel.cp
index 8d4c334f2896df1262b8371a0fef66ecfbfcb3c2..622e0b10cc31ffb511333206090233333c0fd193 100644 (file)
wouldFinalize: BOOLEAN;
- watcher*: PROCEDURE (event: INTEGER); (* for debugging *)
+ watcher*: PROCEDURE (event: INTEGER); (* for debugging *)
+
+ intTrap*: BOOLEAN;
PROCEDURE Erase (adr, words: INTEGER);
BEGIN
SetDLink(tryDLink);
setjmp._longjmp(tryEnv, 1)
END;
- IF err = 128 THEN (* do nothing *)
+ IF (err = 128) OR (err = 200) & ~intTrap THEN (* do nothing *)
ELSIF (trapViewer # NIL) & (restart # NIL) & ~trapped & ~guarded THEN
trapped := TRUE; trapViewer()
ELSE DefaultTrapViewer
SetDLink(tryDLink);
setjmp._longjmp(tryEnv, 1)
END;
- IF err = 128 THEN (* do nothing *)
+ IF (err = 128) OR (err = 200) & ~intTrap THEN (* do nothing *)
ELSIF (trapViewer # NIL) & (restart # NIL) & ~trapped & ~guarded THEN
trapped := TRUE; trapViewer()
ELSE DefaultTrapViewer
PROCEDURE Init;
VAR i: INTEGER;
BEGIN
+ intTrap := TRUE;
baseStack := S.ADR(i); (* XXX *)
pagesize := unistd.sysconf(unistd._SC_PAGESIZE);
index 77ded19d6927edae6e61c4b5b22a0e9d35efd9e2..5d1a68f85758850af00f8a5423956419fb3fc9db 100644 (file)
ELSIF p = "-no-hints" THEN
EXCL(opts, hint)
ELSIF p = "-trap" THEN
+ Kernel.intTrap := TRUE;
INCL(opts, errorTrap)
ELSIF p = "-no-trap" THEN
EXCL(opts, errorTrap)
END Init;
BEGIN
+ Kernel.intTrap := FALSE;
Kernel.Start(Init)
END DswCompiler486Main.
diff --git a/src/generic/Dsw/Mod/CompilerCPfrontMain.cp b/src/generic/Dsw/Mod/CompilerCPfrontMain.cp
index 672ca76000539e89f455d36274e56d4db660599b..b5d4ec95769d797b5321f8efd3230b811f15b4c1 100644 (file)
ELSIF p = "-no-hints" THEN
EXCL(opts, hint)
ELSIF p = "-trap" THEN
+ Kernel.intTrap := TRUE;
INCL(opts, errorTrap)
ELSIF p = "-no-trap" THEN
EXCL(opts, errorTrap)
END Init;
BEGIN
+ Kernel.intTrap := FALSE;
Kernel.Start(Init)
END DswCompilerCPfrontMain.
index 27997e2c3bf946219122604f9b2451a481fc2acc..677681f61bf92aef3b403317581584d8cede96f0 100644 (file)
inobj.next := obj;
INC(i)
ELSIF p = "-trap" THEN
- LB.trap := TRUE
+ LB.trap := TRUE;
+ Kernel.intTrap := TRUE
ELSE
Console.WriteStr("unknown option ");
Console.WriteStr(p); Console.WriteLn;
END Init;
BEGIN
+ Kernel.intTrap := FALSE;
Kernel.Start(Init)
END DswLinker486Main.
index 115a773f82860be78230ca4b089622ee056e17aa..4c8688e00fa7f81f9050eeaa96a876549e7c1eb8 100644 (file)
wouldFinalize: BOOLEAN;
- watcher*: PROCEDURE (event: INTEGER); (* for debugging *)
+ watcher*: PROCEDURE (event: INTEGER); (* for debugging *)
+
+ intTrap*: BOOLEAN;
PROCEDURE Erase (adr, words: INTEGER);
BEGIN
IF isTry THEN
setjmp._longjmp(tryEnv, 1)
END;
- IF err = 128 THEN (* do nothing *)
+ IF (err = 128) OR (err = 200) & ~intTrap THEN (* do nothing *)
ELSIF (trapViewer # NIL) & (restart # NIL) & ~trapped & ~guarded THEN
trapped := TRUE; trapViewer()
ELSE DefaultTrapViewer
IF isTry THEN
setjmp._longjmp(tryEnv, 1)
END;
- IF err = 128 THEN (* do nothing *)
+ IF (err = 128) OR (err = 200) & ~intTrap THEN (* do nothing *)
ELSIF (trapViewer # NIL) & (restart # NIL) & ~trapped & ~guarded THEN
trapped := TRUE; trapViewer()
ELSE DefaultTrapViewer
PROCEDURE Init;
VAR i: INTEGER;
BEGIN
+ intTrap := TRUE;
pagesize := unistd.sysconf(unistd._SC_PAGESIZE);
(* init heap *)
diff --git a/src/native/posix/generic/System/Mod/Kernel.cp b/src/native/posix/generic/System/Mod/Kernel.cp
index 5773b4ebcdedcbc3fe3124c6bb9fe428d8043569..2039e1766ff3b0595b81a696846cc72f4dc58c3a 100644 (file)
wouldFinalize: BOOLEAN;
- watcher*: PROCEDURE (event: INTEGER); (* for debugging *)
+ watcher*: PROCEDURE (event: INTEGER); (* for debugging *)
+
+ intTrap*: BOOLEAN;
PROCEDURE Erase (adr, words: INTEGER);
BEGIN
IF isTry THEN
setjmp._longjmp(tryEnv, 1)
END;
- IF err = 128 THEN (* do nothing *)
+ IF (err = 128) OR (err = 200) & ~intTrap THEN (* do nothing *)
ELSIF (trapViewer # NIL) & (restart # NIL) & ~trapped & ~guarded THEN
trapped := TRUE; trapViewer()
ELSE DefaultTrapViewer
IF isTry THEN
setjmp._longjmp(tryEnv, 1)
END;
- IF err = 128 THEN (* do nothing *)
+ IF (err = 128) OR (err = 200) & ~intTrap THEN (* do nothing *)
ELSIF (trapViewer # NIL) & (restart # NIL) & ~trapped & ~guarded THEN
trapped := TRUE; trapViewer()
ELSE DefaultTrapViewer
PROCEDURE Init;
VAR i: INTEGER;
BEGIN
+ intTrap := TRUE;
pagesize := unistd.sysconf(unistd._SC_PAGESIZE);
(* init heap *)