[Pkg] SystemEditor: SystemEditor-Squeak-mtf.158.mcz

squeak-dev-noreply at lists.squeakfoundation.org squeak-dev-noreply at lists.squeakfoundation.org
Tue Nov 18 19:13:50 UTC 2008


A new version of SystemEditor-Squeak was added to project SystemEditor:
http://www.squeaksource.com/SystemEditor/SystemEditor-Squeak-mtf.158.mcz

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

Name: SystemEditor-Squeak-mtf.158
Author: mtf
Time: 18 November 2008, 12:13:32 pm
UUID: 45181e22-2f02-4a80-a7da-f8c64b48d949
Ancestors: SystemEditor-Squeak-mtf.157

- oops. Forgot to add the compilerClass ivar.
- slight simplification of  ensuredCompilerClass

=============== Diff against SystemEditor-Squeak-mtf.157 ===============

Item was added:
+ ----- Method: PureBehaviorEditor>>edUltimateMethodAt: (in category 'editing') -----
+ edUltimateMethodAt: aSelector
+ 	^ self edUltimateMethodAt: aSelector ifAbsent: [self error: 'Method not found']!

Item was changed:
  ClassDescriptionEditor subclass: #ClassEditor
+ 	instanceVariableNames: 'name classVarNames sharedPools category compilerClass'
- 	instanceVariableNames: 'name classVarNames sharedPools category'
  	classVariableNames: ''
  	poolDictionaries: ''
  	category: 'SystemEditor-Squeak'!

Item was changed:
  ----- Method: ClassEditor>>ensuredCompilerClass (in category 'accessing') -----
  ensuredCompilerClass
  "Answer my  product's compilerClass, building it if necessary"
  
  	| methodEditor method |
  	compilerClass ifNotNil: [^ compilerClass].
  
  	"Normal case: the compiler is already in the system. Check to see if I have a newer version"
  	self product compilerClass ifNotNil: [
  		compilerClass := self system classOrEditorFor: self product compilerClass.
  		compilerClass edIsEditor ifTrue: [compilerClass := compilerClass product].
  		^ compilerClass].
  
  	"If we get here, this package is presumably using a compiler that does not yet exist in the system. 
  	Evil evil hackery. Get the method editor, compile it in the context of the system editor,
  	and run it to find the editor for the new compiler"
+ 	methodEditor := self class edUltimateMethodAt: #compilerClass.
- 	methodEditor := self class edUltimateMethodAt: #compilerClass ifAbsent: [^ self subject
- 		ifNil: [Compiler]
- 		ifNotNil: [self subject compilerClass]].
  	method := methodEditor compileForClass: self using: Compiler new.
  	compilerClass := (self new executeMethod: method) product.
  	compilerClass ifNil: [self error: 'Unknown compiler'].
  	^ compilerClass!



More information about the Packages mailing list