|
-
Apr 18th, 2006, 07:41 PM
#1
Thread Starter
Addicted Member
Dynamically Generated Compiled Code
Hi folks,
Is there a way to dynamically generate compiled code? I am after what can be done with reflection but without the performance cost. It seems logical that a good way to accomplish the goal is to compile code at run-time.
Thoughts? Successes? Ideas?
-
Apr 19th, 2006, 09:22 AM
#2
Frenzied Member
Re: Dynamically Generated Compiled Code
Sounds like an interpreter... Performance cost will be present.
-
Apr 19th, 2006, 11:57 AM
#3
Thread Starter
Addicted Member
Re: Dynamically Generated Compiled Code
Using reflection is an interpreter and does come with a performance cost. What I am looking for is potentially a way to construct Java code on the fly and pass it to something that will translate it into byte-code for later use... or anything that comes close to that.
-
Apr 19th, 2006, 12:38 PM
#4
Frenzied Member
Re: Dynamically Generated Compiled Code
Isn't that the same thing that already happens, though?
-
Apr 19th, 2006, 04:56 PM
#5
Thread Starter
Addicted Member
Re: Dynamically Generated Compiled Code
You're right that does happen. The part that I failed to mention is that I would want to retain that compiled code and potentially execute it many times without having to reinterpret it. Hope that clarifies things a touch.
-
Apr 19th, 2006, 10:18 PM
#6
Thread Starter
Addicted Member
Re: Dynamically Generated Compiled Code
Found what I was looking for:
http://java.sys-con.com/read/36843.htm
Thanks.
-
Apr 28th, 2006, 05:16 PM
#7
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|