Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!news.misty.com!news.iecc.com!.POSTED!nerds-end From: Jens Kallup Newsgroups: comp.compilers Subject: Re: Language translation Date: Thu, 06 Mar 2014 20:31:43 +0100 Organization: 1&1 Internet AG Lines: 46 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <14-03-012@comp.compilers> References: <14-03-009@comp.compilers> NNTP-Posting-Host: news.iecc.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: miucha.iecc.com 1394197704 43527 64.57.183.58 (7 Mar 2014 13:08:24 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Fri, 7 Mar 2014 13:08:24 +0000 (UTC) Keywords: OOP, practice, code Posted-Date: 07 Mar 2014 08:08:23 EST X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:1134 Hello, for my compiler, i do some test's. when i had a class "Aclass", then i check it's parent. It can be "Acustom", or an other class "Aform". So, i have 2 types: Acustom // parent (super) Aclass // my plain class Acustom // parent (super) Aform // form class (window) Aclass // class -> Aform = parent You can build a tree: CLASS Aform // you can leave the parent, if you know it is Acustom ... ENDCLASS CLASS Aclass OF Aform ... ENDCLASS Then you can build code: (All classes becomes numbers - you reserve a part for your static parents...) push 10 ; push 10 (Aform - if you wish it is a window) push 0 ; parent (window) class push CNAME ; rtti - name the class call create_class ; call function to create the class ; e.g. init window size The best way is, you should consult the assembler code, which is created by follpwing command: gcc -S test.cc cheers Jens