5 I believe for when I want to be closer to machine code but not too close, I
6 will use what JNI does like having regular functions that take `JNIEnv*`-alike
7 as their first argument. This is to match how JNI works and the environment
8 can contain information on state and such.
12 Maybe for RatufaCoat what I could instead do is compile SummerCoat to basically
13 C with a kind of `SJMEEnv*` then for whatever target that exists that C code
14 exists and I can use that for RetroArch. Then I can get away with whatever
15 optimizations that are system specific and it would be much faster in the long
16 run. Then that could help me get RatufaCoat up to embedded speed and such but
17 I could use it as a base for AutumnCoat as well.
21 Instead of writing the interpreter multiple times, one for the Java tests and
22 one for RatufaCoat... I can write the SummerCoat interpreter in Java and then
23 have that compiled to C through SummerCoat. This way it is much less error
24 prone and I only have to write the interpreter once. The same could eventually
25 be done for SpringCoat potentially as a major refactor of sorts. I think in
26 the long run, these choices would make sense because I would not have to
27 rebuild my own wheel every time.
29 Another thing, I do not want just `SJMEEnv*` but it would be better be called
30 `SJMEThread*` and then also there should be a `SJMEProcessClass*` which
31 contains the class state for the current class. This way the current class
32 is always known and there is no need to guess where to find the class table
33 and otherwise... I think this simplifies things.
37 For the stack caching code I should have two treads when it comes to variables
38 and that would the `int` chain, also for `float`, `long`, and `double`, but
39 then also an object chain for any object references. This would be easier
40 I would say to translate since when I leave a method things will need to be
41 counted down anyway and I could probably do an easier method exit when it
42 comes to counting down rather than trying to track references and such in
43 a more complex manner. This means method tear down would be a bit slower and
44 would require a teardown call, but I suppose it could work.
48 I may as well have the same teardown for method calls regarding object counts
49 like I do with objects.