On Sun, Feb 21, 2016 at 07:40:22AM +0000, commits(a)source.squeak.org wrote:
> Eliot Miranda uploaded a new version of System to project The Trunk:
> http://source.squeak.org/trunk/System-eem.801.mcz
>
> ==================== Summary ====================
>
> Name: System-eem.801
> Author: eem
> Time: 20 February 2016, 11:40:02.089874 pm
> UUID: cb00963a-1c90-40c0-9539-04c88c0afa5f
> Ancestors: System-mt.800
>
> In Spur calcEndianness can be a lot simpler.
>
This works in Spur because ByteArray can now adopt an instance of WordArray,
is that right?
Does the test work on big endian 64-bit? I think that it will, but if there
is any doubt it might be safer to use a two element WordArray:
WordArray with: 16r01020304 with: 16r01020304
The method comment describes the old String implementation, so it would be
good to update that.
Dave
> =============== Diff against System-mt.800 ===============
>
> Item was changed:
> ----- Method: SmalltalkImage>>calcEndianness (in category 'system attributes') -----
> calcEndianness
> - | bytes word blt |
> "What endian-ness is the current hardware? The String '1234' will be stored into a machine word. On BigEndian machines (the Mac), $1 will be the high byte if the word. On LittleEndian machines (the PC), $4 will be the high byte."
> "Smalltalk endianness"
> + | wordThenBytes |
> + wordThenBytes := WordArray with: 16r01020304.
> + ByteArray adoptInstance: wordThenBytes.
> + wordThenBytes first = 1 ifTrue: [^#big].
> + wordThenBytes first = 4 ifTrue: [^#little].
> + self error: 'The author is confused'!
> -
> - bytes := ByteArray withAll: #(0 0 0 0). "(1 2 3 4) or (4 3 2 1)"
> - word := WordArray with: 16r01020304.
> - blt := (BitBlt toForm: (Form new hackBits: bytes))
> - sourceForm: (Form new hackBits: word).
> - blt combinationRule: Form over. "store"
> - blt sourceY: 0; destY: 0; height: 1; width: 4.
> - blt sourceX: 0; destX: 0.
> - blt copyBits. "paste the word into the bytes"
> - bytes first = 1 ifTrue: [^ #big].
> - bytes first = 4 ifTrue: [^ #little].
> - self error: 'Ted is confused'.!
>
Hi All,
first of all, apologies for the long wait for new VMs. I know there
are bugs that these VMs address and that it's been 5 months since VMs were
last made is something I regret. The wait was due to my developing the
64-bit Spur Cog JIT VM which required surgery not just to the Cogit but
also to Slang. I beg your forgiveness.
Secondly, the Mac VMs are much changed, using John McIntosh's Cocoa
support libraries. The old Carbon UI VMs are history. That means that Cog
supports building on contemporary Mac OS releases. These VMs were built on
10.9; I like the 3D look much more than the 10.10 one ;-). The VMs are
also signed, so installing them should be easier.
Thirdly, these VMs include 64-bit JIT support. There is an updated
squeak trunk image at http://www.mirandabanda.org/files/Cog/SpurImages for
you to try. As yet the 64-bit Vms do not include an FFI plugin. I hope to
rectify this soon.
Finally I have included Pharo Mac VMs, not to displace the official
Pharo VMs, but to test my build process. I hope that in very few months
the svn repository will be moed to githup and that Esteban and I will build
official VMs from the same repository.
The VMs are here: http://www.mirandabanda.org/files/Cog/VM/VM.r3602
CogVM binaries as per VMMaker.oscog-eem.1679/r3602
Include 64-bit Spur VMs for Mac OS X x64 and Linux x64. N.B. As yet these
VMs
lack FFI support.
Move all Mac OS X VMs to the Cocoa libraries. Minimum supported version
should
be 10.6.x. The Mac OS X VMs are signed and so should install properly
without
having to disable the launch security checks.
Bug Fixes and Improvements:
General:
Add vmParameter 20 to answer the utc microseconds at startup.
CoInterpreter:
Remove the atCache from the CoInterpreter. It's of little benefit given the
Cogit.
ceSend: et al need to add looked up methods to the method cache, otherwise
methods only found through machine code sends will not be jitted.
Fix slip in maybeSelectorOfMethod: which will improve back traces
including methods containing pragmas (including primitives).
Modify secret primtiive 161, primitiveSetIdentityHash so that with 0 args it
answers whether an object has an identity hash. This is vacuously true for
V3,
but is meaningful in Spur.
Cogit:
Fix /horrible/ bug with primitive error codes and fixups. The adjustment
of the
initialPC to skip the primitive and error code, if any, was done after
generating fixups for backward branches, and hence these branches were
bogus.
Object>>shallowCopy in Spur is subject to this, but amazingly enough it has
not
surfaced before now. Fix this by adjusting the initialPC before scanMethod
scans for fixups.
Fix bug in Spur machine-code at:put: on 32-bit bits objects; method failed
to
fail for negative values.
Fill unused portions of methods with the stop instruction, not nop.
Explicitly initialize the code zone with stops. Explicitly clear the
reclaimed portion of the method zone after a compaction.
Include the reclaimed portion of the method zone in the I-cache flush
after a compaction: no point in leaving it in cache since it isn't a
valid call/jump target.
Spur:
Maintain the survivor count on scavenge.
Fix start up of images containing >= 16 segments. The old code assumed
numSegments < 16 and failed to grow the segment records, resulting in
objects
in segments greater than 15 to not be swizzled, and a resulting crash.
Spur Cogit: Support CompiledMethod indexing in genPrimitiveAt[Put]. Hence
fix
the regression in at:[put:] whereby in Spur one could access the literals
part
of a method as bytes.
Add a machine-code primitive for objectAt: to provide fast literal and
header
access on Spur.
Add 16-bit indexability to Spur. Generate slimmer code for
positive32BitValueOf: on 64-bit Spur.
Fix a bug with out-of-place two-way become, which got the hash copy the
wrong
way round. By default, the hash stays with the reference in two-way become.
Fix what appears to be a compiler bug with in-place two-way-become by
treating
the headers to be swapped so that remembered flags are swapped and hash bits
are swapped if required. This fixes a bug with in-place two-way become of
objects that are the same size on the heap. One object's contents would not
be updated correctly.
Implement ephemeron queue primitive. Add an image flag that controls the
finalization support (StackInterpreter instVar newFinalization). If unset,
finalization is as currently expected; WeakArray finalizes all WeakArrays in
its registries on each finalization (which does not scale!). If set, then
both
fired ephemerons and bereaved weak arrays are added to the finalization
queue
and the finalization semaphore is signalled. In this regime the image is
expected to send mourn to each element of the queue, and weak arrays will
send
themselves finalize in mourn, side-stepping the finalizeValues steps and
rendering WeakArray's FinalizationDependents and WeakRegistry obsolete.
The bit is set via
Smalltalk vmParameterAt: 48
put: ((Smalltalk vmParameterAt: 48) bitOr: 64).
Slang:
Fix bad regression in type inference from VMMaker.oscog-eem.1587.
returnTypeForSend:in: can only default return types to sqInt for unknown
selectors. The rewrite in VMMaker.oscog-eem.1587 inadvertently defaulted
the
return type of known methods whose return type was yet to be determined to
sqInt. The fix is to only default to sqInt if there is no known method for
the
given selector. This fixes, for instance, the weird flipping of the type of
32-bit Spur's headerWhileForwardingOf:,which should always be #sqLong.
Fix bad bug in type inferrence. Avoid computing variable and return types
prematurely i.e. don't derive types from as-yet-untyped methods.
Fix baaaad bug in node:typeCompatibleWith:inliningInto:in: which was looking
up the type of the formal parameter in inlining in the target method, not
the
method being inlined!
Newspeak:
Fix bug in MNU for cogged dynamic super sends - should start looking for
#doesNotUnderstand: in the superclass not the receiver class. Unify MNU
lookup between absent and present receiver sends as a result.
Further fix outer send MNU by not confusing lkupClass and lkupClassTag.
Push setting lkupClassTag down to clarify it is for new cache entries.
Plugins:
Fix the FilePlugin's unnecessary fullGC on Spur.
Include the file sync prim in the FilePrims plugin.
ThreadedFFIPlugin:
- ExternalAddress now are taken correctly (nor as ByteArray or Alien,
because
they are different beasts).
- allow pushing of pointers to any type (into a ByteArray, an
ExternalAddress
or an Alien), to allow passing parameters style int*, float*, etc.
- allow reading in memory to allow read chunks of ByteArray
Added ThreadedFFIPlugin>>#primitiveLoadSymbolFromModule (copy and adapt from
IA32ABIPlugin).
Fix coercion problems on FFI plugin (IA32 & ARM)
- character were not correctly mapped back
- floats were not being well checked
- external addressed needs to be treated as aliens for the purpose of
coercing
them as pointers (bad regression by Eliot)
Alien Plugins:
Fix missing primitive failure for Alien typeAt: 0 [put:].
Add word accessors to Alien.
_,,,^..^,,,_
best, Eliot
Eliot Miranda uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-eem.801.mcz
==================== Summary ====================
Name: System-eem.801
Author: eem
Time: 20 February 2016, 11:40:02.089874 pm
UUID: cb00963a-1c90-40c0-9539-04c88c0afa5f
Ancestors: System-mt.800
In Spur calcEndianness can be a lot simpler.
=============== Diff against System-mt.800 ===============
Item was changed:
----- Method: SmalltalkImage>>calcEndianness (in category 'system attributes') -----
calcEndianness
- | bytes word blt |
"What endian-ness is the current hardware? The String '1234' will be stored into a machine word. On BigEndian machines (the Mac), $1 will be the high byte if the word. On LittleEndian machines (the PC), $4 will be the high byte."
"Smalltalk endianness"
+ | wordThenBytes |
+ wordThenBytes := WordArray with: 16r01020304.
+ ByteArray adoptInstance: wordThenBytes.
+ wordThenBytes first = 1 ifTrue: [^#big].
+ wordThenBytes first = 4 ifTrue: [^#little].
+ self error: 'The author is confused'!
-
- bytes := ByteArray withAll: #(0 0 0 0). "(1 2 3 4) or (4 3 2 1)"
- word := WordArray with: 16r01020304.
- blt := (BitBlt toForm: (Form new hackBits: bytes))
- sourceForm: (Form new hackBits: word).
- blt combinationRule: Form over. "store"
- blt sourceY: 0; destY: 0; height: 1; width: 4.
- blt sourceX: 0; destX: 0.
- blt copyBits. "paste the word into the bytes"
- bytes first = 1 ifTrue: [^ #big].
- bytes first = 4 ifTrue: [^ #little].
- self error: 'Ted is confused'.!
tim Rowledge uploaded a new version of Help-Squeak-Project to project The Trunk:
http://source.squeak.org/trunk/Help-Squeak-Project-tpr.35.mcz
==================== Summary ====================
Name: Help-Squeak-Project-tpr.35
Author: tpr
Time: 21 February 2016, 5:09:48.473345 pm
UUID: 589b8fff-3754-48e7-a759-4d9121abba0e
Ancestors: Help-Squeak-Project-cmm.34
Some improvements to the commandkey help text; correct meaning of cmd-shift-l/r, add tab/shift-tav etc
=============== Diff against Help-Squeak-Project-cmm.34 ===============
Item was changed:
----- Method: SqueakTutorialsCommandKey class>>commandKeyMappings (in category 'as yet unclassified') -----
commandKeyMappings
"This method was automatically generated. Edit it using:"
"SqueakTutorialsCommandKey edit: #commandKeyMappings"
^HelpTopic
title: 'Command Key Mappings'
contents:
'Lower-case command keys
(use with Cmd key on Mac and Alt key on other platforms)
a Select all
b Browse it (selection is a class name or cursor is over a class-list or message-list)
c Copy selection
d Do it (selection is a valid expression)
e Exchange selection with prior selection
f Find text with a dialog
g Find the current selection again
j Repeat the last selection replacement
i Inspect it
k Set font
l Cancel text edit
m Implementors of it
n Senders of it
o Spawn current method
p Print it (selection is a valid expression)
q Query symbol (toggle all possible completion for a given prefix)
s Save (i.e. accept)
t Finds a Transcript (when cursor is over the desktop)
u Toggle alignment
v Paste
w Select/Delete preceding word (over text); Close-window (over morphic desktop)
x Cut selection
y Swap characters
z Undo
Note: for Do it, Senders of it, etc., a null selection will be expanded to a word or to the current line in an attempt to do what you want. Also note that Senders/Implementors of it will find the outermost keyword selector in a large selection, as when you have selected a bracketed expression or an entire line. Finally note that the same cmd-m and cmd-n (and cmd-v for versions) work in the message pane of most browsers.
Upper-case command keys
(use with Shift-Cmd, or Ctrl on Mac
or Shift-Alt on other platforms; sometimes Ctrl works too)
A Advance argument
B Browse it in this same browser (in System browsers only)
C Compare the selected text to the clipboard contents
D Debug-It
E Method strings containing it
F Insert ''ifFalse:''
G fileIn from it (a file name)
+ H Move cursor to top/home of text
- H cursor TopHome:
I Inspect via Object Explorer
J Again many (apply the previous text command repeatedly until the end of the text)
K Set style
+ L Opens a FileList, bringing forward on that already exists if appropriate
- L Outdent (move selection one tab-stop left)
M Select current type-in
N References to it (selection is a class name, or cursor is over a class-list or message-list)
O Open single-message browser (in message lists)
P Make project link
+ R opens a Recent Submissions browser
+ S Pretty-print a method in the current browser
- R Indent (move selection one tab-stap right)
- S Search
T Insert ''ifTrue:''
U Convert linefeeds to carriage returns in selection
V Paste author''s initials
W Selectors containing it (in text); show-world-menu (when issued with cursor over desktop)
X Force selection to lowercase
Y Force selection to uppercase
Z Redo
Other special keys
Backspace Backward delete character
Shift-Bksp Backward select or delete word
Del Forward delete character
Shift-Del Forward delete word
Esc Pop up the context menu
Shift+Esc Pop up the World Menu
Cmd+Esc Close the active window
Ctrl+Esc Present a list of open windows
+ Cmd+\ Send the active window to the back
+ Tab Insert a tab char in a single-line selection or insert a tab at the beginning of each line in a multi-line selection
+ Shift-Tab Remove a tab from the beginning of each line in the selection
- \ Send the active window to the back
Cursor keys
left, right,
up, down Move cursor left, right, up or down
Ctrl-left Move cursor left one word
Ctrl-right Move cursor right one word
Home Move cursor to begin of line or begin of text
End Move cursor to end of line or end of text
PgUp, Ctrl-up Move cursor up one page
PgDown, Ctrl-Dn Move cursor down one page
Note all these keys can be used together with Shift to define or enlarge the selection. You cannot however shrink that selection again, as in some other systems.
Other Cmd-key combinations (not available on all platforms)
Return Insert return followed by as many tabs as the previous line
(with a further adjustment for additional brackets in that line)
Space Select the current word as with double clicking
Enclose the selection in a kind of bracket. Each is a toggle.
(not available on all platforms)
Ctrl-( Toggle enclosure within parentheses
Cmd-[ Toggle enclosure within brackets
Crtl-{ Toggle enclosure within curly braces
Ctrl-'' Toggle enclosure within double-quotes
Cmd-'' Toggle enclosure within single-quotes
Note also that you can double-click just inside any of the above delimiters, or at the beginning or end of a line, to select the text enclosed.
Text Emphasis
(not available on all platforms)
Cmd-1 type the first method argument
Cmd-2 type the second method argument
Cmd-3 type the third method argument
Cmd-4 type the fourth method argument
Cmd-5 for future use
Cmd-6 color, action-on-click, link to class comment, link to method, url
Brings up a menu. To remove these properties, select
more than the active part and then use command-0.
Cmd-7 bold
Cmd-8 italic
Cmd-9 narrow (same as negative kern)
Cmd-0 plain text (resets all emphasis)
Cmd-- underlined (toggles it)
Cmd-= struck out (toggles it)
Shift-Cmd-- (aka :=) negative kern (letters 1 pixel closer)
Shift-Cmd-+ positive kern (letters 1 pixel larger spread)
Docking Bar
Ctrl-<n> opens the n-th (where n is between 0 and 7) menu if such exists, otherwise it moves the keyboard focus to the Search Bar. Currently this means:
Ctrl-0 Activates Search Bar or Scratch Pad
Ctrl-1 Squeak menu
Ctrl-2 Projects menu
Ctrl-3 Tools menu
Ctrl-4 Apps menu
Ctrl-5 Extras menu
Ctrl-6 Windows menu
Ctrl-7 Help menu
!!' readStream nextChunkText!
I’m curious how one might be expected to use cmd-tab on systems where cmd-tab is intercepted by the window-wotsit and/or OS to do UI/OS level window swapping. Why did we need to change from the venerable cmd-R/cmd-L presses?
tim
--
tim Rowledge; tim(a)rowledge.org; http://www.rowledge.org/tim
Useful random insult:- A one-bit brain with a parity error.
Chris Muller uploaded a new version of Installer-Core to project The Trunk:
http://source.squeak.org/trunk/Installer-Core-cmm.404.mcz
==================== Summary ====================
Name: Installer-Core-cmm.404
Author: cmm
Time: 20 February 2016, 11:17:21.045856 am
UUID: f5341e16-0e86-4193-82ed-a3a8d0da52b3
Ancestors: Installer-Core-cmm.403
Correct project for jsonParser.
=============== Diff against Installer-Core-cmm.403 ===============
Item was changed:
----- Method: Installer>>jsonParser (in category 'package-definitions') -----
jsonParser
+ ^ { #ss -> 'JSON'.
- ^ { #ss -> 'VHRP'.
'JSON' }!
On Fri, 19 Feb 2016, commits(a)source.squeak.org wrote:
> Eliot Miranda uploaded a new version of Kernel to project The Trunk:
> http://source.squeak.org/trunk/Kernel-eem.999.mcz
>
> ==================== Summary ====================
>
> Name: Kernel-eem.999
> Author: eem
> Time: 18 February 2016, 11:03:09.008076 pm
> UUID: 30222068-755f-4637-bbbb-6f775291e746
> Ancestors: Kernel-bf.998
>
> Fix isSuspended (my last commit was a regression; I had confused isSuspended with isBlocked). Comment all the isFoo testing methods in process. Add isBlocked. Modify Process>>terminate to set the pc of the context of a process that is not auto-terminated to its endPC so that isTerminated and isSuspended can distinguish between processes either terminated or suspended.
>
> =============== Diff against Kernel-bf.998 ===============
>
> Item was added:
> + ----- Method: Process>>isBlocked (in category 'testing') -----
> + isBlocked
> + "A process is blocked if it is waiting on some list (i.e. a Semaphore), other than the runnable process lists."
> + | myPriority |
> + "Grab my prioirty now. Even though evaluation is strictly right-to-left, accessing Processor could involve a send."
> + myPriority := priority.
> + ^myList
> + ifNil: [false]
> + ifNotNil: [:list| list ~~ (Processor waitingProcessesAt: myPriority)]!
The list variable seems unnecessary. myList should do it, because its
value will be pushed onto the stack before it could be changed.
>
> Item was added:
> + ----- Method: Process>>isRunnable (in category 'testing') -----
> + isRunnable
> + "A process is runnable if it is the active process or is on one of the runnable process lists."
> + | myPriority |
> + "Grab my prioirty now. Even though evaluation is strictly right-to-left, accessing Processor could involve a send."
> + myPriority := priority.
> + ^myList
> + ifNil: [^self == Processor activeProcess]
> + ifNotNil: [:list| list == (Processor waitingProcessesAt: myPriority)]!
Same as above.
>
> Item was changed:
> ----- Method: Process>>isSuspended (in category 'testing') -----
> isSuspended
> + "A process is suspended if it has been suspended with the suspend primitive.
> + It is distinguishable from the active process and a terminated process by
> + having a non-nil suspendedContext that is either not the bottom context
> + or has not reached its endPC."
> + ^nil == myList
> + and: [nil ~~ suspendedContext
> + and: [suspendedContext isBottomContext
> + ifTrue: [suspendedContext closure
> + ifNil: [suspendedContext methodClass ~~ Process
> + or: [suspendedContext selector ~~ #terminate]]
> + ifNotNil: [suspendedContext pc < suspendedContext closure endPC]]
> + ifFalse: [true]]]!
I find it hard to decode what this method does with all that boolean
magic. IMHO early returns would make it a lot easier to understand what it
actually does:
myList ifNotNil: [ ^false ].
suspendedContext ifNil: [ ^false ].
suspendedContext isBottomContext ifFalse: [ ^true ].
suspendedContext closure ifNotNil: [ :closure |
^suspendContext pc < closure endPC ].
^suspendedContext methodClass ~~ Process
or: [ suspendedContext selector ~~ #terminate ]
> - "A process is suspended if it is waiting on some list, other than the runnable process lists."
> - | myPriority |
> - "Grab my prioirty now. Even though evaluation is strictly right-to-left, accessing Processor could involve a send."
> - myPriority := priority.
> - ^myList
> - ifNil: [false]
> - ifNotNil: [:list| list ~~ (Processor waitingProcessesAt: myPriority)]!
>
> Item was changed:
> ----- Method: Process>>isTerminated (in category 'testing') -----
> isTerminated
> + "Answer if the receiver is terminated, or at least terminating."
> -
> self isActiveProcess ifTrue: [^ false].
> ^suspendedContext isNil
> or: ["If the suspendedContext is the bottomContext it is the block in Process>>newProcess.
> + If so, and the pc is at the endPC, the block has already sent and returned
> - If so, and the pc is greater than the startpc, the block has alrteady sent and returned
> from value and there is nothing more to do."
> suspendedContext isBottomContext
> + and: [suspendedContext closure
> + ifNil: [suspendedContext methodClass == Process
> + and: [suspendedContext selector == #terminate]]
> + ifNotNil: [suspendedContext pc >= suspendedContext closure endPC]]]!
Just like above.
> - and: [suspendedContext pc > suspendedContext startpc]]!
>
> Item was changed:
> ----- Method: Process>>terminate (in category 'changing process state') -----
> terminate
> "Stop the process that the receiver represents forever. Unwind to execute pending ensure:/ifCurtailed: blocks before terminating."
>
> | ctxt unwindBlock oldList |
> self isActiveProcess ifTrue: [
> ctxt := thisContext.
> [ ctxt := ctxt findNextUnwindContextUpTo: nil.
> ctxt isNil
> ] whileFalse: [
> (ctxt tempAt: 2) ifNil:[
> ctxt tempAt: 2 put: nil.
> unwindBlock := ctxt tempAt: 1.
> thisContext terminateTo: ctxt.
> unwindBlock value].
> ].
> thisContext terminateTo: nil.
> self suspend.
> ] ifFalse:[
> "Always suspend the process first so it doesn't accidentally get woken up"
> oldList := self suspend.
> suspendedContext ifNotNil:[
> "Figure out if we are terminating a process that is in the ensure: block of a critical section.
> In this case, if the block has made progress, pop the suspendedContext so that we leave the
> ensure: block inside the critical: without signaling the semaphore/exiting the primitive section,
> since presumably this has already happened."
> (suspendedContext isClosureContext
> and: [(suspendedContext method pragmaAt: #criticalSection) notNil
> and: [suspendedContext startpc > suspendedContext closure startpc]]) ifTrue:
> [suspendedContext := suspendedContext home].
>
> "If we are terminating a process halfways through an unwind, try
> to complete that unwind block first."
> (suspendedContext findNextUnwindContextUpTo: nil) ifNotNil:
> [:outer|
> (suspendedContext findContextSuchThat:[:c| c closure == (outer tempAt: 1)]) ifNotNil:
> [:inner| "This is an unwind block currently under evaluation"
> suspendedContext runUntilErrorOrReturnFrom: inner]].
>
> ctxt := self popTo: suspendedContext bottomContext.
> ctxt == suspendedContext bottomContext ifFalse:
> + [self debug: ctxt title: 'Unwind error during termination'].
> + "Set the context to its endPC for the benefit of isTerminated."
> + ctxt pc: ctxt endPC]]!
> - [self debug: ctxt title: 'Unwind error during termination']]]!
I guess you know already. :)
Levente
>
>
>