VariableNode.st
changeset 4306 694e41c01781
parent 4213 ca2720e15d46
child 4464 1c6ea6cf9b91
equal deleted inserted replaced
4305:2b94668b13a1 4306:694e41c01781
       
     1 "{ Encoding: utf8 }"
       
     2 
     1 "
     3 "
     2  COPYRIGHT (c) 1994 by Claus Gittinger
     4  COPYRIGHT (c) 1994 by Claus Gittinger
     3 	      All Rights Reserved
     5 	      All Rights Reserved
     4 
     6 
     5  This software is furnished under a license and may be used
     7  This software is furnished under a license and may be used
   951     ^ aValue
   953     ^ aValue
   952 
   954 
   953     "Modified: / 05-12-2011 / 18:43:56 / cg"
   955     "Modified: / 05-12-2011 / 18:43:56 / cg"
   954 ! !
   956 ! !
   955 
   957 
   956 
       
   957 !VariableNode methodsFor:'printing & storing'!
   958 !VariableNode methodsFor:'printing & storing'!
   958 
   959 
   959 displayOn:aGCOrStream
   960 displayOn:aGCOrStream
   960     "Compatibility
   961     "Compatibility
   961      append a printed desription on some stream (Dolphin,  Squeak)
   962      append a printed desription on some stream (Dolphin,  Squeak)
  1080 
  1081 
  1081     "Modified: / 19.10.1998 / 19:43:04 / cg"
  1082     "Modified: / 19.10.1998 / 19:43:04 / cg"
  1082 !
  1083 !
  1083 
  1084 
  1084 isGlobalNamed:nameWanted
  1085 isGlobalNamed:nameWanted
  1085     "return true, if this is a node for a particular global variable"
  1086     "return true, if this is a node for a particular 
  1086 
  1087      (and existing) global variable"
       
  1088 
       
  1089     |sym|
       
  1090     
  1087     ^ (type == #GlobalVariable) 
  1091     ^ (type == #GlobalVariable) 
  1088       and:[name = nameWanted
  1092       and:[name = nameWanted
  1089       and:[name isSymbol
  1093       and:[(sym := name asSymbolIfInterned) isSymbol
  1090       and:[Smalltalk includesKey:name]]]
  1094       and:[Smalltalk includesKey:name]]]
  1091 
  1095 
  1092     "Created: / 05-03-2007 / 13:35:07 / cg"
  1096     "Created: / 05-03-2007 / 13:35:07 / cg"
       
  1097     "Modified: / 22-09-2018 / 17:27:58 / Claus Gittinger"
  1093 !
  1098 !
  1094 
  1099 
  1095 isGlobalVariable
  1100 isGlobalVariable
  1096     "return true, if this is a node for global variable"
  1101     "return true, if this is a node for global variable"
  1097 
  1102 
  1098     ^ type == #GlobalVariable
  1103     ^ type == #GlobalVariable
       
  1104 !
       
  1105 
       
  1106 isGlobalVariableNamed:nameWanted
       
  1107     "return true, if this is a node for a particular 
       
  1108      global variable (existing or not) "
       
  1109 
       
  1110     ^ (type == #GlobalVariable) 
       
  1111       and:[name = nameWanted]
       
  1112 
       
  1113     "Created: / 22-09-2018 / 17:26:50 / Claus Gittinger"
  1099 !
  1114 !
  1100 
  1115 
  1101 isInstance
  1116 isInstance
  1102     <resource: #obsolete>
  1117     <resource: #obsolete>
  1103 
  1118