Related articles |
---|
[10 earlier articles] |
Re: Proper Tail Recursive C++ njl@cyberpass.net (1997-03-09) |
Re: Proper Tail Recursive C++ hbaker@netcom.com (1997-03-13) |
Re: Proper Tail Recursive C++ fjh@murlibobo.cs.mu.OZ.AU (1997-03-13) |
Re: Proper Tail Recursive C++ ramsdell@linus.mitre.org (1997-03-16) |
Re: Proper Tail Recursive C++ danwang@atomic.CS.Princeton.EDU (1997-03-18) |
Re: Proper Tail Recursive C++ njl@cyberpass.net (1997-03-21) |
Re: Proper Tail Recursive C++ erik.schnetter@student.uni-tuebingen.de (1997-03-21) |
Re: Tail recursion in Java, was Proper Tail Recursive C++ danwang@atomic.CS.Princeton.EDU (1997-03-22) |
Re: Proper Tail Recursive Java (no more C++) mw@ipx2.rz.uni-mannheim.de (1997-03-23) |
Re: Tail recursion in Java, was Proper Tail Recursive C++ Dave@occl-cam.demon.co.uk (Dave Lloyd) (1997-03-27) |
Re: Tail recursion in Java, was Proper Tail Recursive C++ ramsdell@linus.mitre.org (John D. Ramsdell) (1997-04-02) |
Re: Tail recursion in Java, was Proper Tail Recursive C++ hbaker@netcom.com (1997-04-03) |
Re: Tail recursion in Java, was Proper Tail Recursive C++ markt@harlequin.co.uk (1997-05-14) |
From: | erik.schnetter@student.uni-tuebingen.de |
Newsgroups: | comp.compilers |
Date: | 21 Mar 1997 10:23:29 -0500 |
Organization: | Compilers Central |
Keywords: | Java |
: John D Ramsdell <ramsdell@linus.mitre.org> writes:
: > Funny thing is that Java is not stuck with a stack model, yet
: > implementations of Java are not required to be tail recursive. When
: > will people ever learn? ... :-(
: The security manager which is part of the security API has a function
: that lets the SM figure out the call chain. Some of the current
: security mechanisms would conceivably break in the presence of tail
: call optimizations. I think this is the main reason Java is "stuck"
: with the stack model for now at least.
Java is compiled to bytecode. A clever compiler would create bytecode
that has tail recursion transformed into jumps.
It is that bytecode that is then checked by the security mechanisms,
not the source code. So while the elimination of tail recursion can
possibly change the semantics of a program (if it has access to its
own call chain), it can never break the security mechanisms. And this
"change in semantics" might just be what you want.
-erik
-----
Erik Schnetter, erik.schnetter@student.uni-tuebingen.de
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.