digitalmars.D.announce - TypeInfoEx: it's here!
- Christopher Wright (30/30) Apr 18 2009 Hello everyone,
- Christopher Wright (2/2) Apr 18 2009 A quick speed note: a direct virtual call is about 600 times faster than...
- Kagamin (1/1) Apr 20 2009 fst tbyte ptr [eax]
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
Apr 18 2009
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