stack inspection and tail call optimisation in java
vaibhav vishal
Greenhorn
Joined: Nov 13, 2011
Posts: 10
posted
0
Tail recursion optimisations are not implemented in java till now.
I read that because of its sophisticated stack inspection its not possible to implement this optimization.
can anybody tell why and how stack inspection mechanism in java prevents the above mentioned optimization???
Also is this anyhow related to the Sandbox model i.e. if stack inspection is a new and improved security model for java??
If you're asking us to comment on something that you read, you could at least post a link to it. Otherwise you're just asking us to speculate about rumours. Which can be fun, but it's really a waste of time if you were interested in useful comments. So: link?
vaibhav vishal
Greenhorn
Joined: Nov 13, 2011
Posts: 10
posted
0
Paul Clapham wrote:If you're asking us to comment on something that you read, you could at least post a link to it. Otherwise you're just asking us to speculate about rumours. Which can be fun, but it's really a waste of time if you were interested in useful comments. So: link?
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4726340 The way Java 2 security works, you need stack frames to keep track of protection domains. You cannot eliminate frames that cross protection domains unless you change how that works.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: stack inspection and tail call optimisation in java