3746 newStream := 'src.tmp' asFilename writeStream. |
3746 newStream := 'src.tmp' asFilename writeStream. |
3747 |
3747 |
3748 table := IdentityDictionary new:100. |
3748 table := IdentityDictionary new:100. |
3749 |
3749 |
3750 Method allSubInstancesDo:[:aMethod | |
3750 Method allSubInstancesDo:[:aMethod | |
3751 source := nil. |
3751 source := nil. |
3752 aMethod sourcePosition notNil ifTrue:[ |
3752 aMethod sourcePosition notNil ifTrue:[ |
3753 aMethod sourceFilename = 'st.src' ifTrue:[ |
3753 aMethod sourceFilename = 'st.src' ifTrue:[ |
3754 source := aMethod source. |
3754 source := aMethod source. |
3755 ] |
3755 ] |
3756 ] ifFalse:[ |
3756 ] ifFalse:[ |
3757 source := aMethod source |
3757 source := aMethod source |
3758 ]. |
3758 ]. |
3759 |
3759 |
3760 source notNil ifTrue:[ |
3760 source notNil ifTrue:[ |
3761 pos := newStream position1Based. |
3761 pos := newStream position1Based. |
3762 newStream nextChunkPut:source. |
3762 newStream nextChunkPut:source. |
3763 |
3763 |
3764 " |
3764 " |
3765 dont change the methods info - maybe some write error |
3765 dont change the methods info - maybe some write error |
3766 occurs later, in that case we abort and leave everything |
3766 occurs later, in that case we abort and leave everything |
3767 untouched. |
3767 untouched. |
3768 " |
3768 " |
3769 table at:aMethod put:pos |
3769 table at:aMethod put:pos |
3770 ] |
3770 ] |
3771 ]. |
3771 ]. |
3772 |
3772 |
3773 newStream close. |
3773 newStream syncData; close. |
3774 |
3774 |
3775 " |
3775 " |
3776 now, rename the new source file, |
3776 now, rename the new source file, |
3777 " |
3777 " |
3778 fileName := (ObjectMemory nameForSources). |
3778 fileName := (ObjectMemory nameForSources). |
3808 newStream := 'src.tmp' asFilename writeStream. |
3808 newStream := 'src.tmp' asFilename writeStream. |
3809 |
3809 |
3810 table := IdentityDictionary new:100. |
3810 table := IdentityDictionary new:100. |
3811 |
3811 |
3812 Method allSubInstancesDo:[:aMethod | |
3812 Method allSubInstancesDo:[:aMethod | |
3813 source := aMethod source. |
3813 source := aMethod source. |
3814 source notNil ifTrue:[ |
3814 source notNil ifTrue:[ |
3815 pos := newStream position1Based. |
3815 pos := newStream position1Based. |
3816 newStream nextChunkPut:source. |
3816 newStream nextChunkPut:source. |
3817 |
3817 |
3818 " |
3818 " |
3819 dont change the methods info - maybe some write error |
3819 dont change the methods info - maybe some write error |
3820 occurs later, in that case we abort and leave everything |
3820 occurs later, in that case we abort and leave everything |
3821 untouched. |
3821 untouched. |
3822 " |
3822 " |
3823 table at:aMethod put:pos |
3823 table at:aMethod put:pos |
3824 ] |
3824 ] |
3825 ]. |
3825 ]. |
3826 |
3826 |
3827 newStream close. |
3827 newStream syncData; close. |
3828 |
3828 |
3829 " |
3829 " |
3830 now, rename the new source file, |
3830 now, rename the new source file, |
3831 " |
3831 " |
3832 fileName := (ObjectMemory nameForSources). |
3832 fileName := (ObjectMemory nameForSources). |