-
-
Notifications
You must be signed in to change notification settings - Fork 488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Whether the contents of the compiler or function node can be cached in the local file #396
Comments
If the compiler saves the string assembly and uses asmjit+asmtk to compile and load the string assembly into memory in real time at runtime, this idea can be realized. However, the compilation speed seems to be slow, and some implementations in function nodes cannot be used. |
When using "logger" and asmtk, there is no way to convert the address back to the original string symbol and compile the result generated by the logger |
You can already do this yourself if you are using the Builder, you can just traverse all nodes and save them to disk and when you load the file you just create the nodes again. |
True, the only way is to serialize and deserialize the content yourself. The reason is that I would like to not deal with compatibility of the serialized content (versions, new features, etc...), so this is supposed to be done by users. I think that maybe caching the content of your upper layer that generates the code would be much better / easier than caching the nodes - depends on the number of nodes, but I don't really see a big overhead here - you can create the nodes at a lighting speed, and even if you load them from a file, you have to create them anyway. BTW logger is not a proper tool for serializing the content - it's purpose is to log something, but not immediately log it in a format that is then parseable by asmtk or other assemblers. |
Hello Petr,
can you made an Example to this context ?
Thank You
Jens
Am 08.02.2023 um 20:08 schrieb Petr Kobalicek:
…
True, the only way is to serialize and deserialize the content
yourself. The reason is that I would like to not deal with
compatibility of the serialized content (versions, new features,
etc...), so this is supposed to be done by users. I think that maybe
caching the content of your upper layer that generates the code would
be much better / easier than caching the nodes - depends on the number
of nodes, but I don't really see a big overhead here - you can create
the nodes at a lighting speed, and even if you load them from a file,
you have to create them anyway.
BTW logger is not a proper tool for serializing the content - it's
purpose is to log something, but not immediately log it in a format
that is then parseable by asmtk or other assemblers.
—
Reply to this email directly, view it on GitHub
<#396 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA4DCK7ECR4GMKBD3PJACSTWWPVMFANCNFSM6AAAAAAUP5A54Y>.
You are receiving this because you are subscribed to this
thread.Message ID: ***@***.***>
--
Diese E-Mail wurde von Avast-Antivirussoftware auf Viren geprüft.
www.avast.com
|
In other words, I need to implement a compilation process similar to the generation and parsing of "llvm IR" intermediate bytecode, and input the intermediate code to the asmjit compiler to finally generate the machine code. Well, I can't think of any more scientific way. |
Like the status of the intermediate code of the llvm, it can be saved and reloaded, and I don't have to deal with the relocation problem myself. Because I want to implement an offline compiler, I need to separate the compiler from the runtime, and I like the asmjit method, but I don't seem to see the corresponding solution at present.
The text was updated successfully, but these errors were encountered: