|
@@ -4,18 +4,18 @@ Object subclass: #MyScript
|
|
|
|
|
|
!MyScript class methodsFor: 'main'!
|
|
!MyScript class methodsFor: 'main'!
|
|
main
|
|
main
|
|
- | class compiler method |
|
|
|
|
|
|
+ | klass compiler method |
|
|
Object subclass: #Dummy instanceVariableNames: '' category: 'Dummy'.
|
|
Object subclass: #Dummy instanceVariableNames: '' category: 'Dummy'.
|
|
- class := smalltalk at: #Dummy.
|
|
|
|
|
|
+ klass := smalltalk at: #Dummy.
|
|
compiler := Compiler new.
|
|
compiler := Compiler new.
|
|
|
|
|
|
- method := compiler load: 'foo ^ 10' forClass: class.
|
|
|
|
|
|
+ method := compiler load: 'foo ^ 10' forClass: klass.
|
|
method category: 'foo'.
|
|
method category: 'foo'.
|
|
- class addCompiledMethod: method.
|
|
|
|
|
|
+ klass addCompiledMethod: method.
|
|
|
|
|
|
- method := compiler load: 'bar ^ self foo * 2' forClass: class.
|
|
|
|
|
|
+ method := compiler load: 'bar ^ self foo * 2' forClass: klass.
|
|
method category: 'foo'.
|
|
method category: 'foo'.
|
|
- class addCompiledMethod: method.
|
|
|
|
|
|
+ klass addCompiledMethod: method.
|
|
|
|
|
|
console log: (Exporter new exportCategory: 'Dummy')
|
|
console log: (Exporter new exportCategory: 'Dummy')
|
|
! !
|
|
! !
|