Comments (6)
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.
from asmjit.
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
from asmjit.
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.
from asmjit.
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.
from asmjit.
from asmjit.
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.
from asmjit.
Related Issues (20)
- Tag releases HOT 2
- kErrorInvalidImmediate when adding UINT32_MAX to 64bit register HOT 4
- Strange code fragment HOT 2
- RISC-V port HOT 2
- Deployed docs do not match source code HOT 2
- Inline comment is dropped when instruction has a label binding HOT 4
- vmxoff instruction HOT 3
- NetBSD: erlang using asmjit fails with `Internal error: jit: Cannot allocate executable memory. Use the interpreter instead.` HOT 58
- Shaping new JIT allocator API HOT 11
- CI Service for RISC-V port HOT 2
- How to call a external function with x86::Compiler?
- How can I convert a byte array to assembly code? HOT 3
- parse "faddp st1, st0" and "fsubp st1, st0" instruction failed HOT 1
- Unexpected error when load label address to register in AArch64 HOT 3
- InvalidDisplacement error when use loop instruction HOT 3
- Calling void function on a64 (android) not working HOT 2
- LAHF issue with x86_64 compiler HOT 2
- Return "Segmentation fault" when use std instruction HOT 4
- Jmp to label size HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asmjit.