edu.isi.stella
Class Symbol

java.lang.Object
  extended by edu.isi.stella.Stella_Object
      extended by edu.isi.stella.StandardObject
          extended by edu.isi.stella.ContextSensitiveObject
              extended by edu.isi.stella.GeneralizedSymbol
                  extended by edu.isi.stella.Symbol
Direct Known Subclasses:
TransientSymbol

public class Symbol
extends GeneralizedSymbol


Field Summary
 int symbolSlotOffset
           
 Cons symbolValueAndPlist
           
 
Fields inherited from class edu.isi.stella.GeneralizedSymbol
symbolId, symbolName
 
Fields inherited from class edu.isi.stella.ContextSensitiveObject
homeContext
 
Constructor Summary
Symbol()
           
 
Method Summary
static Stella_Object accessSymbolSlotValue(Symbol self, Symbol slotname, Stella_Object value, boolean setvalueP)
           
static int clStructSlotOffset(Symbol slotname, Surrogate classtype)
           
 Stella_Object clTranslateAtomicTree()
           
static Stella_Object clTranslateGlobalSymbol(Symbol symbol)
           
static Stella_Object clTranslateLocalSymbol(Symbol symbol)
           
static Cons clTranslateNormalCallMethodTree(Symbol operator, Surrogate owner, Cons arguments)
           
static Stella_Object coerceARestToCons(Symbol restvariable)
          Coerce the argument list variable restvariable into a CONS list containing all its elements (uses argument list iteration to do so).
static Cons combineStartupFunctionUnits(Symbol startupfnname)
           
static boolean constantSymbolP(Symbol symbol)
           
static Symbol cppCreateOverloadedFunctionName(Symbol functionname, Surrogate classtype)
           
static Symbol cppFixupNameSymbol(Symbol namesymbol, Module homemodule)
           
static Cons cppLookupOperatorTable(Symbol operator)
           
static StringWrapper cppLookupReservedWordTable(Symbol word)
           
 void cppOutputLiteral()
           
static Cons cppTranslateArefMethodCall(Symbol operator, Surrogate owner, Cons arguments)
           
static Cons cppTranslateArgumentListTree(Symbol operator, Surrogate owner, Stella_Object argument)
           
 Cons cppTranslateAtomicTree()
           
static StringWrapper cppTranslateClassParameterName(Symbol namesymbol)
           
static StringWrapper cppTranslateFunctionNameFromName(Symbol functionname)
           
static Stella_Object cppTranslateFunctionParameter(Symbol name, StandardObject type, MethodSlot method)
           
static StringWrapper cppTranslateGlobalName(Symbol namesymbol)
           
static Cons cppTranslateHardcodedSymbolReference(Symbol operator, int offset)
           
static StringWrapper cppTranslateMethodNameFromName(Symbol methodname, StandardObject methodowner)
           
static StringWrapper cppTranslateName(Symbol namesymbol)
           
static Cons cppTranslateNormalMethodCall(Symbol methodname, Surrogate owner, Cons arguments, boolean referencedP)
           
static Cons cppTranslateNthMethodCall(Symbol operator, Surrogate owner, Cons arguments)
           
static StringWrapper cppTranslateReturnParameterName(Symbol namesymbol, int parameternumber)
           
static StringWrapper cppTranslateSymbolId(Symbol symbol)
           
static StringWrapper cppTranslateSymbolName(Symbol symbol)
           
static StringWrapper cppYieldRenamedReservedWord(Symbol word)
           
static Cons cppYieldVaEndTree(Symbol iteratorvar)
           
static Cons cppYieldVaIteratorDeclarations(Symbol iteratorvar)
           
static Symbol cppYieldVaIteratorHelperVariable(Symbol iteratorvar)
           
static Cons cppYieldVaStartTree(Symbol iteratorvar)
           
static void createLispMacroUnits(Symbol name, MethodSlot method)
           
static boolean declarationOperatorP(Symbol operator)
           
static MethodSlot defineInlineMethod(Symbol name, Cons parametersandbody)
           
static MethodSlot defineStellaMethodSlot(Symbol inputname, Cons returntypes, boolean functionP, Cons inputparameters, KeywordKeyValueList options)
          Define a new Stella method object (a slot), and attach it to the class identified by the first parameter in 'inputParameters'.
static Slot defineStellaSlot(Symbol name, Surrogate owner, Surrogate basetype, Cons typespecifier, KeywordKeyValueList options)
           
static SystemDefinition defsystem(Symbol name, Cons options)
          Define a system of files that collectively define a Stella application.
static boolean duplicateCursorVariableP(Symbol variable, Cons iteratorbindings)
           
static Cons expandXmlTagCase(Symbol item, Cons clauses)
           
static Stella_Object extractOptionAndResidue(Symbol option, Cons tail, java.lang.Object[] MV_returnarray)
           
static MethodSlot findPrototypeMethod(Symbol methodname, Surrogate abstracttype)
           
static MethodSlot getFunctionWithIdenticalSignature(Symbol name, java.lang.String stringifiedsource)
           
static Stella_Object getLocalVariableInfo(Symbol variable, Keyword key)
           
static MethodSlot getMethodWithIdenticalSignature(Symbol name, Cons parameterstree, java.lang.String stringifiedsource)
           
 Stella_Class getStellaClass(boolean errorP)
          Return a class with name className.
 Context getStellaContextSlowly()
           
static Symbol getSym(int offset)
           
static Symbol getSymFromOffset(int offset)
           
static Symbol idlCreateOverloadedFunctionName(Symbol functionname, Surrogate classtype)
           
static StringWrapper idlLookupReservedWordTable(Symbol word)
           
 void idlOutputLiteral()
           
 Cons idlTranslateAtomicTree()
           
static StringWrapper idlTranslateClassParameterName(Symbol namesymbol)
           
static Stella_Object idlTranslateMethodParameter(Symbol name, StandardObject type, Symbol direction)
           
static StringWrapper idlTranslateName(Symbol namesymbol)
           
static StringWrapper idlTranslateSymbolId(Symbol symbol)
           
static StringWrapper idlTranslateSymbolName(Symbol symbol)
           
static StringWrapper idlYieldRenamedReservedWord(Symbol word)
           
static Symbol importSymbol(Symbol symbol, Module module)
          Import symbol into module and return the imported symbol.
static boolean inlineVariableReferenceP(Symbol self)
           
static Symbol internDerivedSymbol(GeneralizedSymbol basesymbol, java.lang.String newname)
          Return a newly-created or existing symbol with name newname which is interned in the same module as basesymbol.
static Symbol internPermanentSymbol(java.lang.String name)
          Return a newly-created or existing permanent symbol with name name.
static Symbol internSymbol(java.lang.String name)
          Return a newly-created or existing symbol with name name.
static Symbol internSymbolInModule(java.lang.String name, Module module, boolean localP)
          Look for a symbol named name in module (if localP do not consider inherited modules).
static Symbol javaCreateOverloadedFunctionName(Symbol functionname, Surrogate classtype)
           
static Cons javaLookupOperatorTable(Symbol operator)
           
 void javaOutputLiteral()
           
static Cons javaTranslateArefMethodCall(Symbol operator, Surrogate owner, Cons arguments)
           
 Cons javaTranslateAtomicTree()
           
static Cons javaTranslateGeneralSymbol(Symbol tree)
           
static StringWrapper javaTranslateGlobalName(Symbol namesymbol, boolean definitionP)
           
static Stella_Object javaTranslateMethodParameter(Symbol name, StandardObject type, MethodSlot method)
           
static StringWrapper javaTranslateName(Symbol namesymbol)
           
static Cons javaTranslateNormalMethodCall(Symbol methodname, Surrogate classtype, Cons allargs)
           
static Cons javaTranslateNthMethodCall(Symbol operator, Surrogate owner, Cons arguments)
           
static StringWrapper javaTranslateSymbolId(Symbol symbol)
           
static StringWrapper javaTranslateSymbolName(Symbol symbol)
           
static StringWrapper javaTranslateVariableLengthArgName(Symbol namesymbol, int parameternumber)
           
static StringWrapper javaYieldRenamedReservedWord(Symbol word)
           
 Stella_Class lookupClass()
          Return a class with name name.
static MethodSlot lookupCommand(Symbol name)
          If name names an evaluable command return its associated command object; otherwise, return null.
static Surrogate lookupConstantSymbol(Symbol self)
           
static MethodSlot lookupFunction(Symbol functionsymbol)
          Return the function defined for 'functionSymbol', if it exists.
static Module lookupFunctionHomeModule(Symbol functionsymbol)
           
static MethodSlot lookupFunctionOrStellaFunction(Symbol functionsymbol)
           
static StandardObject lookupGlobalVariableType(Symbol name)
           
static MethodSlot lookupMacro(Symbol name)
          If name has a macro definition, return the method object holding its expander function.
static Symbol lookupOldValueVariable(Symbol variable)
           
static Symbol lookupSymbol(java.lang.String name)
          Return the first symbol with name visible from the current module.
static Symbol lookupSymbolInModule(java.lang.String name, Module module, boolean localP)
          Return the first symbol with name visible from module.
static StandardObject lookupVariableType(Symbol variablename)
           
static Surrogate makeMemoizationTableSurrogate(Symbol memoname)
           
static Cons matchPatternElement(Symbol patternElement, Stella_Object datumElement)
           
static void maybeRenameLocalVariable(Symbol variable)
           
static Symbol methodCallTypeForVectorStructs(Symbol slotname, Surrogate owner, boolean functionP)
           
static boolean nativeNameP(Symbol name, Keyword language, Keyword category)
           
static Symbol newSymbol(java.lang.String symbolName)
           
static Module overloadedFunctionNameModule(Symbol functionName, Surrogate classType)
           
 Stella_Object permanentify()
           
static Stella_Object popq(Symbol variable)
          Pops a value from the cons list 'variable'.
 Surrogate primaryType()
          Returns the primary type of self.
 void printObject(java.io.PrintStream stream)
           
static void printSymbol(Symbol self, java.io.PrintStream stream)
           
static Stella_Object pushq(Symbol variable, Stella_Object value)
          Push 'value' onto the cons list 'variable'.
static Stella_Object pushqNew(Symbol variable, Stella_Object value)
          Push value onto the cons list variable, unless value is already a member of the list.
static void pushSpecial(Symbol variable, Symbol oldvaluevariable)
           
static void pushVariableBinding(Symbol variable, StandardObject type)
           
static boolean registeredSlotNameP(Symbol slotName)
          Return true if slotName is the name of some registered; slot in the system.
static void registerNativeName(Symbol name, Keyword language, Keyword category)
           
static void registerReferenceToGlobalVariable(Symbol variablename)
           
static Symbol safeImportSymbol(Symbol symbol, Module module)
          Safe version of importSymbol (which see).
static void setLocalVariableInfo(Symbol variable, Keyword key, Stella_Object info)
           
static Stella_Object setqP(Symbol variable, Cons expression)
          Assign 'variable' the result of evaluating 'expression', and return TRUE if 'expression' is not NULL else return FALSE.
static Stella_Object signal(Symbol type, Cons body)
          Signal error message, placing non-string arguments in quotes.
static boolean slotReaderFromNameP(Symbol methodname, StandardObject methodowner)
           
 Symbol softPermanentify()
           
 Surrogate surrogatify()
          Converts 'self' into a surrogate (same semantics as symbolToSurrogate which see).
static boolean symbolCommonLispP(Symbol self)
           
static Cons symbolPlist(Symbol symbol)
          Return the property list of symbol.
static Cons symbolPlistSetter(Symbol symbol, Cons plist)
           
static Stella_Object symbolProperty(Symbol symbol, StandardObject key)
          Return the property of symbol whose key is eqP to key.
static Stella_Object symbolPropertySetter(Symbol symbol, Stella_Object value, StandardObject key)
           
static Surrogate symbolToSurrogate(Symbol self)
          Return a surrogate with the same name as 'self'.
static Surrogate symbolToType(Symbol self)
          Convert self into a surrogate with the same name and module.
static Stella_Object symbolValue(Symbol symbol)
          Return the value of symbol.
static Stella_Object symbolValueSetter(Symbol symbol, Stella_Object value)
           
static Symbol trueSlotName(Symbol slotname, Surrogate type)
           
static Symbol trueVariableName(Symbol variable)
           
static void undefineExternalSlots(Symbol name)
           
static void undefineFunction(Symbol name)
           
static void uninternSymbol(Symbol self)
          Remove self from its home module and the symbol table.
static boolean variableEqlP(Symbol var1, Symbol var2)
           
static boolean visibleSymbolP(Symbol self)
          Return true if self is visible from the current module.
static Cons walkADeclaration(Symbol variable, Stella_Object typetree, Stella_Object value, boolean inputparameterP)
           
 Stella_Object walkAtomicTree(java.lang.Object[] MV_returnarray)
           
static Symbol walkConstantSymbol(Symbol self, java.lang.Object[] MV_returnarray)
           
static Cons walkInlineVariableReference(Symbol self, java.lang.Object[] MV_returnarray)
           
static Stella_Object yieldArgumentAccessTree(Symbol argumentsvariable, int index, boolean restargumentP)
           
static Cons yieldArithmeticOperatorCallTree(Symbol operator, Cons operands)
           
static Cons yieldCastedTypecaseClauseTrees(Symbol testvariable, StandardObject clausetype, Cons clausetrees)
           
static Stella_Object yieldClosSlotAccessorName(Symbol slotname)
           
static Cons yieldCollectCode(Symbol collectvariable, Stella_Object intovariable, Stella_Object collecttree)
           
static Cons yieldCollectIntoConsCode(Symbol collectvariable, Stella_Object intovariable, Stella_Object collecttree)
           
static Cons yieldCollectIntoListCode(Symbol collectvariable, Stella_Object intovariable, Stella_Object collecttree)
           
static Symbol yieldEvaluatorWrapperName(Symbol methodname)
           
static Cons yieldLispMacroTrees(Symbol name, MethodSlot method, java.lang.Object[] MV_returnarray)
           
static Symbol yieldLocalVariableAlias(Symbol variable, int level)
           
static Cons yieldNestedArithmeticOperatorCallTree(Symbol operator, Cons operands)
           
static Symbol yieldRenamedNameIfNative(Symbol name, Keyword language, Keyword category)
           
static Symbol yieldSetterMethodName(Symbol methodname)
           
static Cons yieldSlotValueReaderTree(Symbol slotname, Stella_Object objectref, Surrogate objecttype)
           
static Cons yieldSlotValueWriterTree(Symbol slotname, Stella_Object objectref, Surrogate objecttype, Stella_Object valueref)
           
static java.lang.String yieldStartupFunctionClassname(Symbol functionName)
           
 StandardObject yieldTypeSpecifier()
           
 
Methods inherited from class edu.isi.stella.GeneralizedSymbol
accessGeneralizedSymbolSlotValue, constructSymbolConstantName, cppChangeCase, cppQualifyNameP, cppTranslateClassName, cppTranslateClassTypename, cppTranslateSymbolConstantId, cppTranslateSymbolConstantName, cppYieldNamespacePrefix, createStartupSymbol, deletedP, explicitlyQualifiedNameP, generalizedSymbolLessThanP, getGeneralizedSymbolFromOffset, helpCppChangeCase, helpInternGeneralizedSymbol, idlChangeCase, idlTranslateClassName, idlTranslateSymbolConstantId, idlTranslateSymbolConstantName, internDerivedSurrogate, internRigidSymbolCaseSensitively, internRigidSymbolLocally, internRigidSymbolWrtModule, javaChangeCase, javaTranslateClassName, javaTranslateSymbolConstantId, javaTranslateSymbolConstantName, keywordify, localPrintName, lookupGlobalVariable, lookupRigidSymbol, lookupRigidSymbolLocally, registerSymbol, relativeName, shadowedSymbolP, visibleName, yieldSymbolConstantName
 
Methods inherited from class edu.isi.stella.ContextSensitiveObject
homeModule
 
Methods inherited from class edu.isi.stella.StandardObject
arrayTypeSpecifierP, baseTypeToTypeSpec, cantOverwriteActiveCollectionSlot, compatibleParameterTypesP, computeAnchoredTypeSpec, computeRelativeTypeSpec, conformingTypeSpecP, copyWrappedLiteral, cppNonPointerTypeP, cppReferenceTypeP, cppReferencizeType, cppTranslateAndPointerizeTypeSpec, cppTranslateAndReferencizeTypeSpec, cppTranslateTypeSpec, cppTypeWithoutInteriorPointersP, dropSlotValue, extractParameterType, extractRequiredArgumentValues, getSlot, hashCode_, idlTranslateTypeSpec, inverseSlotDemon, javaLiteralP, javaNativeLiteralWrapperNames, javaSpecialSetterName, javaTranslateArrayOfTypeSpec, javaTranslateTypeSpec, javaTranslateTypeSpecForFunction, javaTranslateTypeSpecHelper, javaYieldClassObjectArrayExpression, javaYieldClassObjectExpression, javaYieldFullyQualifiedTypeName, javaYieldTranslatedClassAndMethodNames, listifyTypeSpec, lookupClTypeFromStellaType, objectEqlP, putSlotValue, readSlotValue, runConstructorDemons, runDestructorDemons, runSlotDemons, runSlotGuardDemonsP, standardObjectP, subTypeSpecOfP, twoArgumentLeastCommonSupertype, typeSpecToBaseType, typeSpecToClass, typeToWalkedNullValueTree, validateTypeSpecifier, voidP, walkTypeSpecIsNativeTypeP, writeSlotValue, yieldTypeSpecTree
 
Methods inherited from class edu.isi.stella.Stella_Object
_, accessInContext, addPropertyValue, amPm, anchoredTypeSpecifierP, andOrNotTreeP, applyCoercionMethod, atomicExpressionP, bindToSurrogateP, booleanP, bootstrapIsaP, bquotify, cast, characterP, chooseSortPredicate, clConditionalizeTypeDeclarationTree, clTranslateATree, clTranslateBooleanTest, clTranslatePlainBooleanTest, clTranslateVerbatimBodySymbols, clYieldTypedExpressionTree, coerceATree, coerceEvaluatedTree, coerceMvTree, coerceOptionValue, coerceToBoolean, coerceToFloat, coerceToHashSet, coerceToModule, coerceToModuleName, coerceToString, coerceToSymbol, coerceToXmlElement, coerceValueToBoolean, coerceValueToFloat, coerceValueToString, coerceValueToType, coercibleP, collectFeatureList, collectKeyValueList, commonLispSymbolP, computeExpressionType, consify, consifyListsAndIterators, consP, consTreeMatchP, convertToLiteral, copyConsTree, cppArgumentIsStreamP, cppBinaryOperatorP, cppBlockP, cppMaybeOutputStatementWithParentheses, cppOperatorP, cppOutputAtomicExpression, cppOutputOneActualParameter, cppOutputStatement, cppOutputTypedEntity, cppPrognifyStatement, cppPrognP, cppStatementToList, cppStreamIsStandardOutputP, cpptrans, cppTranslateATree, cppTranslatedArrayTypeP, csValueP, dateDivider, dateTimeDivider, day, dealWithAmPm, dealWithEra, dealWithNoonMidn, decrementReferenceCount, defaultOptionHandler, defineSystem, defmodule, describe, describeObject, describeTersely, destructureMethodNameTree, deUglifyParseTree, either, eqlP, eqlToBooleanP, eqlToCharacterP, eqlToFloatP, eqlToIntegerP, eqlToLongIntegerP, eqlToStringP, equalConsTreesP, equalHashCode, equalP, era, estimatedEvaluationCost, evaluate, evaluateArgumentTree, evaluateAtomicTree, evaluateCommand, expandBquoteTree, filterModuleP, floatP, free, get, getObject, getProperty, hashlist, hashMemoizedArguments, helpBquotify, helpClTranslateATree, helpCoerceATree, helpLptrans, helpPrintOutline, helpTransformBooleanProceduralExpression, helpWalkATree, hour, idlOutputAtomicExpression, idlOutputStatement, idlTranslateATree, illegalTreeP, implodePathname, incrementallyTranslate, incrementReferenceCount, inlineUnwrapBoolean, inlineWrapBoolean, inModule, integerP, isaP, javaBinaryOperatorP, javaBlockP, javaEndOfLineTokenP, javaHelpOutputPrintStream, javaMaybeOutputStatementWithParentheses, javaOperatorP, javaOutputStatement, javaPrognP, javaStreamIsStandardOutputP, javaSymbolCaseP, javaTranslateATree, javaTranslateWithNativeWrapper, jptrans, keywordP, legalTokenizerFromStateP, legalTokenizerStateP, legalTokenizerToStateP, literalEqlP, logLevelLE, longIntegerP, lptrans, makeEvaluatableBquoteTree, makeFileNameFromRelativePath, makeMemoizedValueEntry, makeMemoizedValueEntryn, matchConsTree, methodSlotP, minute, month, nameToString, nilP, noonMidn, numberWrapperToFloat, objectEqualP, objectHashCode, one, oneI, onlyIf, parametricTypeSpecifierP, parseArrayDimensionsSpec, parseOptions, parseTokenizerCharacterSpec, parseTokenizerStateModifiers, permanentCopy, permanentifyForm, po, prettyPrintLiteral, primaryClass, printOutline, printStellaCode, printStellaDefinition, printUndefinedSuperClasses, proceduralExpressionP, ptrans, publicSlots, registerRecycledItem, runOptionHandlerP, safeEqualHashCode, safeHashCode, safePrimaryType, safeYieldTypeSpecifier, searchConsTreeP, searchConsTreeWithFilterP, searchForObject, secondp, setProperty, sideEffectFreeExpressionP, simplifyBquoteTree, specialp, stella_Increment, stellaClassP, stellaCollectionP, stellaNeedToCompileP, stellaNeedToTranslateP, stellaObjectP, stellify, storageSlotP, stringifyInModule, stringP, substituteConsTree, substituteOnce, surrogateP, sweep, symbolCaseP, symbolP, sysTree, targetLanguageType, taxonomyIsaP, timeDivider, timeMultiply, tokenizerIncludeSpecP, tokenizerToStateAlias, tokenizerToStateName, toString, traceIf, traceKeywordP, transientifyForm, transientObjectP, transientSymbolP, translateWalkedTree, treeSize, treeToTrees, trueOptionP, tryToEvaluate, typeP, typify, unmake, unregisterRecycledItem, updateInContext, valuesTreeP, variableExpressionP, verbatimStringP, verbatimTreeP, vetOptions, vrletExpressionP, walkATree, walkCollectionTree, walkDontCallMeTree, walkedExpressionExpression, walkedExpressionType, walkExpressionTree, walkMvExpressionTree, walkMvTree, walkStatement, walkTopLevelExpression, walkWithoutTypeTree, warnAboutUnknownSourceType, weekday, withinContext, withinModule, withinWorld, withStellaTokenizer, withSystemDefinition, withTokenizer, wrapperP, wrapWhereTest, xmlAttributeP, xmlBaseAttributeP, xmlCdataFormP, xmlCdataP, xmlDeclarationFormP, xmlDeclarationP, xmlDoctypeFormP, xmlElementFormP, xmlElementP, xmlGlobalAttributeP, xmlLocalAttributeP, xmlnsAttributeP, xmlProcessingInstructionFormP, xmlProcessingInstructionP, xmlTagCase, year, yieldCondTest, yieldCondTestOrTests, yieldHardcodedCaseSymbolIdOrIds, yieldInCursorClausesForArgumentList, yieldInCursorClausesForGeneralCollection, yieldInCursorClausesForVector, zone, zoneMinute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

symbolSlotOffset

public int symbolSlotOffset

symbolValueAndPlist

public Cons symbolValueAndPlist
Constructor Detail

Symbol

public Symbol()
Method Detail

internDerivedSymbol

public static Symbol internDerivedSymbol(GeneralizedSymbol basesymbol,
                                         java.lang.String newname)
Return a newly-created or existing symbol with name newname which is interned in the same module as basesymbol.

Parameters:
basesymbol -
newname -
Returns:
Symbol

internSymbolInModule

public static Symbol internSymbolInModule(java.lang.String name,
                                          Module module,
                                          boolean localP)
Look for a symbol named name in module (if localP do not consider inherited modules). If none exists, intern it locally in module. Return the existing or newly-created symbol.

Parameters:
name -
module -
localP -
Returns:
Symbol

internSymbol

public static Symbol internSymbol(java.lang.String name)
Return a newly-created or existing symbol with name name.

Parameters:
name -
Returns:
Symbol

internPermanentSymbol

public static Symbol internPermanentSymbol(java.lang.String name)
Return a newly-created or existing permanent symbol with name name.

Parameters:
name -
Returns:
Symbol

lookupSymbolInModule

public static Symbol lookupSymbolInModule(java.lang.String name,
                                          Module module,
                                          boolean localP)
Return the first symbol with name visible from module. If localP only consider symbols directly interned in module. If module is null, use $MODULE$ instead.

Parameters:
name -
module -
localP -
Returns:
Symbol

lookupSymbol

public static Symbol lookupSymbol(java.lang.String name)
Return the first symbol with name visible from the current module.

Parameters:
name -
Returns:
Symbol

getSymFromOffset

public static Symbol getSymFromOffset(int offset)

getSym

public static Symbol getSym(int offset)

newSymbol

public static Symbol newSymbol(java.lang.String symbolName)

idlOutputLiteral

public void idlOutputLiteral()
Overrides:
idlOutputLiteral in class Stella_Object

idlTranslateMethodParameter

public static Stella_Object idlTranslateMethodParameter(Symbol name,
                                                        StandardObject type,
                                                        Symbol direction)

idlCreateOverloadedFunctionName

public static Symbol idlCreateOverloadedFunctionName(Symbol functionname,
                                                     Surrogate classtype)

idlTranslateClassParameterName

public static StringWrapper idlTranslateClassParameterName(Symbol namesymbol)

idlTranslateSymbolId

public static StringWrapper idlTranslateSymbolId(Symbol symbol)

idlTranslateSymbolName

public static StringWrapper idlTranslateSymbolName(Symbol symbol)

idlTranslateName

public static StringWrapper idlTranslateName(Symbol namesymbol)

idlLookupReservedWordTable

public static StringWrapper idlLookupReservedWordTable(Symbol word)

idlYieldRenamedReservedWord

public static StringWrapper idlYieldRenamedReservedWord(Symbol word)

idlTranslateAtomicTree

public Cons idlTranslateAtomicTree()
Overrides:
idlTranslateAtomicTree in class Stella_Object

javaOutputLiteral

public void javaOutputLiteral()
Overrides:
javaOutputLiteral in class Stella_Object

javaTranslateNthMethodCall

public static Cons javaTranslateNthMethodCall(Symbol operator,
                                              Surrogate owner,
                                              Cons arguments)

javaTranslateArefMethodCall

public static Cons javaTranslateArefMethodCall(Symbol operator,
                                               Surrogate owner,
                                               Cons arguments)

javaTranslateNormalMethodCall

public static Cons javaTranslateNormalMethodCall(Symbol methodname,
                                                 Surrogate classtype,
                                                 Cons allargs)

javaTranslateVariableLengthArgName

public static StringWrapper javaTranslateVariableLengthArgName(Symbol namesymbol,
                                                               int parameternumber)

javaCreateOverloadedFunctionName

public static Symbol javaCreateOverloadedFunctionName(Symbol functionname,
                                                      Surrogate classtype)

javaTranslateMethodParameter

public static Stella_Object javaTranslateMethodParameter(Symbol name,
                                                         StandardObject type,
                                                         MethodSlot method)

javaTranslateAtomicTree

public Cons javaTranslateAtomicTree()
Overrides:
javaTranslateAtomicTree in class Stella_Object

javaTranslateGeneralSymbol

public static Cons javaTranslateGeneralSymbol(Symbol tree)

javaTranslateGlobalName

public static StringWrapper javaTranslateGlobalName(Symbol namesymbol,
                                                    boolean definitionP)

javaTranslateName

public static StringWrapper javaTranslateName(Symbol namesymbol)

javaYieldRenamedReservedWord

public static StringWrapper javaYieldRenamedReservedWord(Symbol word)

javaTranslateSymbolId

public static StringWrapper javaTranslateSymbolId(Symbol symbol)

javaTranslateSymbolName

public static StringWrapper javaTranslateSymbolName(Symbol symbol)

javaLookupOperatorTable

public static Cons javaLookupOperatorTable(Symbol operator)

cppOutputLiteral

public void cppOutputLiteral()
Overrides:
cppOutputLiteral in class Stella_Object

cppTranslateHardcodedSymbolReference

public static Cons cppTranslateHardcodedSymbolReference(Symbol operator,
                                                        int offset)

cppTranslateArefMethodCall

public static Cons cppTranslateArefMethodCall(Symbol operator,
                                              Surrogate owner,
                                              Cons arguments)

cppTranslateNthMethodCall

public static Cons cppTranslateNthMethodCall(Symbol operator,
                                             Surrogate owner,
                                             Cons arguments)

cppTranslateNormalMethodCall

public static Cons cppTranslateNormalMethodCall(Symbol methodname,
                                                Surrogate owner,
                                                Cons arguments,
                                                boolean referencedP)

cppCreateOverloadedFunctionName

public static Symbol cppCreateOverloadedFunctionName(Symbol functionname,
                                                     Surrogate classtype)

cppTranslateMethodNameFromName

public static StringWrapper cppTranslateMethodNameFromName(Symbol methodname,
                                                           StandardObject methodowner)

cppTranslateFunctionNameFromName

public static StringWrapper cppTranslateFunctionNameFromName(Symbol functionname)

slotReaderFromNameP

public static boolean slotReaderFromNameP(Symbol methodname,
                                          StandardObject methodowner)

cppTranslateFunctionParameter

public static Stella_Object cppTranslateFunctionParameter(Symbol name,
                                                          StandardObject type,
                                                          MethodSlot method)

cppTranslateSymbolId

public static StringWrapper cppTranslateSymbolId(Symbol symbol)

cppTranslateSymbolName

public static StringWrapper cppTranslateSymbolName(Symbol symbol)

cppTranslateReturnParameterName

public static StringWrapper cppTranslateReturnParameterName(Symbol namesymbol,
                                                            int parameternumber)

cppTranslateClassParameterName

public static StringWrapper cppTranslateClassParameterName(Symbol namesymbol)

cppTranslateGlobalName

public static StringWrapper cppTranslateGlobalName(Symbol namesymbol)

cppTranslateName

public static StringWrapper cppTranslateName(Symbol namesymbol)

cppFixupNameSymbol

public static Symbol cppFixupNameSymbol(Symbol namesymbol,
                                        Module homemodule)

cppTranslateAtomicTree

public Cons cppTranslateAtomicTree()
Overrides:
cppTranslateAtomicTree in class Stella_Object

cppTranslateArgumentListTree

public static Cons cppTranslateArgumentListTree(Symbol operator,
                                                Surrogate owner,
                                                Stella_Object argument)

cppYieldVaIteratorDeclarations

public static Cons cppYieldVaIteratorDeclarations(Symbol iteratorvar)

cppYieldVaIteratorHelperVariable

public static Symbol cppYieldVaIteratorHelperVariable(Symbol iteratorvar)

cppYieldVaEndTree

public static Cons cppYieldVaEndTree(Symbol iteratorvar)

cppYieldVaStartTree

public static Cons cppYieldVaStartTree(Symbol iteratorvar)

cppLookupReservedWordTable

public static StringWrapper cppLookupReservedWordTable(Symbol word)

cppYieldRenamedReservedWord

public static StringWrapper cppYieldRenamedReservedWord(Symbol word)

cppLookupOperatorTable

public static Cons cppLookupOperatorTable(Symbol operator)

overloadedFunctionNameModule

public static Module overloadedFunctionNameModule(Symbol functionName,
                                                  Surrogate classType)

defsystem

public static SystemDefinition defsystem(Symbol name,
                                         Cons options)
Define a system of files that collectively define a Stella application. Required options are: :directory -- the relative path from the respective source/native/binary root directory to the directory containing the system files. Can be a string or a list of strings (do not include directory separators). :files -- a list of files in the system, containing strings and lists of strings; the latter defines exploded paths to files in subdirectories. Optional options are: :data-files -- a list of files like the :files keyword, which contain data or other content that should not be processed, but instead copied verbatim to the native directory :required-systems -- a list of systems (strings) that should be loaded prior to loading this system. :cardinal-module -- the name (a string) of the principal module for this system. :copyright-header -- string with a header for inclusion into all translated files produced by Stella. :lisp-only-files -- Like the :files keyword, but these are only included :cpp-only-files in the translation for the specific language, namely :java-only-files Common Lisp, C++ or Java

Parameters:
name -
options -
Returns:
SystemDefinition

makeMemoizationTableSurrogate

public static Surrogate makeMemoizationTableSurrogate(Symbol memoname)

coerceARestToCons

public static Stella_Object coerceARestToCons(Symbol restvariable)
Coerce the argument list variable restvariable into a CONS list containing all its elements (uses argument list iteration to do so). If restvariable already is a CONS due to argument listification, this is a no-op.

Parameters:
restvariable -
Returns:
Stella_Object

setqP

public static Stella_Object setqP(Symbol variable,
                                  Cons expression)
Assign 'variable' the result of evaluating 'expression', and return TRUE if 'expression' is not NULL else return FALSE.

Parameters:
variable -
expression -
Returns:
Stella_Object

pushqNew

public static Stella_Object pushqNew(Symbol variable,
                                     Stella_Object value)
Push value onto the cons list variable, unless value is already a member of the list.

Parameters:
variable -
value -
Returns:
Stella_Object

popq

public static Stella_Object popq(Symbol variable)
Pops a value from the cons list 'variable'.

Parameters:
variable -
Returns:
Stella_Object

pushq

public static Stella_Object pushq(Symbol variable,
                                  Stella_Object value)
Push 'value' onto the cons list 'variable'.

Parameters:
variable -
value -
Returns:
Stella_Object

expandXmlTagCase

public static Cons expandXmlTagCase(Symbol item,
                                    Cons clauses)

getStellaContextSlowly

public Context getStellaContextSlowly()

clStructSlotOffset

public static int clStructSlotOffset(Symbol slotname,
                                     Surrogate classtype)

duplicateCursorVariableP

public static boolean duplicateCursorVariableP(Symbol variable,
                                               Cons iteratorbindings)

clTranslateNormalCallMethodTree

public static Cons clTranslateNormalCallMethodTree(Symbol operator,
                                                   Surrogate owner,
                                                   Cons arguments)

methodCallTypeForVectorStructs

public static Symbol methodCallTypeForVectorStructs(Symbol slotname,
                                                    Surrogate owner,
                                                    boolean functionP)

trueSlotName

public static Symbol trueSlotName(Symbol slotname,
                                  Surrogate type)

yieldSlotValueWriterTree

public static Cons yieldSlotValueWriterTree(Symbol slotname,
                                            Stella_Object objectref,
                                            Surrogate objecttype,
                                            Stella_Object valueref)

yieldSlotValueReaderTree

public static Cons yieldSlotValueReaderTree(Symbol slotname,
                                            Stella_Object objectref,
                                            Surrogate objecttype)

yieldClosSlotAccessorName

public static Stella_Object yieldClosSlotAccessorName(Symbol slotname)

clTranslateLocalSymbol

public static Stella_Object clTranslateLocalSymbol(Symbol symbol)

clTranslateGlobalSymbol

public static Stella_Object clTranslateGlobalSymbol(Symbol symbol)

clTranslateAtomicTree

public Stella_Object clTranslateAtomicTree()
Overrides:
clTranslateAtomicTree in class Stella_Object

yieldArgumentAccessTree

public static Stella_Object yieldArgumentAccessTree(Symbol argumentsvariable,
                                                    int index,
                                                    boolean restargumentP)

yieldEvaluatorWrapperName

public static Symbol yieldEvaluatorWrapperName(Symbol methodname)

lookupCommand

public static MethodSlot lookupCommand(Symbol name)
If name names an evaluable command return its associated command object; otherwise, return null. Currently, commands are not polymorphic, i.e., they can only be implemented by functions.

Parameters:
name -
Returns:
MethodSlot

createLispMacroUnits

public static void createLispMacroUnits(Symbol name,
                                        MethodSlot method)

yieldLispMacroTrees

public static Cons yieldLispMacroTrees(Symbol name,
                                       MethodSlot method,
                                       java.lang.Object[] MV_returnarray)

yieldRenamedNameIfNative

public static Symbol yieldRenamedNameIfNative(Symbol name,
                                              Keyword language,
                                              Keyword category)

nativeNameP

public static boolean nativeNameP(Symbol name,
                                  Keyword language,
                                  Keyword category)

registerNativeName

public static void registerNativeName(Symbol name,
                                      Keyword language,
                                      Keyword category)

yieldStartupFunctionClassname

public static java.lang.String yieldStartupFunctionClassname(Symbol functionName)

combineStartupFunctionUnits

public static Cons combineStartupFunctionUnits(Symbol startupfnname)

lookupMacro

public static MethodSlot lookupMacro(Symbol name)
If name has a macro definition, return the method object holding its expander function.

Parameters:
name -
Returns:
MethodSlot

walkInlineVariableReference

public static Cons walkInlineVariableReference(Symbol self,
                                               java.lang.Object[] MV_returnarray)

inlineVariableReferenceP

public static boolean inlineVariableReferenceP(Symbol self)

findPrototypeMethod

public static MethodSlot findPrototypeMethod(Symbol methodname,
                                             Surrogate abstracttype)

yieldNestedArithmeticOperatorCallTree

public static Cons yieldNestedArithmeticOperatorCallTree(Symbol operator,
                                                         Cons operands)

yieldArithmeticOperatorCallTree

public static Cons yieldArithmeticOperatorCallTree(Symbol operator,
                                                   Cons operands)

yieldCastedTypecaseClauseTrees

public static Cons yieldCastedTypecaseClauseTrees(Symbol testvariable,
                                                  StandardObject clausetype,
                                                  Cons clausetrees)

lookupOldValueVariable

public static Symbol lookupOldValueVariable(Symbol variable)

pushSpecial

public static void pushSpecial(Symbol variable,
                               Symbol oldvaluevariable)

walkADeclaration

public static Cons walkADeclaration(Symbol variable,
                                    Stella_Object typetree,
                                    Stella_Object value,
                                    boolean inputparameterP)

walkAtomicTree

public Stella_Object walkAtomicTree(java.lang.Object[] MV_returnarray)
Overrides:
walkAtomicTree in class Stella_Object

walkConstantSymbol

public static Symbol walkConstantSymbol(Symbol self,
                                        java.lang.Object[] MV_returnarray)

constantSymbolP

public static boolean constantSymbolP(Symbol symbol)

lookupConstantSymbol

public static Surrogate lookupConstantSymbol(Symbol self)

trueVariableName

public static Symbol trueVariableName(Symbol variable)

maybeRenameLocalVariable

public static void maybeRenameLocalVariable(Symbol variable)

yieldLocalVariableAlias

public static Symbol yieldLocalVariableAlias(Symbol variable,
                                             int level)

registerReferenceToGlobalVariable

public static void registerReferenceToGlobalVariable(Symbol variablename)

getLocalVariableInfo

public static Stella_Object getLocalVariableInfo(Symbol variable,
                                                 Keyword key)

setLocalVariableInfo

public static void setLocalVariableInfo(Symbol variable,
                                        Keyword key,
                                        Stella_Object info)

lookupVariableType

public static StandardObject lookupVariableType(Symbol variablename)

pushVariableBinding

public static void pushVariableBinding(Symbol variable,
                                       StandardObject type)

variableEqlP

public static boolean variableEqlP(Symbol var1,
                                   Symbol var2)

declarationOperatorP

public static boolean declarationOperatorP(Symbol operator)

yieldCollectCode

public static Cons yieldCollectCode(Symbol collectvariable,
                                    Stella_Object intovariable,
                                    Stella_Object collecttree)

yieldCollectIntoConsCode

public static Cons yieldCollectIntoConsCode(Symbol collectvariable,
                                            Stella_Object intovariable,
                                            Stella_Object collecttree)

yieldCollectIntoListCode

public static Cons yieldCollectIntoListCode(Symbol collectvariable,
                                            Stella_Object intovariable,
                                            Stella_Object collecttree)

extractOptionAndResidue

public static Stella_Object extractOptionAndResidue(Symbol option,
                                                    Cons tail,
                                                    java.lang.Object[] MV_returnarray)

getMethodWithIdenticalSignature

public static MethodSlot getMethodWithIdenticalSignature(Symbol name,
                                                         Cons parameterstree,
                                                         java.lang.String stringifiedsource)

getFunctionWithIdenticalSignature

public static MethodSlot getFunctionWithIdenticalSignature(Symbol name,
                                                           java.lang.String stringifiedsource)

yieldSetterMethodName

public static Symbol yieldSetterMethodName(Symbol methodname)

defineInlineMethod

public static MethodSlot defineInlineMethod(Symbol name,
                                            Cons parametersandbody)

matchPatternElement

public static Cons matchPatternElement(Symbol patternElement,
                                       Stella_Object datumElement)

lookupGlobalVariableType

public static StandardObject lookupGlobalVariableType(Symbol name)

undefineFunction

public static void undefineFunction(Symbol name)

lookupFunctionHomeModule

public static Module lookupFunctionHomeModule(Symbol functionsymbol)

lookupFunctionOrStellaFunction

public static MethodSlot lookupFunctionOrStellaFunction(Symbol functionsymbol)

lookupFunction

public static MethodSlot lookupFunction(Symbol functionsymbol)
Return the function defined for 'functionSymbol', if it exists.

Parameters:
functionsymbol -
Returns:
MethodSlot

undefineExternalSlots

public static void undefineExternalSlots(Symbol name)

defineStellaMethodSlot

public static MethodSlot defineStellaMethodSlot(Symbol inputname,
                                                Cons returntypes,
                                                boolean functionP,
                                                Cons inputparameters,
                                                KeywordKeyValueList options)
Define a new Stella method object (a slot), and attach it to the class identified by the first parameter in 'inputParameters'.

Parameters:
inputname -
returntypes -
functionP -
inputparameters -
options -
Returns:
MethodSlot

yieldTypeSpecifier

public StandardObject yieldTypeSpecifier()
Overrides:
yieldTypeSpecifier in class Stella_Object

registeredSlotNameP

public static boolean registeredSlotNameP(Symbol slotName)
Return true if slotName is the name of some registered; slot in the system.

Parameters:
slotName -
Returns:
boolean

defineStellaSlot

public static Slot defineStellaSlot(Symbol name,
                                    Surrogate owner,
                                    Surrogate basetype,
                                    Cons typespecifier,
                                    KeywordKeyValueList options)

getStellaClass

public Stella_Class getStellaClass(boolean errorP)
Return a class with name className. If non exists, break if errorP, else return null.

Parameters:
errorP -
Returns:
Stella_Class

lookupClass

public Stella_Class lookupClass()
Return a class with name name. Scan all visible surrogates looking for one that has a class defined for it.

Returns:
Stella_Class

softPermanentify

public Symbol softPermanentify()

permanentify

public Stella_Object permanentify()
Overrides:
permanentify in class Stella_Object

printSymbol

public static void printSymbol(Symbol self,
                               java.io.PrintStream stream)

symbolPropertySetter

public static Stella_Object symbolPropertySetter(Symbol symbol,
                                                 Stella_Object value,
                                                 StandardObject key)

symbolProperty

public static Stella_Object symbolProperty(Symbol symbol,
                                           StandardObject key)
Return the property of symbol whose key is eqP to key. Symbol properties can be set with setf.

Parameters:
symbol -
key -
Returns:
Stella_Object

symbolPlistSetter

public static Cons symbolPlistSetter(Symbol symbol,
                                     Cons plist)

symbolPlist

public static Cons symbolPlist(Symbol symbol)
Return the property list of symbol. The symbolPlist of a symbol can be set with setf. IMPORTANT: Property list are modified destructively, hence, if you supply it as a whole make sure to always supply a modfiable copy, e.g., by using bquote.

Parameters:
symbol -
Returns:
Cons

symbolValueSetter

public static Stella_Object symbolValueSetter(Symbol symbol,
                                              Stella_Object value)

symbolValue

public static Stella_Object symbolValue(Symbol symbol)
Return the value of symbol. Note, that this value is not visible to code that references a variable with the same name as symbol. The symbolValue is simply a special property that can always be accessed in constant time. The symbolValue of a symbol can be changed with setf.

Parameters:
symbol -
Returns:
Stella_Object

visibleSymbolP

public static boolean visibleSymbolP(Symbol self)
Return true if self is visible from the current module.

Parameters:
self -
Returns:
boolean

surrogatify

public Surrogate surrogatify()
Converts 'self' into a surrogate (same semantics as symbolToSurrogate which see).

Overrides:
surrogatify in class Stella_Object
Returns:
Surrogate

symbolToSurrogate

public static Surrogate symbolToSurrogate(Symbol self)
Return a surrogate with the same name as 'self'. Very tricky: The logic is designed to avoid returning an inherited surrogate that has no value. In that case, a new local surrogate is created that shadows the inherited surrogate. Unlike 'string-to-surrogate', the search starts first from the home context of 'self', and if that fails, then it restarts in *module*.

Parameters:
self -
Returns:
Surrogate

symbolToType

public static Surrogate symbolToType(Symbol self)
Convert self into a surrogate with the same name and module.

Parameters:
self -
Returns:
Surrogate

symbolCommonLispP

public static boolean symbolCommonLispP(Symbol self)

uninternSymbol

public static void uninternSymbol(Symbol self)
Remove self from its home module and the symbol table.

Parameters:
self -

safeImportSymbol

public static Symbol safeImportSymbol(Symbol symbol,
                                      Module module)
Safe version of importSymbol (which see). Only imports symbol if no symbol with that name is currently interned or visible in module. Returns symbol if it was imported or the conflicting symbol in module otherwise.

Parameters:
symbol -
module -
Returns:
Symbol

importSymbol

public static Symbol importSymbol(Symbol symbol,
                                  Module module)
Import symbol into module and return the imported symbol. Signal an error if a different symbol with the same name already exists locally in module. Any symbol with the same name visible in module by inheritance will be shadowed by the newly imported symbol.

Parameters:
symbol -
module -
Returns:
Symbol

signal

public static Stella_Object signal(Symbol type,
                                   Cons body)
Signal error message, placing non-string arguments in quotes.

Parameters:
type -
body -
Returns:
Stella_Object

printObject

public void printObject(java.io.PrintStream stream)
Overrides:
printObject in class Stella_Object

accessSymbolSlotValue

public static Stella_Object accessSymbolSlotValue(Symbol self,
                                                  Symbol slotname,
                                                  Stella_Object value,
                                                  boolean setvalueP)

primaryType

public Surrogate primaryType()
Description copied from class: Stella_Object
Returns the primary type of self. Gets defined automatically for every non-abstract subclass of OBJECT.

Overrides:
primaryType in class Stella_Object
Returns:
Surrogate