5 So working on this stack shuffling method and looking at the original and
6 the new one, this is what it looks like:
9 DB: ******************** NEW CODE (THIS OUTPUT IS WRONG)
10 DB: Preprocessing STACKSHUFFLE:[DUP2] (@62#DUP2~:[])
11 DB: Shuffle with: DUP2 -> [[A+] -> [A+A+]]
12 DB: *** Stack Result ***
13 DB: BEF: State:{L=[r8:Lcc/squirreljme/jvm/summercoat/ld/mem/AbstractReadableMe
14 mory;:RN, r9:J, r10:top-long, r11:[B:RN, r12:I, r13:I:R, r14:I], S=[r11(15):[B
15 :N, r16:I, r8(17):Lcc/squirreljme/jvm/summercoat/ld/mem/AbstractReadableMemory
16 ;:N, r9(18):J, r10(19):top-long]}
17 DB: AFT: State:{L=[r8:Lcc/squirreljme/jvm/summercoat/ld/mem/AbstractReadableMe
18 mory;:RN, r9:J, r10:top-long, r11:[B:RN, r12:I, r13:I:R, r14:I], S=[r11(15):[B
19 :N, r16:I, r8(17):Lcc/squirreljme/jvm/summercoat/ld/mem/AbstractReadableMemory
21 DB: IN : [In:{r=r9, type=J, flags=}]
24 DB: ******************** OLD CODE
25 DB: Preprocessing STACKSHUFFLE:[DUP2] (@62#DUP2~:[])
26 DB: Shuffle with: DUP2 -> [[A+] -> [A+A+]]
27 DB: Popped: [r9(18):J, r10(19):top-long]
28 DB: Source map: {0=r9(18):J}
30 DB: *** Stack Result ***
31 DB: BEF: State:{L=[r8:Lcc/squirreljme/jvm/summercoat/ld/mem/AbstractReadableMe
32 mory;:RN, r9:J, r10:top-long, r11:[B:RN, r12:I, r13:I:R, r14:I], S=[r11(15):[B
33 :N, r16:I, r8(17):Lcc/squirreljme/jvm/summercoat/ld/mem/AbstractReadableMemory
34 ;:N, r9(18):J, r10(19):top-long]}
35 DB: AFT: State:{L=[r8:Lcc/squirreljme/jvm/summercoat/ld/mem/AbstractReadableMe
36 mory;:RN, r9:J, r10:top-long, r11:[B:RN, r12:I, r13:I:R, r14:I], S=[r11(15):[B
37 :N, r16:I, r8(17):Lcc/squirreljme/jvm/summercoat/ld/mem/AbstractReadableMemory
38 ;:N, r9(18):J, r10(19):top-long, r9(20):J, r10(21):top-long]}
41 DB: ********************
44 So I wonder what the pushed Java types are...
46 Actually the correct new code result is this:
49 DB: ********************
50 DB: Preprocessing STACKSHUFFLE:[DUP2] (@62#DUP2~:[])
51 DB: Shuffle with: DUP2 -> [[A+] -> [A+A+]]
52 DB: >>>>>>>> PRE-DETERMINE
53 DB: *** Stack Result ***
54 DB: BEF: State:{L=[r8:Lcc/squirreljme/jvm/summercoat/ld/mem/AbstractReadableMemory;:RN, r9:J, r10:top-long, r11:[B:RN, r12:I, r13:I:R, r14:I], S=[r11(15):[B:N, r16:I, r8(17):Lcc/squirreljme/jvm/summercoat/ld/mem/AbstractReadableMemory;:N, r9(18):J, r10(19):top-long]}
55 DB: AFT: State:{L=[r8:Lcc/squirreljme/jvm/summercoat/ld/mem/AbstractReadableMemory;:RN, r9:J, r10:top-long, r11:[B:RN, r12:I, r13:I:R, r14:I], S=[r11(15):[B:N, r16:I, r8(17):Lcc/squirreljme/jvm/summercoat/ld/mem/AbstractReadableMemory;:N]}
56 DB: IN : [In:{r=r9, type=J, flags=}]
58 DB: ********************
59 DB: @@PUSHTYPE: [[A+] -> [A+A+]] -> [J, J]
60 DB: *** Stack Result ***
61 DB: BEF: State:{L=[r8:Lcc/squirreljme/jvm/summercoat/ld/mem/AbstractReadableMemory;:RN, r9:J, r10:top-long, r11:[B:RN, r12:I, r13:I:R, r14:I], S=[r11(15):[B:N, r16:I, r8(17):Lcc/squirreljme/jvm/summercoat/ld/mem/AbstractReadableMemory;:N, r9(18):J, r10(19):top-long]}
62 DB: AFT: State:{L=[r8:Lcc/squirreljme/jvm/summercoat/ld/mem/AbstractReadableMemory;:RN, r9:J, r10:top-long, r11:[B:RN, r12:I, r13:I:R, r14:I], S=[r11(15):[B:N, r16:I, r17:J, r18:top-long, r19:J, r20:top-long]}
63 DB: IN : [In:{r=r8, type=Lcc/squirreljme/jvm/summercoat/ld/mem/AbstractReadableMemory;, flags=NC}, In:{r=r9, type=J, flags=}]
64 DB: OUT: [Out:{r=r17, type=J, flags=}, Out:{r=r19, type=J, flags=}]
65 DB: ********************
66 DB: <<<<<<<< POST-DETERMINE
67 DB: @@PUSHPOP: [[A+] -> [A+A+]] -> Result:{bef=State:{L=[r8:Lcc/squirreljme/jvm/summercoat/ld/mem/AbstractReadableMemory;:RN, r9:J, r10:top-long, r11:[B:RN, r12:I, r13:I:R, r14:I], S=[r11(15):[B:N, r16:I, r8(17):Lcc/squirreljme/jvm/summercoat/ld/mem/AbstractReadableMemory;:N, r9(18):J, r10(19):top-long]}, aft=State:{L=[r8:Lcc/squirreljme/jvm/summercoat/ld/mem/AbstractReadableMemory;:RN, r9:J, r10:top-long, r11:[B:RN, r12:I, r13:I:R, r14:I], S=[r11(15):[B:N, r16:I, r17:J, r18:top-long, r19:J, r20:top-long]}, enq=ENQ[|], in=[In:{r=r8, type=Lcc/squirreljme/jvm/summercoat/ld/mem/AbstractReadableMemory;, flags=NC}, In:{r=r9, type=J, flags=}], out=[Out:{r=r17, type=J, flags=}, Out:{r=r19, type=J, flags=}], ops=[]}
68 DB: @@INOUT: In:{r=r8, type=Lcc/squirreljme/jvm/summercoat/ld/mem/AbstractReadableMemory;, flags=NC} -> Out:{r=r17, type=J, flags=}
69 DB: @@INOUT: In:{r=r8, type=Lcc/squirreljme/jvm/summercoat/ld/mem/AbstractReadableMemory;, flags=NC} -> Out:{r=r19, type=J, flags=}
70 DB: *** Stack Result ***
71 DB: BEF: State:{L=[r8:Lcc/squirreljme/jvm/summercoat/ld/mem/AbstractReadableMemory;:RN, r9:J, r10:top-long, r11:[B:RN, r12:I, r13:I:R, r14:I], S=[r11(15):[B:N, r16:I, r8(17):Lcc/squirreljme/jvm/summercoat/ld/mem/AbstractReadableMemory;:N, r9(18):J, r10(19):top-long]}
72 DB: AFT: State:{L=[r8:Lcc/squirreljme/jvm/summercoat/ld/mem/AbstractReadableMemory;:RN, r9:J, r10:top-long, r11:[B:RN, r12:I, r13:I:R, r14:I], S=[r11(15):[B:N, r16:I, r17:J, r18:top-long, r19:J, r20:top-long]}
75 DB: OPS: [COPY(R8, T0), COPY(T0, R17), COPY(T0, R19)]
76 DB: ********************
83 S=[r11(15):[B:N, r16:I, r8(17):Lcc/squirreljme/jvm/summercoat/ld/mem/AbstractReadableMemory;:N, r9(18):J, r10(19):top-long]}
85 S=[r11(15):[B:N, r16:I, r17:J, r18:top-long, r19:J, r20:top-long]}
88 That `AbstractReadableMemory` is just going poof for some reason.
92 Ah, I am mixing the maxes... the pops is logical but one has logical and
93 the other has not... so after doing this basically it works and compiles
94 the code? Now to see if it actually produces the right result.
98 Okay so looks to be correct, although the optimizations that I did have been
99 tossed out the window, but oh well...
102 - "*** Java :113 IADD@61 ***"
103 - "INTEGER_ADD_REG:[[14, 15, 14]]"
104 - "*** Java :113 DUP_X1@62 ***"
106 - "IF_ICMP_EQUALS:[[13, 0, 7]]"
107 - "MEM_HANDLE_COUNT_UP:[[13]]"
112 - "*** Java :113 PUTFIELD@63 ***"
114 - "IF_ICMP_EQUALS:[[14, 0, 542]]"
115 - "LOAD_POOL:[[#5271(ACCESSED_FIELD):NORMAL+INSTANCE+field java/util/LinkedLis
117 - "MEM_HANDLE_OFF_STORE_INTEGER_REG_JAVA:[[15, 14, 21]]"
118 - "IF_ICMP_EQUALS:[[20, 0, 61]]"
119 - "MEM_HANDLE_COUNT_DOWN:[[20, 21]]"
120 - "IF_ICMP_GREATER_THAN:[[21, 0, 53]]"
123 - "LOAD_POOL:[[#5(INVOKE_XTABLE):XTable:STATIC[cc/squirreljme/jvm/summercoat/L
125 - "LOAD_POOL:[[#19(INVOKED_METHOD):STATIC+cc/squirreljme/jvm/summercoat/LogicH
126 andler::gcMemHandle(I)V, 26]]"
127 - "MEM_HANDLE_OFF_LOAD_INTEGER_REG_JAVA:[[24, 23, 26]]"
128 - "INTEGER_ADD_CONST:[[26, 4, 26]]"
129 - "MEM_HANDLE_OFF_LOAD_INTEGER_REG_JAVA:[[25, 23, 26]]"
130 - "INVOKE_POINTER_AND_POOL:[[24, 25, R[20]]]"
131 - "IF_ICMP_NOT_EQUALS:[[3, 0, 8]]"
133 - "IF_ICMP_NOT_EQUALS:[[3, 0, 1792]]"
135 - "IF_ICMP_NOT_EQUALS:[[3, 0, 1784]]"