• Post Reply Bookmark Topic Watch Topic
  • New Topic

stack inspection and tail call optimisation in java  RSS feed

 
vaibhav vishal
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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??
 
Paul Clapham
Sheriff
Posts: 22832
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?



Here are the links where this topic was discussed :
http://stackoverflow.com/questions/3616483/why-does-the-jvm-still-not-support-tail-call-optimization
answer by Alex Miller


http://stackoverflow.com/questions/105834/does-the-jvm-prevent-tail-call-optimizations
answer by Michael Myers

http://www.frihost.com/forums/vt-127886.html
by gcca

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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!