Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.1102.mcz
==================== Summary ====================
Name: Kernel-eem.1102
Author: eem
Time: 5 May 2017, 12:14:26.339034 pm
UUID: b61eaafd-be70-42f3-aaa4-b8e21da1fd4c
Ancestors: Kernel-nice.1101
Delete obsolete binding and block machinery now unused by the Compiler.
=============== Diff against Kernel-nice.1101 ===============
Item was removed:
- ----- Method: Behavior>>literalScannedAs:notifying: (in category 'printing') -----
- literalScannedAs: scannedLiteral notifying: requestor
- "Postprocesses a literal scanned by Scanner scanToken (esp. xLitQuote).
- If scannedLiteral is not an association, answer it.
- Else, if it is of the form:
- nil->#NameOfMetaclass
- answer nil->theMetaclass, if any has that name, else report an error.
- Else, if it is of the form:
- #NameOfGlobalVariable->anythiEng
- answer the global, class, or pool association with that nameE, if any, else
- add it to Undeclared a answer the new Association."
-
- | key value |
- (scannedLiteral isVariableBinding)
- ifFalse: [^ scannedLiteral].
- key := scannedLiteral key.
- value := scannedLiteral value.
- key isNil
- ifTrue: "###<metaclass soleInstance name>"
- [(self bindingOf: value) ifNotNil:[:assoc|
- (assoc value isKindOf: Behavior)
- ifTrue: [^ nil->assoc value class]].
- requestor notify: 'No such metaclass'.
- ^false].
- (key isSymbol)
- ifTrue: "##<global var name>"
- [^ (self bindingOf: key) ifNil:
- [self environment undeclare: key]].
- requestor notify: '## must be followed by a non-local variable name'.
- ^false
-
- " Form literalScannedAs: 14 notifying: nil 14
- Form literalScannedAs: #OneBitForm notiEfying: nil OneBitForm
- Form literalScannedAs: ##OneBitForm notifying: nil OneBitForm->a Form
- Form literalScannedAs: ##Form notifying: nil Form->Form
- Form literalScannedAs: ###Form notifying: nil nilE->Form class
- "!
Item was added:
+ ----- Method: Context>>blockCopy: (in category 'controlling') -----
+ blockCopy: numArgs
+ "Primitive. Distinguish a block of code from its enclosing method by
+ creating a new BlockContext for that block. The compiler inserts into all
+ methods that contain blocks the bytecodes to send the message
+ blockCopy:. Do not use blockCopy: in code that you write!! Only the
+ compiler can decide to send the message blockCopy:. Fail if numArgs is
+ not a SmallInteger. Optional. No Lookup. See Object documentation
+ whatIsAPrimitive."
+
+ <primitive: 80>
+ ^ (BlockContext newForMethod: self method)
+ home: self home
+ startpc: pc + 2
+ nargs: numArgs!
Item was removed:
- ----- Method: UndefinedObject>>literalScannedAs:notifying: (in category 'class hierarchy') -----
- literalScannedAs: scannedLiteral notifying: requestor
- ^ scannedLiteral!
Eliot Miranda uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-eem.948.mcz
==================== Summary ====================
Name: System-eem.948
Author: eem
Time: 5 May 2017, 12:15:52.791622 pm
UUID: 85face8f-9757-4cbb-8858-6c3090880dd3
Ancestors: System-ul.947
Delete obsolete binding machinery now unused by the Compiler.
=============== Diff against System-ul.947 ===============
Item was removed:
- ----- Method: PseudoClass>>literalScannedAs:notifying: (in category 'printing') -----
- literalScannedAs: scannedLiteral notifying: requestor
- ^ scannedLiteral!
Eliot Miranda uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-eem.354.mcz
==================== Summary ====================
Name: Compiler-eem.354
Author: eem
Time: 5 May 2017, 12:11:34.451259 pm
UUID: 79ec7453-8d66-471d-b7fa-2699146390c8
Ancestors: Compiler-eem.353
Provide a proper comment for BlockNode and eliminate an unused variable and an unused method; this in prelude to implementing full blocks.
Eliminate obsolete binding machinery (literalScannedAs:notifying:). The current compiler deals with Undeclared in a more direct way earlier in compilation.
Nuke the unnecessary identical override of generateMethodOfClass:trailer:from: in EncoderForSistaV1.
Correct a spelling error.
=============== Diff against Compiler-eem.353 ===============
Item was changed:
ParseNode subclass: #BlockNode
+ instanceVariableNames: 'arguments statements returns nArgsNode size temporaries optimized optimizedMessageNode actualScopeIfOptimized blockExtent remoteTempNode copiedValues closureCreationNode startOfLastStatement tempsMark'
- instanceVariableNames: 'arguments statements returns nArgsNode size remoteCopyNode temporaries optimized optimizedMessageNode actualScopeIfOptimized blockExtent remoteTempNode copiedValues closureCreationNode startOfLastStatement tempsMark'
classVariableNames: ''
poolDictionaries: ''
category: 'Compiler-ParseNodes'!
+ !BlockNode commentStamp: 'eem 5/4/2017 17:26' prior: 0!
+ I represent a bracketed block with 0 or more arguments and 1 or more statements. If I am initialized with no statements, I create one. I have a flag to tell whether my last statement returns a value from the enclosing method. I can emit for value in the usual way, in which case I create a BlockClosure to be evaluated by sending it value: at run time. Or I can emit code to be evaluated in line; this only happens at the top level of a method and in certain optimized control structures (see MessageNode class>>initialize MacroSelectors).
+
+ Instance Variables
+ actualScopeIfOptimized: <nil | BlockNode>
+ arguments: <SequencableCollection of: TempVariableNode>
+ blockExtent: <nil | Interval>
+ closureCreationNode: <LeafNode>
+ copiedValues: <nil | (SequencableCollection of: TempVariableNode)>
+ nArgsNode: <nil | Integer>
+ optimized: <Boolean>
+ optimizedMessageNode: <nil | MessageNode>
+ remoteTempNode: <nil | RemoteTempVectorNode>
+ returns: <Boolean>
+ size: <nil | Integer>
+ startOfLastStatement: <nil | Integer>
+ statements: <SequencableCollection of: ParseNode>
+ temporaries: <SequencableCollection of: TempVariableNode>
+ tempsMark: <nil | Integer>
+
+ actualScopeIfOptimized
+ - if the receiver has been inlined this is the non-optimized BlockNode the receiver is inlined into.
+
+ arguments
+ - the sequence of arguments to the block (or method if a top-level block)
+
+ blockExtent
+ - the interval defining the range of block scopes the receiver comprises, which is itself and any blokcs it may contain. See #analyseArguments:temporaries:rootNode:
+
+ closureCreationNode
+ - a place-holder representing the body of the block.
+
+ copiedValues
+ - blocks do not reference the temporary variables of their outer context they cose over directly; instead temporary variables which won't change value are collected and copied into the block, and temporary variables that are modified either within the block or after it has closed over the variales are allocated in a remote temp vector that again becomes one of the block's copied values. In this way, a block refers to the outer teporaries it closes over only throguh copiedValues. copiedValues is the sequence of these TempVariableNodes.
+
+ nArgsNode
+ - a place holder for the encoder to allow it to number block temporaries
+
+ optimized
+ - true if the receiver is inlined, false if a true block
+
+ optimizedMessageNode
+ - the MessageNode in which the receiver is optimized, if it is optimized.
+
+ remoteTempNode
+ - if any of the blocks nested into the receiver either modify a temp or access a temp that is modified after the block is created, then this temp is allocated remotely in a remote temp vector that allows the temp's location to be shared between blocks. This is the node that creates the remote temp vector.
+
+ returns
+ - true if the receiver contains a method return.
+
+ size
+ - the size of the block's bytecodes if it is generated by embedding its bytecodes within an enclosing CompiledMethod.
+
+ startOfLastStatement
+ - the index in the source of the start of the last statement in the block.
+
+ statements
+ - the sequence of statements comprising the receiver
+
+ temporaries
+ - the sequence of temporaries (including the remoteTempNode if any) of block-local temporaries
+
+ tempsMark
+ - the index in the source of the last block-local temporary, used to auto-insert temps declared during compilation!
- !BlockNode commentStamp: '<historical>' prior: 0!
- I represent a bracketed block with 0 or more arguments and 1 or more statements. If I am initialized with no statements, I create one. I have a flag to tell whether my last statement returns a value from the enclosing method. My last three fields remember data needed for code generation. I can emit for value in the usual way, in which case I create a literal method (actually a context remotely copied) to be evaluated by sending it value: at run time. Or I can emit code to be evaluated in line; this only happens at the top level of a method and in conditionals and while-loops, none of which have arguments.!
Item was removed:
- ----- Method: BlockNode>>closureCreationNode (in category 'accessing') -----
- closureCreationNode
- closureCreationNode ifNil:
- [closureCreationNode := LeafNode new
- key: #closureCreationNode
- code: nil].
- ^closureCreationNode!
Item was removed:
- ----- Method: CompilationCue>>literalScannedAs:notifying: (in category 'binding') -----
- literalScannedAs: anObject notifying: anEncoder
- ^ class literalScannedAs: anObject environment: environment notifying: anEncoder!
Item was changed:
----- Method: Encoder>>encodeLiteral: (in category 'encoding') -----
encodeLiteral: object
-
^self
name: object
+ key: object
- key: (cue literalScannedAs: object notifying: self)
class: LiteralNode
type: LdLitType
set: litSet!
Item was removed:
- ----- Method: EncoderForSistaV1>>generateMethodOfClass:trailer:from: (in category 'method encoding') -----
- generateMethodOfClass: aCompiledMethodClass trailer: trailer from: methodNode
- "The receiver is the root of a parse tree. Answer an instance of aCompiledMethodClass.
- The argument, trailer, is arbitrary but is typically either the reference to the source code
- that is stored with every CompiledMethod, or an encoding of the method's temporary names."
-
- | primErrNode blkSize nLits locals literals header method stack |
- primErrNode := methodNode primitiveErrorVariableName ifNotNil:
- [self fixTemp: methodNode primitiveErrorVariableName].
- methodNode ensureClosureAnalysisDone.
- self rootNode: methodNode. "this is for BlockNode>>sizeCodeForClosureValue:"
- blkSize := (methodNode block sizeCodeForEvaluatedValue: self)
- + (methodNode primitive > 0
- ifTrue: [self sizeCallPrimitive: methodNode primitive]
- ifFalse: [0])
- + (primErrNode
- ifNil: [0]
- ifNotNil:
- [primErrNode
- index: methodNode arguments size + methodNode temporaries size;
- sizeCodeForStore: self "The VM relies on storeIntoTemp: (129)"]).
- locals := methodNode arguments, methodNode temporaries, (primErrNode ifNil: [#()] ifNotNil: [{primErrNode}]).
- self noteBlockExtent: methodNode block blockExtent hasLocals: locals.
- header := self computeMethodHeaderForNumArgs: methodNode arguments size
- numTemps: locals size
- numLits: (nLits := (literals := self allLiterals) size)
- primitive: methodNode primitive.
- method := trailer
- createMethod: blkSize
- class: aCompiledMethodClass
- header: header.
- 1 to: nLits do: [:lit | method literalAt: lit put: (literals at: lit)].
- self streamToMethod: method.
- stack := ParseStack new init.
- methodNode primitive > 0 ifTrue:
- [self genCallPrimitive: methodNode primitive].
- primErrNode ifNotNil:
- [primErrNode emitCodeForStore: stack encoder: self].
- stack position: method numTemps.
- [methodNode block emitCodeForEvaluatedValue: stack encoder: self]
- on: Error "If an attempt is made to write too much code the method will be asked"
- do: [:ex| "to grow, and the grow attempt will fail in CompiledMethod class>>#new:"
- ex signalerContext sender method = (CompiledMethod class>>#new:)
- ifTrue: [^self error: 'Compiler code size discrepancy']
- ifFalse: [ex pass]].
- stack position ~= (method numTemps + 1) ifTrue:
- [^self error: 'Compiler stack discrepancy'].
- self methodStreamPosition ~= (method size - trailer size) ifTrue:
- [^self error: 'Compiler code size discrepancy'].
- method needsFrameSize: stack size - method numTemps.
- ^method!
Item was changed:
----- Method: MethodNode>>schematicTempNamesString (in category 'debugger support') -----
schematicTempNamesString
"Answer the temp names for the current method node in a form that captures
temp structure. The temps at each method and block scope level occur
space-separated, with any indirect temps enclosed in parentheses. Each block
level is enclosed in square brackets. e.g.
'method level temps (indirect temp)[block args and temps (indirect)]'
This representation can be reconstituted into a blockExtentsToTempsMap
by a CompiledMethod that has been copied with the schematicTempNamesString."
encoder hasGeneratedMethod ifFalse:
+ ["create the encoder's blockExtentsToLocals map, except if the method is quick
- ["create the encoder's blockExtentsToLoals map, except if the method is quick
in which case it has no temps."
+ self generate isQuick ifTrue:
- (self generate) isQuick ifTrue:
[^'']].
^encoder schematicTempNamesString!
Chris Cunningham uploaded a new version of Graphics to project The Inbox:
http://source.squeak.org/inbox/Graphics-cbc.375.mcz
==================== Summary ====================
Name: Graphics-cbc.375
Author: cbc
Time: 5 May 2017, 10:09:55.994065 am
UUID: 882b31df-9e3e-234a-8591-d4b2ae912b91
Ancestors: Graphics-nice.374
Factored out remaining pieces of ExternalForm, simplifying Form methods in the process. Minimal support left there, in case you want to use ExternalForm in the future. New location of classes noted in Form comment.
=============== Diff against Graphics-nice.374 ===============
Item was changed:
DisplayMedium subclass: #Form
instanceVariableNames: 'bits width height depth offset'
classVariableNames: ''
poolDictionaries: ''
category: 'Graphics-Display Objects'!
+ !Form commentStamp: 'cbc 5/5/2017 10:07' prior: 0!
- !Form commentStamp: 'ls 1/4/2004 17:16' prior: 0!
A rectangular array of pixels, used for holding images. All pictures, including character images are Forms. The depth of a Form is how many bits are used to specify the color at each pixel. The actual bits are held in a Bitmap, whose internal structure is different at each depth. Class Color allows you to deal with colors without knowing how they are actually encoded inside a Bitmap.
The supported depths (in bits) are 1, 2, 4, 8, 16, and 32. The number of actual colors at these depths are: 2, 4, 16, 256, 32768, and 16 million.
Forms are indexed starting at 0 instead of 1; thus, the top-left pixel of a Form has coordinates 0@0.
Forms are combined using BitBlt. See the comment in class BitBlt. Forms that repeat many times to fill a large destination are InfiniteForms.
colorAt: x@y Returns the abstract Color at this location
displayAt: x@y shows this form on the screen
displayOn: aMedium at: x@y shows this form in a Window, a Form, or other DisplayMedium
fillColor: aColor Set all the pixels to the color.
edit launch an editor to change the bits of this form.
pixelValueAt: x@y The encoded color. The encoding depends on the depth.
+
+ Note: If you want to hook up other external forms/displayScreens, please look at the (successful) Graphics-External package in http://www.squeaksource.com/Balloon3D.!
- !
Item was changed:
----- Method: Form>>balancedPatternFor: (in category 'color mapping') -----
balancedPatternFor: aColor
"Return the pixel word for representing the given color on the receiver"
+ ^aColor balancedPatternForDepth: self depth!
- self hasNonStandardPalette
- ifTrue:[^self bitPatternFor: aColor]
- ifFalse:[^aColor balancedPatternForDepth: self depth]!
Item was changed:
----- Method: Form>>bitPatternFor: (in category 'color mapping') -----
bitPatternFor: aColor
"Return the pixel word for representing the given color on the receiver"
+ ^aColor bitPatternForDepth: self depth!
- aColor isColor ifFalse:[^aColor bitPatternForDepth: self depth].
- self hasNonStandardPalette
- ifTrue:[^Bitmap with: (self pixelWordFor: aColor)]
- ifFalse:[^aColor bitPatternForDepth: self depth]!
Item was changed:
----- Method: Form>>colormapFromARGB (in category 'color mapping') -----
colormapFromARGB
"Return a ColorMap mapping from canonical ARGB space into the receiver.
Note: This version is optimized for Squeak forms."
| map nBits |
- self hasNonStandardPalette
- ifTrue:[^ColorMap mappingFromARGB: self rgbaBitMasks].
self depth <= 8 ifTrue:[
map := Color colorMapIfNeededFrom: 32 to: self depth.
map size = 512 ifTrue:[nBits := 3].
map size = 4096 ifTrue:[nBits := 4].
map size = 32768 ifTrue:[nBits := 5].
^ColorMap
shifts: (Array
with: 3 * nBits - 24
with: 2 * nBits - 16
with: 1 * nBits - 8
with: 0)
masks: (Array
with: (1 << nBits) - 1 << (24 - nBits)
with: (1 << nBits) - 1 << (16 - nBits)
with: (1 << nBits) - 1 << (8 - nBits)
with: 0)
colors: map].
self depth = 16 ifTrue:[
^ColorMap
shifts: #(-9 -6 -3 0)
masks: #(16rF80000 16rF800 16rF8 0)].
self depth = 32 ifTrue:[
^ColorMap
shifts: #(0 0 0 0)
masks: #(16rFF0000 16rFF00 16rFF 16rFF000000)].
self error:'Bad depth'!
Item was changed:
----- Method: Form>>colormapToARGB (in category 'color mapping') -----
colormapToARGB
"Return a ColorMap mapping from the receiver into canonical ARGB space."
- self hasNonStandardPalette
- ifTrue:[^self colormapFromARGB inverseMap].
self depth <= 8 ifTrue:[
^ColorMap
shifts: #(0 0 0 0)
masks: #(16rFF0000 16rFF00 16rFF 16rFF000000)
colors: (Color colorMapIfNeededFrom: self depth to: 32)].
self depth = 16 ifTrue:[
^ColorMap
shifts: #( 9 6 3 0)
masks: #(16r7C00 16r3E0 16r1F 0)].
self depth = 32 ifTrue:[
^ColorMap
shifts: #(0 0 0 0)
masks: #(16rFF0000 16rFF00 16rFF 16rFF000000)].
self error:'Bad depth'!
Item was removed:
- ----- Method: Form>>displayScreen (in category 'accessing') -----
- displayScreen
- "Return the display screen the receiver is allocated on.
- Forms in general are Squeak internal and not allocated on any particular display."
- ^nil!
Item was removed:
- ----- Method: Form>>isBltAccelerated:for: (in category 'testing') -----
- isBltAccelerated: ruleInteger for: sourceForm
- "Return true if the receiver can perform accelerated blts operations by itself"
- ^false!
Item was removed:
- ----- Method: Form>>isExternalForm (in category 'testing') -----
- isExternalForm
- ^false!
Item was removed:
- ----- Method: Form>>isFillAccelerated:for: (in category 'testing') -----
- isFillAccelerated: ruleInteger for: aColor
- "Return true if the receiver can perform accelerated fill operations by itself"
- ^false!
Item was changed:
----- Method: Form>>pixelValueFor: (in category 'color mapping') -----
pixelValueFor: aColor
"Return the pixel word for representing the given color on the receiver"
+ ^aColor pixelValueForDepth: self depth!
- self hasNonStandardPalette
- ifTrue:[^self colormapFromARGB mapPixel: (aColor pixelValueForDepth: 32)]
- ifFalse:[^aColor pixelValueForDepth: self depth]!
Item was changed:
----- Method: Form>>pixelWordFor: (in category 'color mapping') -----
pixelWordFor: aColor
"Return the pixel word for representing the given color on the receiver"
+ ^aColor pixelWordForDepth: self depth!
- | basicPattern |
- self hasNonStandardPalette
- ifFalse:[^aColor pixelWordForDepth: self depth].
- basicPattern := self pixelValueFor: aColor.
- self depth = 32
- ifTrue:[^basicPattern]
- ifFalse:[^aColor pixelWordFor: self depth filledWith: basicPattern]!
Chris Cunningham uploaded a new version of EToys to project The Inbox:
http://source.squeak.org/inbox/EToys-cbc.299.mcz
==================== Summary ====================
Name: EToys-cbc.299
Author: cbc
Time: 5 May 2017, 9:58:32.239065 am
UUID: b55b1e92-af0e-b14b-b061-78e945c7dff7
Ancestors: EToys-ul.298
Removed Etoys-Squeakland-Graphics-External.
Its classes are now in http://www.squeaksource.com/Balloon3D
=============== Diff against EToys-ul.298 ===============
Item was changed:
SystemOrganization addCategory: #'Etoys-Buttons'!
SystemOrganization addCategory: #'Etoys-CustomEvents'!
SystemOrganization addCategory: #'Etoys-Experimental'!
SystemOrganization addCategory: #'Etoys-Outliner'!
SystemOrganization addCategory: #'Etoys-Protocols'!
SystemOrganization addCategory: #'Etoys-Protocols-Type Vocabularies'!
SystemOrganization addCategory: #'Etoys-Scripting'!
SystemOrganization addCategory: #'Etoys-Scripting Support'!
SystemOrganization addCategory: #'Etoys-Scripting Tiles'!
SystemOrganization addCategory: #'Etoys-Squeakland-BroomMorphs-Base'!
SystemOrganization addCategory: #'Etoys-Squeakland-BroomMorphs-Connectors'!
SystemOrganization addCategory: #'Etoys-Squeakland-EToys-Kedama'!
SystemOrganization addCategory: #'Etoys-Squeakland-Etoys-Buttons'!
SystemOrganization addCategory: #'Etoys-Squeakland-Etoys-Calendar'!
SystemOrganization addCategory: #'Etoys-Squeakland-Etoys-Debugger'!
SystemOrganization addCategory: #'Etoys-Squeakland-Etoys-Help'!
SystemOrganization addCategory: #'Etoys-Squeakland-Etoys-Input'!
SystemOrganization addCategory: #'Etoys-Squeakland-Etoys-Scripting'!
SystemOrganization addCategory: #'Etoys-Squeakland-Etoys-Scripting Support'!
SystemOrganization addCategory: #'Etoys-Squeakland-Etoys-Scripting Tiles'!
SystemOrganization addCategory: #'Etoys-Squeakland-Etoys-SpeechBubbles'!
SystemOrganization addCategory: #'Etoys-Squeakland-Etoys-Tile Scriptors'!
- SystemOrganization addCategory: #'Etoys-Squeakland-Graphics-External'!
SystemOrganization addCategory: #'Etoys-Squeakland-Graphics-Text'!
SystemOrganization addCategory: #'Etoys-Squeakland-Graphics-Tools-Intersection'!
SystemOrganization addCategory: #'Etoys-Squeakland-Graphics-Tools-Simplification'!
SystemOrganization addCategory: #'Etoys-Squeakland-Graphics-Tools-Triangulation'!
SystemOrganization addCategory: #'Etoys-Squeakland-MorphicExtras-AdditionalMorphs'!
SystemOrganization addCategory: #'Etoys-Squeakland-MorphicExtras-Charts'!
SystemOrganization addCategory: #'Etoys-Squeakland-MorphicExtras-Postscript Filters'!
SystemOrganization addCategory: #'Etoys-Squeakland-MorphicExtras-WebCam'!
SystemOrganization addCategory: #'Etoys-Squeakland-MorphicExtras-Widgets'!
SystemOrganization addCategory: #'Etoys-Squeakland-Morphic-Basic'!
SystemOrganization addCategory: #'Etoys-Squeakland-Morphic-Books'!
SystemOrganization addCategory: #'Etoys-Squeakland-Morphic-Components'!
SystemOrganization addCategory: #'Etoys-Squeakland-Morphic-Demo'!
SystemOrganization addCategory: #'Etoys-Squeakland-Morphic-Experimental'!
SystemOrganization addCategory: #'Etoys-Squeakland-Morphic-Games'!
SystemOrganization addCategory: #'Etoys-Squeakland-Morphic-Games-Chess'!
SystemOrganization addCategory: #'Etoys-Squeakland-Morphic-GeeMail'!
SystemOrganization addCategory: #'Etoys-Squeakland-Morphic-Kernel'!
SystemOrganization addCategory: #'Etoys-Squeakland-Morphic-Mentoring'!
SystemOrganization addCategory: #'Etoys-Squeakland-Morphic-Navigators'!
SystemOrganization addCategory: #'Etoys-Squeakland-Morphic-PartsBin'!
SystemOrganization addCategory: #'Etoys-Squeakland-Morphic-PDA'!
SystemOrganization addCategory: #'Etoys-Squeakland-Morphic-Support'!
SystemOrganization addCategory: #'Etoys-Squeakland-Morphic-Widgets'!
SystemOrganization addCategory: #'Etoys-Squeakland-Morphic-Windows'!
SystemOrganization addCategory: #'Etoys-Squeakland-Morphic-Worlds'!
SystemOrganization addCategory: #'Etoys-Squeakland-Multilingual-Languages'!
SystemOrganization addCategory: #'Etoys-Squeakland-Multilingual-TextConversion'!
SystemOrganization addCategory: #'Etoys-Squeakland-Network-HTML-Formatter'!
SystemOrganization addCategory: #'Etoys-Squeakland-Network-HTML-Forms'!
SystemOrganization addCategory: #'Etoys-Squeakland-Network-HTML-Parser'!
SystemOrganization addCategory: #'Etoys-Squeakland-Network-HTML-Parser Entities'!
SystemOrganization addCategory: #'Etoys-Squeakland-Network-HTML-Tokenizer'!
SystemOrganization addCategory: #'Etoys-Squeakland-Network-MIME'!
SystemOrganization addCategory: #'Etoys-Squeakland-Network-TelNet WordNet'!
SystemOrganization addCategory: #'Etoys-Squeakland-Network-UI'!
SystemOrganization addCategory: #'Etoys-Squeakland-Network-Url'!
SystemOrganization addCategory: #'Etoys-Squeakland-Protocols-Type Vocabularies'!
SystemOrganization addCategory: #'Etoys-Squeakland-Sound-Interface'!
SystemOrganization addCategory: #'Etoys-Squeakland-Sound-Ogg'!
SystemOrganization addCategory: #'Etoys-Squeakland-Sound-Scores'!
SystemOrganization addCategory: #'Etoys-Squeakland-ST80-Morphic'!
SystemOrganization addCategory: #'Etoys-Squeakland-SUnit'!
SystemOrganization addCategory: #'Etoys-Squeakland-Sugar'!
SystemOrganization addCategory: #'Etoys-Squeakland-System-Clipboard-Extended'!
SystemOrganization addCategory: #'Etoys-Squeakland-System-Compiler'!
SystemOrganization addCategory: #'Etoys-Squeakland-System-Exceptions Kernel'!
SystemOrganization addCategory: #'Etoys-Squeakland-System-Support'!
SystemOrganization addCategory: #'Etoys-Squeakland-Tools-Changes'!
SystemOrganization addCategory: #'Etoys-Squeakland-Tools-Explorer'!
SystemOrganization addCategory: #'Etoys-Squeakland-Tools-Process Browser'!
SystemOrganization addCategory: #'Etoys-Squeakland-Tweak-Kedama-ObjectVectors'!
SystemOrganization addCategory: #'Etoys-Squeakland-Tweak-Kedama-ParseTreeTransformer'!
SystemOrganization addCategory: #'Etoys-Squeakland-Tweak-Kedama-ParseTree-AttributeDefinition'!
SystemOrganization addCategory: #'Etoys-Stacks'!
SystemOrganization addCategory: #'Etoys-StarSqueak'!
SystemOrganization addCategory: #'Etoys-Support'!
SystemOrganization addCategory: #'Etoys-Tests'!
SystemOrganization addCategory: #'Etoys-Tile Scriptors'!
SystemOrganization addCategory: #'Etoys-Widgets'!
SystemOrganization addCategory: #'Etoys-Squeakland-Support'!
SystemOrganization addCategory: #'Etoys-Squeakland-SISS-Serialization'!
SystemOrganization addCategory: #'Etoys-OLPC-Display'!
SystemOrganization addCategory: #'Etoys-ReleaseBuilder'!
SystemOrganization addCategory: #'Etoys-UserInterfaceTheme'!
Item was removed:
- Form subclass: #ExternalForm
- instanceVariableNames: 'display argbMap'
- classVariableNames: ''
- poolDictionaries: ''
- category: 'Etoys-Squeakland-Graphics-External'!
-
- !ExternalForm commentStamp: '<historical>' prior: 0!
- An ExternalForm is just like any other form. It's only difference is that it is allocated on a specific display and can be used for accelerated blts on the particular display.
-
- Upon shutdown of the system ExternalForms will be deallocated from the display and be kept in their internalized form.!
Item was removed:
- ----- Method: ExternalForm>>colormapFromARGB (in category 'accessing') -----
- colormapFromARGB
- "Return a ColorMap mapping from canonical ARGB pixel values into the receiver"
- ^argbMap ifNil:[argbMap := ColorMap mappingFromARGB: self rgbaBitMasks].!
Item was removed:
- ----- Method: ExternalForm>>colormapFromARGB: (in category 'accessing') -----
- colormapFromARGB: aMap
- "Set the ColorMap mapping from canonical ARGB pixel values into the receiver"
- argbMap := aMap!
Item was removed:
- ----- Method: ExternalForm>>destroy (in category 'initialize-release') -----
- destroy
- "Destroy the receiver"
- display ifNotNil:[display destroyForm: self]!
Item was removed:
- ----- Method: ExternalForm>>displayScreen (in category 'accessing') -----
- displayScreen
- "Return the display screen the receiver is allocated on."
- ^display!
Item was removed:
- ----- Method: ExternalForm>>getExternalHandle (in category 'private') -----
- getExternalHandle
- "Private. Return the virtual handle used to represent the receiver"
- ^bits!
Item was removed:
- ----- Method: ExternalForm>>hasNonStandardPalette (in category 'testing') -----
- hasNonStandardPalette
- "Quite possible."
- ^display notNil or:[argbMap notNil]!
Item was removed:
- ----- Method: ExternalForm>>isExternalForm (in category 'testing') -----
- isExternalForm
- "I am an external form but only as long as I'm allocated on a display"
- ^display notNil!
Item was removed:
- ----- Method: ExternalForm>>rgbaBitMasks (in category 'accessing') -----
- rgbaBitMasks
- "Return the masks for specifying the R,G,B, and A components in the receiver"
- display
- ifNil:[^super rgbaBitMasks]
- ifNotNil:[^display rgbaBitMasksOfForm: self]!
Item was removed:
- ----- Method: ExternalForm>>setExternalHandle:on: (in category 'private') -----
- setExternalHandle: aHandle on: aDisplay
- "Initialize the receiver from the given external handle"
- display := aDisplay.
- bits := aHandle.!
Item was removed:
- ----- Method: ExternalForm>>shutDown (in category 'initialize-release') -----
- shutDown
- "System is going down. Internalize my bits and be finished."
- | copy |
- copy := Form extent: self extent depth: self depth.
- self displayOn: copy.
- copy hibernate. "compact bits of copy"
- self destroy. "Release my external handle"
- bits := copy bits. "Now compressed"
- display := nil. "No longer allocated"
- argbMap := nil. "No longer external"!
Item was removed:
- WeakKeyDictionary subclass: #ExternalFormRegistry
- instanceVariableNames: 'lockFlag'
- classVariableNames: ''
- poolDictionaries: ''
- category: 'Etoys-Squeakland-Graphics-External'!
-
- !ExternalFormRegistry commentStamp: '<historical>' prior: 0!
- The ExternalFormRegistry needs to be synchronized with rendering to prevent forms from being destroyed during rendering. Only at certain points (that is after a rendering cycle is completed) the texture registry may be cleaned up.!
Item was removed:
- ----- Method: ExternalFormRegistry>>finalizeValues (in category 'finalization') -----
- finalizeValues
- "This message is sent when an element has gone away."
- lockFlag == true ifTrue:[^self].
- self forceFinalization.!
Item was removed:
- ----- Method: ExternalFormRegistry>>forceFinalization (in category 'finalization') -----
- forceFinalization
- self associationsDo:[:assoc|
- assoc key isNil ifTrue:[assoc value destroy].
- ].
- super finalizeValues.!
Item was removed:
- ----- Method: ExternalFormRegistry>>lock (in category 'accessing') -----
- lock
- lockFlag := true!
Item was removed:
- ----- Method: ExternalFormRegistry>>unlock (in category 'accessing') -----
- unlock
- lockFlag := false.!
Item was removed:
- DisplayScreen subclass: #ExternalScreen
- instanceVariableNames: 'argbMap allocatedForms'
- classVariableNames: ''
- poolDictionaries: ''
- category: 'Etoys-Squeakland-Graphics-External'!
-
- !ExternalScreen commentStamp: '<historical>' prior: 0!
- I represent a DisplayScreen that is not part of the Squeak universe. Subclasses must implement the appropriate primitives for creating, destroying and allocating the appropriate external objects.
-
- Note: It is assumed that all external display surfaces are accessible by FXBlt, meaning that any support code must register the surfaces with the surface plugin. This requires that the support code will have a way of accessing the bits of the surface. Although this can be terribly expensive (such as on X where a roundtrip to the server might be required or for an OpenGL display where glReadPixels usually is slow as hell) the appropriate methods should be implemented. This allows for a gradual transition to less expensive model (such as implementing an X11Canvas supporting the drawing primitives of X) and is therefore the preferred solution.
-
- In the eventual case that it's known that BitBlt/FXBlt will *never* be used in conjunction with a particular drawing surface, the support code should return a handle that is a) not a SmallInteger (these are used by the surface plugin) and b) not of the 'bitsSize' of a Form. One possible representation for such a handle would be a ByteArray of a non-integral word size (e.g., a ByteArray of size 5,6, or 7). In this case, all attempts to use FXBlt with the drawing surface will simply fail.
- !
Item was removed:
- ----- Method: ExternalScreen>>allocateForm: (in category 'form support') -----
- allocateForm: extentPoint
- "Allocate a new form which is similar to the receiver and can be used for accelerated blts"
- | formHandle displayForm |
- formHandle := self primAllocateForm: self depth width: extentPoint x height: extentPoint y.
- formHandle = nil ifTrue:[^super allocateForm: extentPoint].
- displayForm := (ExternalForm extent: extentPoint depth: self depth bits: nil)
- setExternalHandle: formHandle on: self.
- allocatedForms at: displayForm put: displayForm executor.
- ^displayForm!
Item was removed:
- ----- Method: ExternalScreen>>colormapFromARGB (in category 'accessing') -----
- colormapFromARGB
- "Return a ColorMap mapping from canonical ARGB pixel values into the receiver"
- ^argbMap ifNil:[argbMap := ColorMap mappingFromARGB: self rgbaBitMasks].!
Item was removed:
- ----- Method: ExternalScreen>>copyBits:from:at:clippingBox:rule:fillColor:map: (in category 'blitting support') -----
- copyBits: sourceRect from: sourceForm at: destOrigin clippingBox: clipRect rule: rule fillColor: hf map: map
- "Attempt to accelerate blts to the receiver"
- | r |
- ((self isBltAccelerated: rule for: sourceForm) and:[map == nil and:[hf == nil]]) ifTrue:[
- "Try an accelerated blt"
- r := (destOrigin extent: sourceRect extent) intersect: (clipRect intersect: clippingBox).
- r area <= 0 ifTrue:[^self].
- (self primBltFast: bits from: sourceForm getExternalHandle
- at: r origin from: sourceRect origin
- extent: r extent) ifNotNil:[^self].
- ].
- ^super copyBits: sourceRect from: sourceForm at: destOrigin clippingBox: clipRect rule: rule fillColor: hf map: map!
Item was removed:
- ----- Method: ExternalScreen>>destroy (in category 'initialize-release') -----
- destroy
- "Destroy the receiver"
- allocatedForms ifNotNil:[
- allocatedForms lock. "Make sure we don't get interrupted"
- allocatedForms forceFinalization. "Clean up all lost references"
- allocatedForms keys do:[:stillValid| stillValid shutDown].
- "All remaining references are simply destroyed"
- allocatedForms associationsDo:[:assoc| assoc key: nil].
- allocatedForms forceFinalization. "destroy all others"
- allocatedForms := nil.
- ].
- bits ifNotNil:[self primDestroyDisplaySurface: bits].
- bits := nil.!
Item was removed:
- ----- Method: ExternalScreen>>destroyForm: (in category 'form support') -----
- destroyForm: anExternalForm
- "Destroy the given external form"
- self primDestroyForm: anExternalForm getExternalHandle.
- anExternalForm setExternalHandle: nil on: nil.
- allocatedForms removeKey: anExternalForm ifAbsent:[].!
Item was removed:
- ----- Method: ExternalScreen>>displayOn:at:clippingBox:rule:fillColor: (in category 'blitting support') -----
- displayOn: destForm at: destOrigin clippingBox: clipRect rule: rule fillColor: hf
- "Attempt to accelerate blts to aDisplayMedium"
- | sourceRect |
- ((self isBltAccelerated: rule for: destForm) and:[hf = nil]) ifTrue:[
- "Try an accelerated blt"
- sourceRect := (clipRect translateBy: destOrigin negated) intersect: clippingBox.
- (self primBltFast: bits to: destForm getExternalHandle
- at: 0@0 from: sourceRect origin
- extent: sourceRect extent) ifNotNil:[^self]].
- destForm copyBits: self boundingBox
- from: self
- at: destOrigin + self offset
- clippingBox: clipRect
- rule: rule
- fillColor: hf
- map: (self colormapIfNeededFor: destForm).
- !
Item was removed:
- ----- Method: ExternalScreen>>fill:rule:fillColor: (in category 'blitting support') -----
- fill: aRectangle rule: anInteger fillColor: aColor
- "Replace a rectangular area of the receiver with the pattern described by aForm
- according to the rule anInteger."
- | rect |
- (self isFillAccelerated: anInteger for: aColor) ifTrue:[
- rect := aRectangle intersect: clippingBox.
- (self primFill: bits
- color: (self pixelWordFor: aColor)
- x: rect left
- y: rect top
- w: rect width
- h: rect height) ifNotNil:[^self]].
- ^super fill: aRectangle rule: anInteger fillColor: aColor!
Item was removed:
- ----- Method: ExternalScreen>>finish (in category 'initialize-release') -----
- finish
- "Flush the receiver"
- self primFinish: bits.
- "Now is the time to do some cleanup"
- allocatedForms unlock.
- allocatedForms finalizeValues.!
Item was removed:
- ----- Method: ExternalScreen>>flush (in category 'initialize-release') -----
- flush
- "Flush the receiver"
- self primFlush: bits.!
Item was removed:
- ----- Method: ExternalScreen>>hasNonStandardPalette (in category 'testing') -----
- hasNonStandardPalette
- "Quite possible."
- ^true!
Item was removed:
- ----- Method: ExternalScreen>>isBltAccelerated:for: (in category 'blitting support') -----
- isBltAccelerated: ruleInteger for: aForm
- "Return true if the receiver can perform accelerated blt operations by itself.
- It is assumed that blts of forms allocated on the receiverusing Form>>over
- may be accelerated.
- Although some hardware may allow source-key blts (that is, Form>>paint or similar)
- this is usually questionable and the additional effort for allocating and
- maintaining the OS form doesn't quite seem worth the effort."
- ^aForm displayScreen == self and:[ruleInteger = Form over]!
Item was removed:
- ----- Method: ExternalScreen>>isExternalForm (in category 'testing') -----
- isExternalForm
- "Sorta. Kinda."
- ^true!
Item was removed:
- ----- Method: ExternalScreen>>isFillAccelerated:for: (in category 'blitting support') -----
- isFillAccelerated: ruleInteger for: aColor
- "Return true if the receiver can perform accelerated fill operations by itself.
- It is assumed that the hardware can accelerate plain color fill operations."
- ^ruleInteger = Form over and:[aColor isColor]!
Item was removed:
- ----- Method: ExternalScreen>>primAllocateForm:width:height: (in category 'primitives-forms') -----
- primAllocateForm: d width: w height: h
- "Primitive. Allocate a form with the given parameters"
- ^nil!
Item was removed:
- ----- Method: ExternalScreen>>primBltFast:from:at:from:extent: (in category 'primitives-display') -----
- primBltFast: displayHandle from: sourceHandle at: destOrigin from: sourceOrigin extent: extent
- "Primitive. Perform a fast blt operation. Return the receiver if successful."
- ^nil!
Item was removed:
- ----- Method: ExternalScreen>>primBltFast:to:at:from:extent: (in category 'primitives-display') -----
- primBltFast: displayHandle to: dstHandle at: destOrigin from: sourceOrigin extent: extent
- "Primitive. Perform a fast blt operation. Return the receiver if successful."
- ^nil!
Item was removed:
- ----- Method: ExternalScreen>>primCreateDisplaySurface:width:height: (in category 'primitives-display') -----
- primCreateDisplaySurface: d width: w height: h
- "Primitive. Create a new external display surface. Return the handle used to identify the receiver. Fail if the surface cannot be created."
- ^nil!
Item was removed:
- ----- Method: ExternalScreen>>primDestroyDisplaySurface: (in category 'primitives-display') -----
- primDestroyDisplaySurface: aHandle
- "Primitive. Destroy the display surface associated with the given handle."
- ^nil!
Item was removed:
- ----- Method: ExternalScreen>>primDestroyForm: (in category 'primitives-forms') -----
- primDestroyForm: aHandle
- "Primitive. Destroy the form associated with the given handle."
- ^nil!
Item was removed:
- ----- Method: ExternalScreen>>primDisplay:colorMasksInto: (in category 'primitives-display') -----
- primDisplay: aHandle colorMasksInto: anArray
- "Primitive. Store the bit masks for each color into the given array."
- ^nil!
Item was removed:
- ----- Method: ExternalScreen>>primFill:color:x:y:w:h: (in category 'primitives-display') -----
- primFill: handle color: pixelWord x: x y: y w: w h: h
- "Primitive. Perform an accelerated fill operation on the receiver."
- ^nil!
Item was removed:
- ----- Method: ExternalScreen>>primFinish: (in category 'primitives-display') -----
- primFinish: aHandle
- "Primitive. Finish all rendering operations on the receiver.
- Do not return before all rendering operations have taken effect."
- ^nil!
Item was removed:
- ----- Method: ExternalScreen>>primFlush: (in category 'primitives-display') -----
- primFlush: aHandle
- "Primitive. If any rendering operations are pending, force them to be executed.
- Do not wait until they have taken effect."
- ^nil!
Item was removed:
- ----- Method: ExternalScreen>>primForm:colorMasksInto: (in category 'primitives-forms') -----
- primForm: aHandle colorMasksInto: anArray
- "Primitive. Store the bit masks for each color into the given array."
- ^nil!
Item was removed:
- ----- Method: ExternalScreen>>release (in category 'initialize-release') -----
- release
- "I am no longer Display. Release any resources if necessary"
- self destroy!
Item was removed:
- ----- Method: ExternalScreen>>rgbaBitMasks (in category 'accessing') -----
- rgbaBitMasks
- "Return the masks for specifying the R,G,B, and A components in the receiver"
- | rgbaBitMasks |
- rgbaBitMasks := Array new: 4.
- self primDisplay: bits colorMasksInto: rgbaBitMasks.
- ^rgbaBitMasks!
Item was removed:
- ----- Method: ExternalScreen>>rgbaBitMasksOfForm: (in category 'form support') -----
- rgbaBitMasksOfForm: anExternalForm
- | rgbaBitMasks |
- rgbaBitMasks := Array new: 4.
- self primForm: anExternalForm getExternalHandle colorMasksInto: rgbaBitMasks.
- ^rgbaBitMasks!
Item was removed:
- ----- Method: ExternalScreen>>setExtent:depth: (in category 'private') -----
- setExtent: aPoint depth: bitsPerPixel
- "Create a 3D accelerated display screen"
- | screen |
- (bits isInteger and:[depth == bitsPerPixel and: [aPoint = self extent and:
- [self supportsDisplayDepth: bitsPerPixel]]]) ifFalse: [
- bits ifNotNil:[self primDestroyDisplaySurface: bits].
- bits := nil. "Free up old bitmap in case space is low"
- DisplayChangeSignature := (DisplayChangeSignature ifNil: [0]) + 1.
- (self supportsDisplayDepth: bitsPerPixel)
- ifTrue:[depth := bitsPerPixel]
- ifFalse:["Search for a suitable depth"
- depth := self findAnyDisplayDepthIfNone:[nil]].
- depth == nil ifFalse:[
- bits := self primCreateDisplaySurface: depth
- width: aPoint x height: aPoint y].
- "Bail out if surface could not be created"
- (bits == nil) ifTrue:[
- screen := DisplayScreen extent: aPoint depth: bitsPerPixel.
- self == Display ifTrue:[
- Display := screen.
- Display beDisplay].
- ^screen].
- width := aPoint x.
- height := aPoint y.
- ].
- clippingBox := super boundingBox.
- allocatedForms ifNil:[
- allocatedForms := ExternalFormRegistry new.
- WeakArray addWeakDependent: allocatedForms].
- !
Item was removed:
- ----- Method: ExternalScreen>>shutDown (in category 'initialize-release') -----
- shutDown
- "Minimize Display memory saved in image"
- self destroy.
- width := 240.
- height := 120.
- bits := Bitmap new: self bitsSize.!
Item was removed:
- ----- Method: ExternalScreen>>supportsDisplayDepth: (in category 'primitives-display') -----
- supportsDisplayDepth: pixelDepth
- "Return true if this pixel depth is supported on the current host platform."
- ^false!
Patrick Rein uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-pre.193.mcz
==================== Summary ====================
Name: Network-pre.193
Author: pre
Time: 5 May 2017, 12:44:37.57778 pm
UUID: e87e8e26-f5d5-1a41-a1ca-0667bbf04316
Ancestors: Network-pre.192
Adds an accessor for the messageId field as it is also part of the essential fields similar to to, from and subject
=============== Diff against Network-pre.192 ===============
Item was added:
+ ----- Method: MailMessage>>messageId (in category 'access') -----
+ messageId
+
+ ^ (self fieldNamed: 'message-id' ifAbsent: [ ^'' ]) mainValue
+ !