aboutsummaryrefslogtreecommitdiff
path: root/src/interp/g-opt.boot
AgeCommit message (Collapse)AuthorFilesLines
2016-02-06optNot: handle conjunction and disjunction operandsGabriel Dos Reis1-0/+4
2016-01-31Remove support for --show-insn, and ")set )report insn"Gabriel Dos Reis1-11/+2
2015-12-31Improve 'random()' from Integer domain.Gabriel Dos Reis1-1/+1
2015-12-26Introduce opcode '%constant' in lieu of IDENTITY.Gabriel Dos Reis1-1/+1
2015-12-24Tidy uses of apply.Gabriel Dos Reis1-1/+1
2015-12-24Replace FUNCALL with apply.Gabriel Dos Reis1-2/+2
2013-05-26Define lexicographical ordering on Bits in Spaddos-reis1-1/+1
2013-05-15 * interp/g-opt.boot (quoteMode): New.dos-reis1-3/+9
(optRetract): Use it. (optPullback): Likewise.
2013-05-13 * interp/g-opt.boot (%array2list): New side-effect free opcode.dos-reis1-1/+2
* interp/lisp-backend.boot: Expand it. * algebra/array1.spad.pamphlet (PrimitiveArray): Implement maxIndex, parts, and members.
2013-05-11Introduce opcodes for arrays constructionsdos-reis1-2/+18
2013-05-09Simplify copydos-reis1-2/+2
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.