11:17
I need a namespace format that is simple to use and can be directly executed
in memory. So I suppose I should keep a table of contents and write that at
the end. I will need a shared string table also. Similar to before. I should
aim for everything to be aligned as possible, so all details in a class can
just be treated as an integer array for the most part. Methods will need a
global binding table, although this could be shared among all methods in a
single namespace. When a namespace is loaded, the function table can be called
in. The entire table could just be function pointers to other methods and
called as such. So get of a field just changes to a function call which can
check for correctness and determine if a class needs to be initialized. This
way the only thing that needs to be initialized is the actual table itself for
each namespace. I would want to avoid duplicating static structures elsewhere
in memory. Although there would be some speed loss from using many functions,
it would simplify things because the code would not need to check for special
conditions at all. So translate everything to a method call for simplicity.
When an interned String constant is requested that would be treated as a method
call also. It would have to create a String
object if one was not set, but
that could be done with a volatile. The initial bootstrap would completely
have to avoid using objects for the most part because it would have to setup
the memory management routines, basic stack, and the heap. Classes and objects
would not be initialized. However, I could just setup a basic heap at first and
setup the initial tables with binding handlers. Generally the first thing I
need is allocation and a stack. So I just need to think about class
initialization in the early boot stage process.
11:26
When a method call is performed, there will need to be a pointer to the
namespace table for the current process for usage. This way each process can
have their own unique set which does not collide with other usages. For the
early initilization stage, these pointers can be initialized as usual. So
then all the calls should be the same for the most part. Since classes are
also used, I will need an actual class table also along with the string table.
Because I need to refer to classes for initialization before String
s may
even exist. So ldc
(Foo.class
) of a class returns a Class
. So then the
call to the function table would be then:
ftable[vtableindex](classid)
Where the C equivalent prototype would be:
Object* getClass(int __classid);
I may need an extra pointer to the classpath or namespace setup however and to remember it in every method. So this would be a global virtual machine pointer. The bootstrap would setup this virtual machine.
11:35
The function table could just be a reference from the VM table. Possibly the best way to do this would be to have the VM structure not be a Java object. It would have a raw representation and exist outside of the virtual machine. Then this way I do not need to worry about initializing classes and objects for it since that would completely complicate the bootstrap process. There would however be method which can manage access to the internal VM structure.
18:04
The Creator CI40 will be shipping around next week, very exciting.
19:58
Manually converting my mascot to SVG, this will take awhile but it should be optimized!
20:19
Inkscape is not too bad.
22:33
Right now I just have the ears and the head hair done for the most part. However it does look really nice.
23:03
Did the ears, eyes, the head hair, and part of the face. So far it looks well.