Re: [perl #38146] [TODO] OS.pmc - file copy 38146

2006-06-20 Thread Alberto Simões

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

2006-06-19 Thread Leopold Toetsch


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





Re: [perl #38146] [TODO] OS.pmc - file copy 38146

2006-06-19 Thread Vishal Soni

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

2006-06-19 Thread Leopold Toetsch


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



[perl #38146] [TODO] OS.pmc - file copy 38146

2006-06-18 Thread Vishal Soni via RT
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

2006-06-18 Thread Vishal Soni via RT
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