David T. Lewis uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-jr.1061.mcz ==================== Summary ==================== Name: Kernel-jr.1061 Author: jr Time: 28 February 2017, 12:28:50.653081 am UUID: acd952fb-8e90-e940-8d2e-6c1a9e3a7d3f Ancestors: Kernel-ul.1060 increase environment awareness for behaviors =============== Diff against Kernel-ul.1060 =============== Item was added: + ----- Method: Behavior>>compile:environment:notifying:trailer:ifFail: (in category 'compiling') ----- + compile: code environment: anEnvironment notifying: requestor trailer: bytes ifFail: failBlock + "Compile code in another Environment without logging the source in the changes file" + + | methodNode | + methodNode := self newCompiler + compile: code + in: self + environment: anEnvironment + notifying: requestor + ifFail: failBlock. + ^ CompiledMethodWithNode generateMethodFromNode: methodNode trailer: bytes.! Item was changed: ----- Method: Class>>category: (in category 'organization') ----- category: aString "Categorize the receiver under the system category, aString, removing it from any previous categorization." | oldCategory | oldCategory := category. aString isString ifTrue: [ category := aString asSymbol. + self environment organization classify: self name under: category ] - SystemOrganization classify: self name under: category ] ifFalse: [self errorCategoryName]! Item was changed: ----- Method: ClassDescription>>definition (in category 'fileIn/Out') ----- definition "Answer a String that defines the receiver." | aStream path | aStream := WriteStream on: (String new: 300). superclass == nil ifTrue: [aStream nextPutAll: 'ProtoObject'] ifFalse: [path := ''. self environment scopeFor: superclass name from: nil envtAndPathIfFound: [:envt :remotePath | path := remotePath]. aStream nextPutAll: path , superclass name]. aStream nextPutAll: self kindOfSubclass; store: self name. (self hasTraitComposition and: [self traitComposition notEmpty]) ifTrue: [ aStream cr; tab; nextPutAll: 'uses: '; nextPutAll: self traitCompositionString]. aStream cr; tab; nextPutAll: 'instanceVariableNames: '; store: self instanceVariablesString. aStream cr; tab; nextPutAll: 'classVariableNames: '; store: self classVariablesString. aStream cr; tab; nextPutAll: 'poolDictionaries: '; store: self sharedPoolsString. aStream cr; tab; nextPutAll: 'category: '; + store: (self environment organization categoryOfElement: self name) asString. - store: (SystemOrganization categoryOfElement: self name) asString. superclass ifNil: [ aStream nextPutAll: '.'; cr. aStream nextPutAll: self name. aStream space; nextPutAll: 'superclass: nil'. ]. ^ aStream contents! Item was changed: ----- Method: Object class>>readFrom: (in category 'instance creation') ----- readFrom: textStringOrStream "Create an object based on the contents of textStringOrStream." | object | (Compiler couldEvaluate: textStringOrStream) ifFalse: [^ self error: 'expected String, Stream, or Text']. + object := self environment beCurrentDuring: [Compiler evaluate: textStringOrStream environment: self environment]. - object := Compiler evaluate: textStringOrStream. (object isKindOf: self) ifFalse: [self error: self name, ' expected']. ^object! |
Free forum by Nabble | Edit this page |