www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - TypeInfoEx: it's here!

reply Christopher Wright <dhasenan gmail.com> writes:
Hello everyone,

I have created TypeInfoEx, a clone of Jascha Wetzel's ClassInfoEx.

Quick info:
Support: D2 / Phobos
License: any license that is used by Phobos or Tango
Status: alpha at best
Download: svn co http://felt-project.org/reflect/trunk

  - The type 'real' is not supported. (fst my_real doesn't work; I don't 
know the asm operation to store an 80-bit real.)
  - Functions that return structs are not supported.
  - Constructors are not supported :(
  - Complex types are not supported, because I'm lazy.
  - The whole deal is poorly tested.

Supported operations:
  - Creating XRTTI for any user-defined type (including library types 
that you don't control)
  - Listing fields of a type
  - Listing member functions of a type
  - Extracting fields from an object or struct
  - Invoking methods on an object or struct

Operations that really should be supported but have been overlooked for now:
  - Setting fields
  - Invoking methods with an array of variants for arguments rather than 
D varargs (ironic since I switched from std.boxer to homegrown variant 
in order to support this)

So, download it, ridicule the crufty code, and curse its shortcomings. 
But if you do, tell me what you would like to have changed, plx. I'll be 
working on it in any case, but your feedback is appreciated.
svn co http://felt-project.org/reflect/trunk
Apr 18 2009
next sibling parent Christopher Wright <dhasenan gmail.com> writes:
A quick speed note: a direct virtual call is about 600 times faster than 
dynamic invocation. I'm profiling it now, though.
Apr 18 2009
prev sibling parent Kagamin <spam here.lot> writes:
fst tbyte ptr [eax]
Apr 20 2009