equal
deleted
inserted
replaced
27 |
27 |
28 BrowserView comment:' |
28 BrowserView comment:' |
29 COPYRIGHT (c) 1989 by Claus Gittinger |
29 COPYRIGHT (c) 1989 by Claus Gittinger |
30 All Rights Reserved |
30 All Rights Reserved |
31 |
31 |
32 $Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.16 1995-08-15 21:25:46 claus Exp $ |
32 $Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.17 1995-08-19 02:49:43 claus Exp $ |
33 '! |
33 '! |
34 |
34 |
35 !BrowserView class methodsFor:'documentation'! |
35 !BrowserView class methodsFor:'documentation'! |
36 |
36 |
37 copyright |
37 copyright |
48 " |
48 " |
49 ! |
49 ! |
50 |
50 |
51 version |
51 version |
52 " |
52 " |
53 $Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.16 1995-08-15 21:25:46 claus Exp $ |
53 $Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.17 1995-08-19 02:49:43 claus Exp $ |
54 " |
54 " |
55 ! |
55 ! |
56 |
56 |
57 documentation |
57 documentation |
58 " |
58 " |
3847 methodListView flash. |
3847 methodListView flash. |
3848 ^ nil |
3848 ^ nil |
3849 ]. |
3849 ]. |
3850 labels := #( |
3850 labels := #( |
3851 'inspect method' |
3851 'inspect method' |
3852 'decompile ' |
3852 'compile to machine code' |
|
3853 'decompile' |
3853 '-' |
3854 '-' |
3854 'make private' |
3855 'make private' |
3855 'make protected' |
3856 'make protected' |
3856 'make public' |
3857 'make public' |
3857 ). |
3858 ). |
3858 selectors := #( |
3859 selectors := #( |
3859 methodInspect |
3860 methodInspect |
|
3861 methodSTCCompile |
3860 methodDecompile |
3862 methodDecompile |
3861 nil |
3863 nil |
3862 methodMakePrivate |
3864 methodMakePrivate |
3863 methodMakeProtected |
3865 methodMakeProtected |
3864 methodMakePublic |
3866 methodMakePublic |
4061 ]. |
4063 ]. |
4062 currentMethod isPublic ifTrue:[ |
4064 currentMethod isPublic ifTrue:[ |
4063 m disable:#methodMakePublic |
4065 m disable:#methodMakePublic |
4064 ]. |
4066 ]. |
4065 ]. |
4067 ]. |
|
4068 currentMethod notNil ifTrue:[ |
|
4069 (currentMethod code notNil |
|
4070 or:[Compiler canCreateMachineCode not]) ifTrue:[ |
|
4071 m disable:#methodSTCCompile |
|
4072 ]. |
|
4073 currentMethod byteCode isNil ifTrue:[ |
|
4074 m disable:#methodDecompile |
|
4075 ]. |
|
4076 ]. |
4066 ^ m |
4077 ^ m |
4067 ! |
4078 ! |
4068 |
4079 |
4069 methodRemove |
4080 methodRemove |
4070 "remove the current method" |
4081 "remove the current method" |
4389 self checkMethodSelected ifFalse:[^ self]. |
4400 self checkMethodSelected ifFalse:[^ self]. |
4390 |
4401 |
4391 currentMethod inspect. |
4402 currentMethod inspect. |
4392 ! |
4403 ! |
4393 |
4404 |
|
4405 methodSTCCompile |
|
4406 "compile the current method to machine code. |
|
4407 This is not supported on all machines, and never supported in |
|
4408 the demo version." |
|
4409 |
|
4410 |prev| |
|
4411 |
|
4412 self checkMethodSelected ifFalse:[^ self]. |
|
4413 prev := Compiler stcCompilation:#always. |
|
4414 [ |
|
4415 codeView accept. |
|
4416 ] valueNowOrOnUnwindDo:[ |
|
4417 Compiler stcCompilation:prev |
|
4418 ]. |
|
4419 ! |
|
4420 |
4394 methodDecompile |
4421 methodDecompile |
4395 "decompile the current methods bytecodes. |
4422 "decompile the current methods bytecodes. |
4396 The Decompiler is delivered as an extra, and not normally |
4423 The Decompiler is delivered as an extra, and not normally |
4397 avaliable with the system." |
4424 avaliable with the system." |
4398 |
4425 |
4403 ] do:[ |
4430 ] do:[ |
4404 Decompiler autoload. |
4431 Decompiler autoload. |
4405 ]. |
4432 ]. |
4406 ]. |
4433 ]. |
4407 Decompiler isLoaded ifFalse:[ |
4434 Decompiler isLoaded ifFalse:[ |
4408 Smalltalk fileIn:'/phys/clam/claus/work/libcomp/not_delivered/Decomp.st'. |
4435 Smalltalk |
|
4436 fileIn:'/phys/clam/claus/work/libcomp/not_delivered/Decomp.st' |
|
4437 logged:false. |
4409 ]. |
4438 ]. |
4410 Decompiler isLoaded ifFalse:[ |
4439 Decompiler isLoaded ifFalse:[ |
4411 ^ self warn:'No decompiler available'. |
4440 ^ self warn:'No decompiler available'. |
4412 ]. |
4441 ]. |
4413 |
4442 |