Groups | Search | Server Info | Login | Register
Groups > comp.compilers > #190
| From | torbenm@diku.dk (Torben Ægidius Mogensen) |
|---|---|
| Newsgroups | comp.compilers |
| Subject | Re: How to handle qualified identifiers such as x.y in a Pascal-like language |
| Date | 2011-07-07 10:27 +0200 |
| Organization | SunSITE.dk - Supporting Open source |
| Message-ID | <11-07-014@comp.compilers> (permalink) |
| References | (1 earlier) <11-06-039@comp.compilers> <11-06-045@comp.compilers> <11-07-004@comp.compilers> <11-07-008@comp.compilers> <11-07-011@comp.compilers> |
> [It is my impression that a lot of languages that allow closures and the > like end up with their own calling sequences. -John] Not surprising, since most vendor procedure call standards are targeted for C-like languages: Flat scope, single result, no exceptions, no tail call optimisation, and so on. Once you go beyond that you will need to either extend the calling standard or do something quite different. For example, most modern call standards are almost exclusively callee-saves: While some registers are designated as caller-saves, these are often only used for variables that are not live across any call, so they are never saved. Variables live across calls are all stored in callee-saves registers (or spilled). This makes both tail call optimisation and exceptions more costly. The first because you have to restore the callee-saves registers before the tail-call jump (unless it is to the same procedure, which is why many compilers only support tail recursion and not general tail calls) and the latter because the registers you have to restore at an exception will be stored in many different frames, so you will have to unwind the stack to restore them, where a pure caller-saves strategy will allow you to go directly to the frame of the exception handler and take the saved live registers from this. Sure, at leaf calls a callee-saves strategies might avoid saving registers at all, but inlining will get you the same (and other) benefits, though it will increase code size. Torben
Back to comp.compilers | Previous | Next — Previous in thread | Next in thread | Find similar
How to handle qualified identifiers such as x.y in a Pascal-like language noitalmost <noitalmost@cox.net> - 2011-06-20 15:43 -0400
Re: How to handle qualified identifiers such as x.y in a Pascal-like language torbenm@diku.dk (Torben Ægidius Mogensen) - 2011-06-22 10:57 +0200
Re: How to handle qualified identifiers such as x.y in a Pascal-like language Hans-Peter Diettrich <DrDiettrich1@aol.com> - 2011-06-22 11:47 +0100
Re: How to handle qualified identifiers such as x.y in a Pascal-like language George Neuner <gneuner2@comcast.net> - 2011-06-24 18:13 -0400
Re: How to handle qualified identifiers such as x.y in a Pascal-like language BGB <cr88192@hotmail.com> - 2011-06-29 12:31 -0700
Re: How to handle qualified identifiers such as x.y in a Pascal-like language BGB <cr88192@hotmail.com> - 2011-07-01 12:46 -0700
Re: How to handle qualified identifiers such as x.y in a Pascal-like language anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-07-02 17:13 +0000
Re: How to handle qualified identifiers such as x.y in a Pascal-like language BGB <cr88192@hotmail.com> - 2011-07-03 13:14 -0700
Re: How to handle qualified identifiers such as x.y in a Pascal-like language torbenm@diku.dk (Torben Ægidius Mogensen) - 2011-07-07 10:27 +0200
Re: How to handle qualified identifiers such as x.y in a Pascal-like language BGB <cr88192@hotmail.com> - 2011-07-07 04:14 -0700
Re: How to handle qualified identifiers such as x.y in a Pascal-like language George Neuner <gneuner2@comcast.net> - 2011-07-02 16:58 -0400
Re: How to handle qualified identifiers such as x.y in a Pascal-like language Gene <gene.ressler@gmail.com> - 2011-06-22 19:21 -0700
Re: How to handle qualified identifiers such as x.y in a Pascal-like language Hans-Peter Diettrich <DrDiettrich1@aol.com> - 2011-06-24 07:56 +0100
Re: How to handle qualified identifiers such as x.y in a Pascal-like language Gene <gene.ressler@gmail.com> - 2011-06-24 19:19 -0700
Re: How to handle qualified identifiers such as x.y in a Pascal-like language Hans-Peter Diettrich <DrDiettrich1@aol.com> - 2011-06-25 11:55 +0100
Re: How to handle qualified identifiers such as x.y in a Pascal-like language noitalmost <noitalmost@cox.net> - 2011-06-29 13:13 -0400
Re: How to handle qualified identifiers such as x.y in a Pascal-like language "[Linux Magazine]" <uu3kw29sb7@snkmail.com> - 2011-06-24 13:58 +0200
Re: How to handle qualified identifiers such as x.y in a Pascal-like language George Neuner <gneuner2@comcast.net> - 2011-06-25 17:11 -0400
Re: How to handle qualified identifiers such as x.y in a Pascal-like language noitalmost <noitalmost@cox.net> - 2011-06-23 12:43 -0400
Re: How to handle qualified identifiers such as x.y in a Pascal-like language Tony Finch <dot@dotat.at> - 2011-06-29 18:55 +0100
Re: How to handle qualified identifiers such as x.y in a Pascal-like language BGB <cr88192@hotmail.com> - 2011-06-29 15:51 -0700
csiph-web