43 them at least. This is done to make stc happy (or at least, to not be forced to adapt it |
43 them at least. This is done to make stc happy (or at least, to not be forced to adapt it |
44 to any new semantics). |
44 to any new semantics). |
45 " |
45 " |
46 ! ! |
46 ! ! |
47 |
47 |
|
48 !SharedPool class methodsFor:'Compatibility-Squeak'! |
|
49 |
|
50 bindingOf: varName |
|
51 "Answer the binding of some variable resolved in the scope of the receiver" |
|
52 |
|
53 | aSymbol binding | |
|
54 |
|
55 "/ self shouldImplement. "not yet finished" |
|
56 aSymbol := varName asSymbol. |
|
57 |
|
58 "First look in classVar dictionary." |
|
59 binding := self classPool bindingOf: aSymbol. |
|
60 binding notNil ifTrue:[^binding]. |
|
61 |
|
62 "Next look in shared pools." |
|
63 self sharedPools do:[:pool | |
|
64 binding := pool bindingOf: aSymbol. |
|
65 binding notNil ifTrue:[^binding]. |
|
66 ]. |
|
67 |
|
68 "subclassing and environment are not preserved" |
|
69 ^nil |
|
70 |
|
71 "Modified: / 12-09-2011 / 09:40:36 / cg" |
|
72 ! |
|
73 |
|
74 bindingsDo: aBlock |
|
75 self classVarNames do:[:eachKey | |
|
76 aBlock value:(eachKey -> (self classVarAt:eachKey)) |
|
77 ]. |
|
78 |
|
79 "Modified: / 12-09-2011 / 09:42:00 / cg" |
|
80 ! ! |
|
81 |
48 !SharedPool class methodsFor:'Compatibility-V''Age'! |
82 !SharedPool class methodsFor:'Compatibility-V''Age'! |
49 |
83 |
50 declareConstant:constantName value:value |
84 declareConstant:constantName value:value |
51 self == SharedPool ifTrue:[ self error ]. |
85 self == SharedPool ifTrue:[ self error ]. |
52 |
86 |
118 ^ self classVarAt:name put:aValue |
152 ^ self classVarAt:name put:aValue |
119 |
153 |
120 "Created: / 08-09-2011 / 05:48:16 / cg" |
154 "Created: / 08-09-2011 / 05:48:16 / cg" |
121 ! |
155 ! |
122 |
156 |
123 bindingOf: varName |
|
124 "Answer the binding of some variable resolved in the scope of the receiver" |
|
125 |
|
126 | aSymbol binding | |
|
127 |
|
128 "/ self shouldImplement. "not yet finished" |
|
129 aSymbol := varName asSymbol. |
|
130 |
|
131 "First look in classVar dictionary." |
|
132 binding := self classPool bindingOf: aSymbol. |
|
133 binding notNil ifTrue:[^binding]. |
|
134 |
|
135 "Next look in shared pools." |
|
136 self sharedPools do:[:pool | |
|
137 binding := pool bindingOf: aSymbol. |
|
138 binding notNil ifTrue:[^binding]. |
|
139 ]. |
|
140 |
|
141 "subclassing and environment are not preserved" |
|
142 ^nil |
|
143 |
|
144 "Modified: / 12-09-2011 / 09:40:36 / cg" |
|
145 ! |
|
146 |
|
147 bindingsDo: aBlock |
|
148 self classVarNames do:[:eachKey | |
|
149 aBlock value:(eachKey -> (self classVarAt:eachKey)) |
|
150 ]. |
|
151 |
|
152 "Modified: / 12-09-2011 / 09:42:00 / cg" |
|
153 ! |
|
154 |
|
155 classBindingOf: varName |
157 classBindingOf: varName |
156 "For initialization messages grant the regular scope" |
158 "For initialization messages grant the regular scope" |
157 |
159 |
158 self shouldImplement. "not yet finished" |
160 self shouldImplement. "not yet finished" |
159 ^ super bindingOf: varName |
161 ^ super bindingOf: varName |