FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

bless bug with nested classes

 
Post new topic   Reply to topic     Forum Index -> DDL - D Dynamic Libraries
View previous topic :: View next topic  
Author Message
Don Clugston



Joined: 05 Oct 2005
Posts: 91
Location: Germany (expat Australian)

PostPosted: Mon Jan 02, 2006 10:09 am    Post subject: bless bug with nested classes Reply with quote

Displays "Error: Unknown type encountered in signature 'Ç'".

when using a nested class inside a template. Sorry I haven't narrowed it down. The error was occuring in the DynamicLibrary.d
To replicate:
In dynamiclibrary.d replace the one-parameter Ctor with the code below. and compile linktest1.
The "insitu" works OK though, seems to be just a bless problem.

Code:
template getCtor(TInterface, char [] classname) {
      TInterface delegate() getCtor() {
          class InternalClass {
             ClassInfo typeClass;
             Object function(Object) rawCtor;
             this(ClassInfo inf, Object function(Object) func) {
               typeClass=inf;
               rawCtor = func;
            }            
            TInterface internalCtor() {
              auto a = _d_newclass(typeClass);
              rawCtor(a);
              return cast(TInterface)a;
            }
          }
           InternalClass b = new InternalClass(getClassInfo!(classname)(),
           cast(Object function (Object)) getExport(
            "_D" ~ mangleSymbolName!(classname) ~ mangleSymbolName!("_ctor")
            ~ "F"
            ~ "ZC" ~ mangleSymbolName!(classname)).address
           );
           return &b.internalCtor;
}
Back to top
View user's profile Send private message
pragma



Joined: 28 May 2004
Posts: 607
Location: Washington, DC

PostPosted: Mon Jan 02, 2006 5:37 pm    Post subject: Reply with quote

Created Ticket: http://trac.dsource.org/projects/ddl/ticket/34#preview
_________________
-- !Eric.t.Anderton at gmail
Back to top
View user's profile Send private message Yahoo Messenger
pragma



Joined: 28 May 2004
Posts: 607
Location: Washington, DC

PostPosted: Mon Jan 02, 2006 6:19 pm    Post subject: Reply with quote

It looks like a demangler bug. I've seen it throw up on some templates, especially on the code generated by the compile-time regex engine. My guess is that its weak on templates that are specialized based on string constants.

The real test is to run ddlinfo on the suspect binary file, and again with the '-r' option. Using raw mode will pass, while forcing a demangle on the symbol info will fail like it did for bless.

In the meantime, I plan on modifying bless.d to not agressively demangle all symbols, as to head off any future problems with this.
_________________
-- !Eric.t.Anderton at gmail
Back to top
View user's profile Send private message Yahoo Messenger
pragma



Joined: 28 May 2004
Posts: 607
Location: Washington, DC

PostPosted: Tue Apr 18, 2006 8:54 pm    Post subject: Reply with quote

The ticket for this, #34, has been resolved.

I decided to use phobos' std.demangle implementation (now that it has one), so that I can keep in step with Walter's improvements as he goes about changing the spec. His code is much more efficent than what I had in demangle.d anyway.

http://trac.dsource.org/projects/ddl/ticket/34#preview
_________________
-- !Eric.t.Anderton at gmail
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> DDL - D Dynamic Libraries All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group