Actually, this doesn't compile for me:
../src/platform-linux.cc: In static member function 'static void
v8::internal::OS::ReleaseStore(volatile AtomicWord*,
v8::internal::AtomicWord)':
../src/platform-linux.cc:281:30: error: 'ATOMICOPS_COMPILER_BARRIER' was not
declared in this scope
I think what happens is: platform.h includes atomicops.h which includes
atomicops_internals_x86_gcc.h which defines a macro of the same name (and
contents!) and then undefs it after it's done.
We normally try not to let macros live beyond file boundaries, i.e. define
it
where it's needed, then undef it. Doing this in many places doesn't mix well
with not doing it elsewhere ;-)
So, I don't think we can land this CL in its current form or with minor
fixes. A
better way might be to move the definitions that want to use
ATOMICOPS_COMPILER_BARRIER to atomicops_internals_x86_gcc.h where that
macro is
already available, but I haven't looked into whether that's easily possible.
https://chromiumcodereview.appspot.com/10539044/
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev