Check-in [7d10eb6c2a]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Backup developer notes.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:7d10eb6c2a640021db80a85d4200e568150ca303
User & Date: squirreljme 2019-04-17 07:02:32
Context
2019-04-17
12:24
Base for loading of pool entries. check-in: 3a1b4cb8b5 user: stephanie.gawroriski tags: trunk
07:02
Backup developer notes. check-in: 7d10eb6c2a user: squirreljme tags: trunk
01:55
Correct relative offset for constant pools and such being off. check-in: 5dc108ae42 user: stephanie.gawroriski tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to assets/developer-notes/index.mkd.

  2138   2138   `09`
  2139   2139   [**`10`**](stephanie-gawroriski/2019/04/10.mkd)
  2140   2140   [**`11`**](stephanie-gawroriski/2019/04/11.mkd)
  2141   2141   [**`12`**](stephanie-gawroriski/2019/04/12.mkd)
  2142   2142   [**`13`**](stephanie-gawroriski/2019/04/13.mkd)
  2143   2143    * [**`14`**](stephanie-gawroriski/2019/04/14.mkd)
  2144   2144   [**`15`**](stephanie-gawroriski/2019/04/15.mkd)
  2145         -`16`
         2145  +[**`16`**](stephanie-gawroriski/2019/04/16.mkd)
  2146   2146   `17`
  2147   2147   `18`
  2148   2148   `19`
  2149   2149   `20`
  2150   2150    * `21`
  2151   2151   `22`
  2152   2152   `23`

Added assets/developer-notes/stephanie-gawroriski/2019/04/16.mkd.

            1  +# 2019/04/16
            2  +
            3  +## 10:27
            4  +
            5  +Next will be `TABLESWITCH` but I think what I will do there is just transform
            6  +that into code rather than having gigantic instructions because that will be
            7  +a bit complicated to implement and it would put it on the VM to implement it
            8  +correctly. I think it is just too much to be really that worth it. Since I do
            9  +not really want to dual handle these two cases I will just simplify
           10  +`TABLESWITCH` into `LOOKUPSWITCH` since the previous is a linear set of values
           11  +while the second has multiple sorted pairs. Then I need only worry about doing
           12  +just a single format.
           13  +
           14  +## 10:32
           15  +
           16  +I think the only instructions remaining following doing all of this would be
           17  +`instanceof`, so I can do that quickly.
           18  +
           19  +## 11:37
           20  +
           21  +For lookup switches I am going to need an if compare to constant, but this can
           22  +just be a single instruction.
           23  +
           24  +## 14:47
           25  +
           26  +Need to check if `DUP_X2` is done correctly and such.
           27  +
           28  +## 15:18
           29  +
           30  +Seems to be correct, should hopefully be fine. However the stack map table
           31  +deltas seem to be wrong, they are according to my decoder:
           32  +
           33  + * 0, 26!, 34, 62!, 86 -- 26 and 62 are not valid!
           34  +
           35  +According to javap, they are:
           36  +
           37  + * frame_type = 0 /* same */
           38  + * frame_type = 252 /* append */, offset_delta = 26, locals = [ int ]
           39  + * frame_type = 7 /* same */
           40  + * frame_type = 27 /* same */
           41  + * frame_type = 250 /* chop */, offset_delta = 23
           42  +
           43  +There is a definite size difference here. Mine says there are 5 when there
           44  +are 6. So something is being read incorrectly, likely a type.
           45  +
           46  +## 15:26
           47  +
           48  +Okay in the stack map parse I found an off by one for appended frames. It
           49  +is subtracting 251, but I checked JVMS and it was correct.
           50  +
           51  +## 15:33
           52  +
           53  +Actually it is correct, just the offset delta is off by one.
           54  +
           55  +## 15:37
           56  +
           57  +It might have to do with implicit and explicit frames.
           58  +
           59  +## 15:39
           60  +
           61  +Definitely is this.
           62  +
           63  +## 15:44
           64  +
           65  +Okay so I cannot check against placeaddr, I need another variable to
           66  +determine if this is an address which gets incremented by one.
           67  +
           68  +## 16:18
           69  +
           70  +Okay so this next one is a append top top int, followed by a chop frame. It
           71  +chops off 3 locals. So the only logical thing I can think of is that those
           72  +extra top-undefined types are considered for chopping which I believe I am
           73  +doing.
           74  +
           75  +## 16:59
           76  +
           77  +So it seems that jumping to a state, unless my stack map table code is still
           78  +wrong, can add more types onto the target. More bugs in the stack map table
           79  +have been ironed out, it is a rather clunky format. So perhaps transitions can
           80  +happen.... let me seee.... maybe I could check if a value is placed there or
           81  +something. I suppose I can just assume that it means a zero register
           82  +transition or similar.
           83  +
           84  +## 17:33
           85  +
           86  +Definitely want to refactor the instruction writing and such so it is a bit
           87  +more compact.
           88  +
           89  +## 18:32
           90  +
           91  +I will definitely see how much more compact the classes are.
           92  +
           93  +## 18:42
           94  +
           95  +Still like 26K...
           96  +
           97  + * w/ Lines: 27180 bytes (26 KiB)
           98  + * No Lines: 25628 bytes (25 KiB)
           99  +
          100  +So the lines do not really matter much.
          101  +
          102  +## 18:46
          103  +
          104  +I could shave some bytes off the constant pool.
          105  +
          106  +## 20:54
          107  +
          108  +There are in the range of 300 pool entries, what if I could reduce that by
          109  +making it so handles are not their own thing.