aboutsummaryrefslogtreecommitdiff
path: root/src/interp/g-opt.boot
AgeCommit message (Collapse)AuthorFilesLines
2011-12-28 * boot/tokens.boot: Remove redundant renaming of REM.dos-reis1-0/+2
loopBody and loopExit are not selectors. * interp/i-output.boot: Include sys-utility. * interp/sys-utility.boot (last): New macro. (loopBody): Likewise. * interp/vmlisp.lisp (LASTNODE): Remove. (LASTPAIR): Likewise. (last): Do not define here.
2011-12-28 * interp/g-opt.boot (coagulateWhenSeries): Simplify.dos-reis1-20/+9
(packWhen!): Likewise. (unnestWhen!): Tidy. (removeScope!): Handle %when forms.
2011-12-27 * interp/g-opt.boot (exitScope?): Now return an expression or nil.dos-reis1-6/+17
(cancelScopeLeave!): Tidy.
2011-12-27 * interp/g-opt.boot (changeVariableDefinitionToStore): Tidy.dos-reis1-8/+4
Remove handling of IF forms as no longer relevant. * algebra/matfuns.spad.pamphlet (MatrixLinearAlgebraFunctions) [rank]: Tidy.
2011-12-25 * interp/g-opt.boot (unnestWhen!): Recurse into more controldos-reis1-1/+7
structures.
2011-12-18 * interp/g-opt.boot (unnestWhen!): New.dos-reis1-8/+23
(packWhen!): Simplify. (optimize!): Run before changeVariableDefinitionToStore.
2011-12-18 * interp/g-opt.boot (removeScope!): New.dos-reis1-18/+10
(optimize!): Call it. (optimizeFunctionDef): Simplify.
2011-12-17 * interp/compiler.boot (finishVectorCollect): Rename fromdos-reis1-46/+1
optCollectVector. Move here. (compRepeatOrCollect): Use it.
2011-12-17 * interp/g-opt.boot (freeIteratorFirstValues): New.dos-reis1-1/+12
(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-2/+4
(compRepeatOrCollect): Use it. * interp/g-opt.boot (optCollectVector): Likewise. * interp/lisp-backend.boot (expandCollect): Likewise.
2011-12-15 * interp/g-util.boot (prefixWalk!): New.dos-reis1-3/+3
* interp/g-opt.boot (cleanLoop!): Rename from removeLoopExitTag!. Adjust caller. Rewrite as a prefix walk.
2011-12-15 * interp/g-opt.boot (removeLoopExitTag!): New.dos-reis1-1/+16
(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-6/+6
* 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-15 * interp/g-opt.boot (modified?): Tidy.dos-reis1-2/+8
2011-12-15 * interp/g-opt.boot (packWhen!): Tidy.dos-reis1-4/+6
2011-12-15 * interp/g-opt.boot (exitScope?): New.dos-reis1-2/+15
(packWhen!): Use it. (coagulateWhenSeries): Tidy. (cancelScopeLeave!): Likewise.
2011-12-14 * interp/g-opt.boot (removeNeedleesLeave): Remove.dos-reis1-18/+6
(optScope): Adjust. (removeLeave!): New. (optimize!): Run it at the very beginning.
2011-12-14misc cleanupdos-reis1-2/+0
2011-12-14 * interp/g-opt.boot (optSeq): Remove. Adjust callers.dos-reis1-6/+1
2011-12-13 * interp/g-opt.boot (replaceableTemporary?): Remove.dos-reis1-21/+3
(optSeq,getRidOfTemps): Likewise. (optSeq): Rewrite. * interp/slam.boot (compileRecurrenceRelation): Tidy.
2011-12-13 * interp/g-opt.boot (removeJunk!): Rename from removeSeq!dos-reis1-6/+19
(cancelScopeLeave!): New. (inlineLocals!): Tidy. (optimize!): Run cancelScopeLeave! right after removeJunk!.
2011-12-13 * interp/g-opt.boot: Rework. Schedule conditional splittingdos-reis1-5/+5
before changing %LETs to %stores. Run beta reduction and condtional splitting afterward, one more time. (optimizeFunctionDef): Simplify.
2011-12-12 * interp/g-opt.boot (packWhen!): Tidy.dos-reis1-6/+21
(spliceSeq!): New. (optimize!): Run splice! packWhen! twice.
2011-12-11 * interp/g-opt.boot (inlineLocals!): Single-used temporaries should go.dos-reis1-0/+2
(spliceSeqArgs): Splice sequences drapped in %scope cloths too.
2011-12-10 * interp/g-opt.boot (optSeq): Remove splicePROGN as redundant.dos-reis1-5/+1
* interp/functor.boot (optFunctorBody): Generate %seq form, not PROGN. (DescendCode): Likewise. * interp/c-util.boot (displayComp): Fix thinko.
2011-12-10 * interp/g-opt.boot (optSeq): Remove seqToCOND as now redundantdos-reis1-8/+1
with packWhen!.
2011-12-10 * interp/g-opt.boot (mkDefault): New.dos-reis1-3/+25
(coagulateWhenSeries): Likewise. (packWhen!): Likewise. Use them. (optimize!): Call it. Tidy.
2011-12-09 * interp/g-opt.boot (packWehn!): New.dos-reis1-1/+13
(optimize!): Use it.
2011-12-08 * interp/g-opt.boot (tranformIF!): New.dos-reis1-13/+22
(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-08 * interp/g-opt.boot: %writeString, %writeNewline and %writeLinedos-reis1-4/+4
are side-effect full. (removeSeq!): Tidy. Skip side-effectfree statements.
2011-12-07 * interp/g-opt.boot (removeSeq!): New.dos-reis1-3/+40
(inlineLocals!): Likewise. (optimizeFunctionDef): Use them. (optSeq): Tidy. * interp/buildom.boot (seteltRecordFun): Tidy. * interp/clam.boot (compHash): Likewise.
2011-12-07 * interp/g-opt.boot (groupTranscients!): New.dos-reis1-1/+21
(reduceXLAM!): Likewise. (optimizeFunctionDef): Call them before simplifyVMForm. * interp/g-util.boot (mkSeq): New. (abstraction?): Likewise. (walkWith!): Likewise.
2011-12-05 * interp/g-opt.boot (changeVariableDefinitionToStore): Separatelydos-reis1-3/+11
handle %bind and LET forms. * interp/g-util.boot (spliceSeqArgs): Recurse into %seq forms.
2011-12-03 * interp/compiler.boot: Use %seq in lieu of PROGN.dos-reis1-0/+2
* interp/g-util.boot (spliceSeqArgs): New. * interp/g-opt.boot (changeVariableDefinitionToStore): Call it before recursing on %seq forms.
2011-12-03 * interp/compiler.boot: Replace %labelled with %scope.dos-reis1-6/+6
* interp/define.boot: Likewise. * interp/g-opt.boot: Likewise. * interp/g-util.boot: Likewise. Rename mkLabelled to mkScope.
2011-12-03 * interp/g-opt.boot (groupVariableDefinitions): Simplify a bit.dos-reis1-20/+13
(optimizeFunctionDef): Likewise. Change %LET to %store before simplification. (simplifyVMForm): Do not call changeVariableDefinitionToStore.
2011-12-03 * interp/g-util.boot (hasNoLeave?): Move from g-opt.boot.dos-reis1-23/+12
(mkLabelled): New. (mkBind): Likewise. * interp/g-opt.boot (groupVariableDefinitions): Use them. * algebra/aggcat.spad.pamphlet (ListAggregate) [merge!]: Declare local variables `r' and `s' before assigning to them.
2011-12-02 * interp/g-opt.boot (iteratorName): New.dos-reis1-6/+55
(changeLoopVarDefsToStore): Likewise. (changeVariableDefinitionToStore): Use it. Tidy. (groupVariableDefinitions): Tidy.
2011-12-02 * interp/buildom.boot (seteltRecordFun): Change EXIT to %exit.dos-reis1-9/+9
* 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-16/+16
* 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 (modified?): Examine the rhs too.dos-reis1-1/+2
2011-12-02 * interp/g-opt.boot (changeVariableDefinitionToStore): Handle SEQdos-reis1-1/+9
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/g-opt.boot (groupVariableDefinitions): Look throughdos-reis1-4/+9
%labelled and %lambda. (optimizeFunctionDef): Use copyTree, not COPY. Simplify. (simplifyVMForm): Perform changeVariableDefinitionToStore and groupVariableDefinitions on abstraction forms.
2011-12-01 * interp/compiler.boot (compSeq1): Generate %labelled forms.dos-reis1-43/+42
(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-11-29 * boot/tokens.boot (absKind, absParms, absBody): New selectors.dos-reis1-4/+4
* 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-29 * interp/g-opt.boot (isSimpleForm): Remove as unused.dos-reis1-32/+27
(floatableVMForm?): New. (modified?): Rename form varIsAssigned. (canInlineVarDefinition): Tidy. Allow intermediate temporaries initialized from variables to be inlined if not modified. (optBind): Tidy.
2011-11-11 * interp/compiler.boot (applyMapping): Emit special call fordos-reis1-0/+4
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-10-27 * algebra/stream.spad.pamphlet (Stream): Tidy accessors.dos-reis1-1/+1
2011-10-23 * interp/g-opt.boot ($VMsideEffectFreeOperators): Include %fdecode.dos-reis1-1/+1
* 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-3/+3