[Pkg] The Trunk: Compiler-eem.480.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Nov 23 03:10:30 UTC 2022


Eliot Miranda uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-eem.480.mcz

==================== Summary ====================

Name: Compiler-eem.480
Author: eem
Time: 22 November 2022, 7:10:27.324796 pm
UUID: 3e5ba19e-c44a-4390-9004-de1246736cbc
Ancestors: Compiler-eem.479

Do not warn of an uninitialized temporary if it is being sent ifNil: or ifNotNil:.

=============== Diff against Compiler-eem.479 ===============

Item was changed:
  ----- Method: Parser>>primaryExpression (in category 'expression types') -----
  primaryExpression 
  	hereType == #word 
  		ifTrue: 
  			[parseNode := self variable.
+ 			(parseNode isUndefTemp
+ 			 and: [(#('ifNil:' 'ifNotNil:') includes: here) not
+ 			 and: [self interactive]])
+ 				ifTrue:
+ 					[self queryUndefined].
- 			(parseNode isUndefTemp and: [self interactive])
- 				ifTrue: [self queryUndefined].
  			parseNode nowHasRef.
  			^ true].
  	hereType == #leftBracket
  		ifTrue: 
  			[self advance.
  			self blockExpression.
  			^true].
  	hereType == #leftBrace
  		ifTrue: 
  			[self braceExpression.
  			^true].
  	hereType == #leftParenthesis
  		ifTrue: 
  			[self advance.
  			self expression ifFalse: [^self expected: 'expression'].
  			(self match: #rightParenthesis)
  				ifFalse: [^self expected: 'right parenthesis'].
  			^true].
  	(hereType == #string or: [hereType == #number or: [hereType == #literal or: [hereType == #character]]])
  		ifTrue: 
  			[parseNode := encoder encodeLiteral: self advance.
  			^true].
  	(here == #- and: [tokenType == #number and: [1 + hereEnd = mark]])
  		ifTrue: 
  			[self advance.
  			parseNode := encoder encodeLiteral: self advance negated.
  			^true].
  	^false!



More information about the Packages mailing list