On 2009/11/25 09:26:42, Mikhail Naganov wrote: > On 2009/11/25 02:55:05, pvalchev wrote: > > seems to work from a few basic tests
> Out of curiosity, I've compared 'platform-openbsd.cc' with 'platform-freebsd.cc' > and found only minor differences. I think, a better approach would be to > reuse > the common code for these two platforms as much as possible. > So, my proposal is to rename 'platform-freebsd' to something like > 'platform-bsd', and throw in #ifdefs where needed. I can see where you are coming from, but the freebsd one is basically a copy of the linux one with OS-specific modifications too. So you can make the argument that there should be only one, with lots of ifdef's - but that's very ugly and I like chrome's approach of having different _os.c files. There are some significant differences between freebsd and openbsd in this file, for example the lack of ucontext. Also a lot of the mmap/mprotect magic will be different, because OpenBSD has W^X (where no page can be writable and executable at the same time, as a security measure). The difference between the two files may seem minor right now, but that's because several of the openbsd functions are UNIMPLEMENTED();, I just wanted to get further before spending significant time on flushing out this file, but there is more work to be done. Did I mention I hate ifdef's? :) But it's up to you guys to decide in the end. http://codereview.chromium.org/431047 --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
