VariableNode.st
changeset 2757 a86f78669293
parent 2755 a59c6adef58f
child 2764 9acca5d69f54
equal deleted inserted replaced
2756:4b1b41756f13 2757:a86f78669293
   124 
   124 
   125 index
   125 index
   126     ^ index
   126     ^ index
   127 !
   127 !
   128 
   128 
   129 index:something
   129 index:anIntegerIndex
   130     index := something.
   130 "/    self assert:(anIntegerIndex isNil or:[anIntegerIndex ~~ 0]).
       
   131     index := anIntegerIndex.
       
   132 
       
   133     "Modified: / 15-11-2011 / 19:10:08 / cg"
   131 !
   134 !
   132 
   135 
   133 name
   136 name
   134     ^ name
   137     ^ name
   135 !
   138 !
   189     type := t.
   192     type := t.
   190     value := nil.
   193     value := nil.
   191     name := n
   194     name := n
   192 !
   195 !
   193 
   196 
   194 type:t name:n context:aContext index:i
   197 type:t name:n context:aContext index:anIntegerIndex
   195     type := t.
   198     type := t.
   196     index := i.
   199 "/    self assert:(anIntegerIndex isNil or:[anIntegerIndex ~~ 0]).
       
   200     index := anIntegerIndex.
   197     value := aContext.
   201     value := aContext.
   198     name := n
   202     name := n
   199 
   203 
   200     "Created: / 17.1.1998 / 02:40:55 / cg"
   204     "Created: / 17-01-1998 / 02:40:55 / cg"
   201     "Modified: / 17.1.1998 / 04:01:21 / cg"
   205     "Modified: / 15-11-2011 / 19:10:18 / cg"
   202 !
   206 !
   203 
   207 
   204 type:t name:n index:i selfClass:s
   208 type:t name:n index:anIntegerIndex selfClass:s
   205     type := t.
   209     type := t.
   206     index := i.
   210 "/    self assert:(anIntegerIndex isNil or:[anIntegerIndex ~~ 0]).
       
   211     index := anIntegerIndex.
   207     value := s.
   212     value := s.
   208     name := n
   213     name := n
   209 
   214 
   210     "Modified: / 17.1.1998 / 04:04:04 / cg"
   215     "Modified: / 15-11-2011 / 19:10:21 / cg"
   211 !
   216 !
   212 
   217 
   213 type:t name:n index:i selfValue:s
   218 type:t name:n index:anIntegerIndex selfValue:s
   214     type := t.
   219     type := t.
   215     index := i.
   220 "/    self assert:(anIntegerIndex isNil or:[anIntegerIndex ~~ 0]).
       
   221     index := anIntegerIndex.
   216     value := s.
   222     value := s.
   217     name := n
   223     name := n
   218 
   224 
   219     "Modified: / 17.1.1998 / 04:02:58 / cg"
   225     "Modified: / 15-11-2011 / 19:10:24 / cg"
   220 !
   226 !
   221 
   227 
   222 type:t name:n token:tok index:i
   228 type:t name:n token:tok index:anIntegerIndex
   223     type := t.
   229     type := t.
   224     index := i.
   230 "/    self assert:(anIntegerIndex isNil or:[anIntegerIndex ~~ 0]).
       
   231     index := anIntegerIndex.
   225     token := tok.
   232     token := tok.
   226     name := n
   233     name := n
   227 !
   234 
   228 
   235     "Modified: / 15-11-2011 / 19:10:30 / cg"
   229 type:t name:n token:tok index:i block:variableBlock from:codeBlock
   236 !
       
   237 
       
   238 type:t name:n token:tok index:anIntegerIndex block:variableBlock from:codeBlock
   230     type := t.
   239     type := t.
   231     index := i.
   240 "/    self assert:(anIntegerIndex isNil or:[anIntegerIndex ~~ 0]).
       
   241     index := anIntegerIndex.
   232     block := variableBlock.
   242     block := variableBlock.
   233     token := tok.
   243     token := tok.
   234     name := n.
   244     name := n.
   235     (type == #BlockArg) ifTrue:[
   245     (type == #BlockArg) ifTrue:[
   236         variableBlock blockArgAccessed:true.
   246         variableBlock blockArgAccessed:true.
   238 
   248 
   239     codeBlock ~~ variableBlock ifTrue:[
   249     codeBlock ~~ variableBlock ifTrue:[
   240         codeBlock rememberOuterBlockVarAccess:self
   250         codeBlock rememberOuterBlockVarAccess:self
   241     ]
   251     ]
   242 
   252 
   243     "Created: 2.7.1997 / 10:54:50 / cg"
   253     "Created: / 02-07-1997 / 10:54:50 / cg"
   244     "Modified: 2.7.1997 / 11:12:58 / cg"
   254     "Modified: / 15-11-2011 / 19:10:35 / cg"
   245 !
   255 !
   246 
   256 
   247 type:t token:tok index:i block:b
   257 type:t token:tok index:anIntegerIndex block:b
   248     type := t.
   258     type := t.
   249     index := i.
   259 "/    self assert:(anIntegerIndex isNil or:[anIntegerIndex ~~ 0]).
       
   260     index := anIntegerIndex.
   250     block := b.
   261     block := b.
   251     token := tok.
   262     token := tok.
   252 
   263 
   253     (type == #BlockArg) ifTrue:[
   264     (type == #BlockArg) ifTrue:[
   254         b blockArgAccessed:true.
   265         b blockArgAccessed:true.
   255     ].
   266     ].
   256 
   267 
   257     "Modified: 18.6.1997 / 11:41:05 / cg"
   268     "Modified: / 15-11-2011 / 19:10:04 / cg"
   258 ! !
   269 ! !
   259 
   270 
   260 !VariableNode methodsFor:'code generation'!
   271 !VariableNode methodsFor:'code generation'!
   261 
   272 
   262 codeForSideEffectOn:aStream inBlock:b for:aCompiler
   273 codeForSideEffectOn:aStream inBlock:b for:aCompiler
  1026 ! !
  1037 ! !
  1027 
  1038 
  1028 !VariableNode class methodsFor:'documentation'!
  1039 !VariableNode class methodsFor:'documentation'!
  1029 
  1040 
  1030 version
  1041 version
  1031     ^ '$Header: /cvs/stx/stx/libcomp/VariableNode.st,v 1.81 2011-10-25 21:46:51 cg Exp $'
  1042     ^ '$Header: /cvs/stx/stx/libcomp/VariableNode.st,v 1.82 2011-11-15 18:10:42 cg Exp $'
  1032 !
  1043 !
  1033 
  1044 
  1034 version_CVS
  1045 version_CVS
  1035     ^ '$Header: /cvs/stx/stx/libcomp/VariableNode.st,v 1.81 2011-10-25 21:46:51 cg Exp $'
  1046     ^ '$Header: /cvs/stx/stx/libcomp/VariableNode.st,v 1.82 2011-11-15 18:10:42 cg Exp $'
  1036 ! !
  1047 ! !