aboutsummaryrefslogtreecommitdiff
path: root/src/interp/g-opt.boot
AgeCommit message (Collapse)AuthorFilesLines
2012-05-01 * algebra/integer.spad.pamphlet (Integer): Use %iaddmod, %isubmod,dos-reis1-0/+1
%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 * algebra/si.spad.pamphlet (SingleInteger): Use %iaddmod,dos-reis1-1/+13
%isubmod, and %imulmod. * interp/g-opt.boot: These are now builtin side-effect operators. (optIaddmod): New optimizer. Register. (optIsubmod): Likewise. (optImulmod): Likewise. * interp/sys-macros.lisp (QSADDMOD): Remove. (QSDIFMOD): Likewise. (QSMULMOD): Likewise.
2012-04-28 * interp/compiler.boot (finishLambdaExpression): Tidy.dos-reis1-1/+5
(compWithMappingMode): Use %lambda not LAMBDA. * interp/g-opt.boot (changeVariableDefinitionToStore): Handle %closure.
2012-04-28 * interp/boot-pkg.lisp (gensym?): Check for non-null object.dos-reis1-3/+3
* interp/clammed.boot: Use it in lieu of GENSYMP. * interp/debug.lisp: Likewise. * interp/g-opt.boot: Likewise. * interp/g-util.boot: Likewise. * interp/i-analy.boot: Likewise. * interp/trace.boot: Likewise. * interp/vmlisp.lisp (GENSYMP): Remove.
2012-02-27 * interp/compiler.boot (emitLocalCallInsn): Mark externaldos-reis1-2/+3
operators as such, and local functions as such. (freeVarUsage): Do not count external and local functions. (extractCode): Tidy. Handle closure literals. * interp/g-opt.boot (optCall): Optimize external calls where possible. %external is a side-effect free operator.
2012-02-26 * interp/g-util.boot (usedSymbol?): Remove.dos-reis1-4/+4
(bindingForm?): New. (usesVariable?): Likewise. * interp/compiler.boot (declareUnusedParameters): Use it. * interp/g-opt.boot (inlineLocals): Likewise. (optClosure): Likewise. (optBind): Likewise. * interp/define.boot (compContained): Remove.
2012-02-26 * interp/c-util.boot (numOfOccurencesOf): Tidy.dos-reis1-1/+1
* interp/compiler.boot (compUnnamedMapping): Fix thinko. * interp/g-opt.boot (semiSimpleRelativeTo?): Likewise.
2012-02-26 * interp/compiler.boot (compTopLevel): Do not bind $killOptimizeIfTrue.dos-reis1-3/+13
(compWithMappingMode): Likewise. (compUnnamedMapping): Likewise. (extractCode): Simplify. * interp/g-opt.boot (optClosure): New. Register. (semiSimpleRelativeTo?): An abstraction is always semisimple. * interp/nruncomp.boot ($killOptimizeIfTrue): Remove. (optDeltaEntry): Don't test for it.
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-1/+1
* 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.
2012-02-09 * interp/g-opt.boot (optCall): Simplify SPADCALL of atomicdos-reis1-5/+9
function expressions. ($VMsideEffectFreeOperators): Don't include %funcall. ($simpleVMoperators): Include it.
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.