On 2009/11/25 22:21:23, Mikhail Naganov wrote:
> Can you please point out more concretely what '_os.c' files do you mean?  
> In
> Chromium, I can only find such files in sqlite and native_client. But in
> Chromium's own code I see lots of "#if defined(OS_LINUX) ||
> defined(OS_FREEBSD)"-like branches.

I am attempting to remove many those.

My general approach is:
if the function looks like
void f() {
   #if OS1
     implementation_1();
   #elif OS2
     implementation_2();
}
then it should be split into multiple files.

Otherwise, if you need the occasional ifdef within shared code, it's ok.

Take a look at some of the _freebsd files in Chrome's base/ and compare  
them to
the _linux or _posix ones (I've just been splitting them over the last  
week).

http://codereview.chromium.org/431047

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to