Eliot Miranda uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-eem.836.mcz
==================== Summary ====================
Name: System-eem.836
Author: eem
Time: 7 July 2016, 11:51:22.921345 am
UUID: b27dc440-8cbb-43a4-ac99-8db510ef9b1e
Ancestors: System-eem.835
Modify string search in methods to search symbols that are not used as message selectors.
=============== Diff against System-eem.835 ===============
Item was changed:
----- Method: SystemNavigation>>browseMethodsWithString:matchCase: (in category 'browse') -----
browseMethodsWithString: aString matchCase: caseSensitive
"Launch a browser on all methods that contain string literals with aString as a substring. Make the search case-sensitive or insensitive as dictated by the caseSensitive boolean parameter"
self browseAllSelect:
[:method |
+ method hasLiteralSuchThat:
+ [:lit |
+ lit isString
+ and: [(lit includesSubstring: aString caseSensitive: caseSensitive)
+ and: [lit isSymbol
+ ifTrue: [(method messages includes: lit) not]
+ ifFalse: [true]]]]]
- method hasLiteralSuchThat: [:lit |
- (lit isString and: [lit isSymbol not]) and:
- [lit includesSubstring: aString caseSensitive: caseSensitive]]]
name: 'Methods with string ', aString printString, (caseSensitive ifTrue: [' (case-sensitive)'] ifFalse: [' (case-insensitive)'])
+ autoSelect: aString!
- autoSelect: aString.
- !
Eliot Miranda uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-eem.1189.mcz
==================== Summary ====================
Name: Morphic-eem.1189
Author: eem
Time: 7 July 2016, 11:39:54.334537 am
UUID: 0aaf4adb-3407-4afb-b0c5-d8275daaa0db
Ancestors: Morphic-cmm.1188
Tiny cleanup.
=============== Diff against Morphic-cmm.1188 ===============
Item was changed:
----- Method: MorphicProject>>exportSegmentWithChangeSet:fileName:directory: (in category 'file in/out') -----
exportSegmentWithChangeSet: aChangeSetOrNil fileName: aFileName
directory: aDirectory
"Store my project out on the disk as an *exported*
ImageSegment. All outPointers will be in a form that can be resolved
in the target image. Name it <project name>.extSeg. Whatdo we do
about subProjects, especially if they are out as local image
segments? Force them to come in?
Player classes are included automatically."
| is str ans revertSeg roots holder collector fd mgr stacks |
"Files out a changeSet first, so that a project can contain
its own classes"
+ world ifNil: [^ false].
+ world presenter ifNil: [^ false].
- world ifNil: [^ false]. world presenter ifNil: [^ false].
ScrapBook default emptyScrapBook.
world currentHand pasteBuffer: nil. "don't write the paste buffer."
world currentHand mouseOverHandler initialize. "forget about any
references here"
"Display checkCurrentHandForObjectToPaste."
Command initialize.
world clearCommandHistory.
world fullReleaseCachedState; releaseViewers.
world cleanseStepList.
world localFlapTabs size = world flapTabs size ifFalse: [
self error: 'Still holding onto Global flaps'].
world releaseSqueakPages.
holder := Project allProjects. "force them in to outPointers, where
DiskProxys are made"
"Just export me, not my previous version"
revertSeg := self parameterAt: #revertToMe.
self removeParameter: #revertToMe.
roots := OrderedCollection new.
+ roots add: self; add: world; add: transcript; add: aChangeSetOrNil; add: thumbnail; add: world activeHand.
- roots add: self; add: world; add: transcript; add: changeSet; add: thumbnail.
- roots add: world activeHand.
"; addAll: classList; addAll: (classList collect: [:cls | cls class])"
roots := roots reject: [ :x | x isNil]. "early saves may not have
active hand or thumbnail"
+ fd := aDirectory directoryNamed: self resourceDirectoryName.
+ fd assureExistence.
+ "Clean up resource references before writing out"
+ mgr := self resourceManager.
+ self resourceManager: nil.
+ ResourceCollector current: ResourceCollector new.
+ ResourceCollector current localDirectory: fd.
+ ResourceCollector current baseUrl: self resourceUrl.
+ ResourceCollector current initializeFrom: mgr.
+ ProgressNotification signal: '2:findingResources' extra:
+ '(collecting resources...)' translated.
+ "Must activate old world because this is run at #armsLength.
+ Otherwise references to ActiveWorld, ActiveHand, or ActiveEvent
+ will not be captured correctly if referenced from blocks or user code."
+ world becomeActiveDuring:[
+ is := ImageSegment new copySmartRootsExport: roots asArray.
+ "old way was (is := ImageSegment new
+ copyFromRootsForExport: roots asArray)"
+ ].
+ self resourceManager: mgr.
+ collector := ResourceCollector current.
+ ResourceCollector current: nil.
+ ProgressNotification signal: '2:foundResources' extra: ''.
+ is state = #tooBig ifTrue: [
+ collector replaceAll.
+ ^ false].
- fd := aDirectory directoryNamed: self resourceDirectoryName.
- fd assureExistence.
- "Clean up resource references before writing out"
- mgr := self resourceManager.
- self resourceManager: nil.
- ResourceCollector current: ResourceCollector new.
- ResourceCollector current localDirectory: fd.
- ResourceCollector current baseUrl: self resourceUrl.
- ResourceCollector current initializeFrom: mgr.
- ProgressNotification signal: '2:findingResources' extra:
- '(collecting resources...)' translated.
- "Must activate old world because this is run at #armsLength.
- Otherwise references to ActiveWorld, ActiveHand, or ActiveEvent
- will not be captured correctly if referenced from blocks or user code."
- world becomeActiveDuring:[
- is := ImageSegment new copySmartRootsExport: roots asArray.
- "old way was (is := ImageSegment new
- copyFromRootsForExport: roots asArray)"
- ].
- self resourceManager: mgr.
- collector := ResourceCollector current.
- ResourceCollector current: nil.
- ProgressNotification signal: '2:foundResources' extra: ''.
- is state = #tooBig ifTrue: [
- collector replaceAll.
- ^ false].
str := ''.
"considered legal to save a project that has never been entered"
(is outPointers includes: world) ifTrue: [
str := str, '\Project''s own world is not in the segment.' translated withCRs].
str isEmpty ifFalse: [
ans := UIManager default chooseFrom: {
'Do not write file' translated.
'Write file anyway' translated.
'Debug' translated.
} title: str.
ans = 1 ifTrue: [
revertSeg ifNotNil: [projectParameters at:
#revertToMe put: revertSeg].
collector replaceAll.
^ false].
ans = 3 ifTrue: [
collector replaceAll.
self halt: 'Segment not written' translated]].
stacks := is findStacks.
is
writeForExportWithSources: aFileName
inDirectory: fd
changeSet: aChangeSetOrNil.
SecurityManager default signFile: aFileName directory: fd.
"Compress all files and update check sums"
collector forgetObsolete.
self storeResourceList: collector in: fd.
self storeHtmlPageIn: fd.
self storeManifestFileIn: fd.
self writeStackText: stacks in: fd registerIn: collector.
"local proj.005.myStack.t"
self compressFilesIn: fd to: aFileName in: aDirectory
resources: collector.
"also deletes the resource directory"
"Now update everything that we know about"
mgr updateResourcesFrom: collector.
revertSeg ifNotNil: [projectParameters at: #revertToMe put: revertSeg].
holder.
collector replaceAll.
world flapTabs do: [:ft |
(ft respondsTo: #unhibernate) ifTrue: [ft unhibernate]].
is arrayOfRoots do: [:obj |
obj isScriptEditorMorph ifTrue: [obj unhibernate]].
^ true
!
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.1032.mcz
==================== Summary ====================
Name: Kernel-eem.1032
Author: eem
Time: 7 July 2016, 11:36:43.185017 am
UUID: 0e4a81f4-1688-419a-b951-f0bc7a0b33fd
Ancestors: Kernel-eem.1031
Faster method creation in CompiledMethodTrailer.
Provide CompiledMethod>>voidCogVMState with a fail-over to flushCache, for safe modification of methods.
Provide BlockClosure>>isNestedeWithin: for testing block nesting.
=============== Diff against Kernel-eem.1031 ===============
Item was added:
+ ----- Method: BlockClosure>>isNestedWithin: (in category 'testing') -----
+ isNestedWithin: aContextOrBlock
+ "Answer if the receiver is nested within aContextOrBlock, which may be ither a Context, or a BlockClosure."
+ aContextOrBlock ifNotNil:
+ [self outerContextsDo:
+ [:ctxt|
+ (ctxt == aContextOrBlock
+ or: [ctxt closureOrNil = aContextOrBlock]) ifTrue: [^true]]].
+ ^false!
Item was added:
+ ----- Method: CompiledMethod>>voidCogVMState (in category 'cleaning') -----
+ voidCogVMState
+ "Tell the VM to remove all references to any machine code form of the method.
+ This primitive must be called whenever a method is in use and modified. This is
+ more aggressive (and *much* more costly) than flushCache since it must search
+ through all context objects, making sure that none have a (hidden) machine code pc
+ in the receiver. Since modifying a method will likely change the generated machine code,
+ modifying a method (rather than redefining it) requires this more aggressive flush."
+
+ <primitive: 215>
+ ^self flushCache!
Item was changed:
----- Method: CompiledMethodTrailer>>createMethod:class:header: (in category 'creating a method') -----
createMethod: numberOfBytesForAllButTrailer class: aCompiledMethodClass header: headerWord
+ | meth delta |
- | meth |
encodedData ifNil: [self encode].
+
-
meth := aCompiledMethodClass newMethod: numberOfBytesForAllButTrailer + size header: headerWord.
"copy the encoded trailer data"
+ delta := meth size - size.
1 to: size do:
+ [:i | meth at: delta + i put: (encodedData at: i)].
- [:i | meth at: meth size - size + i put: (encodedData at: i)].
^meth!
Eliot Miranda uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-eem.323.mcz
==================== Summary ====================
Name: Compiler-eem.323
Author: eem
Time: 7 July 2016, 11:27:28.886558 am
UUID: 52466c66-954e-47f9-8c43-2ce094580ab4
Ancestors: Compiler-eem.322
Comment bytecode 139 as the callPrimitive bytecode (Spur mandates this to lift the number of literals).
=============== Diff against Compiler-eem.322 ===============
Item was changed:
EncoderForV3 subclass: #EncoderForV3PlusClosures
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'Compiler-Kernel'!
+ !EncoderForV3PlusClosures commentStamp: 'eem 2/29/2016 00:07' prior: 0!
- !EncoderForV3PlusClosures commentStamp: '<historical>' prior: 0!
An encoder for the V3 bytecode set augmented with the following bytecodes that are part of the full closure implementation.
138 10001010 jkkkkkkk Push (Array new: kkkkkkk) (j = 0)
or Pop kkkkkkk elements into: (Array new: kkkkkkk) (j = 1)
+ 139 10001011 kkkkkkkk jjjjjjjj Invoke primitive number jjjjjjjjkkkkkkkk
-
140 10001100 kkkkkkkk jjjjjjjj Push Temp At kkkkkkkk In Temp Vector At: jjjjjjjj
141 10001101 kkkkkkkk jjjjjjjj Store Temp At kkkkkkkk In Temp Vector At: jjjjjjjj
142 10001110 kkkkkkkk jjjjjjjj Pop and Store Temp At kkkkkkkk In Temp Vector At: jjjjjjjj
143 10001111 llllkkkk jjjjjjjj iiiiiiii Push Closure Num Copied llll Num Args kkkk BlockSize jjjjjjjjiiiiiiii
This is an exact duplicate of EncoderForLongFormV3PlusClosures.
Could be a trait (or in Newspeak, a Mixin).
For now we impose upon you to synchronise any and all changes between these two classes.!
Eliot Miranda uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-eem.700.mcz
==================== Summary ====================
Name: Collections-eem.700
Author: eem
Time: 7 July 2016, 11:10:35.817225 am
UUID: 3761f170-2d94-4ed1-bf3d-1790217dc3d3
Ancestors: Collections-eem.699
Better error messages for primitive failure of one-way become. Set lastChar in TranscriptStream (does this really belong in Collections?) when resetting.
=============== Diff against Collections-eem.699 ===============
Item was changed:
----- Method: Array>>elementsForwardIdentityTo:copyHash: (in category 'converting') -----
elementsForwardIdentityTo: otherArray copyHash: copyHash
"This primitive performs a bulk mutation, causing all pointers to the elements of the
receiver to be replaced by pointers to the corresponding elements of otherArray.
If copyHash is true, the identityHashes remain with the pointers rather than with the
objects so that the objects in the receiver should still be properly indexed in any
existing hashed structures after the mutation. If copyHash is false, then the hashes
of the objects in otherArray remain unchanged. If you know what you're doing this
may indeed be what you want."
<primitive: 249 error: ec>
+ ec == #'bad receiver' ifTrue:
+ [^self error: 'receiver must be of class Array'].
+ ec == #'bad argument' ifTrue:
+ [^self error: (otherArray class == Array
+ ifTrue: ['arg must be of class Array']
+ ifFalse: ['receiver and argument must have the same size'])].
+ ec == #'inappropriate operation' ifTrue:
+ [^self error: 'can''t become immediates such as SmallIntegers or Characters'].
+ ec == #'no modification' ifTrue:
+ [^self error: 'can''t become immutable objects'].
+ ec == #'object is pinned' ifTrue:
+ [^self error: 'can''t become pinned objects'].
self primitiveFailed!
Item was added:
+ ----- Method: TranscriptStream>>reset (in category 'positioning') -----
+ reset
+ "Override to set lastChar"
+ position > 0 ifTrue:
+ [lastChar := collection at: position].
+ ^super reset!