aboutsummaryrefslogtreecommitdiff
path: root/src/interp/compiler.boot
AgeCommit message (Collapse)AuthorFilesLines
2011-12-17 * interp/compiler.boot (compColon): Handle multiple declarationsdos-reis1-1/+2
properly.
2011-12-17 * interp/compiler.boot (finishVectorCollect): Rename fromdos-reis1-1/+50
optCollectVector. Move here. (compRepeatOrCollect): Use it.
2011-12-17 * interp/compiler.boot (finishListCollect): New.dos-reis1-1/+8
(compRepeatOrCollect): Use it. * interp/g-opt.boot (optCollectVector): Likewise. * interp/lisp-backend.boot (expandCollect): Likewise.
2011-12-15 * interp/g-opt.boot (removeLoopExitTag!): New.dos-reis1-35/+2
(optimize!): Run it first. * interp/compiler.boot (nullifyTargetingLeaves): Remove. (massageLoop): Likewise. (compRepeatOrCollect): Don't call it anymore.
2011-12-15 * interp/compiler.boot: Rename %loop to %repeat. Propagate.dos-reis1-2/+2
* 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/+4
to local variable declarations which are not definitions. * interp/lisp-backend.boot (expandToVMForm): Translate %undefined.
2011-12-08 * interp/g-opt.boot (tranformIF!): New.dos-reis1-1/+1
(optimize!): Likewise. Abstract from optimizeFunctionDef. (optimize): New. (optimizeFunctionDef): Use optimize!. (simplifyVMForm): Do not call optIF2COND. (optIF2COND): Remove. * interp/compiler.boot (compHasFormat): Use optimize! in lieu of simplifyVMForm. * interp/nruncomp.boot (NRTencode): Use optimize. (NRTsetVector4a): Likewise.
2011-12-07 * interp/compiler.boot (compReduce1): Tidy.dos-reis1-3/+4
* 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-06 * interp/compiler.boot (setqMultipleExplicit): Introduceddos-reis1-10/+9
temporary variables are local to the assignment.
2011-12-06 * interp/compiler.boot (compResolveCall): Update description.dos-reis1-47/+63
(compRetractGuard): Tidy. (compRecoverDomain): Likewise. (compRecoverGuard): Likewise. (compAlternativeGuard): Likewise. (compMatchAlternative): Likewise. (compMatch): Likewise.
2011-12-04 * interp/compiler.boot (freeVarUsage): Handle %bind and LET.dos-reis1-2/+13
2011-12-03 * interp/compiler.boot: Use %seq in lieu of PROGN.dos-reis1-9/+8
* interp/g-util.boot (spliceSeqArgs): New. * interp/g-opt.boot (changeVariableDefinitionToStore): Call it before recursing on %seq forms.
2011-12-03 * interp/compiler.boot (setqMultiple): Handle lhs and rhs of typedos-reis1-4/+14
Cross instance. * interp/g-util.boot ($DomainNames): Include Cross. * interp/cattable.boot (genCategoryTable): Do not eval Cross. It is bogus to prepopulate the table with builtin functors anyway. * algebra/triset.spad.pamphlet (PolynomialSetUtilitiesPackage)[removeRedundantFactors]: Do not define `c' and `d' in conditional. Make the initializer conditional.
2011-12-03 * interp/compiler.boot: Replace %labelled with %scope.dos-reis1-7/+7
* interp/define.boot: Likewise. * interp/g-opt.boot: Likewise. * interp/g-util.boot: Likewise. Rename mkLabelled to mkScope.
2011-12-02 * interp/buildom.boot (setelt): Change SEQ to %seq.dos-reis1-4/+4
* 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-01 * interp/compiler.boot (compSeq1): Generate %labelled forms.dos-reis1-25/+32
(coerceExit): Likewise. (compRepeatOrCollect): Likewise. (replaceExitEtc): Tidy. (canReturn): Likewise. (compIterate): Generate %lave form. (nullifyTargetingLeaves): Move out of massageLoop. (massageLoop): Adjust. * interp/define.boot (compDefineCapsuleFunction): Generate %labelled form for the body. * interp/g-opt.boot: Now handle %labelled and %leave forms. (optLabelled): Rename from optCatch.
2011-12-01 * interp/buildom.boot (UnionEqual): Use %lambda, not %lam.dos-reis1-1/+1
(coerceUn2E): Likewise. * interp/compiler.boot (massageLoop): %leave now takes a label as first argument. * interp/lisp-backend.boot (expandLeave): New. Expand accordingly.
2011-11-30 * interp/define.boot (registerInlinableDomain): Lose last argument.dos-reis1-1/+1
Recursively nominate constructor argument for inlining. Adjust callers. * interp/c-util.boot: Tidy. * algebra/Makefile.in: Tidy.
2011-11-29 * boot/tokens.boot (absKind, absParms, absBody): New selectors.dos-reis1-3/+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-11-27 * interp/nruncomp.boot (assocIndex): Rename from NRTassocIndex.dos-reis1-2/+2
Adjust callers.
2011-11-26 * interp/nruncomp.boot (genDeltaEntry): Split first argument intodos-reis1-6/+6
separate arguments (operation and modemap). Adjust callers.
2011-11-26 * interp/br-con.boot (conOpPage1): Fix typo.dos-reis1-5/+6
* interp/c-util.boot (registerConstructor): New. (currentConstructor): Likewise. (makeCompilationData): Initialize dbEntityBuffer. (dbEntityBuffer): New. (dbUsedEntities): Likewise. (dbEntityCount): Likewise. * interp/compiler.boot: Adjust call to getLocalIndex, NRTassocIndex * interp/define.boot: Likewise. ($NRTdeltaLength): Remove. * interp/nruncomp.boot: Likewise.
2011-11-21 * interp/nruncomp.boot (getLocalIndex): Rename from NRTgetLocalIndex.dos-reis1-1/+1
Adjust callers. * interp/compiler.boot: Adjust. * interp/define.boot: Likewise.
2011-11-11 * interp/compiler.boot (applyMapping): Emit special call fordos-reis1-4/+13
domain producing mapping variables. (compWithMappingMode): Coerce constructors to function objets. (compFormWithModemap): Constructor calls are direct calls. Everything else is ordinary indirect call. * interp/g-opt.boot (optCall): Handle function objects. * interp/nruncomp.boot (NRTencode): Encode the elaboration of atomic forms, not the source level form. * testsuite/compiler/ctor-mapping.spad: New.
2011-11-07 * interp/compiler.boot ($compileOnlyCertainItems): Remove.dos-reis1-4/+0
* interp/define.boot ($NRTslot1Info): Likewise. (getInfovecCode): Add additional environment argument. Adjust caller. Call NRTmakeSlot1Info here. (NRTgetLookupFunction): Lose second and third arguments. They are derivable from the DB argument. Adjust caller. (compDefineFunctor1): Do not bind $NRTslot1Info. (compDefineCapsuleFunction): Adjust. (compile): Likewise. * interp/i-syscmd.boot (compilerDoitWithScreenedLisplib): Remove. Adjust caller. * interp/nruncomp.boot (NRTmakeSlot1Info): Tak a DB argument. Adjust caller. (mkSlot1sublis): Remove.
2011-11-02 Add compiler support for implicit parameters.dos-reis1-10/+86
* interp/compiler.boot (bindPredicateExistentials): Rename from constructorCondition. Now return a substitution on success, otherwise failure. (solveEquation): New. (solveSubsumption): Likewise. (deduceImplicitParameters): Likewise. (evaluateConstructorModemap): Use it. Tidy.
2011-10-31 * interp/compiler.boot (evaluateConstructorModemap): Rename fromdos-reis1-13/+22
substituteInfoFunctorModemap. (constructorCondition): New. * interp/define.boot (compDefineCategory2): Compute dual signature early on. (compDefineFunctor1): Likewise. (typingKind): New. (deduceImplicitParameters): Use it. * interp/database.boot (modemapsFromCategory): Take a first argument as a DB. Tidy. Adjust caller. Add constructor condition. (modemapsFromFunctor): Likewise. Lose last argument. (mkDatabasePred): Remove. (formal2Pattern): Likewise.
2011-10-30 * interp/sys-macros.lisp (MKPF1): Tidy.dos-reis1-7/+10
* interp/sys-constants.boot ($QueryVariables): New. * interp/define.boot ($whreDecls): Remove. (checkRepresentation): Take a DB as first parameter. Adjust Callers. (buildConstructorCondition): New (deduceImplicitParameters): Likewise (compDefineCategory2): Use it. (compDefineFunctor1): Likewise. (typeDependencyPath): Remove. (inferConstructorImplicitParameters): Likewise. * interp/compiler.boot (compTopLevel): Do not bind $whereDecls. (recordDeclarationInSideCondition): Take additional reference parameter to the list of processed decls. Adjust callers. (compWhere): Record any side decls in compilation environment. * interp/c-util.boot (makeCompilationData): Initialize implicit data. (dbParameters): New. (dbImplicitData): New accessor macro. (dbImplicitParameters): New. (dbImplicitConstraints): Likewise. (dbSubstituteFormals): Likewise. (dbSubstituteQueries): Likewise. * interp/database.boot (fixUpPredicate): Tidy. * boot/utility.boot (applySubst): Early exit on identity substitution. (applySubst!): Likewise. (applySubstNQ): Likewise. * boot/ast.boot (bfIS1): Accept pattern matching against Boolean constant true.
2011-10-29 * interp/compiler.boot (compHasFormat): Simplify type form.dos-reis1-2/+2
2011-10-27 Support use of any natural number literal as constant name.dos-reis1-10/+14
* interp/postpar.boot (postNormalizeName): Remove. (postLhsOfDefinition): New. (postDef): Use it. (postMDef): Likewise. (postForm): Remove dead code. (postSignature): Internalize names of exported operators. * interp/i-intern.boot (mkAtree2): For package call resolution, use internal names. * interp/compiler.boot (compAtomWithModemap): Use externalName for name reported in diagnostic. (compIntegerLiteral): New. (compAtom): Use it. (compElt): Look up modemaps for internal names. (getModemapList): Likewise. * interp/g-util.boot (normalizeName): New. (internalName): Likewise. (externalName): Likewise.
2011-10-25 * interp/compiler.boot (getFormModemaps): Tidy checking of "elt"dos-reis1-8/+7
and "setelt" modemaps.
2011-10-24 * interp/compiler.boot (compArgumentsAndTryAgain): Fail only ifdos-reis1-2/+1
elaboration of all arguments fails.
2011-10-24 * interp/compiler.boot (compOrCroak1): Drop last argument. Tidy.dos-reis1-14/+44
(mostSpecificTriple): New. (compAtomWithModemap): Use it to resolve ambiguous constants. (formatConstantCandidates): New. (compForm1): Do try to compile constants 0 and 1 with compToApply. * algebra/polycat.spad.pamphlet (FiniteAbelianMonoidRing) [binomThmExpt]: Tidy. (UnivariatePolynomialCategory) [pseudoDivide]: Likewise. * algebra/float.spad.pamphlet (Float) [log]: Specificy type for local variable `l'. * interp/format.boot (formatUnabbreviatedSig): Handle constants.
2011-10-23 * interp/compiler.boot (compForm2): Simplify. Don't bother withdos-reis1-19/+2
subsumption. Exit early on empty modemap candidate list.
2011-10-23 * interp/compiler.boot (compAtomWithModemap): Handle code-gen here.dos-reis1-5/+14
2011-10-19 * interp/postpar.boot (postNormalizeName): New.dos-reis1-5/+6
(postAtom): Use it. (postMDef): Do not generate artificial list of nils. Leave left-hand-side as written in source code. * interp/compiler.boot (compMacro): Tidy. * interp/define.boot (checkRepresentation): Likewise. * interp/parse.boot (parseMDEF): Likewise. * algebra/syntax.spad.pamphlet (MacroAst): Adjust.
2011-10-18 * interp/postpar.boot (displayPreCompilationErrors): Dot not checkdos-reis1-6/+6
for interactive mode. (postBigFloat): Likewise. (postDef): Likewise. (postMDef): Likewise. (tuple2List): Likewise. (postReduce): Likewise. (postQUOTE): Remove. (postQuot): Likewise. (postOp): Likewise. (postTran): Adjust. * interp/newaux.lisp: Replace %LET with ':='. * interp/property.lisp: Likewise. * interp/g-util.boot (getTypeOfSyntax): Likewise. * interp/define.boot (checkRepresentation): Likewise. (doIt): Likewise. * interp/compiler.boot (compSetq): Likewise. (compRecoverGuard): Likewise. (compReduce1): Likewise. * interp/c-util.boot (lhsOfAssignment): Likewise. (isAlmostSimple): Likewise. * interp/c-doc.boot (recordAttributeDocumentation): Likewise. * interp/parse.boot (parseLeftArrow): Remove. (parseLETD): Likewise. (parseAssign): Rename from parseLET. * algebra/syntax.spad.pamphlet (SpadAst): Handle both cases.
2011-10-03 Cleanup.dos-reis1-11/+11
2011-10-02 * boot/utility.boot (objectAssoc): New. Export.dos-reis1-1/+1
* boot/ast.boot: Use it. instead of ASSOC. * boot/translator.boot (packageBody): Tidy. * interp/astr.boot: Use objectAssoc instead of ASSQ. * interp/br-con.boot: Likewise. * interp/br-op1.boot: Likewise. * interp/br-saturn.boot: Likewise. * interp/buildom.boot: Likewise. * interp/c-util.boot: Likewise. * interp/category.boot: Likewise. * interp/clam.boot: Likewise. * interp/compiler.boot: Likewise. * interp/define.boot: Likewise. * interp/functor.boot: Likewise. * interp/g-util.boot: Likewise. * interp/i-coerce.boot: Likewise. * interp/i-coerfn.boot: Likewise. * interp/i-funsel.boot: Likewise. * interp/i-object.boot: Likewise. * interp/i-output.boot: Likewise. * interp/i-resolv.boot: Likewise. * interp/i-special.boot: Likewise. * interp/i-syscmd.boot: Likewise. * interp/i-util.boot: Likewise. * interp/int-top.boot: Likewise. * interp/lisplib.boot: Likewise. * interp/msg.boot: Likewise. * interp/posit.boot: Likewise. * interp/termrw.boot: Likewise. * interp/trace.boot: Likewise. * interp/sys-utility.boot (upwardCut): New. * interp/spad.lisp: Use it. * interp/util.lisp: Likewise. * interp/spaderror.lisp: Likewise. * interp/vmlisp.lisp (ASSEMBLE): Remove. (ASSQ): Likewise. (MEMQ): Likewise. (NAMEDERRSET): Likewise. (ORADDTEMPDEFS): Likewise. * interp/macros.lisp (QLASSQ): Move to vmlisp.lisp. (LASSQ): Remove.
2011-10-01 * boot/utility.boot: Define BOOTTRAN namespace.dos-reis1-2/+2
(setUnion): New. (setDifference): New. * boot/translator.boot (packageBody): New. (translateToplevel): Use it. Translate namespace definition. * boot/tokens.boot: Replace bitmask with bitref. Do not translate setDifference and setUnion. * boot/parser.boot (bpDef): Now include namespace definition. (bpComma): Remove namespace rule as subsumed by Where rule. * boot/Makefile.in: Remove dependencies on initial-env.lisp. (AXIOM_LOCAL_LISP_sources): Remove as unused, (boot_sources): Remove as redundant with boot_SOURCES. * boot/initial-env.lisp: Remove.
2011-09-11 * interp/compiler.boot (finishLambdaExpression): Tidy.dos-reis1-2/+2
(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-35/+19
* 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-09-07 * interp/compiler.boot (compImport): Don't do anything ifdos-reis1-1/+3
bootstrapping: there is no much to import for now. * interp/define.boot (getOperationAlist): Get the isFunctor property directly. (addDomain): Call isDomainForm.
2011-08-25 * interp/compiler.boot (compHasFormat): Take environmentdos-reis1-8/+8
argument. Adjust callers. * interp/define.boot (NRTmakeCategoryAlist): Likewise. * interp/functor.boot (ProcessCond): Likewise. * interp/lisplib.boot (NRTgenFinalAttributeAlist): Likewise. (predicateBitIndex): Likewise. (predicateBitRef): Likewise. (makePredicateBitVector): Likewise. (transHasCode): Likewise.
2011-08-19 * interp/category.boot (mkOr): Taken environment as parameter.dos-reis1-10/+10
Adjust callers. (mkOr2): Likewise. (mkAnd): Likewise. (mkAnd2): Likewise. (FindFundAncs): Likewise. (CatEval): Likewise. (AncestorP): Likewise. (CondAncestorP): Likewise. (DescendantP): Likewise. * interp/compiler.boot (compMapCond): Likewise. (compMapCond'): Likewise. * interp/define.boot (formatPred): Likewise. (formatInfo): Likewise. (addInfo): Likewise. (knownPred): Likewise. * interp/functor.boot (InvestigateConditions): Likewise. (ICformat): Likewise.
2011-08-18 * interp/momdemap.boot: Fold content into compiler.boot anddos-reis1-1/+10
define.boot. Remove. * Makefile.in: Adjust dependencies.
2011-08-15 * interp/compiler.boot (compSeq1): Tidy.dos-reis1-35/+30
(cpmpSeqItem): Likewise. (replaceExitEtc): Likewise. (massageLoop): Don't check for TAGGEDexit anymore.
2011-08-14 * interp/lisp-backend.boot ($freeVarName): New global constant.dos-reis1-42/+59
(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-14 * interp/compiler.boot (compRepeatOrCollect): Set $loopKind directly.dos-reis1-8/+8
(complainIfShadowing): Don't complain when collecting. * algebra/contfrac.spad.pamphlet: Remove capsule-level declaration of local variables. * algebra/cycles.spad.pamphlet: Likewise. * algebra/cyclotom.spad.pamphlet: Likewise. * algebra/ddfact.spad.pamphlet: Likewise. * algebra/fortpak.spad.pamphlet: Likewise. * algebra/lingrob.spad.pamphlet: Likewise. * algebra/numode.spad.pamphlet: Likewise. * algebra/numquad.spad.pamphlet: Likewise. * algebra/out.spad.pamphlet: Likewise. * algebra/perman.spad.pamphlet: Likewise. * algebra/view2D.spad.pamphlet: Likewise.
2011-08-12Remove another instance of LIST2VECdos-reis1-1/+1