Stream: cranelift

Topic: ✔ Quick question: is there a way to redefine a function?


view this post on Zulip Ivan Chinenov (Nov 12 2021 at 12:25):

Quick question: is there a way to redefine a function?
I'm JITing up my interpreter and i'd like to be able to redefine existing functions.
Is there a way to drop or shadow one function without dropping entire JIT engine?

view this post on Zulip Ivan Chinenov (Nov 12 2021 at 12:36):

And while I'm asking, am I right that in case compilation aborts early i need to clear context before trying to compile again?

view this post on Zulip Ivan Chinenov (Nov 12 2021 at 15:18):

I've found an answer: it's JITModule.prepare_for_function_redefine

view this post on Zulip Notification Bot (Nov 12 2021 at 15:22):

Ivan Chinenov has marked this topic as resolved.

view this post on Zulip bjorn3 (Nov 12 2021 at 16:42):

Ivan Chinenov said:

And while I'm asking, am I right that in case compilation aborts early i need to clear context before trying to compile again?

If you are refering to cranelift_codegen::context::Context, then yes.


Last updated: Oct 23 2024 at 20:03 UTC