Spaces:
Running
Running
File size: 957 Bytes
8f3f8db |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
inlining
doBasicInlining: inlineFlag
"Inline the bodies of all methods that are suitable for inlining.
This method does only the basic inlining suitable for both the core VM and plugins - no bytecode inlining etc"
| pass progress max |
inlineFlag ifFalse: [^self].
self collectInlineList.
pass := 0.
max := 12. "More than this is probably due to infinite recursion"
progress := true.
[progress] whileTrue: [
"repeatedly attempt to inline methods until no further progress is made"
progress := false.
pass > max
ifTrue: [self notify: 'too many inlining steps, inlining terminated']
ifFalse: [('Inlining pass ', (pass := pass + 1) printString, '...')
displayProgressAt: Sensor cursorPoint
from: 0 to: methods size
during: [:bar |
(self sortMethods: methods) doWithIndex: [:m :i |
bar value: i.
currentMethod := m.
(m tryToInlineMethodsIn: self)
ifTrue: [progress := true]]]]].
|