[squeak-dev] The Trunk: Compiler-eem.461.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Oct 21 19:00:14 UTC 2021
Eliot Miranda uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-eem.461.mcz
==================== Summary ====================
Name: Compiler-eem.461
Author: eem
Time: 21 October 2021, 12:00:12.295003 pm
UUID: f42bd9ed-6507-42c4-a99c-cd2d6f69bc5f
Ancestors: Compiler-eem.460
Make canBeSpecialLiteral: bytecode set specific.
=============== Diff against Compiler-eem.460 ===============
Item was changed:
----- Method: BytecodeEncoder class>>canBeSpecialLiteral: (in category 'testing') -----
canBeSpecialLiteral: aLiteral
"This check can be used to prevent unnecessary use of #scanBlockOrNilForLiteral:. For performance, this method summarizes specializations from all known bytecode encoders. It is not meant to be refined per bytecode encoder."
+
+ aLiteral isVariableBinding ifTrue: [^false]. "a common case; don't waste time analysing..."
aLiteral isSymbol ifTrue: [^ Smalltalk specialSelectors identityIncludes: aLiteral].
aLiteral isCharacter ifTrue: [^ aLiteral asInteger <= 65535].
aLiteral isInteger ifTrue: [^ aLiteral between: -32768 and: 32767].
aLiteral == true ifTrue: [^ true].
aLiteral == false ifTrue: [^ true].
aLiteral == nil ifTrue: [^ true].
^ false!
Item was added:
+ ----- Method: EncoderForSistaV1 class>>canBeSpecialLiteral: (in category 'testing') -----
+ canBeSpecialLiteral: aLiteral
+ "This check can be used to prevent unnecessary use of #scanBlockOrNilForLiteral:."
+
+ aLiteral isVariableBinding ifTrue: [^false]. "a common case; don't waste time analysing..."
+
+ aLiteral isSymbol ifTrue: [^ Smalltalk specialSelectors identityIncludes: aLiteral].
+ aLiteral isCharacter ifTrue: [^ aLiteral asInteger <= 65535].
+ aLiteral isInteger ifTrue: [^ aLiteral between: -32768 and: 32767].
+
+ aLiteral == true ifTrue: [^ true].
+ aLiteral == false ifTrue: [^ true].
+ aLiteral == nil ifTrue: [^ true].
+
+ ^ false!
Item was added:
+ ----- Method: EncoderForV3 class>>canBeSpecialLiteral: (in category 'testing') -----
+ canBeSpecialLiteral: aLiteral
+ "This check can be used to prevent unnecessary use of #scanBlockOrNilForLiteral:."
+
+ aLiteral isVariableBinding ifTrue: [^false]. "a common case; don't waste time analysing..."
+
+ aLiteral isSymbol ifTrue: [^ Smalltalk specialSelectors identityIncludes: aLiteral].
+ aLiteral isInteger ifTrue: [^ aLiteral between: -1 and: 2].
+
+ aLiteral == true ifTrue: [^ true].
+ aLiteral == false ifTrue: [^ true].
+ aLiteral == nil ifTrue: [^ true].
+
+ ^ false!
More information about the Squeak-dev
mailing list
|