edu.isi.stella
Class Surrogate

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.Surrogate

public class Surrogate
extends GeneralizedSymbol

Rigid surrogate.


Field Summary
 Stella_Object surrogateValue
           
 
Fields inherited from class edu.isi.stella.GeneralizedSymbol
symbolId, symbolName
 
Fields inherited from class edu.isi.stella.ContextSensitiveObject
homeContext
 
Constructor Summary
Surrogate()
           
 
Method Summary
static Stella_Object accessSurrogateSlotValue(Surrogate self, Symbol slotname, Stella_Object value, boolean setvalueP)
           
static boolean bootstrapSubtypeOfP(Surrogate subtype, Surrogate supertype)
           
static Surrogate canonicalType(Surrogate type)
           
 Stella_Object clTranslateAtomicTree()
           
static List collectBadSuperClasses(Surrogate type, List badones)
           
static Surrogate collectionToActiveCollection(Surrogate type)
           
 void cppOutputLiteral()
           
 Cons cppTranslateAtomicTree()
           
static Cons cppTranslateDefinedPMethodCall(Surrogate argumenttype, Stella_Object argument, boolean nullP)
           
static StringWrapper cppTranslateSurrogateId(Surrogate surrogate)
           
static StringWrapper cppTranslateSurrogateName(Surrogate surrogate)
           
static Stella_Object createObject(Surrogate type, Cons initialValuePairs)
          Funcallable version of the renamed_New operator.
static RecycleList createRecycleList(Surrogate classtype, int itemsize)
           
static boolean definedTypeP(Surrogate type)
           
static Stella_Class defineStellaClass(Surrogate name, List supers, List slots, KeywordKeyValueList options)
          Return a Stella class with name name.
 void destroyClass()
           
static boolean filterUnboundSurrogateP(Surrogate self, AllPurposeIterator iterator)
           
static boolean genericallyAccessibleTypeP(Surrogate type)
           
static Stella_Object getGlobalValue(Surrogate self)
          Return the (possibly-wrapped) value of the global variable for the surrogate 'self'.
static Surrogate getSgt(int offset)
           
static Surrogate getSgtFromOffset(int offset)
           
 Stella_Class getStellaClass(boolean errorP)
          Return a class with name className.
 void idlOutputLiteral()
           
static StringWrapper idlTranslateSurrogateId(Surrogate surrogate)
           
static StringWrapper idlTranslateSurrogateName(Surrogate surrogate)
           
static Surrogate importSurrogate(Surrogate surrogate, Module module)
          Import surrogate into module and return the imported surrogate.
static void initializeMemoizationTable(Surrogate memotablesurrogate, java.lang.String options)
           
static void insertPrimitiveSuper(Surrogate newsuper, List supers)
           
static Surrogate internSurrogate(java.lang.String name)
          Return a newly-created or existing surrogate with name name.
static Surrogate internSurrogateInModule(java.lang.String name, Module module, boolean localP)
          Look for a symbol named name in module (if localP do not consider inherited modules).
 void javaOutputLiteral()
           
static Cons javaTranslateDefinedOrNull(Surrogate classtype, Stella_Object renamed_Object, boolean nullP)
           
static StringWrapper javaTranslateSurrogateId(Surrogate surrogate)
           
static StringWrapper javaTranslateSurrogateName(Surrogate surrogate)
           
 java.lang.String localPrintName(boolean readableP)
           
static Stella_Object lookupCoersionMethod(Surrogate sourcetype, Surrogate targettype, Stella_Object expression)
           
 GlobalVariable lookupGlobalVariable()
          Return a global variable with name 'self'.
static Stella_Object lookupLiteralTypeInfo(Surrogate type, Keyword key)
           
static StorageSlot lookupSlotFromOptionKeyword(Surrogate owner, Keyword keyword)
           
static Slot lookupSlotFromSlotref(Surrogate slotref)
           
static Surrogate lookupSlotref(Surrogate self, Symbol slotname)
           
static Surrogate lookupSurrogate(java.lang.String name)
          Return the first surrogate with name visible from the current module.
static Surrogate lookupSurrogateInModule(java.lang.String name, Module module, boolean localP)
          Return the first surrogate with name visible from module.
static Surrogate moreGeneralNumericType(Surrogate type1, Surrogate type2)
           
static Surrogate newSurrogate(java.lang.String symbolName)
           
static boolean optimisticSubtypeOfP(Surrogate subtype, Surrogate supertype)
           
 Surrogate primaryType()
          Returns the primary type of self.
 void printObject(java.io.PrintStream stream)
           
static void printSurrogate(Surrogate self, java.io.PrintStream stream)
           
static StandardObject realTypeSpecifier(Surrogate type)
           
static Surrogate safeImportSurrogate(Surrogate surrogate, Module module)
          Safe version of importSurrogate (which see).
static boolean safeSubtypeOfP(Surrogate subtype, Surrogate supertype)
           
static Stella_Object setGlobalValue(Surrogate self, Stella_Object value)
          Set the value of the global variable for the surrogate 'self' to 'value'.
static void setLiteralTypeInfo(Surrogate type, Keyword key, Stella_Object value)
           
static boolean slotrefP(Surrogate self)
           
static Surrogate slotrefType(Surrogate slotref)
           
static boolean subtypeOfAnchoredTypeSpecifierP(Surrogate type)
           
static boolean subtypeOfBooleanP(Surrogate type)
           
static boolean subtypeOfCharacterP(Surrogate type)
           
static boolean subtypeOfClassP(Surrogate type)
           
static boolean subtypeOfConsP(Surrogate type)
           
static boolean subtypeOfFloatP(Surrogate type)
           
static boolean subtypeOfIntegerP(Surrogate type)
           
static boolean subtypeOfKeywordP(Surrogate type)
           
static boolean subtypeOfLongIntegerP(Surrogate type)
           
static boolean subtypeOfMethodSlotP(Surrogate type)
           
static boolean subtypeOfP(Surrogate subType, Surrogate superType)
          Return true iff the class named subType is a subclass of the class named superType.
static boolean subtypeOfParametricTypeSpecifierP(Surrogate type)
           
static boolean subtypeOfStorageSlotP(Surrogate type)
           
static boolean subtypeOfStringP(Surrogate type)
           
static boolean subtypeOfSurrogateP(Surrogate type)
           
static boolean subtypeOfSymbolP(Surrogate type)
           
static boolean subtypeOfTransientSymbolP(Surrogate type)
           
static boolean subtypeOfTypeP(Surrogate type)
           
static boolean subtypeOfVerbatimStringP(Surrogate type)
           
static boolean subtypeOfWrapperP(Surrogate type)
           
static Symbol surrogateToSymbol(Surrogate self)
           
 Surrogate surrogatify()
          Converts 'self' into a surrogate.
static Symbol symbolize(Surrogate surrogate)
          Convert surrogate into a symbol with the same name and module.
static Stella_Class typeToClass(Surrogate type)
           
static Stella_Object typeToNullValueTree(Surrogate type)
           
static Symbol typeToSymbol(Surrogate type)
          Convert type into a symbol with the same name and module.
 Surrogate typeToWrappedType()
          Return the wrapped type for the type self, or 'self' if it is not a bare literal type.
static void uninternSurrogate(Surrogate self)
          Remove self from its home module and the surrogate table.
static boolean unknownTypeP(Surrogate type)
           
static boolean useVectorStyleIterationP(Surrogate collectiontype)
           
static Surrogate verifyType(Surrogate self)
           
static void verifyTypecaseClauseType(Surrogate testtype, Surrogate clausetype, List precedingclausetypes, Cons clause)
           
static boolean visibleSurrogateP(Surrogate self)
          Return true if self is visible from the current module.
 Stella_Object walkAtomicTree(java.lang.Object[] MV_returnarray)
           
static Surrogate wrappedTypeToType(Surrogate self)
          Return the unwrapped type for the wrapped type self, or self if it is not a wrapped type.
static Cons yieldIsaPCaseTest(Surrogate casekey, Stella_Object testexpression)
           
static Stella_Object yieldStructSlotAccessorName(Surrogate classtype, Symbol slotname)
           
static Cons yieldSubtypeOfPCaseTest(Surrogate casekey, Stella_Object testexpression)
           
 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, 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, idlTranslateAtomicTree, idlTranslateATree, illegalTreeP, implodePathname, incrementallyTranslate, incrementReferenceCount, inlineUnwrapBoolean, inlineWrapBoolean, inModule, integerP, isaP, javaBinaryOperatorP, javaBlockP, javaEndOfLineTokenP, javaHelpOutputPrintStream, javaMaybeOutputStatementWithParentheses, javaOperatorP, javaOutputStatement, javaPrognP, javaStreamIsStandardOutputP, javaSymbolCaseP, javaTranslateAtomicTree, 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, permanentify, 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

surrogateValue

public Stella_Object surrogateValue
Constructor Detail

Surrogate

public Surrogate()
Method Detail

internSurrogateInModule

public static Surrogate internSurrogateInModule(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:
Surrogate

internSurrogate

public static Surrogate internSurrogate(java.lang.String name)
Return a newly-created or existing surrogate with name name.

Parameters:
name -
Returns:
Surrogate

lookupSurrogateInModule

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

Parameters:
name -
module -
localP -
Returns:
Surrogate

lookupSurrogate

public static Surrogate lookupSurrogate(java.lang.String name)
Return the first surrogate with name visible from the current module.

Parameters:
name -
Returns:
Surrogate

getSgtFromOffset

public static Surrogate getSgtFromOffset(int offset)

getSgt

public static Surrogate getSgt(int offset)

newSurrogate

public static Surrogate newSurrogate(java.lang.String symbolName)

idlOutputLiteral

public void idlOutputLiteral()
Overrides:
idlOutputLiteral in class Stella_Object

idlTranslateSurrogateId

public static StringWrapper idlTranslateSurrogateId(Surrogate surrogate)

idlTranslateSurrogateName

public static StringWrapper idlTranslateSurrogateName(Surrogate surrogate)

javaOutputLiteral

public void javaOutputLiteral()
Overrides:
javaOutputLiteral in class Stella_Object

javaTranslateDefinedOrNull

public static Cons javaTranslateDefinedOrNull(Surrogate classtype,
                                              Stella_Object renamed_Object,
                                              boolean nullP)

javaTranslateSurrogateId

public static StringWrapper javaTranslateSurrogateId(Surrogate surrogate)

javaTranslateSurrogateName

public static StringWrapper javaTranslateSurrogateName(Surrogate surrogate)

cppOutputLiteral

public void cppOutputLiteral()
Overrides:
cppOutputLiteral in class Stella_Object

cppTranslateDefinedPMethodCall

public static Cons cppTranslateDefinedPMethodCall(Surrogate argumenttype,
                                                  Stella_Object argument,
                                                  boolean nullP)

cppTranslateSurrogateId

public static StringWrapper cppTranslateSurrogateId(Surrogate surrogate)

cppTranslateSurrogateName

public static StringWrapper cppTranslateSurrogateName(Surrogate surrogate)

cppTranslateAtomicTree

public Cons cppTranslateAtomicTree()
Overrides:
cppTranslateAtomicTree in class Stella_Object

initializeMemoizationTable

public static void initializeMemoizationTable(Surrogate memotablesurrogate,
                                              java.lang.String options)

yieldStructSlotAccessorName

public static Stella_Object yieldStructSlotAccessorName(Surrogate classtype,
                                                        Symbol slotname)

clTranslateAtomicTree

public Stella_Object clTranslateAtomicTree()
Overrides:
clTranslateAtomicTree in class Stella_Object

moreGeneralNumericType

public static Surrogate moreGeneralNumericType(Surrogate type1,
                                               Surrogate type2)

verifyTypecaseClauseType

public static void verifyTypecaseClauseType(Surrogate testtype,
                                            Surrogate clausetype,
                                            List precedingclausetypes,
                                            Cons clause)

yieldSubtypeOfPCaseTest

public static Cons yieldSubtypeOfPCaseTest(Surrogate casekey,
                                           Stella_Object testexpression)

yieldIsaPCaseTest

public static Cons yieldIsaPCaseTest(Surrogate casekey,
                                     Stella_Object testexpression)

walkAtomicTree

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

safeSubtypeOfP

public static boolean safeSubtypeOfP(Surrogate subtype,
                                     Surrogate supertype)

verifyType

public static Surrogate verifyType(Surrogate self)

lookupCoersionMethod

public static Stella_Object lookupCoersionMethod(Surrogate sourcetype,
                                                 Surrogate targettype,
                                                 Stella_Object expression)

typeToWrappedType

public Surrogate typeToWrappedType()
Return the wrapped type for the type self, or 'self' if it is not a bare literal type.

Returns:
Surrogate

wrappedTypeToType

public static Surrogate wrappedTypeToType(Surrogate self)
Return the unwrapped type for the wrapped type self, or self if it is not a wrapped type.

Parameters:
self -
Returns:
Surrogate

useVectorStyleIterationP

public static boolean useVectorStyleIterationP(Surrogate collectiontype)

lookupSlotFromOptionKeyword

public static StorageSlot lookupSlotFromOptionKeyword(Surrogate owner,
                                                      Keyword keyword)

genericallyAccessibleTypeP

public static boolean genericallyAccessibleTypeP(Surrogate type)

createRecycleList

public static RecycleList createRecycleList(Surrogate classtype,
                                            int itemsize)

unknownTypeP

public static boolean unknownTypeP(Surrogate type)

typeToNullValueTree

public static Stella_Object typeToNullValueTree(Surrogate type)

setGlobalValue

public static Stella_Object setGlobalValue(Surrogate self,
                                           Stella_Object value)
Set the value of the global variable for the surrogate 'self' to 'value'.

Parameters:
self -
value -
Returns:
Stella_Object

getGlobalValue

public static Stella_Object getGlobalValue(Surrogate self)
Return the (possibly-wrapped) value of the global variable for the surrogate 'self'.

Parameters:
self -
Returns:
Stella_Object

lookupGlobalVariable

public GlobalVariable lookupGlobalVariable()
Return a global variable with name 'self'.

Overrides:
lookupGlobalVariable in class GeneralizedSymbol
Returns:
GlobalVariable

optimisticSubtypeOfP

public static boolean optimisticSubtypeOfP(Surrogate subtype,
                                           Surrogate supertype)

yieldTypeSpecifier

public StandardObject yieldTypeSpecifier()
Overrides:
yieldTypeSpecifier in class Stella_Object

canonicalType

public static Surrogate canonicalType(Surrogate type)

realTypeSpecifier

public static StandardObject realTypeSpecifier(Surrogate type)

definedTypeP

public static boolean definedTypeP(Surrogate type)

slotrefType

public static Surrogate slotrefType(Surrogate slotref)

lookupSlotFromSlotref

public static Slot lookupSlotFromSlotref(Surrogate slotref)

slotrefP

public static boolean slotrefP(Surrogate self)

lookupSlotref

public static Surrogate lookupSlotref(Surrogate self,
                                      Symbol slotname)

subtypeOfP

public static boolean subtypeOfP(Surrogate subType,
                                 Surrogate superType)
Return true iff the class named subType is a subclass of the class named superType.

Parameters:
subType -
superType -
Returns:
boolean

collectBadSuperClasses

public static List collectBadSuperClasses(Surrogate type,
                                          List badones)

filterUnboundSurrogateP

public static boolean filterUnboundSurrogateP(Surrogate self,
                                              AllPurposeIterator iterator)

collectionToActiveCollection

public static Surrogate collectionToActiveCollection(Surrogate type)

insertPrimitiveSuper

public static void insertPrimitiveSuper(Surrogate newsuper,
                                        List supers)

destroyClass

public void destroyClass()

defineStellaClass

public static Stella_Class defineStellaClass(Surrogate name,
                                             List supers,
                                             List slots,
                                             KeywordKeyValueList options)
Return a Stella class with name name. Caution: If the class already exists, the Stella class object gets redefined, but the native C++ class is not redefined.

Parameters:
name -
supers -
slots -
options -
Returns:
Stella_Class

createObject

public static Stella_Object createObject(Surrogate type,
                                         Cons initialValuePairs)
Funcallable version of the renamed_New operator. Return an instance of the class named by type. If initialValuePairs is supplied, it has to be a key/value list similar to what's accepted by renamed_New and the named slots will be initialized with the supplied values. Similar to renamed_New, all required arguments for type must be included. Since all the slot initialization, etc. is handled dynamically at run time, createObject is much slower than renamed_New; therefore, it should only be used if type cannot be known at translation time.

Parameters:
type -
initialValuePairs -
Returns:
Stella_Object

getStellaClass

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

Parameters:
errorP -
Returns:
Stella_Class

typeToClass

public static Stella_Class typeToClass(Surrogate type)

setLiteralTypeInfo

public static void setLiteralTypeInfo(Surrogate type,
                                      Keyword key,
                                      Stella_Object value)

lookupLiteralTypeInfo

public static Stella_Object lookupLiteralTypeInfo(Surrogate type,
                                                  Keyword key)

printSurrogate

public static void printSurrogate(Surrogate self,
                                  java.io.PrintStream stream)

visibleSurrogateP

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

Parameters:
self -
Returns:
boolean

localPrintName

public java.lang.String localPrintName(boolean readableP)
Overrides:
localPrintName in class GeneralizedSymbol

surrogatify

public Surrogate surrogatify()
Converts 'self' into a surrogate.

Overrides:
surrogatify in class Stella_Object
Returns:
Surrogate

symbolize

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

Parameters:
surrogate -
Returns:
Symbol

typeToSymbol

public static Symbol typeToSymbol(Surrogate type)
Convert type into a symbol with the same name and module.

Parameters:
type -
Returns:
Symbol

surrogateToSymbol

public static Symbol surrogateToSymbol(Surrogate self)

uninternSurrogate

public static void uninternSurrogate(Surrogate self)
Remove self from its home module and the surrogate table.

Parameters:
self -

safeImportSurrogate

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

Parameters:
surrogate -
module -
Returns:
Surrogate

importSurrogate

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

Parameters:
surrogate -
module -
Returns:
Surrogate

subtypeOfParametricTypeSpecifierP

public static boolean subtypeOfParametricTypeSpecifierP(Surrogate type)

subtypeOfAnchoredTypeSpecifierP

public static boolean subtypeOfAnchoredTypeSpecifierP(Surrogate type)

subtypeOfMethodSlotP

public static boolean subtypeOfMethodSlotP(Surrogate type)

subtypeOfStorageSlotP

public static boolean subtypeOfStorageSlotP(Surrogate type)

subtypeOfClassP

public static boolean subtypeOfClassP(Surrogate type)

subtypeOfConsP

public static boolean subtypeOfConsP(Surrogate type)

subtypeOfKeywordP

public static boolean subtypeOfKeywordP(Surrogate type)

subtypeOfTransientSymbolP

public static boolean subtypeOfTransientSymbolP(Surrogate type)

subtypeOfSymbolP

public static boolean subtypeOfSymbolP(Surrogate type)

subtypeOfTypeP

public static boolean subtypeOfTypeP(Surrogate type)

subtypeOfSurrogateP

public static boolean subtypeOfSurrogateP(Surrogate type)

subtypeOfWrapperP

public static boolean subtypeOfWrapperP(Surrogate type)

subtypeOfCharacterP

public static boolean subtypeOfCharacterP(Surrogate type)

subtypeOfVerbatimStringP

public static boolean subtypeOfVerbatimStringP(Surrogate type)

subtypeOfStringP

public static boolean subtypeOfStringP(Surrogate type)

subtypeOfFloatP

public static boolean subtypeOfFloatP(Surrogate type)

subtypeOfLongIntegerP

public static boolean subtypeOfLongIntegerP(Surrogate type)

subtypeOfIntegerP

public static boolean subtypeOfIntegerP(Surrogate type)

subtypeOfBooleanP

public static boolean subtypeOfBooleanP(Surrogate type)

bootstrapSubtypeOfP

public static boolean bootstrapSubtypeOfP(Surrogate subtype,
                                          Surrogate supertype)

printObject

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

accessSurrogateSlotValue

public static Stella_Object accessSurrogateSlotValue(Surrogate 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