[Vm-dev] [commit][3374] CogVm source as per VMMaker.oscog-eem.1349

Esteban Lorenzano estebanlm at gmail.com
Wed Jun 17 07:22:40 UTC 2015


> On 17 Jun 2015, at 07:45, Ryan Macnak <rmacnak at gmail.com> wrote:
> 
> On Sat, Jun 13, 2015 at 12:17 AM, Esteban Lorenzano <estebanlm at gmail.com <mailto:estebanlm at gmail.com>> wrote:
>  
> 
>> On 13 Jun 2015, at 03:38, Ryan Macnak <rmacnak at gmail.com <mailto:rmacnak at gmail.com>> wrote:
>> 
>> On Fri, Jun 12, 2015 at 12:43 AM, Esteban Lorenzano <estebanlm at gmail.com <mailto:estebanlm at gmail.com>> wrote:
>> extern extern sqInt superclassOf(sqInt classPointer);
>> gcc 4.6.3 (Travis CI) also says this is an error.
>> 
>> Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) is okay with it.
>> 
>> ps: btw, I’m using clang to compile in mac since a lot of time and I do not have problems, yes I needed to tweak a flag here and there, but not much more… of course, I use “Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)”, so is probably not the same...
>> 
>> What flags have you changed? We should adopt them or fix things so they aren't needed.
> 
> 
> I’m compiling with this: 
> 
> -D_FILE_OFFSET_BITS=64 -DNDEBUG -D_GNU_SOURCE -DLSB_FIRST -DHAVE_SYS_TIME_H -DHAVE_UUID_GENERATE -Wno-unused-parameter -mmacosx-version-min=10.5 -DHAVE_NANOSLEEP -O3 -fomit-frame-pointer -DDEBUGVM=0 -fpascal-strings -DCOGVM -Qunused-arguments -funroll-loops -DDEFAULT_IMAGE_NAME="Pharo.image" -Wno-unused-value -fmessage-length=0 -DUSE_CORE_GRAPHICS -g0 -DBASE_HEADER_SIZE=4 -march=pentium-m -DBUILD_FOR_OSX -DENABLE_FAST_BLT -fasm-blocks -Wno-unused-variable -std=gnu99 -DCOGMTVM=0 -fwrapv -Wno-return-type -fno-inline-functions -fno-gcse -mfpmath=sse -arch i386 -mtune=prescott -falign-functions=16 -DUSE_GLOBAL_STRUCT=0
> 
> I think the only “CLANG Only” is: 
> 
> -fwrapv 
> 
> That one fixes my VMs. Looks like it goes back to gcc 3.3, so it should be safe to add to all the builds.
> 
> But I didn't need this before. Your merge with Eliot falls within the range of commits where things stopped working. Are you aware of code from your branch that relies on signed integer overflow?

yes you needed :)
this flag is to say the compiler to avoid an optimisation that skips the overflow check assuming it will be ok, and the vm uses that “trick” to calculate when it has to give you a SmallInteger or a LongPositiveInteger. 
clang 3.3 didn’t do those optimisations by default (I remember I didn’t needed), and then at some point of Xcode 4.x, I do not remember clang version, it started to be a problem… that’s why I added it. 

My merge with Eliot was simply dropping some code and align with current sources, and nothing I did there or in the platform files (where the main difference is) can lead to this problem.
Right now pharovm is the same as a regular spur vm (because also, my merge is in the spur branch, not in the master)… only changes are in plugins and platform files.

cheers,
Esteban

> 
> Ryan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20150617/6c1a2dfc/attachment.htm


More information about the Vm-dev mailing list