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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Eliot Miranda-3
 
  Branch: refs/heads/Cog
  Home:   https://github.com/OpenSmalltalk/opensmalltalk-vm
  Commit: 2f27a1e1f213943a6f7860713f5d78f15310ac8d
      https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/2f27a1e1f213943a6f7860713f5d78f15310ac8d
  Author: Eliot Miranda <[hidden email]>
  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.


Reply | Threaded
Open this post in threaded view
|

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

alistairgrant
 
Hi Eliot,

On Wed, 6 Mar 2019 at 19:09, Eliot Miranda <[hidden email]> 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 <[hidden email]>
>   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
Reply | Threaded
Open this post in threaded view
|

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

Eliot Miranda-2
 
Hi Alistair,

On Wed, Mar 6, 2019 at 10:50 PM Alistair Grant <[hidden email]> wrote:
 
Hi Eliot,

On Wed, 6 Mar 2019 at 19:09, Eliot Miranda <[hidden email]> 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 <[hidden email]>
>   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).

Oops!! Stupid me!  Good catch; thanks.
 

Otherwise, this all looks good.

Thanks,
Alistair


--
_,,,^..^,,,_
best, Eliot