I am testing the attached patch. The 'i-syscmd.boot' part
prevents system command from throwing to reader, this should
prevent aborting code after 'systemCommand' in most cases (and
in remaining ones it debatable if code should continue).
The 'i-toplev.boot' part uses dynamic variable to make
sure that '$timedNameStack' is restored, but also executes
cleanup loop. AFAICS this is reasonably close to correct
behaviour and is simple to implement.
--
Waldek Hebisch
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/ZZrQTeA-E9XX98Hg%40fricas.org.
diff --git a/src/interp/i-syscmd.boot b/src/interp/i-syscmd.boot
index 21c2b3d..8e337d5 100644
--- a/src/interp/i-syscmd.boot
+++ b/src/interp/i-syscmd.boot
@@ -2861,7 +2861,7 @@ processSynonyms() ==
-- functions for interfacing to system commands from algebra code
-- common lisp dependent
-doSystemCommand string ==
+doSystemCommand1(string) ==
string := CONCAT('")", string)
LINE: fluid := string
processSynonyms()
@@ -2880,6 +2880,9 @@ doSystemCommand string ==
nil
nil
+doSystemCommand(string) ==
+ CATCH('SPAD_READER, doSystemCommand1(string))
+
)if false
The system commands given by the global variable
[[|$noParseCommands|]]\cite{1} require essentially no
diff --git a/src/interp/i-toplev.boot b/src/interp/i-toplev.boot
index 52da728..c99e515 100644
--- a/src/interp/i-toplev.boot
+++ b/src/interp/i-toplev.boot
@@ -131,8 +131,7 @@ processInteractive(form, posnForm) ==
-- and then calls processInteractive1 to do most of the work.
-- This function receives the output from the parser.
- initializeTimedNames($interpreterTimedNames,$interpreterTimedClasses)
-
+ $timedNameStack : local := NIL
$op: local:= (form is [op,:.] => op; form) --name of operator
$Coerce: local := NIL
$compErrorMessageStack:local := nil
@@ -153,7 +152,11 @@ processInteractive(form, posnForm) ==
$minivector: local := NIL
$domPvar: local := NIL
$inRetract: local := NIL
- object := processInteractive1(form, posnForm)
+
+ initializeTimedNames($interpreterTimedNames,$interpreterTimedClasses);
+ finally(
+ object := processInteractive1(form, posnForm),
+ while $timedNameStack repeat stopTimingProcess peekTimedName())
if not($ProcessInteractiveValue) then
if $reportInstantiations = true then
reportInstantiations()