Package kawa.standard
Class SchemeCompilation
- java.lang.Object
-
- gnu.expr.Compilation
-
- kawa.lang.Translator
-
- kawa.standard.SchemeCompilation
-
- All Implemented Interfaces:
SourceLocator,SourceLocator,Locator
public class SchemeCompilation extends Translator
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class kawa.lang.Translator
Translator.FormStack, Translator.ScanContext, Translator.ValuesFromLList
-
Nested classes/interfaces inherited from interface gnu.text.SourceLocator
SourceLocator.Simple
-
-
Field Summary
Fields Modifier and Type Field Description static DeclarationapplyFieldDeclstatic Lambdalambdastatic Lambdamlambdastatic kawa.replrepl-
Fields inherited from class kawa.lang.Translator
curMethodLambda, currentMacroDefinition, formStack, getNamedPartDecl, matchArray, patternScope, pendingForm, templateScopeDecl, xmlElementNamespaces
-
Fields inherited from class gnu.expr.Compilation
apply0args, apply0method, apply1args, apply1method, apply2args, apply2method, apply3method, apply4method, applyCpsMethod, applymethods, applyNargs, applyNmethod, argsCallContextField, BODY_PARSED, CALL_WITH_CONSUMER, CALL_WITH_CONTINUATIONS, CALL_WITH_RETURN, CALL_WITH_TAILCALLS, CALL_WITH_UNSPECIFIED, CLASS_WRITTEN, classPrefix, classPrefixDefault, COMPILE_SETUP, COMPILED, curClass, curLambda, current_scope, currentOptions, debugPrintANF, debugPrintExpr, debugPrintFinalExpr, defaultCallConvention, defaultClassFileVersion, emitSourceDebugExtAttr, enableANF, ERROR_SEEN, explicit, exprStack, falseConstant, fullTailCallsVariable, getCallContextInstanceMethod, getCurrentEnvironmentMethod, getNextArgMethod, immediate, inlineOk, int1Args, javaStringType, language, lexer, lexical, mainClass, mainLambda, mainMethodVariable, maxErrors, messages, method, MODULE_NONSTATIC, MODULE_STATIC, MODULE_STATIC_DEFAULT, MODULE_STATIC_RUN, moduleClass, moduleStatic, mustCompile, noArgsField, objArrayType, options, pcCallContextField, pendingImports, PRE_WALKED, procCallContextField, PROLOG_PARSED, PROLOG_PARSING, RESOLVED, scmBooleanType, scmKeywordType, scmListType, scmSequenceType, string1Arg, subModuleMap, sym1Arg, thisDecl, trueConstant, typeApplet, typeCallContext, typeCharSequence, typeClass, typeClassType, typeCompiledProc, typeConsumer, typeEnvironment, typeFieldLocation, typeLanguage, typeList, typeLocation, typeLocationProc, typeMethodProc, typeModuleBody, typeObject, typeObjectType, typePair, typeProcedure, typeProcedure0, typeProcedure1, typeProcedure2, typeProcedure3, typeProcedure4, typeProcedureArray, typeProcedureN, typeRunnable, typeRunnableModule, typeServlet, typeStaticFieldLocation, typeString, typeSymbol, typeType, typeValues, voidConsumerInstanceField, WALKED, warnAsError, warnInvokeUnknownMethod, warnUndefinedVariable, warnUninitialized, warnUnknownMember, warnUnreachable, warnUnused, warnVoidUsed, writeImplicitClasses
-
-
Constructor Summary
Constructors Constructor Description SchemeCompilation(Language language, SourceMessages messages, NameLookup lexical)SchemeCompilation(Language language, SourceMessages messages, NameLookup lexical, Environment env)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanappendBodyValues()Should the values of body/block be appended as multiple values? Otherwise, just return the result of the final expression.ExpressionapplyFunction(Expression func)A language-dependent "apply" function for generic application.ExpressioncheckDefaultBinding(Symbol symbol, Translator tr)If a symbol is lexically unbound, look for a default binding.booleanisApplyFunction(Expression exp)booleanisSimpleApplyFunction(Expression exp)A simple apply function maps actual arguments to formals directly.-
Methods inherited from class kawa.lang.Translator
curScanNesting, define, define, define, errorIfNonEmpty, errorWithPosition, exp2Type, exp2Type, finishModule, getCompletions, getCurrentSyntax, getGlobalEnvironment, getScanContext, getScanContextStack, keywordsAreSelfEvaluating, listLength, lookup, lookupGlobal, lookupGlobal, lookupStandardEntity, makeBody, makeBody, makePair, makeRenamedAlias, makeRenamedAlias, matches, matches, matches, matchQuoted, namespaceResolve, namespaceResolve, namespaceResolve, namespaceResolvePrefix, noteAccess, parse, popForms, popPositionOf, popRenamedAlias, popScanContext, processAccesses, pushForm, pushPositionOf, pushRenamedAlias, pushScanContext, renamedAliasCount, resolveModule, rewrite, rewrite, rewrite, rewrite_body, rewrite_car, rewrite_car, rewrite_car, rewrite_car_for_lookup, rewrite_lookup, rewrite_pair, rewrite_with_position, rewriteBody, rewriteInBody, safeCar, safeCdr, scanBody, scanForm, selfEvaluatingSymbol, setLine, setLine, setLineOf, stripSyntax, wrapSyntax
-
Methods inherited from class gnu.expr.Compilation
addClass, addMainClass, allocLocalField, asBooleanValue, cleanupAfterCompilation, compileConstant, compileConstant, compileToArchive, currentCallConvention, currentLambda, currentModule, currentScope, emitCoerceToBoolean, emitPushBoolean, error, error, error, error, findForImmediateLiterals, findNamedClass, freeLocalField, generateCheckMethod, generateCheckMethods, generateClassName, generateConstructor, generateConstructor, generateMainMethod, generatingApplet, generatingServlet, getBooleanOption, getBooleanOption, getCode, getColumnNumber, getConstructor, getConstructor, getCurrent, getEndColumn, getEndLine, getFileName, getForNameHelper, getLanguage, getLineNumber, getMessages, getMinfo, getModule, getModuleType, getPublicId, getSourceAbsPath, getStartColumn, getStartLine, getState, getSystemId, inlineOk, inlineOk, isInteractive, isPedantic, isStableSourceLocation, isStatic, letDone, letEnter, letStart, letVariable, letVariable, loadCallContext, loadClassRef, loopBody, loopCond, loopDone, loopEnter, loopRepeat, loopRepeatDone, loopStart, loopVariable, makeCoercion, makeCoercion, makeQuoteExp, makeRunnable, mangleURI, maxErrors, mustCompileHere, outputClass, pop, pop, process, push, push, pushNewModule, pushPendingImport, pushScope, registerForImmediateLiterals, resolve, restoreCurrent, setColumn, setCurrent, setCurrentScope, setEvalName, setFile, setInteractiveName, setLine, setLine, setLine, setLine, setLocation, setMessages, setModule, setModuleName, setPedantic, setPopCurrentScope, setPushCurrentScope, setSaveCurrent, setSharedModuleDefs, setState, setupLiterals, sharedModuleDefs, syntaxError, toString, usedClass, usingCallContext, usingCPStyle, usingTailCalls, warnAsError, warnInvokeUnknownMethod, warnUndefinedVariable, warnUninitialized, warnUnknownMember, warnUnreachable, warnUnused, warnVoidUsed
-
-
-
-
Field Detail
-
applyFieldDecl
public static final Declaration applyFieldDecl
-
lambda
public static final Lambda lambda
-
mlambda
public static final Lambda mlambda
-
repl
public static final kawa.repl repl
-
-
Constructor Detail
-
SchemeCompilation
public SchemeCompilation(Language language, SourceMessages messages, NameLookup lexical, Environment env)
-
SchemeCompilation
public SchemeCompilation(Language language, SourceMessages messages, NameLookup lexical)
-
-
Method Detail
-
applyFunction
public Expression applyFunction(Expression func)
Description copied from class:CompilationA language-dependent "apply" function for generic application.- Overrides:
applyFunctionin classCompilation
-
isApplyFunction
public boolean isApplyFunction(Expression exp)
- Overrides:
isApplyFunctionin classCompilation
-
isSimpleApplyFunction
public boolean isSimpleApplyFunction(Expression exp)
Description copied from class:CompilationA simple apply function maps actual arguments to formals directly. E.g. no distribution of multiple values.- Overrides:
isSimpleApplyFunctionin classCompilation
-
appendBodyValues
public boolean appendBodyValues()
Should the values of body/block be appended as multiple values? Otherwise, just return the result of the final expression.- Overrides:
appendBodyValuesin classTranslator
-
checkDefaultBinding
public Expression checkDefaultBinding(Symbol symbol, Translator tr)
If a symbol is lexically unbound, look for a default binding. Recognizestypename?as a type predicate,->typenameas a conversion function, plus whatever the overridden method handles.- Overrides:
checkDefaultBindingin classTranslator- Returns:
- null if no binding, otherwise an Expression.
-
-