Migration Guide : Migrating from Version 6.0 : Subtle change to Compiler
Subtle change to Compiler
Due to a subtle change to the compiler (CodeStream>>#literalIndexFor:), some methods, when recompiled, may behave differently in VA Smalltalk than they did in earlier versions of VisualAge Smalltalk.
The original problem involved an error in the way the compiler determined whether 2 array literals were identical when the array literals contained one or more numeric values (see badArrayIdentity below as an example).
This problem was corrected in VisualAge Smalltalk V6.0.1, but some unforeseen side-effects were introduced as shown in the table below. These side-effects were eliminated in VisualAge Smalltalk V6.0.2.
While testing the changes for VisualAge Smalltalk V6.0.2, another (pre-existing) problem in this same code was discovered and fixed (see poolDictionaryModification below as an example).
 
badArrayIdentity
| a |
a := #(3.0).
^a == #(3) "Should answer false"
stringLiteralIdentity
| a |
a := 'hello'.
^a == 'hello' "Should answer true"
mixedArray
|a|
a := #('string' #symbol 3).
^a == #('string' #symbol 3) "Should answer true"
poolDictionaryModification
"Upon method compilation, both constants = 'y'"
"Upon entry to this method, TestPoolB::Value1 = 'y'"
TestPoolA::Value1 := 'x'.
^TestPoolB::Value1 "Should answer 'y'"
 
V6.0 and earlier
6.0.1
V6.0.2 and later
badArrayIdentity
true
false
false
stringLiteralIdentity
true
false
true
mixedArray
true
false
true
poolDictionaryModification
'x'
'x'
'y'
 
 
Last modified date: 05/13/2020