From 79cbfd0098caff35ed453782986ddcc8fa9ae142 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Mon, 21 Jun 2010 13:11:55 +0000 Subject: * interp/nlib.lisp (COMPILE-LIB-FILE): Rework. Halt compilation if generated is malformed or contains serious warnings. * algebra/pfo.spad.pamphlet (PointsOfFiniteOrder) [cmult]: Merge local conditional definitions. * algebra/permgrps.spad.pamphlet (PermutationGroup) [cosetRep]: Don't forget to return a value. * algebra/newpoly.spad.pamphlet (RecursivePolynomialCategory) [exactQuo]: Merge conditional local definitions. [ZToR]: Inline at sole use point. Remove conditional definitions. [QToR]: Likewise. [PZToPR]: Likewise. [PQToPR]: Likewise. * algebra/naalgc.spad.pamphlet (FramedNonAssociativeAlgebra) [leftRankPolynomial]: Initialize local variable xx. (rightRankPolynomial): Likewise. * algebra/multsqfr.spad.pamphlet (MultivariateSquareFree) [intChoose]: Error if no solution is found in the loop. * algebra/mts.spad.pamphlet (SparseMultivariateTaylorSeries): Tidy. [stream] Remove duplicate definition. * algebra/d01routine.spad.pamphlet (d01anfAnnaType) [measure]: Tidy. (d01asfAnnaType) [measure]: Likewise. * algebra/d01transform.spad.pamphlet (d01TransformFunctionType) [measure]: Likewise. * algebra/forttyp.spad.pamphlet (FortranScalarType) [coerce]: Likewise. --- src/interp/nlib.lisp | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'src/interp') diff --git a/src/interp/nlib.lisp b/src/interp/nlib.lisp index a81d840b..1f4f913e 100644 --- a/src/interp/nlib.lisp +++ b/src/interp/nlib.lisp @@ -243,19 +243,15 @@ (setf (get fname 'compiler::fixed-args) t))) nil) -#+:AKCL -(defun compile-lib-file (fn &rest opts) - (unwind-protect - (progn - (trace (compiler::fast-link-proclaimed-type-p - :exitcond nil - :entrycond (spad-fixed-arg (car system::arglist)))) - (trace (compiler::t1defun :exitcond nil - :entrycond (spad-fixed-arg (caar system::arglist)))) - (apply #'compile-file fn opts)) - (untrace compiler::fast-link-proclaimed-type-p compiler::t1defun))) -#-:GCL -(define-function 'compile-lib-file #'compile-file) +(defun compile-lib-file (file) + (multiple-value-bind (result warning-p failure-p) + (compile-file file) + (cond ((null result) + (|systemError| (list "Generated Lisp was malformed"))) + (failure-p + (|removeFile| (namestring result)) + (|systemError| (list "Compilation of generated Lisp failed")))) + result)) ;; (RDROPITEMS filearg keys) don't delete, used in files.spad (defun rdropitems (filearg keys &aux (ctable (|getIndexTable| filearg))) -- cgit v1.2.3