I was curious if anyone has done any work on plugin support for this? I
saw a post from Mariano back in 2016 but no one replied. So just wondering
(Mariano? Others?) has done anything on this front?
Thanks,
Phil
Eliot Miranda uploaded a new version of VMMakerCompatibilityForPharo6 to project VM Maker:
http://source.squeak.org/VMMaker/VMMakerCompatibilityForPharo6-eem.5.mcz
==================== Summary ====================
Name: VMMakerCompatibilityForPharo6-eem.5
Author: eem
Time: 21 August 2018, 11:51:45.586277 am
UUID: 64432741-5830-0d00-aa5a-8304056c426e
Ancestors: VMMakerCompatibilityForPharo6-eem.4
Add isNodeNil to RBProgramNode & subclass
=============== Diff against VMMakerCompatibilityForPharo6-eem.4 ===============
Item was added:
+ ----- Method: RBLiteralValueNode>>isNodeNil (in category '*VMMakerCompatibilityForPharo6-testing') -----
+ isNodeNil
+ ^value == nil!
Item was changed:
----- Method: RBMessageNode>>asTranslatorNodeIn: (in category '*VMMakerCompatibilityForPharo6-C translation') -----
asTranslatorNodeIn: aTMethod
"Answer a TParseNode subclass equivalent of me"
"selector is sometimes a Symbol, sometimes a SelectorNode!!
On top of this, numArgs is needed due to the (truly grody) use of
arguments as a place to store the extra expressions needed to generate
code for in-line to:by:do:, etc. see below, where it is used.
Expand super nodes in place. Elide sends of halt so that halts can be
sprinkled through the simulator but will be eliminated from the generated C."
| rcvrOrNil sel args ifNotNilBlock |
rcvrOrNil := receiver ifNotNil: [receiver asTranslatorNodeIn: aTMethod].
(rcvrOrNil notNil
and: [rcvrOrNil isVariable
and: [rcvrOrNil name = 'super']]) ifTrue:
[^aTMethod superExpansionNodeFor: selector key args: arguments].
sel := selector isSymbol ifTrue: [selector] ifFalse: [selector key].
sel == #halt ifTrue: [^rcvrOrNil].
(sel == #cCode:inSmalltalk: "extracting here rather than in translation allows inlining in the block."
or: [sel == #cCode:]) ifTrue:
[arguments first isBlockNode ifTrue:
[| block |
^(block := arguments first asTranslatorNodeIn: aTMethod) statements size = 1
ifTrue: [block statements first]
ifFalse: [block]].
(arguments first isLiteralNode
and: [arguments first key isString
and: [arguments first key isEmpty]]) ifTrue:
[^arguments first asTranslatorNodeIn: aTMethod]].
args := arguments
select: [:arg| arg notNil]
thenCollect: [:arg| arg asTranslatorNodeIn: aTMethod].
(sel = #to:by:do: and: [arguments size = 7 and: [(arguments at: 7) notNil]]) ifTrue:
["Restore limit expr that got moved by transformToDo:"
args := {(arguments at: 7) value asTranslatorNodeIn: aTMethod.
args second.
args third. "add the limit var as a hidden extra argument; we may need it later"
TVariableNode new setName: arguments first key}].
+ (sel == #ifTrue:ifFalse: and: [arguments first isNodeNil]) ifTrue:
- (sel == #ifTrue:ifFalse: and: [arguments first isJust: NodeNil]) ifTrue:
[sel := #ifFalse:. args := {args last}].
+ (sel == #ifTrue:ifFalse: and: [arguments last isNodeNil]) ifTrue:
- (sel == #ifTrue:ifFalse: and: [arguments last isJust: NodeNil]) ifTrue:
[sel := #ifTrue:. args := {args first}].
+ (sel == #ifFalse:ifTrue: and: [arguments first isNodeNil]) ifTrue:
- (sel == #ifFalse:ifTrue: and: [arguments first isJust: NodeNil]) ifTrue:
[sel := #ifTrue:. args := {args last}].
+ (sel == #ifFalse:ifTrue: and: [arguments last isNodeNil]) ifTrue:
- (sel == #ifFalse:ifTrue: and: [arguments last isJust: NodeNil]) ifTrue:
[sel := #ifTrue:. args := {args first}].
((sel == #ifFalse: or: [sel == #or:])
and: [arguments size = 2 and: [(arguments at: 2) notNil]]) ifTrue:
["Restore argument block that got moved by transformOr: or transformIfFalse:"
args := {(arguments at: 2) asTranslatorNodeIn: aTMethod}].
(args size > sel numArgs and: [sel ~~ #to:by:do:]) ifTrue: "to:by:do: has iLimiT hidden in last arg"
["prune the extra blocks left by ifTrue:, ifFalse:, and: & or:"
self assert: args size - sel numArgs = 1.
self assert: (args last isStmtList
and: [args last statements size = 1
and: [(args last statements first isVariable
or: [args last statements first isConstant])
and: [#('nil' true false) includes: args last statements first nameOrValue]]]).
args := args first: sel numArgs].
"For the benefit of later passes, e.g. value: inlining,
transform e ifNotNil: [:v| ...] into v := e. v ifNotNil: [...],
which in fact means transforming (v := e) ifTrue: [:v|...] into v := e. v ifTrue: [...]."
((sel == #ifTrue: or: [sel == #ifFalse: or: [sel == #ifTrue:ifFalse: or: [sel == #ifFalse:ifTrue:]]])
and: [receiver notNil
and: [receiver isAssignmentEqualsEqualsNil
and: [(ifNotNilBlock := args detect: [:arg| arg isStmtList and: [arg args size = 1]] ifNone: []) notNil]]]) ifTrue:
[ifNotNilBlock setArguments: #().
^TStmtListNode new
setArguments: #()
statements:
{ receiver receiver asTranslatorNodeIn: aTMethod.
TSendNode new
setSelector: sel
receiver: (TSendNode new
setSelector: #==
receiver: (receiver receiver variable asTranslatorNodeIn: aTMethod)
arguments: {receiver arguments first asTranslatorNodeIn: aTMethod})
arguments: args }].
((CCodeGenerator isVarargsSelector: sel)
and: [args last isCollection
and: [args last isSequenceable]]) ifTrue:
[args := args allButLast, args last].
^TSendNode new
setSelector: sel
receiver: rcvrOrNil
arguments: args!
Item was added:
+ ----- Method: RBProgramNode>>isNodeNil (in category '*VMMakerCompatibilityForPharo6-testing') -----
+ isNodeNil
+ ^false!
Could the VM provide an option for separating its own output from the image's output?
Concretely, the VM complains about pthread_setschedparam in my Travis builds, which prevents writing command-line scripts with clean output both on stdout and stderr. See https://github.com/hpi-swa/smalltalkCI/issues/388
Maybe it's possible to play with the file descriptors at image startup, but it would make sense if the VM itself had something like a `--silent` or a `--vm-stderr FILE` flag (the JVM has `-Xlog`) to redirect its diagnostic messages so that anything that goes to stdout or stderr exclusively comes from the image.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/275
According to the comment for primitiveFileStdioHandles():
Answer an Array of file handles for standard in, standard out and standard
error, with nil in entries that are unvailable, e.g. because the platform
does not provide standard error, etc.
However, on Windows in practice an array of sqFile entries with null handles is returned. The image is unable to distinguish between valid and invalid entries since sqFile is specific to the VM.
Modify the Windows VM so that nil is returned if stdio is unavailable. Check linux behaviour.
PR will be provided (eventually).
Cheers,
Alistair
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/274
Now the installation is extracted to a reusable batch script and install all dependencies, including the ones installed by default on appveyor. This allows the users of the vm to use the script to build their own cygwin to compile the vm without having to look for all needed dependencies.
I am not sure it will work at the first try. I do a PR to let appveyor test it for me.
You can view, comment on, or merge this pull request online at:
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/242
-- Commit Summary --
* Refactor cygwin installation for appveyor. Now the installation is extracted to a reusable batch script and install all dependencies, including the ones installed by default on appveyor. This allow the users of the vm to use the script to build their own cygwin to compile the vm without having to look for all neededs dependencies.
-- File Changes --
M .appveyor.yml (21)
A .appveyor_installCygwin.bat (70)
M build.win32x86/HowToBuild (3)
M build.win64x64/HowToBuild (2)
-- Patch Links --
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/242.patchhttps://github.com/OpenSmalltalk/opensmalltalk-vm/pull/242.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/242