[squeak-dev] The Inbox: Compiler-ct.421.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Mar 21 19:36:04 UTC 2020


Christoph Thiede uploaded a new version of Compiler to project The Inbox:
http://source.squeak.org/inbox/Compiler-ct.421.mcz

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

Name: Compiler-ct.421
Author: ct
Time: 21 March 2020, 8:36:02.08156 pm
UUID: ac4b620a-f7b1-e742-91bd-6150aedc8c40
Ancestors: Compiler-nice.420

Recategorize compiler exceptions

In particular, this fixes a very interesting method stamp of ParserNotification >> #setName: :D

=============== Diff against Compiler-nice.420 ===============

Item was changed:
+ ----- Method: AmbiguousSelector>>setName:range: (in category 'initialization') -----
- ----- Method: AmbiguousSelector>>setName:range: (in category 'private') -----
  setName: aString range: anInterval 
  	name := aString.
  	interval := anInterval!

Item was changed:
+ ----- Method: OutOfScopeNotification>>defaultAction (in category 'handling') -----
- ----- Method: OutOfScopeNotification>>defaultAction (in category 'as yet unclassified') -----
  defaultAction
  
  	self resume: false!

Item was changed:
+ ----- Method: ParserNotification class>>name: (in category 'instance creation') -----
- ----- Method: ParserNotification class>>name: (in category 'as yet unclassified') -----
  name: aString
  	^ (self new setName: aString) signal!

Item was changed:
+ ----- Method: ParserNotification>>setName: (in category 'initialization') -----
- ----- Method: ParserNotification>>setName: (in category 'private') -----
  setName: aString
  	name := aString!

Item was changed:
+ ----- Method: SyntaxErrorNotification class>>inClass:withCode:doitFlag:errorMessage:location: (in category 'instance creation') -----
- ----- Method: SyntaxErrorNotification class>>inClass:withCode:doitFlag:errorMessage:location: (in category 'exceptionInstantiator') -----
  inClass: aClass withCode: codeString doitFlag: doitFlag errorMessage: errorString location: location
  	^self new
  		setClass: aClass
  		code: codeString
  		doitFlag: doitFlag
  		errorMessage: errorString
  		location: location!

Item was changed:
+ ----- Method: UndeclaredVariable>>openMenuIn: (in category 'handling') -----
- ----- Method: UndeclaredVariable>>openMenuIn: (in category 'as yet unclassified') -----
  openMenuIn: aBlock 
  	| alternatives labels actions lines caption choice |
  	alternatives := parser possibleVariablesFor: name.
  	labels := OrderedCollection new.
  	actions := OrderedCollection new.
  	lines := OrderedCollection new.
  	name first isLowercase 
  		ifTrue: 
  			[labels add: 'declare method temp'.
  			actions add: [parser declareTemp: name at: #method].
  			labels add: 'declare block-local temp'.
  			actions add: [parser declareTemp: name at: #block].
  			parser canDeclareInstanceVariable 
  				ifTrue: 
  					[labels add: 'declare instance'.
  					actions add: [parser declareInstVar: name]]]
  		ifFalse: 
  			[labels add: 'define new class'.
  			actions add: [parser defineClass: name].
  			labels add: 'declare global'.
  			actions add: [parser declareGlobal: name].
  			parser canDeclareClassVariable 
  				ifTrue: 
  					[labels add: 'declare class variable'.
  					actions add: [parser declareClassVar: name]]].
  	lines add: labels size.
  	alternatives do: 
  		[:each | 
  		labels add: each.
  		actions add: [parser substituteVariable: each atInterval: interval]].
  	lines add: labels size.
  	labels add: 'cancel'.
  	caption := 'Unknown variable: ' , name , ' please correct, or cancel:'.
  	choice := aBlock value: labels value: lines value: caption.
  	self resume: (actions at: choice ifAbsent: [nil])!

Item was changed:
+ ----- Method: UndeclaredVariable>>setParser:name:range: (in category 'initialization') -----
- ----- Method: UndeclaredVariable>>setParser:name:range: (in category 'as yet unclassified') -----
  setParser: aParser name: aString range: anInterval 
  	parser := aParser.
  	name := aString.
  	interval := anInterval!

Item was changed:
+ ----- Method: UndefinedVariable>>openMenuIn: (in category 'handling') -----
- ----- Method: UndefinedVariable>>openMenuIn: (in category 'as yet unclassified') -----
  openMenuIn: aBlock
  
  	^ self resume: (UIManager default
  		confirm: name asText allBold, ' appears to be undefined at this point.\Proceed anyway?' withCRs
  		title: 'Undefined Variable').!

Item was changed:
+ ----- Method: UnknownSelector>>openMenuIn: (in category 'handling') -----
- ----- Method: UnknownSelector>>openMenuIn: (in category 'as yet unclassified') -----
  openMenuIn: aBlock
  	| alternatives labels lines caption choice |
  	alternatives := Symbol possibleSelectorsFor: name.
  	labels := Array streamContents:
  				[:s | s nextPut: name; nextPutAll: alternatives].
  	lines := {1. alternatives size + 1}.
  	caption := 'Unknown selector, please\confirm, correct, or cancel' withCRs.
  	
  	choice := aBlock value: labels value: lines value: caption.
  	
  	choice = 0 ifTrue: [^ self resume: nil].
  	choice = 1 ifTrue: [^ self resume: name asSymbol].
  	self resume: (alternatives at: choice - 1)!

Item was changed:
+ ----- Method: UnusedVariable>>openMenuIn: (in category 'handling') -----
- ----- Method: UnusedVariable>>openMenuIn: (in category 'as yet unclassified') -----
  openMenuIn: aBlock
  	
  	self resume: (UIManager default
  		confirm: name asText allBold, ' appears to be unused in this method.\Remove it from the code?' withCRs
  		title: 'Unused Variable').!



More information about the Squeak-dev mailing list