64 self cleanGeneratedMethods. |
72 self cleanGeneratedMethods. |
65 ] |
73 ] |
66 ! |
74 ! |
67 |
75 |
68 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 |
69 ((Smalltalk respondsTo:#isSmalltalkX) and:[ Smalltalk isSmalltalkX ]) ifTrue:[ |
87 ((Smalltalk respondsTo:#isSmalltalkX) and:[ Smalltalk isSmalltalkX ]) ifTrue:[ |
70 compiledClass methodsDo: [ :mthd | |
88 compiledClass methodsDo: [ :mthd | |
71 (mthd category beginsWith: 'generated') ifTrue:[ |
89 (mthd category beginsWith: 'generated') ifTrue:[ |
72 compiledClass removeSelector: mthd selector. |
90 compiledClass removeSelector: mthd selector. |
73 ] |
91 ] |
74 ] |
92 ] |
75 ] 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 :(" |
76 (compiledClass allProtocolsUpTo: compiledClass) do: [ :protocol | |
101 (compiledClass allProtocolsUpTo: compiledClass) do: [ :protocol | |
77 (protocol beginsWith: 'generated') ifTrue: [ |
102 (protocol beginsWith: 'generated') ifTrue: [ |
78 compiledClass removeProtocol: protocol. |
103 compiledClass removeProtocol: protocol. |
79 ] |
104 ] |
80 ] |
105 ] |
81 ] |
106 ] |
82 ! ! |
107 ! ! |
83 |
108 |
84 !PPCClassBuilder methodsFor:'compiling'! |
109 !PPCClassBuilder methodsFor:'compiling'! |