Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [omr-dev] Calling functions recursively and via pointers

I would check out the Call and ComputedCall services from JitBuilder. The basic idea is that there are indirect call opcodes whose first child is expected to compute the entry point. You will still need to cook up a ResolvedMethod structure corresponding to the final target, even though it's a computed entry point.

For a recursive function call, you need to reuse the ResolvedMethod for the function you're compiling and it *should* just work (there are paths in the code generators to detect this case....it all amazingly just worked out when I did the JitBuilder support for Calls).

Mark Stoodley 8200 Warden Avenue
Senior Software Developer Markham, L6G 1C7
IBM Runtime Technologies Canada
Phone:+1-905-413-5831 
e-mail:mstoodle@xxxxxxxxxx 

We cannot solve our problems with the same thinking we used when we created them - Albert Einstein
 
 






From:        Dibyendu Majumdar <mobile@xxxxxxxxxxxxxxx>
To:        omr developer discussions <omr-dev@xxxxxxxxxxx>
Date:        2018/06/27 05:20 PM
Subject:        [omr-dev] Calling functions recursively and via pointers
Sent by:        omr-dev-bounces@xxxxxxxxxxx




Hi,

I am working on two features currently missing in my C front-end:

a) Recursive function calls
b) Calling a function through a pointer obtained at runtime

Any pointers to IL opcode / documentation / or relevant ILBuilder /
JITBuilder code would be much appreciated.

Thanks and Regards
Dibyendu
_______________________________________________
omr-dev mailing list
omr-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/omr-dev





Back to the top