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!
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1452.mcz
==================== Summary ====================
Name: System-mt.1452
Author: mt
Time: 28 March 2024, 9:59:08.460064 am
UUID: c4dd53f6-cf69-7b42-b554-f4e6320216cf
Ancestors: System-cmm.1451
When using high-DPI screens, make enough room for the emergency evaluator.
=============== Diff against System-cmm.1451 ===============
Item was changed:
----- Method: Transcripter class>>emergencyEvaluator (in category 'utilities') -----
emergencyEvaluator
+ (Transcripter newInFrame: (0@0 corner: 320 px @ 200 px))
- (Transcripter newInFrame: (0@0 corner: 320@200))
show: 'Type ''revert'' to revert your last method change.
Type ''exit'' to exit the emergency evaluator.';
readEvalPrint!
Marcel Taeumel uploaded a new version of ReleaseBuilder to project The Trunk:
http://source.squeak.org/trunk/ReleaseBuilder-mt.247.mcz
==================== Summary ====================
Name: ReleaseBuilder-mt.247
Author: mt
Time: 26 March 2024, 10:15:40.484051 am
UUID: 6b05e554-d6ae-1046-adab-318f230b240a
Ancestors: ReleaseBuilder-mt.246
Fix comment. Both mt.247 and mt.246 complement Kernel-cmm.1562
=============== Diff against ReleaseBuilder-mt.246 ===============
Item was changed:
----- Method: ReleaseBuilder class>>prepareProcesses (in category 'preparing') -----
prepareProcesses
"Re-start running processes if necessary. Call this at late as possible in the release process. Only required to processes that are not reset at image #startUp."
Delay startTimerEventLoop.
+ Smalltalk processPreemptionYields: false. "avoid accidental round-robin; make users' Morphic-related workspace scripts/code more robust if forked at UI priority"!
- Smalltalk processPreemptionYields: false. "avoid accidental round-robin; make users' Morphic-related workspace scripts/code more robust if forked at lower priority"!