Spaces:
Running
Running
File size: 435 Bytes
8f3f8db |
1 2 3 4 5 6 7 8 9 10 11 |
public
addClassVarsFor: aClass
"Add the class variables for the given class to the code base as constants."
| val node |
aClass classPool associationsDo: [:assoc |
val := assoc value.
(useSymbolicConstants and:[self isJSLiteral: val])
ifTrue:[node := TDefineNode new setName: assoc key asString value: assoc value]
ifFalse:[node := TConstantNode new setValue: assoc value].
constants at: assoc key asString put: node].
|