4626 methodDecompile |
4626 methodDecompile |
4627 "decompile the current methods bytecodes. |
4627 "decompile the current methods bytecodes. |
4628 The Decompiler is delivered as an extra, and not normally |
4628 The Decompiler is delivered as an extra, and not normally |
4629 avaliable with the system." |
4629 avaliable with the system." |
4630 |
4630 |
|
4631 |s| |
|
4632 |
4631 self checkMethodSelected ifFalse:[^ self]. |
4633 self checkMethodSelected ifFalse:[^ self]. |
4632 Decompiler notNil ifTrue:[ |
4634 self checkSelectionChangeAllowed ifFalse:[^ self]. |
4633 Autoload autoloadFailedSignal handle:[:ex | |
4635 |
4634 ex return |
4636 s := '' writeStream. |
4635 ] do:[ |
4637 (currentMethod decompileTo:s) ifFalse:[ |
4636 Decompiler autoload. |
4638 self warn:'No decompiler available'. |
4637 ]. |
4639 ]. |
4638 ]. |
4640 codeView contents:s contents. |
4639 Decompiler isLoaded ifFalse:[ |
4641 codeView modified:false. |
4640 Smalltalk |
4642 codeView acceptAction:nil. |
4641 fileIn:'/phys/clam/claus/work/libcomp/not_delivered/Decomp.st' |
4643 codeView explainAction:nil. |
4642 logged:false. |
4644 |
4643 ]. |
4645 "Modified: 16.4.1996 / 20:35:05 / cg" |
4644 Decompiler isLoaded ifFalse:[ |
|
4645 ^ self warn:'No decompiler available'. |
|
4646 ]. |
|
4647 |
|
4648 Decompiler decompile:currentMethod. |
|
4649 ! |
4646 ! |
4650 |
4647 |
4651 methodFileOut |
4648 methodFileOut |
4652 "file out the current method" |
4649 "file out the current method" |
4653 |
4650 |