aboutsummaryrefslogtreecommitdiff
path: root/src/interp/compiler.boot
AgeCommit message (Collapse)AuthorFilesLines
2009-06-13 Support multiple scrutinee in is-case pattern matching.dos-reis1-84/+154
* interp/compiler.boot (compRetractGruard): Rename from compRetractAlternative. Split. (compRecoverGuard): Rename from compRecoverAlternative. Split. (compAlternativeGuardItem): New. Use them. (compAlternativeGuard): New. (compMatchAlternative): New. Split from compMatch. (compMatchScrutinee): Likewise. (defineMatchScrutinee): Likewise. (compMatch): Rework.
2009-06-10 * interp/parse.boot (parseHas): Preserve unnamed category forms.dos-reis1-0/+2
* interp/i-funsel.boot (hasCaty): Recursively look into Joins. * interp/interop.boot (newHasCategory): Likewise. * interp/compiler.boot (compHasFormat): Handle unnamed categories. * interp/info.boot (knownInfo): Likewise.
2009-06-09 * interp/compiler.boot (compLogicalNot): Tidy.dos-reis1-1/+2
* interp/define.boot (doIt): Tidy conditional case. * boot/tokens.boot: 'fourth' is a now a builtin function.
2009-06-08 Fix SF/2799773dos-reis1-1/+1
* interp/c-util.boot (diagnoseUnknownType): Diagnose duplicate fields in Record or Union, or duplicate constants in Enumeration. * interp/i-eval.boot (checkRecordOrUnionFields): New. (evaluateType): Use it. * testsuite/interpreter/sf-2799773.input: New.
2009-06-01 Simplify compiler ast for `return' expressions.dos-reis1-2/+1
* interp/parse.boot (parseReturn): Remove. * interp/compiler.boot (compReturn): Tidy.
2009-06-01 * interp/compiler.boot (compGreaterThan): Remove.dos-reis1-7/+0
* interp/parse.boot (parseGreaterEqual): Likewise.
2009-06-01 * interp/compiler.boot (compGreaterThan): New. Compiledos-reis1-0/+6
greater-than expressions. * interp/parse.boot (parseGreaterThan): Remove. * algebra/data.spad.pamphlet (Byte): Implement all comparison functions. * algebra/integer.spad.pamphlet (Integer): Likewise. * algebra/sf.spad.pamphlet (DoubleFloat): Likewise. * algebra/si.spad.pamphlet (SingleInteger): Likewise. * algebra/string.spad.pamphlet (Character): Likewise.
2009-05-29 * interp/compiler.boot (getSuccessEnvironment): Tidy.dos-reis1-15/+22
(getInverseEnvironment): Likewise. (compLogicalNot): Don't normalize to if-statement.
2009-05-28 * interp/compiler.boot (compVector): Tidy code generation.dos-reis1-3/+5
(checkExternalEntity): Handle Builtin external entities. (compSignatureImport): Likewise. * algebra/boolean.spad.pamphlet (Boolean): Import Lisp function from Foreign Builtin. (KleeneTrivalentLogic): The constant `true' and `false' are now inherited.
2009-05-28Fix formattingdos-reis1-7/+7
2009-05-09 * interp/compiler.boot (compApplication): Tidy.dos-reis1-2/+4
2009-04-28 * interp/compiler.boot (compComma): Supply element type for tupledos-reis1-1/+1
construction. * interp/i-coerfn.boot (L2Tuple): Likewise. * interp/i-object.boot (asTupleNew): Likewise. (asTupleNew0): Likewise. (asTupleNewCode): Likewise. (asTupleNewCode0): Likewise. * interp/i-spec1.boot (evalCOLLECT): Likewise. (interpCOLLECT): Likewise. * interp/i-spec2.boot (evalTuple): Likewise. (upNullTuple): Likewise.
2009-04-23 * interp/compiler.boot ($IOFormDomains): New.dos-reis1-3/+10
(compAtom): Allow implicit coercion to IO forms for values of fundamental types. (compSymbol): Likewise. (compQuote): Likewise. * algebra/aggcat.spad.pamphlet (coerce$BinaryRecursiveAggregate): Don't hard code empty bracket.
2009-04-23 * interp/sys-constants.boot ($SystemInlinableConstructorNames):dos-reis1-1/+1
Include Identifier. * interp/compiler.boot (compElt): Fix up 0 and 1 shenannigan. * algebra/boolean.spad.pamphlet (Reference): Use Identifier. * algebra/Makefile.pamphlet (axiom_algebra_bootstrap): Remove REF. (axiom_algebra_bootstrap_last_layer): Likewise. * algebra/strap/REF.lsp: Remove.
2009-04-20 * interp/sys-constants.boot ($Identifier): New.dos-reis1-1/+5
* interp/compiler.boot (compQuote): Use the target mode if appropriate. * interp/i-spec2.boot (upQUOTE): Likewise. * algebra/syntax.spad.pamphlet: Use Identifier in lieu of Symbol.
2009-04-20 * boot/ast.boot (genECLnativeTranslation): Tidy.dos-reis1-5/+33
(genSBCLnativeTranslation): Likewise. * interp/compiler.boot (emitLocalCallInsn): Likewise. (compForm1): Allow package call to external function. (compElt): Likewise. (getExternalSymbolMode): New. (compForeignPackageCall): Likewise.
2009-03-26 * boot/ast.boot (nativeType): Accept int16 and int32.dos-reis1-5/+11
(getFFIDatatype): Accept ReadWrite modifier. * algebra/data.spad.pamphlet (Int32): New. (UInt64): Likewise. * algebra/Makefile.pamphlet (axiom_algebra_layer_7): Include INT64 and UINT64.
2009-03-08 * interp/fnewmeta.lisp (PARSE-Import): Parse extern entitydos-reis1-11/+121
signature import. * interp/functor.boot (encodeLocalFunctionName): New. * interp/define.boot (compDefine1): Avoid getAbbreviation. (doIt): Handle %SignatureImport nodes. * interp/compiler.boot (emitLocalCallInsn): New. (applyMapping): Use it. (compApplication): Likewise. (bootDenotation): New. (getBasicFFIType): Likewise. (getFFIDatatype): Likewise. (getBootType): Likewise. (checkExternalEntityType): Likewise. (checkExternalEntity): Likewise. (removeModifiers): Likewise. (compSignatureImport): Likewise. * interp/vmlisp.lisp (|compileLispDefinition|): New. * interp/boot-pkg.lisp: Import genImportDeclaration. * boot/initial-env.lisp: Export genImportDeclaration. * boot/ast.boot: Tidy. Accept `readwrite' modifier.
2009-03-02 * interp/compiler.boot (modeIsAggregateOf): Use RepIfRepHack.dos-reis1-2/+1
* interp/g-opt.boot (optimizeFunctionDef): Tidy. * interp/i-syscmd.boot (compileSpad2Cmd): Support ')report' option. * interp/sys-driver.boot (initializeGlobalState): Likewise.
2009-03-01 * interp/compiler.boot (compTopLevel): Initialize list ofdos-reis1-2/+25
optimizable domain constructors. (processInlineRequest): New. * interp/define.boot (spadCompileOrSetq): Tidy. (mutateToNothing): New. (doIt): Use it. Add support for inline directives. * interp/fnewmeta.lisp (PARSE-Inline): New. * interp/metalex.lisp (KEYWORDS): Include 'inline'.
2009-02-28Revert accidental changedos-reis1-0/+8
2009-02-28(no commit message)dos-reis1-8/+0
2009-02-23 * interp/compiler.boot (compAtom): Don't interpret 'nil' as emptydos-reis1-9/+4
vector. (compSymbol): Don't interpret 'true' and 'false' as Boolean constants if domain Boolean is not in scope. * algebra/any.spad.pamphlet (Property): Tidy. * algebra/asp.spad.pamphlet (Asp34): Likewise. * algebra/functions.spad.pamphlet (BasicFunctions): Likewise. * algebra/lodop.spad.pamphlet (OppositeMonogenicLinearOperator): Likewise. * algebra/groebsol.spad.pamphlet: Import Boolean.
2009-02-22 * interp/compiler.boot (compRetractAlternative): Don't storedos-reis1-9/+9
pointers to the environment. (compRecoverAlternative): Likewise. (compMatch): Likewise. (compIterator): Likewise. (compIteratorV): Likewise. * interp/define.boot (checkRepresentation): Likewise. * interp/info.boot (actOnInfo): Likewise.
2009-02-18 * interp/parse.boot (parseHas): Constants are not attributes.dos-reis1-4/+2
* interp/compiler.boot (compHasFormat): Handle signature for constants too. * interp/info.boot (actOnInfo): Likewise. * algebra/data.spad.pamphlet (sample$Byte): Make a constant. (SystemInteger): Export constant 'sample'. (SystemNonNegativeInteger): Likewise. * algebra/aggcat2.spad.pamphlet (FiniteLinearAggregateFunctions2): Use 'sample' or 'random' elements when allocating new aggregates.
2009-01-12 * interp/category.boot: Miscellaneous cleanup.dos-reis1-13/+12
* interp/compiler.boot: Likewise. * interp/define.boot: Likewise. * interp/functor.boot: Likewise. * interp/info.boot: Likewise. * interp/nruncomp.boot: Likewise. * interp/wi1.boot: Likewise. * interp/wi2.boot: Likewise.
2009-01-11 * interp/compiler.boot (getSuccessEnvironment): Don't specializedos-reis1-17/+3
on `has'. (getInverseEnvironment): Likewise. * algebra/equation2.spad.pamphlet (factorAndSplit$Equation): Fix misuses of `has'. * interp/functor.boot (mkTypeForm): Rename from mkDomainConstructor.
2009-01-10 * interp/compiler.boot (compPredicate): Rename from compBoolean. dos-reis1-5/+16
Lose second argument. Document.
2009-01-06 * interp/sys-utility.boot (getVMType): IndexList are lists.dos-reis1-9/+86
* interp/g-util.boot (isSubDomain): Tidy. * interp/g-opt.boot (isVMConstantForm): New. (findVMFreeVars): Likewise. * interp/define.boot (insertViewMorphisms): Remove. (emitSubdomainInfo): New. (checkVariableName): Likewise. (checkParameterNames): Likewise. (checkRepresentation): Set $subdomain where appropriate. (compDefines): Check parameter names. (compDefineFunctor1): Propagate subdomain info. (doIt): Don't call insertViewMorphisms. * interp/compiler.boot (setqSingle): Check variable name. (compIterator): Likewise. (commonSuperType): New. (satisfies): Likewise. (coerceSubset): Use them to implemen cross-subdomain coercion. (coerceSuperset): New. (comCoerce1): Use it. (compPer): New. (compRep): Likewise. * interp/c-util.boot (getRepresentation): New. (proclaimCapsuleFunction): Improve for specialized subdomains. * algebra/stream.spad.pamphlet: Don't use `per' as variable name. * algebra/si.spad.pamphlet (size$SingleInteger): Tidy. (coerce$SingleInteger): Likewise. * algebra/reclos.spad.pamphlet (nonNull$RealClosure): Don't use `rep' as parameter name. * algebra/data.spad.pamphlet (Byte): Now a subdomain of NonNegativeInteger. Tidy.
2009-01-04 * interp/buildom.boot (createEnum): Fix quoting.dos-reis1-10/+9
* interp/compat.boot (system): Likewise. * interp/astr.boot (ncEltQ): Fix declaration. * interp/compiler.boot (compMapCond'): Likewise. (compMapCond): Likewise. (compMapCondFun): Remove declaration.
2009-01-032009-01-03 Gabriel Dos Reis <gdr@cs.tamu.edu>dos-reis1-18/+15
* Makefile.pamphlet (AXIOM_SRC_TARGETS): Add all-databases. src/ChangeLog 2009-01-03 Gabriel Dos Reis <gdr@cs.tamu.edu> * lisp/core.lisp.in (|%algebraSystemIsComplete|): New. (|%basicSystemIsComplete|): Use it. * interp/wi1.boot (setqSingle): Use maximalSuperType. (coerceSubset): Simplify. (compCoerce1): Tidy. * interp/i-resolv.boot (resolveTCat): Use superType. * interp/lisplib.boot (findConstructorSlotNumber): Use isSubset. (sigsMatch): Likewise. (findDomainSlotNumber): Likewise. * interp/define.boot (compSubDomain1): Reject for complex subdomain predicate. Support paramterized subdomains. * interp/daase.lisp (interpOpen): Read superdomain slot. (getdatabase): Remove adhoc hardcoded superdomain info. Return superdomain info stored in database. (localnrlib): Read superdomain info. (write-interpdb): Write superdomain info. (database): Add superdomain slot. * interp/g-util.boot (superType): New. (maximalSuperType): Rework. Support parameterized subdomains. (noteSubDomainInfo): New. (isSubDomain): Rework. * interp/c-util.boot (isSubset): Rework. * interp/g-opt.boot (optEQ): Remove. * interp/g-cndata.boot (getImmediateSuperDomain): Remove. (maximalSuperType): Move to g-util.boot. * interp/types.boot (%Constructor): New type specifier. (%Instantiation): Likewise. * interp/compiler.boot (primitiveType): Don't return $NegativeInteger. (maxSuperType): Remove. (hasType): Use maximalSuperType. (satisfies): New. (coerceSubset): Use it. Simplify. * interp/wi2.boot (smallIntegerStep): Use maximalSuperType. * interp/sys-constants.boot ($AtVariables): New. ($NegativeInteger): Remove. ($NonPositiveInteger): Likewise. ($CategoryNames): Category is not a category. * interp/property.lisp: Remove Subsets property settings. * interp/i-coerce.boot (coerceSubDomain): Simplify. (coerceImmediateSubDomain): Remove. (getSubDomainPredicate): Simplify. * interp/category.boot (SourceLevelSubset): Use isSubDomain. (MachineLevelSubset): Likewise. * interp/modemap.boot (mergeModemap): Likewise. (isSuperDomain): Remove. (augModemapsFromDomain): Support parameterized subdomains. * interp/i-util.boot (isSubDomain): Move to g-util.boot. * Makefile.pamphlet (all-databases): New target. * interp/Makefile.pamphlet ($(AXIOMSYS)): Push :open-axiom-algebra-system onto *FEATURES*. * etc/Makefile.in (all-databases): New target.
2008-12-19 * interp/define.boot (insertViewMorphisms): New.dos-reis1-1/+3
(checkRepresentation): Rename from maybeInsertViewMorphisms. Tidy. (compDefineFunctor1): Tidy. (doIt): Insert view morphisms if appropriate.
2008-12-16 r12470@gauss: gdr | 2008-12-14 17:43:50 -0600dos-reis1-10/+280
Forgot to commit ChangeLog. r12471@gauss: gdr | 2008-12-14 19:11:21 -0600 Fix typo in PrimitiveRatRicDE. r12472@gauss: gdr | 2008-12-15 01:40:45 -0600 Reformat preparse.lisp. r12473@gauss: gdr | 2008-12-15 03:25:17 -0600 Tidy. r12474@gauss: gdr | 2008-12-15 21:33:54 -0600 Remove unused codes. r12475@gauss: gdr | 2008-12-15 21:57:22 -0600 . r12476@gauss: gdr | 2008-12-15 23:07:49 -0600 Tidy fatal diagnostics. r12477@gauss: gdr | 2008-12-15 23:50:02 -0600 Fold iterator.boot into compiler.boot.
2008-12-14 r12459@gauss: gdr | 2008-12-12 18:18:31 -0600dos-reis1-58/+73
Tidy compApplyModemap. r12460@gauss: gdr | 2008-12-13 09:24:50 -0600 Tidy compMapCond. r12461@gauss: gdr | 2008-12-13 10:24:14 -0600 Activate compViableModemap. r12462@gauss: gdr | 2008-12-13 11:18:17 -0600 Remove pmatch and pmatchWithSl out of main compiler. r12463@gauss: gdr | 2008-12-13 12:26:44 -0600 Tidy compApplyModemap. r12464@gauss: gdr | 2008-12-13 16:39:28 -0600 Add compExclusiveOr. r12465@gauss: gdr | 2008-12-13 16:54:58 -0600 . r12466@gauss: gdr | 2008-12-14 15:01:33 -0600 Tidy compLogicalNot.
2008-12-12 r12451@gauss: gdr | 2008-12-12 08:39:20 -0600dos-reis1-38/+36
Tidy.
2008-12-11 r12438@gauss: gdr | 2008-12-10 01:20:20 -0600dos-reis1-4/+2
Remove quotify.
2008-12-11 r12436@gauss: gdr | 2008-12-09 21:32:50 -0600dos-reis1-0/+35
Modularize S-PROCESS.
2008-12-09 r12415@gauss: gdr | 2008-12-06 11:42:45 -0600dos-reis1-13/+28
Implement basic support for pattern matching. r12416@gauss: gdr | 2008-12-06 18:09:19 -0600 Parse case pattern match. r12417@gauss: gdr | 2008-12-06 21:28:30 -0600 Implement basic case pattern matching for retractable domain. r12418@gauss: gdr | 2008-12-07 00:58:58 -0600 Refine retractability implementation. r12419@gauss: gdr | 2008-12-07 01:39:32 -0600 Update cached Lisp translation r12420@gauss: gdr | 2008-12-07 03:52:09 -0600 r12421@gauss: gdr | 2008-12-07 10:30:44 -0600 Implement type recovery too. r12422@gauss: gdr | 2008-12-07 19:18:09 -0600 Simplify LET-forms and COND-forms. r12423@gauss: gdr | 2008-12-07 21:21:12 -0600 Fix typos r12424@gauss: gdr | 2008-12-08 01:14:54 -0600 Parse case-pattern in the interpreter. r12427@gauss: gdr | 2008-12-08 20:32:29 -0600 Handle RetractableTo T.
2008-12-082008-12-07 Gabriel Dos Reis <gdr@cs.tamu.edu>dos-reis1-1/+133
* interp/g-opt.boot ($simpleVMoperators): New. (isSimpleVMForm): Likewise. (isFloatableVMForm): Likewise. (optLET): Likewise. Expand backend let-forms. * interp/c-util.boot (foldSpadcall): Look into LET and COND forms. (replaceSimpleFunctions): Likewise. (mutateCONDFormWithUnaryFunction): New. (mutateLETFormWithUnaryFunction): Likewise. * interp/compiler.boot (tryCourtesyCoercion): Split from coerce. (compRetractAlternative): Simplify. Now try courtesy coercions before retraction. (compRecoverAlternative): New. (compMatch): Simplify. Implement type recovery too. 2008-12-06 Gabriel Dos Reis <gdr@cs.tamu.edu> * interp/compiler.boot (compRetractAlternative): New. (compMatch): Likewise. Use it to implement pattern macthing for retractable domains. * interp/parse.boot (parseAtAt): New. * interp/postpar.boot (postAtAt): Likewise. (postAlternatives): Likewise. (postMatch): Likewise. * interp/metalex.lisp (Keywords): Remove `otherwise' as keyword. * interp/fnewmeta.lisp (|PARSE-Match|): New local parser. * interp/newaux.lisp (@@): New token. Align wih interpreter. (otherwise): Remove binding specification. (case): Now also a Nud token.
2008-12-03 * interp/compiler.boot (compIs): Error if left operand is not ados-reis1-1/+4
domain expression.
2008-11-29 * interp/compiler.boot (setqSingle): Use setShellEntry.dos-reis1-1/+1
* interp/wi1.boot (setqSingle): Likewise. * interp/functor.boot (setVector4): Likewise. (DescendCode): Abort on SETELT opcode. (SetFunctionSlots): Likewise. * interp/nrunfast.boot (evalSlotDomain): Likewise. * interp/nrungo.boot (NRTevalDomain): Likewise. * interp/showimp.boot (getDomainRefName): Match "setShellEntry".
2008-11-17 * interp/lisplib.boot (compDefineExports): Now take operationdos-reis1-1/+0
exported list, instead of category object. Tidy. * interp/define.boot (compDefineFunctor1): Adjust call to compDefineExports.
2008-11-15 * interp/compiler.boot: Import "msgdb", not "c-util". Movedos-reis1-156/+2
compiler driver to i-syscmd.boot. * interp/define.boot: Import "nruncomp", "functor", "package". * interp/wi2.boot (NRTgetLocalIndex): Remove duplicate.
2008-11-15 * interp/spad.lisp (incTimeSum): Remove.dos-reis1-94/+76
* interp/modemap.boot ($forceAdd): Define. * interp/nruncomp.boot ($NRTderivedTargetIfTrue): Likewise. ($killOptimizeIfTrue): Likewise. * interp/i-toplev.boot (processInteractive): Tidy. * interp/c-util.boot ($compErrorMessageStack): Define. * interp/compiler.boot (compApply): Remove. ($compTimeSum): Likewise ($resolveTimeSum): Likewise. (compCompilerPredicate): Tidy. (comp3): There is no such thing as KAPPA.
2008-11-15 * interp/category.boot: Define global vars.dos-reis1-0/+4
* interp/compiler.boot: Likewise. * interp/define.boot: Likewise. * interp/sys-globals.boot: Likewise. * interp/wi1.boot ($frontier): Removed, as unused. * interp/wi2.boot ($attributesName): Likewise. ($goGetList): Likewise. ($NRTaddList): Likewise. ($NRTloadTimeAlist): Likewise. ($lisplibMissingFunctions): Likewise. ($alternateViewList): Likewise.
2008-11-03 * interp/Makefile.pamphlet (template.$(FASLEXT)): Remove.dos-reis1-0/+1
* interp/template.boot: Move non-dead code where appropriate. Remove file. * boot/ast.boot (bfQ): Improve.
2008-10-16 * interp/compiler.boot (backendCompile1): Move to c-util.boot.dos-reis1-44/+0
(COMP): Likewise. Rename to backendCompile. (compileFileQuietly): Move to c-util.boot. (compAndDefine): Likewise. (compQuietly): Likewise. (compileQuitely): Likewise.
2008-10-12 * interp/c-util.boot (backendCompileNEWNAM): New.dos-reis1-3/+3
(pushLocalVariable): Likewise. (mutateToBackendCode): Likewise. (transformToBackendCode): Likewise * interp/comp.lisp (FLUIDVARS): Remove. (LOCVARS): Likewise. (SPECIALVARS): Likewise. ($CLOSEDFNS): Likewise. (COMP-NAM): Likewise. (COMP-TRAN): Likewise. (COMP-TRAN-1): Likewise. * interp/compiler.boot (compWithMappingMode): Use transformToBackendCode. (COMP-1): Use backendCompileNEWNAM. * interp/i-analy.boot (bottomUpCompile): Use mutateToBackendCode.
2008-10-11 * interp/c-util.boot (backendCompile2): Bootified from COMP-2.dos-reis1-1/+1
* interp/compiler.boot (COMP): Use it. * interp/comp.lisp (COMP-2): Remove.
2008-10-07 * interp/define.boot (compCategoryItem): Don't check signatures yet.dos-reis1-0/+1
* interp/c-util.boot (isKnownCategory): New. (diagnoseUknownType): Use it. Expand. * interp/compiler.boot (compCat): Use it.