www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - _d_isbaseof(ClassInfo oc, ClassInfo c)

reply Yassin <Yassin_member pathlink.com> writes:
Hi,

Actually i'm developping a small kernel in C++. and i think using 'D' would be
helpful so i'm seriously thinking to port the C++ code to D (Actually i've
implemented Interrupt/Exception handling, Slab allocator, Basic virtual mem
manager and a multilevel feedback sheduler).
What i'm looking for actually is:

- enabling langauge features. like string switch cases, dynamic arrays slicing,
runtime type identification
- enabling exception handling to integrate with  cpu exceptions.
- explicit memory management (possibly enabling gc in the user space)

my question is related to the Runtime helper functions used by the compiler to
implement those features ? i've looked at the ABI but the section is marked To
be Done. i've also started learning some phobos code especially the 'internal'
module (i guess this contains functions used by the compiler). but if anyone can
guide me it will be helpful (excuse my bad english).

i dont intend to use the entire phobos library (may be later)just the features i
need in the kernel code.
Apr 28 2006
next sibling parent reply John Demme <me teqdruid.com> writes:
Take a look at Ares:
http://dsource.org/projects/ares

It's a minimalistic Phobos alternative, meant to basically just implement
the stuff that the language needs.

~John Demme

Yassin wrote:

 Hi,
 
 Actually i'm developping a small kernel in C++. and i think using 'D'
 would be helpful so i'm seriously thinking to port the C++ code to D
 (Actually i've implemented Interrupt/Exception handling, Slab allocator,
 Basic virtual mem manager and a multilevel feedback sheduler).
 What i'm looking for actually is:
 
 - enabling langauge features. like string switch cases, dynamic arrays
 slicing, runtime type identification
 - enabling exception handling to integrate with  cpu exceptions.
 - explicit memory management (possibly enabling gc in the user space)
 
 my question is related to the Runtime helper functions used by the
 compiler to implement those features ? i've looked at the ABI but the
 section is marked To be Done. i've also started learning some phobos code
 especially the 'internal' module (i guess this contains functions used by
 the compiler). but if anyone can guide me it will be helpful (excuse my
 bad english).
 
 i dont intend to use the entire phobos library (may be later)just the
 features i need in the kernel code.
Apr 28 2006
parent Sean Kelly <sean f4.ca> writes:
John Demme wrote:
 Take a look at Ares:
 http://dsource.org/projects/ares
 
 It's a minimalistic Phobos alternative, meant to basically just implement
 the stuff that the language needs.
To expand on this a bit, Ares contains three separate libraries (that are assembled into one for ease of use): the runtime, the garbage collector, and the standard library. Currently, DMD is the only compiler supported, which should be evident from the runtime and garbage collector names: dmdrt and dmdgc. Basically, the runtime contains any compiler-specific code required to run a D applications. This is where you'll find all the "_d_" prefixed symbols you see in Phobos, with any remaining dependencies listed in the Ares forum thread titled "Inter-library interface." If you are interested and have any additional questions, please ask in the Ares forum :-) Sean
Apr 28 2006
prev sibling parent Kyle Furlong <kylefurlong gmail.com> writes:
Yassin wrote:
 Hi,
 
 Actually i'm developping a small kernel in C++. and i think using 'D' would be
 helpful so i'm seriously thinking to port the C++ code to D (Actually i've
 implemented Interrupt/Exception handling, Slab allocator, Basic virtual mem
 manager and a multilevel feedback sheduler).
 What i'm looking for actually is:
 
 - enabling langauge features. like string switch cases, dynamic arrays slicing,
 runtime type identification
 - enabling exception handling to integrate with  cpu exceptions.
 - explicit memory management (possibly enabling gc in the user space)
 
 my question is related to the Runtime helper functions used by the compiler to
 implement those features ? i've looked at the ABI but the section is marked To
 be Done. i've also started learning some phobos code especially the 'internal'
 module (i guess this contains functions used by the compiler). but if anyone
can
 guide me it will be helpful (excuse my bad english).
 
 i dont intend to use the entire phobos library (may be later)just the features
i
 need in the kernel code.
 
 
Hi Yassin! If you take a look at http://dsource.org/projects/titan/browser you can see how we have dealt with some of these problems. Please dont copy paste the code, as its licensed, but feel free to look and learn.
Apr 28 2006