If I'm not mistaken, I cannot find the actual hardware description of
the hardware they used in:
https://dl.acm.org/citation.cfm?id=800542
except that it mentions a microprocessor a few times. Does anybody
know what was the microprocessor they experimented with?
--
-- Yoshiki
Thought I would share this,as its pretty cool:
CommandShell command: 'lua -l BananasArgs -e ''p = require("BananasArgs") frame = {} frame["args"] = {"Fred", bananas=5, cherries=2} print(p.has_fruit(frame))'' | inspect; exit'
Where BananasArgs is from Wikimedia https://en.wikipedia.org/wiki/Module:BananasArgs
I am considering writing a Wikitext parser using Squeak.
A prerequisite is that I be able to invoke Lua code "Modules" in wikimedia parlance. After some poking around, that requirement appears feasable...also, its pretty cool to be able to do that from Squeak. Big smiles (:
So with that proved, I need a Parser to parse Wikitext.
Any recommendations? PetitParser looks pretty cool but I haven't tried to load it into Squeak yet.
Does Squeak Scanner or something else seem viable to you?
Thanks in advance.
Marcel Taeumel uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-mt.406.mcz
==================== Summary ====================
Name: Compiler-mt.406
Author: mt
Time: 24 July 2019, 5:10:22.611145 pm
UUID: 6d65ea45-4488-471b-a9cf-b4a16cac35f3
Ancestors: Compiler-mt.405
Minor performance improvement for has-literal checks. Thanks to Levente for the ideas!
Still not sure about putting true/false/nil-checks to the top. Also not sure the complex return blocks for symbol/character/integer.
=============== Diff against Compiler-mt.405 ===============
Item was changed:
----- Method: BytecodeEncoder class>>canBeSpecialLiteral: (in category 'testing') -----
canBeSpecialLiteral: aLiteral
+ "This check can be used to prevent unnecessary use of #scanBlockOrNilForLiteral:. For performance, this method summarizes specializations from all known bytecode encoders. It is not meant to be refined per bytecode encoder."
- "This check can be used to prevent unnecessary use of #scanBlockOrNilForLiteral:. For performance, this method summarizes specializations from all known bytecode encoders. It is not meant to be refined per encoder."
+ aLiteral isSymbol ifTrue: [^ Smalltalk specialSelectors identityIncludes: aLiteral].
+ aLiteral isCharacter ifTrue: [^ aLiteral asInteger <= 65535].
+ aLiteral isInteger ifTrue: [^ aLiteral between: -32768 and: 32767].
+
+ aLiteral == true ifTrue: [^ true].
+ aLiteral == false ifTrue: [^ true].
+ aLiteral == nil ifTrue: [^ true].
+
+ ^ false!
- ^ ((((((aLiteral isSymbol and: [Smalltalk specialSelectors includes: aLiteral])
- or: [aLiteral isInteger and: [aLiteral between: -32768 and: 32767]])
- or: [aLiteral isCharacter and: [aLiteral asInteger <= 65535]])
- or: [aLiteral == true])
- or: [aLiteral == false])
- or: [aLiteral == nil])!
Marcel Taeumel uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-mt.405.mcz
==================== Summary ====================
Name: Compiler-mt.405
Author: mt
Time: 24 July 2019, 11:17:04.167109 am
UUID: 7354b36e-2509-4f23-b110-1b9cfe0310d2
Ancestors: Compiler-mt.404
Adds message to avoid costly byte-code scanning for has-literal checks.
Note that ((... or: [...]) or: [...] ...) is a little bit faster to evaluate to false than (... or: [ ... or: [ ... ] ] ). I would suspect not but deeply nested blocks seem to have an interesting effect here.
=============== Diff against Compiler-mt.404 ===============
Item was added:
+ ----- Method: BytecodeEncoder class>>canBeSpecialLiteral: (in category 'testing') -----
+ canBeSpecialLiteral: aLiteral
+ "This check can be used to prevent unnecessary use of #scanBlockOrNilForLiteral:. For performance, this method summarizes specializations from all known bytecode encoders. It is not meant to be refined per encoder."
+
+ ^ ((((((aLiteral isSymbol and: [Smalltalk specialSelectors includes: aLiteral])
+ or: [aLiteral isInteger and: [aLiteral between: -32768 and: 32767]])
+ or: [aLiteral isCharacter and: [aLiteral asInteger <= 65535]])
+ or: [aLiteral == true])
+ or: [aLiteral == false])
+ or: [aLiteral == nil])!
Marcel Taeumel uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-mt.1250.mcz
==================== Summary ====================
Name: Kernel-mt.1250
Author: mt
Time: 24 July 2019, 11:44:15.067109 am
UUID: 00753086-db4b-4706-bde7-c6d5ea190c04
Ancestors: Kernel-mt.1249
Speeds up deletion of class variables or shared pools.
=============== Diff against Kernel-mt.1249 ===============
Item was changed:
----- Method: Behavior>>whichSelectorsReferTo: (in category 'testing method dictionary') -----
whichSelectorsReferTo: literal
+ "Answer a Set of selectors whose methods access the argument as a literal. Note that we cannot use #systemNavigation because this method should not depend on the 'System' package."
- "Answer a Set of selectors whose methods access the argument as a literal."
+ | who canBeSpecial |
+ canBeSpecial := BytecodeEncoder canBeSpecialLiteral: literal.
- | who |
who := IdentitySet new.
self selectorsAndMethodsDo: [:selector :method |
+ (method hasLiteral: literal scanForSpecial: canBeSpecial)
- (method hasLiteral: literal)
ifTrue: [who add: selector]].
^ who
"Rectangle whichSelectorsReferTo: #+."!
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1075.mcz
==================== Summary ====================
Name: System-mt.1075
Author: mt
Time: 24 July 2019, 11:18:57.127109 am
UUID: 6b2a8705-b2bc-46c3-8dea-34873ae97d6e
Ancestors: System-mt.1074
Speed up search for senders based on Compiler-mt.405 and Kernel-mt.1249.
=============== Diff against System-mt.1074 ===============
Item was changed:
----- Method: SystemNavigation>>allCallsOn:fromBehaviors:sorted: (in category 'query') -----
allCallsOn: aLiteral fromBehaviors: behaviors sorted: sorted
"Answer a collection of all the methods implemented by behaviors that call on aLiteral even deeply embedded in literal arrays."
+ | result canBeSpecial |
- | result |
result := OrderedCollection new.
+ canBeSpecial := BytecodeEncoder canBeSpecialLiteral: aLiteral.
behaviors do: [:behavior |
behavior selectorsAndMethodsDo: [:selector :method |
+ (method hasLiteral: aLiteral scanForSpecial: canBeSpecial)
- (method hasLiteral: aLiteral)
ifTrue: [result addLast: method methodReference]]].
sorted ifTrue: [result sort].
^result!
Item was changed:
----- Method: SystemNavigation>>allCallsOn:fromMethodReferences:sorted: (in category 'query') -----
allCallsOn: aLiteral fromMethodReferences: methodReferences sorted: sorted
"Answer a collection of all the methods implemented by behaviors that call on aLiteral even deeply embedded in literal arrays."
+ | result canBeSpecial |
+ canBeSpecial := BytecodeEncoder canBeSpecialLiteral: aLiteral.
- | result |
result := methodReferences select: [:reference |
reference compiledMethod
ifNil: [false]
+ ifNotNil: [:method | method hasLiteral: aLiteral scanForSpecial: canBeSpecial]].
- ifNotNil: [:method | method hasLiteral: aLiteral]].
sorted ifTrue: [result sort].
^result!
Marcel Taeumel uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-mt.1249.mcz
==================== Summary ====================
Name: Kernel-mt.1249
Author: mt
Time: 24 July 2019, 11:17:56.945109 am
UUID: 5eb63b7e-5e78-45cf-a338-98326b5f26a4
Ancestors: Kernel-fn.1248
Uses special-literal check from Compiler-mt.405 to speed up #hasLiteral:.
=============== Diff against Kernel-fn.1248 ===============
Item was changed:
----- Method: CompiledCode>>hasLiteral: (in category 'literals') -----
hasLiteral: aLiteral
+ "Overwrite this method to invoke the bytecode encoder scanner explicitely. This might be removed if there would be a way to enumerate special literals in a compiled-code object. See #allLiteralsDo:."
- "Since we cannot enumerate this code's special literals, we have to overwrite this method to invoke the encoder scanner explicitely."
+ ^ self
+ hasLiteral: aLiteral
+ scanForSpecial: (BytecodeEncoder canBeSpecialLiteral: aLiteral)!
- | scanBlock |
- (super hasLiteral: aLiteral) ifTrue: [^ true].
-
- scanBlock := self class
- scanBlocksForLiteral: aLiteral
- do: [:primaryScanner :secondaryScanner |
- "E.g., scanner for SistaV1 or scanner for V3PlusClosures"
- self signFlag ifTrue: [secondaryScanner] ifFalse: [primaryScanner]].
-
- self codeLiteralsDo: [:compiledCode |
- (compiledCode scanFor: scanBlock) ifTrue: [^ true]].
-
- ^ false!
Item was added:
+ ----- Method: CompiledCode>>hasLiteral:scanForSpecial: (in category 'literals') -----
+ hasLiteral: aLiteral scanForSpecial: aBoolean
+ "Like #hasLiteral: but can scan for encoder-specific special literals. Not that scanning has a noticeable performance impact."
+
+ | scanBlock |
+ (super hasLiteral: aLiteral) ifTrue: [^ true].
+
+ aBoolean ifFalse: [^ false].
+
+ scanBlock := self class
+ scanBlocksForLiteral: aLiteral
+ do: [:primaryScanner :secondaryScanner |
+ "E.g., scanner for SistaV1 or scanner for V3PlusClosures"
+ self signFlag ifTrue: [secondaryScanner] ifFalse: [primaryScanner]].
+
+ self codeLiteralsDo: [:compiledCode |
+ (compiledCode scanFor: scanBlock) ifTrue: [^ true]].
+
+ ^ false!
Fabio Niephaus uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-fn.847.mcz
==================== Summary ====================
Name: Collections-fn.847
Author: fn
Time: 24 July 2019, 9:23:16.683899 am
UUID: 22fbf3f6-8234-41df-9de5-a38187e659c6
Ancestors: Collections-mt.846
Remove redundant methods for copying from Character (following Chris' suggestion at http://forum.world.st/The-Trunk-Kernel-fn-1223-mcz-tp5098738p5098777.html).
=============== Diff against Collections-mt.846 ===============
Item was removed:
- ----- Method: Character>>copy (in category 'copying') -----
- copy
- "Answer the receiver, because Characters are unique."
- ^self!
Item was removed:
- ----- Method: Character>>postCopy (in category 'copying') -----
- postCopy
- "I will never be copied"
- ^self shouldNotImplement!