Do not inline calls to system

This commit is contained in:
Justin Ethier 2021-09-07 08:24:08 -04:00
parent 28c166a03e
commit 9d130722d6
2 changed files with 3 additions and 1 deletions

View file

@ -14,6 +14,7 @@ Features
Bug Fixes
- Do not display error message for missing file(s) if SCM->C compilation fails.
- Do not inline calls to `system` as it could result in multiple calls of the same command.
## 0.32.0 - August 16, 2021

View file

@ -1057,7 +1057,8 @@
(lambda (arg)
(and (prim-call? arg)
;; Do not inline functions that are looping over lists, seems counter-productive
(not (member (car arg) '( member assoc Cyc-fast-member Cyc-fast-assoc assq assv memq memv)))
;; Or functions that may be harmful to call more than once such as system
(not (member (car arg) '( member assoc Cyc-fast-member Cyc-fast-assoc assq assv memq memv system)))
(not (prim:cont? (car arg)))))
(cdr exp))
;; Disallow primitives that allocate a new obj,