Re: [perl #38146] [TODO] OS.pmc - file copy 38146
Leopold Toetsch wrote: On Jun 18, 2006, at 2:02, Vishal Soni via RT wrote: I am just wonedring if it would make sense to seperate out code for each supported operating system under a directory structure. At the time of build the specific code for target operating system is added to the source tree. Yep. Actually we already have and use the needed infrastructure for platform code. See also: - config/gen/platform* - src/platform.c (generated from above) Given that I started OS.pmc I was preparing to iterate it a little more soon. Meanwhile, I got a design doubt about creating different files for different operating systems. Basically, there are specific functions whose difference is just in the name of a function. Should we separate it anyway, or use a '#define' approach? I do not defent any of the approaches. Just want to know what to do. $ambs
Re: [perl #38146] [TODO] OS.pmc - file copy 38146
Hi Leo, That sounds great. One quick question would it make sense to start defining a generic platform interface that that all supported platforms need to implement. A quick example of a similar abstraction would be the Apache Portable Runtime (http://apr.apache.org/). Let me know what your thoughts are. -Vishal On 6/19/06, Leopold Toetsch <[EMAIL PROTECTED]> wrote: On Jun 19, 2006, at 19:30, Vishal Soni wrote: > So do we need to change os.pmc to leverage this infrastructure and get > rid of the platform specific code( currently implemented via IFDEF) > from os.pmc? I think that all platform-specific code should be factored out, i.e. the existing methods should call some platform functions. leo -- Thanks, Vishal
Re: [perl #38146] [TODO] OS.pmc - file copy 38146
On Jun 19, 2006, at 19:30, Vishal Soni wrote: So do we need to change os.pmc to leverage this infrastructure and get rid of the platform specific code( currently implemented via IFDEF) from os.pmc? I think that all platform-specific code should be factored out, i.e. the existing methods should call some platform functions. leo
Re: [perl #38146] [TODO] OS.pmc - file copy 38146
Hi Leo, So do we need to change os.pmc to leverage this infrastructure and get rid of the platform specific code( currently implemented via IFDEF) from os.pmc? -Vishal On 6/19/06, Leopold Toetsch <[EMAIL PROTECTED]> wrote: On Jun 18, 2006, at 2:02, Vishal Soni via RT wrote: > I am just wonedring if it would make sense to seperate out code for > each >supported operating system under a directory structure. At the time > of build the specific code for target operating system is added to the > source tree. Yep. Actually we already have and use the needed infrastructure for platform code. See also: - config/gen/platform* - src/platform.c (generated from above) leo -- Thanks, Vishal
Re: [perl #38146] [TODO] OS.pmc - file copy 38146
On Jun 18, 2006, at 2:02, Vishal Soni via RT wrote: I am just wonedring if it would make sense to seperate out code for each supported operating system under a directory structure. At the time of build the specific code for target operating system is added to the source tree. Yep. Actually we already have and use the needed infrastructure for platform code. See also: - config/gen/platform* - src/platform.c (generated from above) leo
[perl #38146] [TODO] OS.pmc - file copy 38146
Hi, I am trying implement #38146 todo item. While looking at the code for os.pmc there are IFDEF constructs defined for different operating systems (For e.g. WIN32 for now). I am just wonedring if it would make sense to seperate out code for each supported operating system under a directory structure. At the time of build the specific code for target operating system is added to the source tree. This very similar to the Linux source tree where the architecture specific code is implemented in a differen directory structure and correct directory structure is selected based on the architecture you are compiling for. There a couple of benifits that come to mind: 1. All the OS specific is maintained under seperated directory structure for each OS. 2. Defines a clean seperation b/w OS and Parrot Code. 3. Makes it easy to port Parrot to new platforms without breaking the implemented functionality for other platforms. Let me know what your thoguths are. Thanks, Vishal
[perl #38146] [TODO] OS.pmc - file copy 38146
Hi, I am trying implement #38146 todo item. While looking at the code for os.pmc there are IFDEF constructs defined for different operating systems (For e.g. WIN32 for now). I am just wonedring if it would make sense to seperate out code for each supported operating system under a directory structure. At the time of build the specific code for target operating system is added to the source tree. This very similar to the Linux source tree where the architecture specific code is implemented in a differen directory structure and correct directory structure is selected based on the architecture you are compiling for. There a couple of benifits that come to mind: 1. All the OS specific is maintained under seperated directory structure for each OS. 2. Defines a clean seperation b/w OS and Parrot Code. 3. Makes it easy to port Parrot to new platforms without breaking the implemented functionality for other platforms. Let me know what your thoguths are. Thanks, Vishal