--- a/BCompiler.st Fri Aug 05 05:37:32 1994 +0200
+++ b/BCompiler.st Thu Aug 11 23:40:11 1994 +0200
@@ -24,6 +24,8 @@
ByteCodeCompiler comment:'
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
+
+$Header: /cvs/stx/stx/libcomp/Attic/BCompiler.st,v 1.12 1994-08-11 21:40:11 claus Exp $
'!
!ByteCodeCompiler class methodsFor:'documentation'!
@@ -44,7 +46,7 @@
version
"
-$Header: /cvs/stx/stx/libcomp/Attic/BCompiler.st,v 1.11 1994-06-02 20:25:49 claus Exp $
+$Header: /cvs/stx/stx/libcomp/Attic/BCompiler.st,v 1.12 1994-08-11 21:40:11 claus Exp $
"
!
@@ -203,10 +205,12 @@
oldMethod := aClass compiledMethodAt:(compiler selector).
oldMethod notNil ifTrue:[
oldMethod source = aString ifTrue:[
- (silent or:[Smalltalk silentLoading == true]) ifFalse:[
- Transcript showCr:('unchanged: ',aClass name,' ',compiler selector)
- ].
- ^ oldMethod
+ oldMethod isInvalid ifFalse:[
+ (silent or:[Smalltalk silentLoading == true]) ifFalse:[
+ Transcript showCr:('unchanged: ',aClass name,' ',compiler selector)
+ ].
+ ^ oldMethod
+ ]
]
]
].
@@ -306,6 +310,12 @@
"only some exported codes handled here (for BlockNode)"
(aSymbol == #blockRetTop) ifTrue:[^ 6].
+ (aSymbol == #retNil) ifTrue:[^ 1].
+ (aSymbol == #retTrue) ifTrue:[^ 2].
+ (aSymbol == #retFalse) ifTrue:[^ 3].
+ (aSymbol == #ret0) ifTrue:[^ 4].
+ (aSymbol == #retTop) ifTrue:[^ 0].
+
(aSymbol == #push0) ifTrue:[^120].
(aSymbol == #push1) ifTrue:[^121].
(aSymbol == #push2) ifTrue:[^139].
@@ -426,11 +436,19 @@
] ifFalse:[
(extra == #lit) ifTrue:[
index := self addLiteral:(symbolicCodeArray at:symIndex).
+ index > 255 ifTrue:[
+ self parseError:'too many literals in method - please simplify'.
+ ^ #Error
+ ].
symIndex := symIndex + 1.
self appendByte:index
] ifFalse:[
(extra == #speciallit) ifTrue:[
index := self addLiteral:(symbolicCodeArray at:symIndex).
+ index > 255 ifTrue:[
+ self parseError:'too many literals in method - please simplify'.
+ ^ #Error
+ ].
symIndex := symIndex + 1.
self appendByte:index.
self appendByte:0. "space for inline-generation"
@@ -871,6 +889,7 @@
(aSymbol == #retFalse) ifTrue:[^ 3].
(aSymbol == #ret0) ifTrue:[^ 4].
(aSymbol == #retNum) ifTrue:[extra := #number. ^ 127].
+ (aSymbol == #homeRetTop) ifTrue:[^ 7].
(aSymbol == #pushChar) ifTrue:[stackDelta := 1. ^17].
(aSymbol == #push0) ifTrue:[stackDelta := 1. ^120].