|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.isi.stella.Stella_Object edu.isi.stella.StandardObject edu.isi.stella.ContextSensitiveObject edu.isi.stella.GeneralizedSymbol edu.isi.stella.Surrogate
public class Surrogate
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.ContextSensitiveObject |
---|
homeModule |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public Stella_Object surrogateValue
Constructor Detail |
---|
public Surrogate()
Method Detail |
---|
public static Surrogate internSurrogateInModule(java.lang.String name, Module module, boolean localP)
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.
name
- module
- localP
-
public static Surrogate internSurrogate(java.lang.String name)
name
.
name
-
public static Surrogate lookupSurrogateInModule(java.lang.String name, Module module, boolean localP)
name
visible from module
.
If localP
only consider surrogates directly interned in module
.
If module
is null
, use $MODULE$
instead.
name
- module
- localP
-
public static Surrogate lookupSurrogate(java.lang.String name)
name
visible from the current module.
name
-
public static Surrogate getSgtFromOffset(int offset)
public static Surrogate getSgt(int offset)
public static Surrogate newSurrogate(java.lang.String symbolName)
public void idlOutputLiteral()
idlOutputLiteral
in class Stella_Object
public static StringWrapper idlTranslateSurrogateId(Surrogate surrogate)
public static StringWrapper idlTranslateSurrogateName(Surrogate surrogate)
public void javaOutputLiteral()
javaOutputLiteral
in class Stella_Object
public static Cons javaTranslateDefinedOrNull(Surrogate classtype, Stella_Object renamed_Object, boolean nullP)
public static StringWrapper javaTranslateSurrogateId(Surrogate surrogate)
public static StringWrapper javaTranslateSurrogateName(Surrogate surrogate)
public void cppOutputLiteral()
cppOutputLiteral
in class Stella_Object
public static Cons cppTranslateDefinedPMethodCall(Surrogate argumenttype, Stella_Object argument, boolean nullP)
public static StringWrapper cppTranslateSurrogateId(Surrogate surrogate)
public static StringWrapper cppTranslateSurrogateName(Surrogate surrogate)
public Cons cppTranslateAtomicTree()
cppTranslateAtomicTree
in class Stella_Object
public static void initializeMemoizationTable(Surrogate memotablesurrogate, java.lang.String options)
public static Stella_Object yieldStructSlotAccessorName(Surrogate classtype, Symbol slotname)
public Stella_Object clTranslateAtomicTree()
clTranslateAtomicTree
in class Stella_Object
public static Surrogate moreGeneralNumericType(Surrogate type1, Surrogate type2)
public static void verifyTypecaseClauseType(Surrogate testtype, Surrogate clausetype, List precedingclausetypes, Cons clause)
public static Cons yieldSubtypeOfPCaseTest(Surrogate casekey, Stella_Object testexpression)
public static Cons yieldIsaPCaseTest(Surrogate casekey, Stella_Object testexpression)
public Stella_Object walkAtomicTree(java.lang.Object[] MV_returnarray)
walkAtomicTree
in class Stella_Object
public static boolean safeSubtypeOfP(Surrogate subtype, Surrogate supertype)
public static Surrogate verifyType(Surrogate self)
public static Stella_Object lookupCoersionMethod(Surrogate sourcetype, Surrogate targettype, Stella_Object expression)
public Surrogate typeToWrappedType()
self
,
or 'self' if it is not a bare literal type.
public static Surrogate wrappedTypeToType(Surrogate self)
self
,
or self
if it is not a wrapped type.
self
-
public static boolean useVectorStyleIterationP(Surrogate collectiontype)
public static StorageSlot lookupSlotFromOptionKeyword(Surrogate owner, Keyword keyword)
public static boolean genericallyAccessibleTypeP(Surrogate type)
public static RecycleList createRecycleList(Surrogate classtype, int itemsize)
public static boolean unknownTypeP(Surrogate type)
public static Stella_Object typeToNullValueTree(Surrogate type)
public static Stella_Object setGlobalValue(Surrogate self, Stella_Object value)
self
- value
-
public static Stella_Object getGlobalValue(Surrogate self)
self
-
public GlobalVariable lookupGlobalVariable()
lookupGlobalVariable
in class GeneralizedSymbol
public static boolean optimisticSubtypeOfP(Surrogate subtype, Surrogate supertype)
public StandardObject yieldTypeSpecifier()
yieldTypeSpecifier
in class Stella_Object
public static Surrogate canonicalType(Surrogate type)
public static StandardObject realTypeSpecifier(Surrogate type)
public static boolean definedTypeP(Surrogate type)
public static Surrogate slotrefType(Surrogate slotref)
public static Slot lookupSlotFromSlotref(Surrogate slotref)
public static boolean slotrefP(Surrogate self)
public static Surrogate lookupSlotref(Surrogate self, Symbol slotname)
public static boolean subtypeOfP(Surrogate subType, Surrogate superType)
true
iff the class named subType
is a subclass
of the class named superType
.
subType
- superType
-
public static List collectBadSuperClasses(Surrogate type, List badones)
public static boolean filterUnboundSurrogateP(Surrogate self, AllPurposeIterator iterator)
public static Surrogate collectionToActiveCollection(Surrogate type)
public static void insertPrimitiveSuper(Surrogate newsuper, List supers)
public void destroyClass()
public static Stella_Class defineStellaClass(Surrogate name, List supers, List slots, KeywordKeyValueList options)
name
.
Caution: If the class already exists, the Stella class object gets
redefined, but the native C++ class is not redefined.
name
- supers
- slots
- options
-
public static Stella_Object createObject(Surrogate type, Cons initialValuePairs)
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.
type
- initialValuePairs
-
public Stella_Class getStellaClass(boolean errorP)
className
. If none exists, break
if errorP
, else return null
.
errorP
-
public static Stella_Class typeToClass(Surrogate type)
public static void setLiteralTypeInfo(Surrogate type, Keyword key, Stella_Object value)
public static Stella_Object lookupLiteralTypeInfo(Surrogate type, Keyword key)
public static void printSurrogate(Surrogate self, java.io.PrintStream stream)
public static boolean visibleSurrogateP(Surrogate self)
true
if self
is visible from the current module.
self
-
public java.lang.String localPrintName(boolean readableP)
localPrintName
in class GeneralizedSymbol
public Surrogate surrogatify()
surrogatify
in class Stella_Object
public static Symbol symbolize(Surrogate surrogate)
surrogate
into a symbol with the same name and module.
surrogate
-
public static Symbol typeToSymbol(Surrogate type)
type
into a symbol with the same name and module.
type
-
public static Symbol surrogateToSymbol(Surrogate self)
public static void uninternSurrogate(Surrogate self)
self
from its home module and the surrogate table.
self
- public static Surrogate safeImportSurrogate(Surrogate surrogate, Module module)
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.
surrogate
- module
-
public static Surrogate importSurrogate(Surrogate surrogate, Module module)
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
.
surrogate
- module
-
public static boolean subtypeOfParametricTypeSpecifierP(Surrogate type)
public static boolean subtypeOfAnchoredTypeSpecifierP(Surrogate type)
public static boolean subtypeOfMethodSlotP(Surrogate type)
public static boolean subtypeOfStorageSlotP(Surrogate type)
public static boolean subtypeOfClassP(Surrogate type)
public static boolean subtypeOfConsP(Surrogate type)
public static boolean subtypeOfKeywordP(Surrogate type)
public static boolean subtypeOfTransientSymbolP(Surrogate type)
public static boolean subtypeOfSymbolP(Surrogate type)
public static boolean subtypeOfTypeP(Surrogate type)
public static boolean subtypeOfSurrogateP(Surrogate type)
public static boolean subtypeOfWrapperP(Surrogate type)
public static boolean subtypeOfCharacterP(Surrogate type)
public static boolean subtypeOfVerbatimStringP(Surrogate type)
public static boolean subtypeOfStringP(Surrogate type)
public static boolean subtypeOfFloatP(Surrogate type)
public static boolean subtypeOfLongIntegerP(Surrogate type)
public static boolean subtypeOfIntegerP(Surrogate type)
public static boolean subtypeOfBooleanP(Surrogate type)
public static boolean bootstrapSubtypeOfP(Surrogate subtype, Surrogate supertype)
public void printObject(java.io.PrintStream stream)
printObject
in class Stella_Object
public static Stella_Object accessSurrogateSlotValue(Surrogate self, Symbol slotname, Stella_Object value, boolean setvalueP)
public Surrogate primaryType()
Stella_Object
self
.
Gets defined automatically for every non-abstract subclass of OBJECT.
primaryType
in class Stella_Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |