3 ***DISCLAIMER***: _These notes are from the defunct k8 project which_
4 _precedes SquirrelJME. The notes for SquirrelJME start on 2016/02/26!_
5 _The k8 project was effectively a Java SE 8 operating system and as such_
6 _all of the notes are in the context of that scope. That project is no_
7 _longer my goal as SquirrelJME is the spiritual successor to it._
11 Today was a very busy real life day today. It is also extremely cold too, which
12 is the reason why I was busy all day with no coding much at all. Not sure I
13 will be able to code in these few hours that remain in the day. Currently I
14 am typing this from under many covers and it is still cold.
18 Hopefully I can get something done. My supply of water is frozen, which means
19 it will most likely come back later in the week hopefully when it potentially
20 gets warm enough. As for the instructions and registers, I will need to store
21 them in a kind of cache map. However, I might not need every instruction or
22 register to be known. So what I could do is have a kind of multi-map where I
23 can store multiple maps which provide a view of a single map. I also could use
24 a kind of map where the key is derived from the value and can be cached. There
25 is `WeakHashMap` however it might not work as much. At least with a value
26 derived key map I can lazily initialize entries. However, the main issue is
27 that a value derived map will need a way to determine how to find what the
28 value is. So there would still need a kind of key.
32 I would want all the instructions to be cachable without truly being known
33 (since you cannot iterate classpath contents in a fully defined manner).
37 Well, some achitectures (such as PowerPC) can have on the order of a thousand
38 or so instructions (PowerPC has more than 1000 counting AltiVec, SIMD, etc.).
39 I would want the lookups to be fast but it can cost lots of memory. I believe
40 the best way to look for instructions is to potentially have a class which is
41 essentially backed by a map for instruction lookup which then has reference
42 based values. So there would have to be a large set of strings in memory for
43 each instruction which exists. However, I could have a kind of bucket map of
44 sorts. Basically a map which associates a key grouping with other maps, however
45 the Java collections most likely already performs this function. I could
46 however be overengineering a solution where all I need is a reference backed
47 map. I could potentially be using this map elsewhere so I can add it to my
48 data structures package.