2016/07/01

09:23

Today is a new month. I did not get much work done the last month due to being a bit busy. I still have a plan to work on the single pass JIT however.

12:34

So I definitely believe that I should follow the same route of having a single pass JIT with generating blobs. When the executable needs to be created, all of the blobs which make it up.

12:42

Using the functions I need to figure out the ABI. For example, I can have an ABI function set. For a given CPU there are default operations for addition, subtraction, etc. Then the ABI (such as SysV) can be provided with by other functions. This way not only would the baseline functions for an architecture be replaced, they would also be able to change which registers are used and how. It does sound a bit ugly sort of, but I believe it would be the cleanest route for customizable ABIs. One thing to consider are functions calling other functions. I would need a way for functions to call functions with a variable set of input arguments, similar to reflection. So this would essentially be a static dispatch of sorts with a method name, arguments, and its result (if any). So essentially, the SSJITFunction would require a Object dispatch(String __m, Object... __a). To reduce code duplication (since all functions would have to implement the dispatch), I can have a class which contains a static method which would be given this and the arguments to dispatch, it would then handle all of the default functions that the SSJIT would rely on.