72 self cleanGeneratedMethods. |
72 self cleanGeneratedMethods. |
73 ] |
73 ] |
74 ! |
74 ! |
75 |
75 |
76 cleanGeneratedMethods |
76 cleanGeneratedMethods |
|
77 (compiledClass methodDictionary size == 0) ifTrue: [ ^ self ]. |
|
78 |
|
79 "this is hack, but might help the performance..." |
|
80 (compiledClass methods allSatisfy: [:m | m category beginsWith: 'generated']) ifTrue: [ |
|
81 compiledClass removeFromSystem. |
|
82 compiledClass := nil. |
|
83 ^ self |
|
84 ]. |
|
85 |
|
86 |
77 ((Smalltalk respondsTo:#isSmalltalkX) and:[ Smalltalk isSmalltalkX ]) ifTrue:[ |
87 ((Smalltalk respondsTo:#isSmalltalkX) and:[ Smalltalk isSmalltalkX ]) ifTrue:[ |
78 compiledClass methodsDo: [ :mthd | |
88 compiledClass methodsDo: [ :mthd | |
79 (mthd category beginsWith: 'generated') ifTrue:[ |
89 (mthd category beginsWith: 'generated') ifTrue:[ |
80 compiledClass removeSelector: mthd selector. |
90 compiledClass removeSelector: mthd selector. |
81 ] |
91 ] |
82 ] |
92 ] |
83 ] ifFalse: [ |
93 ] ifFalse: [ |
|
94 " compiledClass methodsDo: [ :mthd | |
|
95 (mthd category beginsWith: 'generated') ifTrue:[ |
|
96 compiledClass removeSelector: mthd selector. |
|
97 ] |
|
98 ] |
|
99 " |
|
100 " Too slow, but more stable :(" |
84 (compiledClass allProtocolsUpTo: compiledClass) do: [ :protocol | |
101 (compiledClass allProtocolsUpTo: compiledClass) do: [ :protocol | |
85 (protocol beginsWith: 'generated') ifTrue: [ |
102 (protocol beginsWith: 'generated') ifTrue: [ |
86 compiledClass removeProtocol: protocol. |
103 compiledClass removeProtocol: protocol. |
87 ] |
104 ] |
88 ] |
105 ] |
89 ] |
106 ] |
90 ! ! |
107 ! ! |
91 |
108 |
92 !PPCClassBuilder methodsFor:'compiling'! |
109 !PPCClassBuilder methodsFor:'compiling'! |