http://d.puremagic.com/issues/show_bug.cgi?id=5051


Don <clugd...@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugd...@yahoo.com.au


--- Comment #1 from Don <clugd...@yahoo.com.au> 2010-10-19 00:11:20 PDT ---
Agreed, I actually use this a lot when debugging backend bugs.
What I do is modify FuncDeclaration::toObjFile() in glue.c.
To do it properly would require a (fairly simple) pass over the syntax tree,
but the function case one is the most important by far. As you can see, it's
very simple.
Incidentally, when properly implemented, this feature would bring us much of
the way towards having a C backend.


                //printf("'%s' is SCfastpar\n",sp->Sident);
            }
        }
    }
+ if (!parent->isDeclaration()) {    
+       printf("%s ", ((TypeFunction *)(func->type))->next->toChars());
+       printf("%s(%s)\n{\n %s}\n\n", func->toChars(),
+            parameters?parameters->toChars() : "",
+            func->fbody->toChars());
+ }
    if (func->fbody)
    {   block *b;
        Blockx bx;
        Statement *sbody;

        localgot = NULL;

        sbody = func->fbody;

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to