Thread overview
TypeInfoEx: it's here!
Apr 19, 2009
Christopher Wright
Apr 19, 2009
Christopher Wright
Apr 20, 2009
Kagamin
April 19, 2009
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

Bugs:
 - 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
April 19, 2009
A quick speed note: a direct virtual call is about 600 times faster than dynamic invocation. I'm profiling it now, though.
April 20, 2009
fst tbyte ptr [eax]