aboutsummaryrefslogtreecommitdiff
path: root/src/interp/lisp-backend.boot
AgeCommit message (Collapse)AuthorFilesLines
2013-05-30Change backend code emitters to take a %Libname parameterdos-reis1-3/+3
2013-05-29Simplify final backend instruction emission.dos-reis1-6/+5
2013-05-29Simplify backend functionsdos-reis1-7/+6
2013-05-29Misc backend cleanup.dos-reis1-20/+2
2013-05-29Add DB parameter to middle end functions.dos-reis1-2/+2
2013-05-29Misc cleanups.dos-reis1-1/+1
2013-05-26Define lexicographical ordering on Bits in Spaddos-reis1-4/+0
2013-05-22Replace OPTIONLIST with $compilerOptionsdos-reis1-1/+1
2013-05-14 * interp/c-util.boot (cleanParameterList!): New.dos-reis1-1/+2
* interp/define.boot (spadCompileOrSetq): Use it.
2013-05-14Move lispy stuff to lisp-backend.bootdos-reis1-0/+185
2013-05-13 * interp/g-opt.boot (%array2list): New side-effect free opcode.dos-reis1-0/+4
* interp/lisp-backend.boot: Expand it. * algebra/array1.spad.pamphlet (PrimitiveArray): Implement maxIndex, parts, and members.
2013-05-11Consistently use OIL opcodes for abstractionsdos-reis1-3/+3
2013-05-11Fix opcode for references to domain-wide entitiesdos-reis1-1/+1
2013-05-11Introduce opcodes for arrays constructionsdos-reis1-0/+7
2013-05-09Simplify copydos-reis1-1/+2
2012-05-26 * boot/tokens.boot: freshLine, functionSymbol?, and symbolGlobal?dos-reis1-1/+1
are now builin. * boot/ast.boot: Tidy. * interp/c-util.boot: Likewise. * interp/br-saturn.boot: Likewise. * interp/i-syscmd.boot: Likewise. * interp/i-output.boot: Likewise. * interp/clam.boot: Likewise. * interp/trace.boot: Likewise. * interp/sys-utility.boot: Likewise. * interp/sys-driver.boot: Likewise. * interp/lisplib.boot: Likewise. * interp/lisp-backend.boot: Likewise.
2012-05-21 * interp/vmlisp.lisp (SETANDFILE): Remove.dos-reis1-0/+5
(LAM,EVALANDFILEACTQ): Likewise. * interp/sys-utility.boot (PRINT-AND-EVAL-DEFUN): Likewise. * interp/slam.boot (reportFunctionCompilation): Tidy. * interp/lisp-backend.boot (evalAndPrintBackendDecl): New. * interp/c-util.boot (backendCompileSPADSLAM): Use it in lieu of SETANDFILE. (compAndDefine): Use evalAndPrintBackendDecl in lieu of PRINT-AND-EVAL-DEFUN. * interp/hypertex.boot: Clean up. * interp/nhyper.boot: Likewise. * interp/word.boot: Likewise.
2012-05-21 * interp/vmlisp.lisp (EVALANDFILEACTQ): Second argument is nodos-reis1-0/+22
longer optional. Adjust callers. (LAM\,EVALANDFILEACTQ): Likewise. * interp/slam.boot (compQuietly): Use printBackendDecl. * interp/spad.lisp (SPAD): Likewise. * interp/sys-utility.boot (PRINT-AND-EVAL-DEFUN): Likewise. * interp/macros.lisp (SETANDFILE): Move to vmlisp.lisp. * interp/lisp-backend.boot (printBackendStmt): New. (evalAndPrintBackendStmt): Likewise. (printBackendDecl): Likewise. * interp/c-util.boot (registerFunctionReplacement): Use evalAndPrintBackendStmt. (registerRedexForm): Likewise. (proclaimCapsuleFunction): Use printBackendStmt. * interp/Makefile.in (lisp-backend.$(FASLEXT)): Require nlib.$(FASLEXT)
2012-05-20 * interp/parsing.lisp (CONVERSATION): Remove.dos-reis1-0/+4
(CONVERSATION1): Likewise. (MAKE-PARSE-FUNCTION): Likewise. (MAKE-PARSE-FUNCTION1): Likewise. (MAKE-PARSE-FUNC-FLATTEN): Likewise. (MAKE-PARSE-FUNC-FLATTEN-1): Likewise. (TRANSPGVAR): Likewise. (GETRULEFUNLISTS): Likewise. (REDUCTION-PRINT): Likewise. (TRACEMETA): Likewise. (TRMETA): Likewise. (TRMETA1): Likewise. (/MDEF): Likewise. * interp/macros.lisp (EXPAND-TABS): Likewise. * interp/spad.lisp (READ-SPAD): Likewise. (READ-INPUT): Likewise. (READ-SPAD0): Likewise. (READ-SPAD1): Likewise. (READ-SPAD-1): Likewise. (New,ENTRY,1): Likewise. (New,ENTRY,2): Likewise. * interp/bootlex.lisp (SPAD_SYNTAX_ERROR): Move to debug.lisp. (SPAD_LONG_ERROR): Likewise. (SPAD_SHORT_ERROR): Likewise. (SPAD_ERROR_LOC): Likewise. * interp/c-util.boot (COMP370): Move to lisp-backend.boot. (compQuietly): Move to slam.boot.
2012-05-04 * interp/lisp-backend.boot (assembleCode): New.dos-reis1-0/+6
* interp/c-util.boot (backendCompileSPADSLAM): Use it. (backendCompile2): Likewise.
2012-05-03 * interp/vmlisp.lisp ($lamName): Remove.dos-reis1-6/+0
(LAM): Likewise. (*LAM): Likewise. (ISQUOTEDP): Likewise. (QUOTESOF): Likewise. (DDQUOTE): Likewise. * interp/lisp-backend.boot (COMPILE1): Simplify.
2012-05-03 * interp/c-util.boot: Use LAMBDA type in lieu of LAM.dos-reis1-1/+1
* interp/clam.boot: Likewise. * interp/define.boot: Likewise. * interp/lisp-backend.boot (COMPILE1): Tidy. * interp/slam.boot: Likewise.
2012-05-02 * interp/vmlisp.lisp (COMPILE1): Move to lisp-backend.boot.dos-reis1-0/+30
($lamName): Rename from *LAM-NAME*.
2012-05-01 * interp/vmlisp.lisp (REMOVE-FLUIDS): Move to lisp-backend.boot.dos-reis1-0/+21
Rename to removeFluids. (SIMPLE-ARGLIST): Move to lisp-backend.boot. Rename to simpleParameterList?.
2012-05-01 * interp/vmlisp.lisp (COMP370): Move to c-util.bootdos-reis1-0/+4
(compileLispDefinition): Move to lisp-backend.boot.
2012-05-01 * algebra/integer.spad.pamphlet (Integer): Use %iaddmod, %isubmod,dos-reis1-0/+2
%imulmod. * algebra/si.spad.pamphlet (SingleInteger): Likewise. * interp/c-util.boot (devaluate): Use # in lieu of QVSIZE. * interp/g-opt.boot: %ilfshift and %irshift are now builtin side-effect free operations. * interp/lisp-backend.boot: Translate them. * interp/g-util.boot (mergeSort): Avoid QSDIFFERENCE. * interp/slam.boot: Likewise. * interp/sys-macros.lisp: Likewise. * interp/macros.lisp: Avoid QVMAXINDEX. * interp/vmlisp.lisp (QSDIFFERENCE): Remove. (QSGREATERP): Likewise. (QSLEFTSHIFT): Likewise. (QSLESSP): Likewise. (QSMAX): Likewise. (QSMIN): Likewise. (QSMINUS): Likewise. (QSMINUSP): Likewise. (QSODDP): Likewise. (QSABSVAL): Likewise. (QSPLUS): Likewise. (QSZEROP): Likewise. (QVMAXINDEX): Likewise. (QVSIZE): Likewise. (ZERO?): Likewise.
2012-04-30 * lisp/core.lisp.in (fixnum?): New.dos-reis1-1/+1
* algebra/sex.spad.pamphlet: Use %float? instead of RNUM. Use %integer? instead of INTP. * interp/g-timer.boot: Use float? instead of RNUMP. * interp/i-coerce.boot: Use fixnum? instead of SINTP or SMINTP. * interp/i-intern.boot: Likewise. * interp/lisp-backend.boot: Likewise. * interp/slam.boot: Likewise. * interp/trace.boot: Likewise. * interp/vmlisp.lisp: Likewise. (INTP): Remove. (BINTP): Likewise. (LESSP): Likewise. (LINTP): Likewise. (MAKESTRING): Likewise. (MAPELT): Likewise. (NUMP): Likewise. (RNUMP): Likewise. (SINTP): Likewise. (SMINTP): Likewise.
2012-02-25 * interp/compiler.boot (finishLambdaExpression): Use %closure.dos-reis1-1/+1
(extractCodeAndConstructTriple): Likewise. * interp/g-opt.boot (optCall): Adjust.
2012-02-23 * interp/nruncomp.boot (genDeltaEntry): Replace applyFun with %apply.dos-reis1-6/+2
* interp/lisp-backend.boot (expandApply): Remove. Unregister expander. * interp/g-opt.boot (optCall): applyFun is not longer an opcode. Look for %apply. * interp/compiler.boot (applyMapping): Generate ['%call,['%apply,.]] form, not ['%apply,..] form. (extractCodeAndConstructTriple): Tidy. (compApplication): Likewise.
2011-12-18 * interp/g-opt.boot (removeScope!): New.dos-reis1-0/+1
(optimize!): Call it. (optimizeFunctionDef): Simplify.
2011-12-17 * interp/g-opt.boot (freeIteratorFirstValues): New.dos-reis1-24/+20
(cleanLoop!): Use it. * interp/lisp-backend.boot ($freeVarName): Remove. (loopVarInit): Do not generate initializer for free iterators. Adjust callers. (massageFreeVarInits): Remove. Adjust caller.
2011-12-17 * interp/compiler.boot (finishListCollect): New.dos-reis1-7/+1
(compRepeatOrCollect): Use it. * interp/g-opt.boot (optCollectVector): Likewise. * interp/lisp-backend.boot (expandCollect): Likewise.
2011-12-15 * interp/compiler.boot: Rename %loop to %repeat. Propagate.dos-reis1-5/+5
* interp/g-opt.boot: Likewise. * interp/i-map.boot: Likewise. * interp/i-special.boot: Likewise. * interp/lisp-backend.boot: Likewise. * interp/slam.boot: Likewise.
2011-12-11 * interp/compiler.boot (compColon): Give initial %undefined valuedos-reis1-1/+2
to local variable declarations which are not definitions. * interp/lisp-backend.boot (expandToVMForm): Translate %undefined.
2011-12-09 * interp/lisp-backend.boot (loopVarInit): Generate VM forms, not Lisp.dos-reis1-24/+23
(expandIN): Likewise. (expandON): Likewise. (expandSTEP): Likewise. (expandUNTIL): Likewise. (expandWHILE): Likewise. (expandSUCHTHAT): Likewise. (expandInit): Likewise. (expandIterators): Likewise. (massageFreeVarInits): Likewise. (expandLoop): optimize! then expand.
2011-12-07 * interp/compiler.boot (compReduce1): Tidy.dos-reis1-3/+6
* interp/define.boot (compDefineCategory2): Likewise. * interp/nruncomp.boot (buildFunctor): Likewise. * interp/slam.boot (compileRecurrenceRelation): Likewise. * interp/lisp-backend.boot (expandSeq): Use PROGN in absence of EXIT.
2011-12-04 * interp/lisp-backend.boot (hasNoExit?): New.dos-reis1-2/+20
(expandSeq): Likewise. Use it. Expand %seq forms.
2011-12-02 * interp/buildom.boot (seteltRecordFun): Change EXIT to %exit.dos-reis1-0/+1
* interp/clam.boot (compHash):Likewise. * interp/g-opt.boot (changeVariableDefinitionToStore): Likewise. (jumpToToplevel?): Likewise. (groupVariableDefinitions): Likewise. (changeLeaveToExit): Likewise. (optLabelled): Likewise. (optSeq): Likewise. * interp/lisp-backend.boot: Translate %exit to EXIT.
2011-12-02 * interp/buildom.boot (setelt): Change SEQ to %seq.dos-reis1-0/+1
* interp/clam.boot (compHash): Likewise. * interp/compiler.boot (freeVarUsage): Likewise. (canReturn): Likewise. * interp/i-special.boot (compileIs): Likewise. * interp/g-opt.boot (changeVariableDefinitionToStore): Likewise. (jumpToToplevel?): Likewise. (groupVariableDefinitions): Likewise. (changeLeaveToExit): Likewise. (optLabelled): Likewise. (optSeq): Rename from optSEQ. Adjust callers. * interp/lisp-backend.boot: Translate %seq to SEQ.
2011-12-02 * interp/g-opt.boot (changeVariableDefinitionToStore): Handle SEQdos-reis1-3/+4
forms too. (groupVariableDefinitions): Handle %bind and %loop forms. * interp/lisp-backend.boot (expandLoop): Special code for case where there is explicit exit condition, for better pretty-printing.
2011-12-01 * interp/buildom.boot (UnionEqual): Use %lambda, not %lam.dos-reis1-2/+6
(coerceUn2E): Likewise. * interp/compiler.boot (massageLoop): %leave now takes a label as first argument. * interp/lisp-backend.boot (expandLeave): New. Expand accordingly.
2011-11-29 * boot/tokens.boot (absKind, absParms, absBody): New selectors.dos-reis1-0/+2
* interp/compiler.boot (canReturn): Handle %lambda forms. (compUnnamedMapping): Generate %lambda forms. Don't optimize them yet. * interp/g-opt.boot: %lambda forms are side-effect free. * interp/lisp-backend.boot: Translate them.
2011-10-23 * interp/g-opt.boot ($VMsideEffectFreeOperators): Include %fdecode.dos-reis1-0/+4
* interp/lisp-backend.boot: Expand it. * algebra/sf.spad.pamphlet (DoubleFloat): Remove %fmanexpr import. Use %fdecode to access Lisp-level double-float decoding. [mantissa]: Rewrite. [exponent]: Likewise. [negative?]: Likewise. [positive?]: Likewise. [manexp]: Likewise. * algebra/view2D.spad.pamphlet (TwoDimensionalViewport): Tidy.
2011-10-03 Cleanup.dos-reis1-6/+6
2011-09-11 * interp/compiler.boot (finishLambdaExpression): Tidy.dos-reis1-0/+1
(extractCodeAndConstructTriple): Likewise. * interp/g-opt.boot (optCall): Likewise. ($VMsideEffectFreeOperators): Include %function * interp/lisp-backend.boot: Translate %function.
2011-09-11 * interp/lisplib.boot (isFunctor): Noe recognize Mapping as a functor.dos-reis1-1/+5
* interp/g-opt.boot (doInlineCall): Tidy one more time. ($VMsideEffectFreeOperators): Move %aplly to $simpleVMoperators. (optLET): Remove as unused. * interp/lisp-backend.boot (expandApply): New. Register as expander for %apply forms. * interp/define.boot (getXmode): New. (displayMissingFunctions): Use it instead of getmode. (compDefineCapsuleFunction): Likewise. (addDomain): Likewise. (getSignature): Likewise. (compile): Likewise. (compJoin): Likewise. * interp/compiler.boot (comp3): Likewise. (compWithMappingMode): Likewise. (applyMapping): Generate %apply form. (compApplication): Likewise. (autoCoerceByModemap): Likewise. (extractCodeAndConstructTriple): Handle %apply forms. (setqSingle): For domain variables, put corresponding macro forms in the environment. * algebra/ore.spad.pamphlet (Automorphism): Define Rep as a constant. Adjust; include explicit uses of rep and per.
2011-08-14 * interp/lisp-backend.boot ($freeVarName): New global constant.dos-reis1-11/+31
(loopVarInit): New. (expandIN): Use it. (expandON): Likewise. (expandSTEP): Likewise. (massageFreeVarInits): New. (expandLoop): Use it. * interp/fnewmeta.lisp (PARSE-QuantifiedVariable): Tidy. (PARSE-AnyId): Likewise. (PARSE-Variable): New. Allow scope-of-type specification for loop variable. (PARSE-Iterator): Use it. * interp/compiler.boot (massage_llop): Don't check $mayHaveFreeIteratorVariables. (compRepeatOrCollect): Don't bind it. (classifyIteratorVariable): New. (complainIfShadowing): Remove as no longer needed. (compStepIterator): Use it. Tidy. (compONIterator, compINIterator): New. Split out of compIterator. (compIterator): Refactor. * interp/functor.boot (optFunctorBody): Fix thinko. * interp/g-opt.boot (optCollectVector): A STEP iterator may have a storage class. * algebra/clip.spad.pamphlet: Fix loop variable scope. * algebra/ffpoly.spad.pamphlet: Likewise. * algebra/fparfrac.spad.pamphlet: Likewise. * algebra/gdpoly.spad.pamphlet: Likewise. * algebra/ghensel.spad.pamphlet: Likewise. * algebra/groebsol.spad.pamphlet: Likewise. * algebra/intfact.spad.pamphlet: Likewise. * algebra/matfuns.spad.pamphlet: Likewise. * algebra/moddfact.spad.pamphlet: Likewise. * algebra/numtheor.spad.pamphlet: Likewise. * algebra/permgrps.spad.pamphlet: Likewise. * algebra/pfbr.spad.pamphlet: Likewise. * algebra/pgcd.spad.pamphlet: Likewise. * algebra/pleqn.spad.pamphlet: Likewise. * algebra/pseudolin.spad.pamphlet: Likewise. * algebra/radeigen.spad.pamphlet: Likewise. * algebra/radix.spad.pamphlet: Likewise. * algebra/regset.spad.pamphlet: Likewise. * algebra/rep2.spad.pamphlet: Likewise. * algebra/sgcf.spad.pamphlet: Likewise. * algebra/smith.spad.pamphlet: Likewise. * algebra/sregset.spad.pamphlet: Likewise. * algebra/syssolp.spad.pamphlet: Likewise. * algebra/zerodim.spad.pamphlet: Likewise. * algebra/crfp.spad.pamphlet: Remove capsule-level declaration of local variables. * algebra/galfact.spad.pamphlet: Likewise. * algebra/mathml.spad.pamphlet: Likewise. * algebra/numode.spad.pamphlet: Likewise. * algebra/tex.spad.pamphlet: Likewise. * algebra/updecomp.spad.pamphlet: Likewise.
2011-08-11 * interp/lisp-backend.boot (expandBytevec2str): Use MAP instead ofdos-reis1-3/+5
COERCE. Eliminate second argument. (expandStr2bytevec): Use MAP instead of COERCE. * algebra/data.spad.pamphlet (ByteBuffer) [coerce]: Adjust call to %bytevec2str.
2011-08-07more cleanupsdos-reis1-2/+2
2011-08-06cleanupdos-reis1-1/+1