A new version of VMMaker was added to project VM Maker Inbox:
http://source.squeak.org/VMMakerInbox/VMMaker.oscog-akg.2497.mcz==================== Summary ====================
Name: VMMaker.oscog-akg.2497
Author: akg
Time: 21 December 2018, 7:27:08.032339 pm
UUID: 4ddda785-b06e-4579-9cfe-3d305534d30d
Ancestors: VMMaker.oscog-eem.2496
FilePlugin>>primitiveFileRename
... fails in the simulator since the call to sCRFfn wasn't simulated.
Always allow the rename in the simulated code (if it really isn't allowed it will be picked up when the primitive is called).
=============== Diff against VMMaker.oscog-eem.2496 ===============
Item was changed:
----- Method: FilePlugin>>primitiveFileRename (in category 'file primitives') -----
primitiveFileRename
| oldNamePointer newNamePointer oldNameIndex oldNameSize newNameIndex newNameSize okToRename |
<var: 'oldNameIndex' type: 'char *'>
<var: 'newNameIndex' type: 'char *'>
<export: true>
newNamePointer := interpreterProxy stackValue: 0.
oldNamePointer := interpreterProxy stackValue: 1.
((interpreterProxy isBytes: newNamePointer)
and: [interpreterProxy isBytes: oldNamePointer])
ifFalse: [^interpreterProxy primitiveFail].
newNameIndex := interpreterProxy firstIndexableField: newNamePointer.
newNameSize := interpreterProxy byteSizeOf: newNamePointer.
oldNameIndex := interpreterProxy firstIndexableField: oldNamePointer.
oldNameSize := interpreterProxy byteSizeOf: oldNamePointer.
"If the security plugin can be loaded, use it to check for rename permission.
If not, assume it's ok"
+ sCRFfn ~= 0 ifTrue:
+ [okToRename := self cCode: ' ((sqInt (*)(char *, sqInt))sCRFfn)(oldNameIndex, oldNameSize)'
+ inSmalltalk: [true].
+ okToRename ifFalse: [^interpreterProxy primitiveFail]].
- sCRFfn ~= 0
- ifTrue: [okToRename := self cCode: ' ((sqInt (*)(char *, sqInt))sCRFfn)(oldNameIndex, oldNameSize)'.
- okToRename
- ifFalse: [^interpreterProxy primitiveFail]].
self
sqFileRenameOld: oldNameIndex Size: oldNameSize
New: newNameIndex Size: newNameSize.
interpreterProxy failed
ifFalse: [interpreterProxy pop: 2]!