Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
51 lines (34 sloc) 2.22 KB
Delta define: #DeltaTopLevelDeclVar as: (
(Class subclassOf: 'DeltaGlobalVar' instanceVariables: '')) !
(Delta mirrorFor: #DeltaTopLevelDeclVar) revision: '$Revision: 1.4 $'!
(Delta mirrorFor: #DeltaTopLevelDeclVar) group: 'ast'!
(Delta mirrorFor: #DeltaTopLevelDeclVar)
'Represents the global variable declaration conceptually associated with a top level definition.
For example, every class in Smalltalk is represented by a global variable in the system dictionary.
This value of this variable is an object that supports a set of messages as defined by the classes''
class side methods (This object is almost always the class itself). Conceptually, a variable declaration
specifying the type of the variable must be associated with such a variable. In practice, such a
declaration can be inferred from the actual class (or other top level definition - protocol, type alias or mixin).
If I am an instance of this class, then either:
1. I have an entry in the system dictionary representing a definition.
2. I have an entry in the system dictionary representing a global variable.
3. I have no entry in the system dictionary (should not happen).
(1) is the valid case, in which case the type of the declaration can be inferred from the defintion.
(2) only happens if a global variable has been defined in Smalltalk, without creating a declaration
for it. In this case, the type of the declaration is an error.
(3) could only happen if I am obsolete, because of reflective changes that occurred after I was
(c) 1995-1997 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
Use and distribution of this software is subject to the terms of the attached source license.'!
! (Delta mirrorFor: #DeltaTopLevelDeclVar) methodsFor: 'Unclassified' !
isValidTerm ^ <Boolean>
^self mirroredType isGeneric not!
name: n
super name: n type: DeltaNoTypeSpecifiedError new.!
type ^ <ObjectType>
" I should represent the global variable storing the first class representative of a definition.
I compute the type information associated with that definition (my mirroredType).
Then I ask said type info for the type of the first class representative."
self deltaHack.
^self mirroredType firstClassRepType! !
Jump to Line
Something went wrong with that request. Please try again.