--- a/Method.st Thu Mar 07 19:32:41 1996 +0100
+++ b/Method.st Thu Mar 07 19:34:33 1996 +0100
@@ -949,21 +949,21 @@
|temporaryMethod cls sourceString silent lazy|
byteCode notNil ifTrue:[
- "
- is already a bytecoded method
- "
- ^ self
+ "
+ is already a bytecoded method
+ "
+ ^ self
].
cls := self containingClass.
cls isNil ifTrue:[
- 'cannot generate bytecode (no class for compilation)' errorPrintNL.
- ^ nil
+ 'METHOD: cannot generate bytecode (no class for compilation)' errorPrintNL.
+ ^ nil
].
sourceString := self source.
sourceString isNil ifTrue:[
- 'cannot generate bytecode (no source for compilation)' errorPrintNL.
- ^ nil
+ 'METHOD: cannot generate bytecode (no source for compilation)' errorPrintNL.
+ ^ nil
].
"
@@ -972,41 +972,41 @@
dont want a lazy method ...
"
Class withoutUpdatingChangesDo:[
- silent := Smalltalk silentLoading:true.
- lazy := Compiler compileLazy:false.
+ silent := Smalltalk silentLoading:true.
+ lazy := Compiler compileLazy:false.
- [
- |compiler|
+ [
+ |compiler|
- compiler := cls compilerClass.
+ compiler := cls compilerClass.
- "/
- "/ kludge - have to make ST/X's compiler protocol
- "/ be compatible to ST-80's
- "/
- (compiler respondsTo:#compile:forClass:inCategory:notifying:install:skipIfSame:)
- ifTrue:[
- temporaryMethod := compiler
- compile:sourceString
- forClass:cls
- inCategory:(self category)
- notifying:nil
- install:false.
- ] ifFalse:[
- temporaryMethod := compiler new
- compile:sourceString
- in:cls
- notifying:nil
- ifFail:nil
- ].
- ] valueNowOrOnUnwindDo:[
- Compiler compileLazy:lazy.
- Smalltalk silentLoading:silent.
- ]
+ "/
+ "/ kludge - have to make ST/X's compiler protocol
+ "/ be compatible to ST-80's
+ "/
+ (compiler respondsTo:#compile:forClass:inCategory:notifying:install:skipIfSame:)
+ ifTrue:[
+ temporaryMethod := compiler
+ compile:sourceString
+ forClass:cls
+ inCategory:(self category)
+ notifying:nil
+ install:false.
+ ] ifFalse:[
+ temporaryMethod := compiler new
+ compile:sourceString
+ in:cls
+ notifying:nil
+ ifFail:nil
+ ].
+ ] valueNowOrOnUnwindDo:[
+ Compiler compileLazy:lazy.
+ Smalltalk silentLoading:silent.
+ ]
].
(temporaryMethod isNil or:[temporaryMethod == #Error]) ifTrue:[
- 'cannot generate bytecode (contains primitive code or error)' errorPrintNL.
- ^ nil.
+ 'METHOD: cannot generate bytecode (contains primitive code or error)' errorPrintNL.
+ ^ nil.
].
"
try to save a bit of memory, by sharing the source (whatever it is)
@@ -1015,6 +1015,7 @@
^ temporaryMethod
"Created: 24.10.1995 / 14:02:30 / cg"
+ "Modified: 7.3.1996 / 19:19:12 / cg"
!
readBinaryContentsFrom: stream manager: manager
@@ -1984,6 +1985,6 @@
!Method class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.76 1996-02-28 23:25:21 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.77 1996-03-07 18:34:00 cg Exp $'
! !
Method initialize!