Add task for running tests that runs both clutter levels accordingly.
[SquirrelJME.git] / assets / developer-notes / stephanie-gawroriski / 2016 / 06 / 01.mkd
bloba48cc5be4cf2861c8e4e8ff511cc6f812636a63c
1 # 2016/06/01
3 ## 07:44
5 A new month. Time for a code review.
7 ## 07:50
9 So let us see then. At the start of the month I did a major removing refactor.
10 I split apart the `extra-util` and such and made a bunch of sub-packages with
11 just a few classes. This is helped out since in the future it would be easier
12 to not use certain things and to keep it very modular.
14 ## 07:51
16 I also optimized the code which the deflate decompression code uses, making it
17 a bit faster. Also performed a refactor of the deflate code so that it is much
18 better and easier to maintain.
20 ## 07:52
22 Then I made `squirreljme.error` which is definitely a much better way to handle
23 error codes. Later in the month I made the decision to use specific letters
24 for error codes in a package rather than thought up ones. This is better
25 because I will less likely write collisions with error codes. I also wrote
26 some scripts which can scan the source code and output the used error codes
27 so that I can easily find which error was thrown, its description, and the
28 location of where it is declared.
30 ## 07:55
32 I had performed a bit of the SSA-like program generation but I stopped that
33 and removed the code later in the month.
35 ## 07:56
37 I made my own unmodifiable collections handle `RandomAccess` for `List` which
38 is important for binary searches being fast.
40 ## 07:57
42 I also performed a move over and splitting of what is now the class interface
43 code. I also implemented part of the byte code handler, I am going to keep that
44 but it is going to get some changes due to the new way that the code operates.
45 For example instead of having the byte code do the verification stuff, it just
46 runs the classes though. One possible thing to have however is an optional
47 verifier on top of the byte code input or one attached to it. Generally
48 `ClassPath` could be used as a hint to the byte code. So I could perhaps have
49 a `verify(ClassPath)` method for the byte code in a class. I can also consider
50 that if I give a `ClassPath` to a get of an instruction that it could create
51 a synthetic instruction based on the current `ClassPath` when returning an
52 instruction. I will have to figure that one out though and have a clean and
53 neat way to have rewrites without making the code a mess.
55 ## 08:01
57 I wrote a bunch of UI Code but I ended up removing all of it because it just
58 would not work. My current plan is to provide _cm_-based display interfaces so
59 that the various details of displays are hidden away.
61 ## 08:02
63 I wrote some of the kernel code, but the bulk of that has been changed to be
64 much better and more manageable. Although incomplete I like the current
65 version more than the old version.
67 ## 08:03
69 Implemented support for reading XPM images which will be handy. I also support
70 now optional dependencies for liblets so that specific projects do not have to
71 exist. I need to adjust that however, where optional dependencies are not
72 considered at compile time so that using them results in an error. Although to
73 the compiler and the classic runtime they would be treated as hard
74 dependencies.
76 ## 08:05
78 I also got a mascot, which was drawn by _puppenstein_, it looks really nice.
79 I then derived lower resolution icons from the mascot and also look nice. So
80 the classically sized icons will fit for older and more lower resolution
81 systems generally.
83 ## 08:06
85 I interrned the strings in `NCIUTF` so that UTF strings are equal to each
86 other when it comes to the JVM. They have to be interned anyway.
88 ## 08:07
90 I also decided against a monolithic kernel and decided instead for a
91 microkernel. The microkernel would be smaller, easier to implements, and
92 more modular. Also the microkernel would work far better for the rerecording
93 virtual machine because the system calls themselves can be used in the replay.
95 ## 08:08
97 I then simplified the kernel and made it much better and it should not turn
98 into a giant mess as it would have previously.
100 ## 08:09
102 A bunch of days were spent on the UI code which was deleted, however that was
103 an eductional experience. The new way which I plan to do the UI should be far
104 better and less complicated to support.
106 ## 08:10
108 I also added `ClassPath` along with `ClassUnit`s which generally is a much
109 better interface when it comes to locating classes. The `ClassPath` can also
110 perform verification also. The beneift of `ClassPath` is that it is more
111 directly used.
113 ## 08:11
115 I also now have a basic kernel startup sequence, before all kernels would
116 start up depending on the implementation. However that would have been messy
117 and would require much duplicated code. So instead now the kernel launches the
118 launcher, which will then handle the main arguments (`-classpath` and `-jar`).
120 ## 08:12
122 Also decided on two interpreters: a standard one and a rerecording one. The
123 standard one would be used for faster JVM based execution so I can write the
124 main library on it. The rerecording one would be used for debugging and could
125 be used for TAS. I have always been interested in TAS, so supporting that would
126 be very nice.
128 ## 08:13
130 And that was the month for the most part. Now onto the statistics via
131 `gitstats` (with my repository converted to git). The past 4 weeks I have been
132 getting much work done, this is likely due to waking up early and sleeping
133 early. So generally a fixed sleep schedule is much nicer. I made 961 commits
134 this month, so lots more work was performed. I was generally more active. My
135 second most active month is March with 524 commits. Right now I have almost
136 2000 commits. My previous project which spanned 2 years has about 8500 commits
137 or so. Looking at the file counts, they went up in the middle of the month
138 but then went back down. I would say that this is refactoring and cleaning
139 things up. The number of lines in the source code also went down.
141 ## 08:20
143 So I would say that I got much work done.
145 ## 10:41
147 Ok so, what I need to do is determine the best way to setup a process which
148 would be given a thread and an entry point. I suppose `createThread()` should
149 be given a process, with the method to invoke, and the arguments to that
150 method in boxed form. That is the kernel can only use arguments which are of
151 primitive types or String.
153 ## 10:43
155 The method and arguments can be handled by the implementation specfic kernel.
157 ## 11:13
159 So for the interpreter when it comes to processes, there would be a core that
160 acts as a kind of memory space for execution. Threads would use this memory
161 space for objects and such.
163 ## 15:21
165 Actually the interpreter data stream will have to be structured. If it is not
166 structured then it will be difficult to handle details. I would suppose to keep
167 it simple there will be input and output arrays for commands. There will be a
168 command code written along with the passed arguments types in some input
169 array. Then when read a command the reverse could be done to reinitialize
170 values and such. So I need a command data set which stores commands to write to
171 the stream along with the type of command.
173 ## 19:56
175 The data commands would work better if they could be closed and reused as
176 needed. Then if they are not needed, they can be garbage collected.
178 ## 20:28
180 This data packet code is much cleaner.