Chris Muller uploaded a new version of SUnit to project The Trunk:
http://source.squeak.org/trunk/SUnit-cmm.146.mcz
==================== Summary ====================
Name: SUnit-cmm.146
Author: cmm
Time: 30 April 2024, 12:43:19.759559 am
UUID: 51424d55-94d0-4d2e-b8dc-f470b05cb44d
Ancestors: SUnit-mt.145
Let SUnit provide consistent results when running vs. debugging, rather than quietly hiding SUnit timeout configuration bugs when debugging.
=============== Diff against SUnit-mt.145 ===============
Item was changed:
----- Method: TestCase>>debug (in category 'running') -----
debug
"Run the receiver and open a debugger on the first failure or error."
+ ^ self assureResourcesDuring: [self runCase]!
- ^ self assureResourcesDuring: [self runCaseWithoutTimeout]!
Item was changed:
----- Method: TestCase>>debugAsFailure (in category 'running') -----
debugAsFailure
"Spawn a debugger that is ready to debug the receiver."
(Process
forBlock: [self debug]
runUntil: [:context | context isClosureContext "navigate the process directly to the point where it is about to send #setUp"
+ and: [context selector = #runCase]])
- and: [context selector = #runCaseWithoutTimeout]])
debug.!
Eliot Miranda uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-eem.1251.mcz
==================== Summary ====================
Name: Tools-eem.1251
Author: eem
Time: 29 April 2024, 2:53:17.573251 pm
UUID: f493712c-4f55-4c9e-96f9-394e45e29b32
Ancestors: Tools-eem.1250
For the TreeBrowser, if a system category is already selected, use it as teh stem of the prompt to add a new category, so that it is easier to add a subcategory.
Guard against empty categories in answering the class list of a PackagePaneBrowser.
=============== Diff against Tools-eem.1250 ===============
Item was changed:
----- Method: Browser>>addSystemCategory (in category 'system category functions') -----
addSystemCategory
"Prompt for a new category name and add it before the
current selection, or at the end if no current selection"
| oldSelection newName |
self okToChange ifFalse: [^ self].
oldSelection := self selectedSystemCategory.
newName := self
request: 'Please type new category name'
+ initialAnswer: (oldSelection ifNil: ['Category-Name'] ifNotNil: [oldSelection, '-Name']).
+ newName isEmpty ifTrue: [^ self].
- initialAnswer: 'Category-Name'.
- newName isEmpty
- ifTrue: [^ self]
- ifFalse: [newName := newName asSymbol].
systemOrganizer
+ addCategory: (newName := newName asSymbol)
- addCategory: newName
before: self selectedSystemCategory.
+ self selectSystemCategory: newName.
- self selectSystemCategory:
- (oldSelection isNil
- ifTrue: [ self systemCategoryList last ]
- ifFalse: [ oldSelection ]).
self changed: #systemCategoryList.!
Item was changed:
----- Method: PackagePaneBrowser>>classList (in category 'class list') -----
classList
self hasSystemCategorySelected ifTrue:
[| thisPackage thisCatSufix categories |
thisPackage := self package.
thisCatSufix := self selectedSystemCategoryWithoutPackage.
categories := systemOrganizer categories select: [:eachCat |
eachCat size >= thisPackage size
and: ["package prefix may occur in different cases, because they are assembled in the same package"
((eachCat first: thisPackage size) compare: thisPackage caseSensitive: false) = 2]
and: ["rest of system category must have exact case, because it is discrimnated by the system category list"
(eachCat allButFirst: thisPackage size) = thisCatSufix]].
+ categories ifNotEmpty:
+ [^categories gather: [:eachCat | systemOrganizer listAtCategoryNamed: eachCat]]].
- ^ categories gather: [:eachCat |
- systemOrganizer listAtCategoryNamed: eachCat]].
self hasPackageSelected ifTrue:
[^ self packageClasses].
^ systemOrganizer allElements!
Marcel Taeumel uploaded a new version of FFI-Kernel to project FFI:
http://source.squeak.org/FFI/FFI-Kernel-mt.232.mcz
==================== Summary ====================
Name: FFI-Kernel-mt.232
Author: mt
Time: 17 April 2024, 11:17:11.319706 am
UUID: 7bf5313f-0238-2541-97d4-daeeadc57839
Ancestors: FFI-Kernel-mt.231
For communicating failed FFI callouts, add support for PrimitiveError and ExceptionInFFICallError.
=============== Diff against FFI-Kernel-mt.231 ===============
Item was changed:
----- Method: ExternalFunction class>>externalCallFailedWith: (in category 'error handling') -----
externalCallFailedWith: primErrorCode
"Raise an error after a failed call to an external function.
The primFailCode could be any of:
- a symbol; one of the standard primitive errors defined in Smalltalk primitiveErrorTable
- nil; the VM does not support primitive errors and is not providing error codes
- an integer; one of the FFI codes incremented by Smalltalk primitiveErrorTable size + 2
+ so as not to clash with the standard primitive errors
+ - an instance of PrimitiveError that encodes an FFI marshalling error
+ - an instance of PrimitiveError that encodes an FFI callout exception error."
+
+ primErrorCode isExceptionInFFICallError ifTrue:
+ [^self error: primErrorCode errorName, ' (', primErrorCode pc asString, ')'].
+ primErrorCode isPrimitiveError ifTrue:
+ [^self error: primErrorCode errorName, ' (', (self errorMessageFor: primErrorCode errorCode), ')'].
+
- so as not to clash with the standard primitive errors."
^self error: (primErrorCode isInteger
ifTrue: [self errorMessageFor: primErrorCode - (Smalltalk primitiveErrorTable size + 2)]
ifFalse: [primErrorCode isNil
ifTrue: ['Call to external function failed']
ifFalse: [primErrorCode]])!
Item was added:
+ ----- Method: Object>>externalCallFailedWith: (in category '*FFI-Kernel') -----
+ externalCallFailedWith: primErrorCode
+
+ ^ ExternalFunction externalCallFailedWith: primErrorCode!
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1453.mcz
==================== Summary ====================
Name: System-mt.1453
Author: mt
Time: 17 April 2024, 10:43:17.752706 am
UUID: d5ecd791-4890-e748-950c-809da8376186
Ancestors: System-mt.1452
For structured primitive errors, expose #errorName in its print-string to make the error table more readable (see index 52 in #specialObjectsArray).
While ExceptionInFFICallError has both a custom name and an extra slot, you can use any custom instance of PrimitiveError to pass scoped error codes from failing primitives such as the existing #'operating system error' and its platform-specific error codes. However, you would need to reserve a new index in the error table and thus update the special-objects array. Therefore, custom VM plugins might want to choose an extra interface to communicate failed operations.
For example, SqueakFFI uses #getLastError and #externalCallFailed to fabricate readable error messages. Not sure why we do it this way (see #ffiFail: in plugin code) ... the approach via PrimitiveError seems more elegant to me... and via PrimErrFFIMarshallingError there is even a way to use the new scheme. :-)
=============== Diff against System-mt.1452 ===============
Item was added:
+ ----- Method: PrimitiveError>>printOn: (in category 'printing') -----
+ printOn: aStream
+
+ self errorName
+ ifNil: [super printOn: aStream]
+ ifNotNil: [:nm | nm printOn: aStream].!
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1453.mcz
==================== Summary ====================
Name: System-mt.1453
Author: mt
Time: 17 April 2024, 10:43:17.752706 am
UUID: d5ecd791-4890-e748-950c-809da8376186
Ancestors: System-mt.1452
For structured primitive errors, expose #errorName in its print-string to make the error table more readable (see index 52 in #specialObjectsArray).
While ExceptionInFFICallError has both a custom name and an extra slot, you can use any custom instance of PrimitiveError to pass scoped error codes from failing primitives such as the existing #'operating system error' and its platform-specific error codes. However, you would need to reserve a new index in the error table and thus update the special-objects array. Therefore, custom VM plugins might want to choose an extra interface to communicate failed operations.
For example, SqueakFFI uses #getLastError and #externalCallFailed to fabricate readable error messages. Not sure why we do it this way (see #ffiFail: in plugin code) ... the approach via PrimitiveError seems more elegant to me... and via PrimErrFFIMarshallingError there is even a way to use the new scheme. :-)
=============== Diff against System-mt.1452 ===============
Item was added:
+ ----- Method: PrimitiveError>>printOn: (in category 'printing') -----
+ printOn: aStream
+
+ self errorName
+ ifNil: [super printOn: aStream]
+ ifNotNil: [:nm | nm printOn: aStream].!
Eliot Miranda uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-eem.1250.mcz
==================== Summary ====================
Name: Tools-eem.1250
Author: eem
Time: 16 April 2024, 10:16:10.120513 pm
UUID: 51b04f56-0b7b-4505-8928-2571e6ecf553
Ancestors: Tools-ct.1249
Fix SavedMultiWindowState's class comment. Remove accessor for private inst var.
=============== Diff against Tools-ct.1249 ===============
Item was changed:
Object subclass: #SavedMultiWindowState
instanceVariableNames: 'models modelStates modelDependents currentModelIndex prototype'
classVariableNames: ''
poolDictionaries: ''
category: 'Tools-Base'!
+ !SavedMultiWindowState commentStamp: 'eem 4/16/2024 14:42' prior: 0!
+ A SavedMultiWindowState is a collection of states of inactive windows for a multi-window tool ui where one can select between multiple copies of a tool sharing a single system window, each tool having its own state. It manages switching between windows, swapping unaccepted edit state (e.g. in text views) as it does so.
- !SavedMultiWindowState commentStamp: 'eem 6/30/2010 15:45' prior: 0!
- A SavedMultiWindowState is a collection of states of inactive windows for a multi-window tool ui where one can select between multiple copies of a tool sharing a single system window, each tol having its own state. It manages switching between windows, swapping unaccepted edit state (e.g. in text views) as it does so.
Instance Variables
+ currentModelIndex: <Integer>
+ modelDependents: <IdentitySet>
- currentModelIndex: <Integer>
- modelDependents: <IdentitySet>
modelStates: <OrderedCollection of: (Array
+ with: modelState <Object>
+ with: unacceptedEditStates <WeakIdentityKeyDictionary>) >
+ models: <OrderedCollection of: Model>
+ prototype: <Model>
- with: modelState <Object>
- with: unacceptedEditStates <WeakIdentityKeyDictionary>) >
- models: <OrderedCollection of: Model>
currentModelIndex
- index into models and modelStates of current window selection
modelDependents
- set of all dependents
modelStates
- the pairs of model-specific selection state and widget-specfic unaccepted edit state for each unselected/inactive window
models
- the models for each window
+
+ prototype
+ - a shallow copy of the initial tool/model, used to create new tools/models!
- !
Item was removed:
- ----- Method: SavedMultiWindowState>>currentModelIndex (in category 'accessing') -----
- currentModelIndex
- ^currentModelIndex!
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.1564.mcz
==================== Summary ====================
Name: Kernel-eem.1564
Author: eem
Time: 11 April 2024, 2:41:49.284637 pm
UUID: 5a2b7f22-ea54-4c08-9327-f74d76974a6d
Ancestors: Kernel-cmm.1563
Fix a couple of speeling rorres in comments
=============== Diff against Kernel-cmm.1563 ===============
Item was changed:
----- Method: Context>>privRefresh (in category 'initialize-release') -----
privRefresh
"Reinitialize the receiver so that it is in the state it was at its creation."
closureOrNil
ifNotNil:
[closureOrNil isFullBlock
ifTrue:
[pc := method initialPC.
self stackp: method numTemps.
closureOrNil numArgs + closureOrNil numCopiedValues + 1 to: method numTemps do:
[:i | self tempAt: i put: nil]]
+ ifFalse: "In non-full blocks temps are established by push bytecodes"
- ifFalse: "In non-full blocks temps are established by push btecodes"
[pc := closureOrNil startpc.
self stackp: closureOrNil numArgs + closureOrNil numCopiedValues].
1 to: closureOrNil numCopiedValues do:
[:i | self tempAt: closureOrNil numArgs + i put: (closureOrNil at: i)]]
ifNil:
[pc := method initialPC.
self stackp: method numTemps.
method numArgs + 1 to: method numTemps do:
[:i | self tempAt: i put: nil]]!
Item was changed:
----- Method: InstructionStream>>willJump (in category 'testing') -----
willJump
+ "Answer whether the next bytecode is an unconditional jump."
- "Answer whether the next bytecode is an uncoinditional jump."
| method |
method := self method.
^method encoderClass isJumpAt: pc in: method!