All new Shark

This is what the refactored Shark makes of String.hashCode() on ppc. The original version is here.

0xd04c2010:     mflr    r0
0xd04c2014:     stw     r0,4(r1)
0xd04c2018:     stwu    r1,-32(r1)
0xd04c201c:     stw     r30,28(r1)
 abi frame setup
0xd04c2020:     lwz     r5,712(r4)
0xd04c2024:     lwz     r6,704(r4)
0xd04c2028:     addi    r5,r5,-44
0xd04c202c:     cmplw   r5,r6
0xd04c2030:     addi    r6,r4,712
0xd04c2034:     addi    r4,r4,716
0xd04c2038:     blt-    0xd04c2130
0xd04c203c:     stw     r5,0(r6)
0xd04c2040:     li      r7,3
0xd04c2044:     stw     r7,16(r5)
0xd04c2048:     lwz     r7,0(r4)
0xd04c204c:     stw     r7,20(r5)
0xd04c2050:     addi    r7,r5,20
0xd04c2054:     stw     r7,0(r4)
 zero frame setup
0xd04c2058:     lwz     r5,44(r5)
0xd04c205c:     cmplwi  r5,0
0xd04c2060:     beq-    0xd04c2140
0xd04c2064:     lwz     r7,20(r5)
0xd04c2068:     cmplwi  r7,0
0xd04c206c:     bne-    0xd04c20f4
 0: aload_0
 1: getfield <Field java.lang.String.hash int>
 4: istore_1
 5: iload_1
 6: ifne 58
0xd04c2070:     cmplwi  r5,0
0xd04c2074:     beq-    0xd04c2150
0xd04c2078:     lwz     r8,12(r5)
0xd04c207c:     lwz     r9,8(r5)
0xd04c2080:     lwz     r10,16(r5)
0xd04c2084:     li      r11,0
 9: aload_0
10: getfield <Field java.lang.String.offset int>
13: istore_2
14: aload_0
15: getfield <Field java.lang.String.value char[]>
18: astore_3
19: aload_0
20: getfield <Field java.lang.String.count int>
23: istore 4
25: iconst_0
26: istore 5
28: goto 46
0xd04c2088:     lis     r12,4031
0xd04c208c:     lwz     r12,-10384(r12)
0xd04c2090:     cmplwi  r12,1
0xd04c2094:     beq-    0xd04c2160
0xd04c2098:     cmpw    r11,r10
0xd04c209c:     bge-    0xd04c20e8
46: iload 5
48: iload 4
50: if_icmplt 31
0xd04c20a0:     mulli   r7,r7,31
0xd04c20a4:     cmplwi  r9,0
0xd04c20a8:     addi    r12,r8,1
0xd04c20ac:     beq-    0xd04c2170
0xd04c20b0:     lwz     r30,8(r9)
0xd04c20b4:     cmpw    r8,r30
0xd04c20b8:     bge-    0xd04c2180
0xd04c20bc:     rlwinm  r8,r8,1,0,30
0xd04c20c0:     add     r8,r8,r9
0xd04c20c4:     lhz     r8,12(r8)
0xd04c20c8:     addi    r11,r11,1
0xd04c20cc:     add     r7,r7,r8
31: bipush 31
33: iload_1
34: imul
35: aload_3
36: iload_2
37: iinc 2 1
40: caload
41: iadd
42: istore_1
43: iinc 5 1
0xd04c20d0:     lis     r8,4031
0xd04c20d4:     lwz     r8,-10384(r8)
0xd04c20d8:     cmplwi  r8,1
0xd04c20dc:     beq-    0xd04c2190
0xd04c20e0:     cmpw    r11,r10
0xd04c20e4:     blt-    0xd04c21a0
46: iload 5
48: iload 4
50: if_icmplt 31
0xd04c20e8:     cmplwi  r5,0
0xd04c20ec:     beq-    0xd04c21a8
0xd04c20f0:     stw     r7,20(r5)
53: aload_0
54: iload_1
55: putfield <Field java.lang.String.hash int>
0xd04c20f4:     lis     r3,4031
0xd04c20f8:     lwz     r3,-10384(r3)
0xd04c20fc:     cmplwi  r3,1
0xd04c2100:     beq-    0xd04c21b8
58: iload_1
59: ireturn
0xd04c2104:     lwz     r3,0(r4)
0xd04c2108:     addi    r5,r3,24
0xd04c210c:     stw     r5,0(r6)
0xd04c2110:     lwz     r5,0(r3)
0xd04c2114:     stw     r5,0(r4)
0xd04c2118:     stw     r7,24(r3)
zero frame teardown
0xd04c211c:     lwz     r30,28(r1)
0xd04c2120:     addi    r1,r1,32
0xd04c2124:     lwz     r0,4(r1)
0xd04c2128:     mtlr    r0
0xd04c212c:     blr
abi frame teardown
0xd04c2130:     lis     r5,4000
0xd04c2134:     li      r4,119
0xd04c2138:     ori     r3,r5,54900
0xd04c213c:     bl      0xd04c1fd8
stack overflow handler (unimplemented)
0xd04c2140:     lis     r5,4000
0xd04c2144:     li      r4,456
0xd04c2148:     ori     r3,r5,48904
0xd04c214c:     bl      0xd04c1fd8
null pointer handler (unimplemented)
0xd04c2150:     lis     r5,4000
0xd04c2154:     li      r4,456
0xd04c2158:     ori     r3,r5,48904
0xd04c215c:     bl      0xd04c1fd8
null pointer handler (unimplemented)
0xd04c2160:     lis     r5,4000
0xd04c2164:     li      r4,510
0xd04c2168:     ori     r3,r5,48904
0xd04c216c:     bl      0xd04c1fd8
safepoint handler (unimplemented)
0xd04c2170:     lis     r7,4000
0xd04c2174:     li      r4,456
0xd04c2178:     ori     r3,r7,48904
0xd04c217c:     bl      0xd04c1fd8
null pointer handler (unimplemented)
0xd04c2180:     lis     r7,4000
0xd04c2184:     li      r4,478
0xd04c2188:     ori     r3,r7,48904
0xd04c218c:     bl      0xd04c1fd8
array out of bounds handler (unimplemented)
0xd04c2190:     lis     r5,4000
0xd04c2194:     li      r4,510
0xd04c2198:     ori     r3,r5,48904
0xd04c219c:     bl      0xd04c1fd8
safepoint handler (unimplemented)
0xd04c21a0:     mr      r8,r12
0xd04c21a4:     b       0xd04c20a0
part of block commencing bci 46
0xd04c21a8:     lis     r5,4000
0xd04c21ac:     li      r4,456
0xd04c21b0:     ori     r3,r5,48904
0xd04c21b4:     bl      0xd04c1fd8
null pointer handler (unimplemented)
0xd04c21b8:     lis     r6,4000
0xd04c21bc:     li      r4,510
0xd04c21c0:     ori     r3,r6,48904
0xd04c21c4:     bl      0xd04c1fd8
safepoint handler (unimplemented)