[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 2f27a1: CogVM source as per VMMaker.oscog-eem.2525/FileAtt...

Alistair Grant akgrant0710 at gmail.com
Thu Mar 7 06:49:46 UTC 2019


Hi Eliot,

On Wed, 6 Mar 2019 at 19:09, Eliot Miranda <noreply at github.com> wrote:
>
>
>   Branch: refs/heads/Cog
>   Home:   https://github.com/OpenSmalltalk/opensmalltalk-vm
>   Commit: 2f27a1e1f213943a6f7860713f5d78f15310ac8d
>       https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/2f27a1e1f213943a6f7860713f5d78f15310ac8d
>   Author: Eliot Miranda <eliot.miranda at gmail.com>
>   Date:   2019-03-06 (Wed, 06 Mar 2019)
>
>   Changed paths:
>     M platforms/unix/plugins/FileAttributesPlugin/faSupport.c
>     M platforms/unix/plugins/FileAttributesPlugin/faSupport.h
>     M platforms/win32/plugins/FileAttributesPlugin/faSupport.c
>     M platforms/win32/plugins/FileAttributesPlugin/faSupport.h
>     M src/plugins/FileAttributesPlugin/FileAttributesPlugin.c
>     M src/plugins/SqueakFFIPrims/ARM32FFIPlugin.c
>     M src/plugins/SqueakFFIPrims/SqueakFFIPrims.c
>
>   Log Message:
>   -----------
>   CogVM source as per VMMaker.oscog-eem.2525/FileAttributesPlugin.oscog-eem.50
>
> Plugins:
>
> ThreadedFFIPlugin: Make sure the ARM identifyingPredefinedMacros do not
> confuse 32 & 64 bits.
>
> FileAttributesPlugin:
> Simpification and simulaiton of primitiveFileExists & primitivePathMax,
> using the simpler and more efficient methodreturnXXX: protocol.

You've replaced:

sqInt faExists(fapath *aFaPath)
{
if (access(faGetPlatPath(aFaPath), F_OK))
return interpreterProxy->falseObject();
else
return interpreterProxy->trueObject();
}

with:

#define faExists(aFaPath) access(faGetPlatPath(aFaPath), F_OK)

But this appears to invert the value returned (access() should be
treated as a predicate function which returns true if the requested
access is denied).

Otherwise, this all looks good.

Thanks,
Alistair


More information about the Vm-dev mailing list