Created
January 9, 2017 12:19
-
-
Save ssadler/a11a3e0a5d313c146b0e8a6fd6ad01f9 to your computer and use it in GitHub Desktop.
ghcjs ccjs minifaction fails
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var h$currentThread = null; | |
var h$stack = null; | |
var h$sp = 0; | |
var h$initStatic = []; | |
var h$staticThunks = {}; | |
var h$staticThunksArr = []; | |
var h$regs = []; | |
var h$r1 = 0; | |
var h$r2 = 0; | |
var h$r3 = 0; | |
var h$r4 = 0; | |
var h$r5 = 0; | |
var h$r6 = 0; | |
var h$r7 = 0; | |
var h$r8 = 0; | |
var h$r9 = 0; | |
var h$r10 = 0; | |
var h$r11 = 0; | |
var h$r12 = 0; | |
var h$r13 = 0; | |
var h$r14 = 0; | |
var h$r15 = 0; | |
var h$r16 = 0; | |
var h$r17 = 0; | |
var h$r18 = 0; | |
var h$r19 = 0; | |
var h$r20 = 0; | |
var h$r21 = 0; | |
var h$r22 = 0; | |
var h$r23 = 0; | |
var h$r24 = 0; | |
var h$r25 = 0; | |
var h$r26 = 0; | |
var h$r27 = 0; | |
var h$r28 = 0; | |
var h$r29 = 0; | |
var h$r30 = 0; | |
var h$r31 = 0; | |
var h$r32 = 0; | |
function h$getReg(h$RTSD_0) | |
{ | |
switch (h$RTSD_0) | |
{ | |
case (1): | |
return h$r1; | |
case (2): | |
return h$r2; | |
case (3): | |
return h$r3; | |
case (4): | |
return h$r4; | |
case (5): | |
return h$r5; | |
case (6): | |
return h$r6; | |
case (7): | |
return h$r7; | |
case (8): | |
return h$r8; | |
case (9): | |
return h$r9; | |
case (10): | |
return h$r10; | |
case (11): | |
return h$r11; | |
case (12): | |
return h$r12; | |
case (13): | |
return h$r13; | |
case (14): | |
return h$r14; | |
case (15): | |
return h$r15; | |
case (16): | |
return h$r16; | |
case (17): | |
return h$r17; | |
case (18): | |
return h$r18; | |
case (19): | |
return h$r19; | |
case (20): | |
return h$r20; | |
case (21): | |
return h$r21; | |
case (22): | |
return h$r22; | |
case (23): | |
return h$r23; | |
case (24): | |
return h$r24; | |
case (25): | |
return h$r25; | |
case (26): | |
return h$r26; | |
case (27): | |
return h$r27; | |
case (28): | |
return h$r28; | |
case (29): | |
return h$r29; | |
case (30): | |
return h$r30; | |
case (31): | |
return h$r31; | |
case (32): | |
return h$r32; | |
case (33): | |
return h$regs[0]; | |
case (34): | |
return h$regs[1]; | |
case (35): | |
return h$regs[2]; | |
case (36): | |
return h$regs[3]; | |
case (37): | |
return h$regs[4]; | |
case (38): | |
return h$regs[5]; | |
case (39): | |
return h$regs[6]; | |
case (40): | |
return h$regs[7]; | |
case (41): | |
return h$regs[8]; | |
case (42): | |
return h$regs[9]; | |
case (43): | |
return h$regs[10]; | |
case (44): | |
return h$regs[11]; | |
case (45): | |
return h$regs[12]; | |
case (46): | |
return h$regs[13]; | |
case (47): | |
return h$regs[14]; | |
case (48): | |
return h$regs[15]; | |
case (49): | |
return h$regs[16]; | |
case (50): | |
return h$regs[17]; | |
case (51): | |
return h$regs[18]; | |
case (52): | |
return h$regs[19]; | |
case (53): | |
return h$regs[20]; | |
case (54): | |
return h$regs[21]; | |
case (55): | |
return h$regs[22]; | |
case (56): | |
return h$regs[23]; | |
case (57): | |
return h$regs[24]; | |
case (58): | |
return h$regs[25]; | |
case (59): | |
return h$regs[26]; | |
case (60): | |
return h$regs[27]; | |
case (61): | |
return h$regs[28]; | |
case (62): | |
return h$regs[29]; | |
case (63): | |
return h$regs[30]; | |
case (64): | |
return h$regs[31]; | |
case (65): | |
return h$regs[32]; | |
case (66): | |
return h$regs[33]; | |
case (67): | |
return h$regs[34]; | |
case (68): | |
return h$regs[35]; | |
case (69): | |
return h$regs[36]; | |
case (70): | |
return h$regs[37]; | |
case (71): | |
return h$regs[38]; | |
case (72): | |
return h$regs[39]; | |
case (73): | |
return h$regs[40]; | |
case (74): | |
return h$regs[41]; | |
case (75): | |
return h$regs[42]; | |
case (76): | |
return h$regs[43]; | |
case (77): | |
return h$regs[44]; | |
case (78): | |
return h$regs[45]; | |
case (79): | |
return h$regs[46]; | |
case (80): | |
return h$regs[47]; | |
case (81): | |
return h$regs[48]; | |
case (82): | |
return h$regs[49]; | |
case (83): | |
return h$regs[50]; | |
case (84): | |
return h$regs[51]; | |
case (85): | |
return h$regs[52]; | |
case (86): | |
return h$regs[53]; | |
case (87): | |
return h$regs[54]; | |
case (88): | |
return h$regs[55]; | |
case (89): | |
return h$regs[56]; | |
case (90): | |
return h$regs[57]; | |
case (91): | |
return h$regs[58]; | |
case (92): | |
return h$regs[59]; | |
case (93): | |
return h$regs[60]; | |
case (94): | |
return h$regs[61]; | |
case (95): | |
return h$regs[62]; | |
case (96): | |
return h$regs[63]; | |
case (97): | |
return h$regs[64]; | |
case (98): | |
return h$regs[65]; | |
case (99): | |
return h$regs[66]; | |
case (100): | |
return h$regs[67]; | |
case (101): | |
return h$regs[68]; | |
case (102): | |
return h$regs[69]; | |
case (103): | |
return h$regs[70]; | |
case (104): | |
return h$regs[71]; | |
case (105): | |
return h$regs[72]; | |
case (106): | |
return h$regs[73]; | |
case (107): | |
return h$regs[74]; | |
case (108): | |
return h$regs[75]; | |
case (109): | |
return h$regs[76]; | |
case (110): | |
return h$regs[77]; | |
case (111): | |
return h$regs[78]; | |
case (112): | |
return h$regs[79]; | |
case (113): | |
return h$regs[80]; | |
case (114): | |
return h$regs[81]; | |
case (115): | |
return h$regs[82]; | |
case (116): | |
return h$regs[83]; | |
case (117): | |
return h$regs[84]; | |
case (118): | |
return h$regs[85]; | |
case (119): | |
return h$regs[86]; | |
case (120): | |
return h$regs[87]; | |
case (121): | |
return h$regs[88]; | |
case (122): | |
return h$regs[89]; | |
case (123): | |
return h$regs[90]; | |
case (124): | |
return h$regs[91]; | |
case (125): | |
return h$regs[92]; | |
case (126): | |
return h$regs[93]; | |
case (127): | |
return h$regs[94]; | |
case (128): | |
return h$regs[95]; | |
default: | |
}; | |
}; | |
function h$setReg(h$RTSD_1, h$RTSD_2) | |
{ | |
switch (h$RTSD_1) | |
{ | |
case (1): | |
h$r1 = h$RTSD_2; | |
return undefined; | |
case (2): | |
h$r2 = h$RTSD_2; | |
return undefined; | |
case (3): | |
h$r3 = h$RTSD_2; | |
return undefined; | |
case (4): | |
h$r4 = h$RTSD_2; | |
return undefined; | |
case (5): | |
h$r5 = h$RTSD_2; | |
return undefined; | |
case (6): | |
h$r6 = h$RTSD_2; | |
return undefined; | |
case (7): | |
h$r7 = h$RTSD_2; | |
return undefined; | |
case (8): | |
h$r8 = h$RTSD_2; | |
return undefined; | |
case (9): | |
h$r9 = h$RTSD_2; | |
return undefined; | |
case (10): | |
h$r10 = h$RTSD_2; | |
return undefined; | |
case (11): | |
h$r11 = h$RTSD_2; | |
return undefined; | |
case (12): | |
h$r12 = h$RTSD_2; | |
return undefined; | |
case (13): | |
h$r13 = h$RTSD_2; | |
return undefined; | |
case (14): | |
h$r14 = h$RTSD_2; | |
return undefined; | |
case (15): | |
h$r15 = h$RTSD_2; | |
return undefined; | |
case (16): | |
h$r16 = h$RTSD_2; | |
return undefined; | |
case (17): | |
h$r17 = h$RTSD_2; | |
return undefined; | |
case (18): | |
h$r18 = h$RTSD_2; | |
return undefined; | |
case (19): | |
h$r19 = h$RTSD_2; | |
return undefined; | |
case (20): | |
h$r20 = h$RTSD_2; | |
return undefined; | |
case (21): | |
h$r21 = h$RTSD_2; | |
return undefined; | |
case (22): | |
h$r22 = h$RTSD_2; | |
return undefined; | |
case (23): | |
h$r23 = h$RTSD_2; | |
return undefined; | |
case (24): | |
h$r24 = h$RTSD_2; | |
return undefined; | |
case (25): | |
h$r25 = h$RTSD_2; | |
return undefined; | |
case (26): | |
h$r26 = h$RTSD_2; | |
return undefined; | |
case (27): | |
h$r27 = h$RTSD_2; | |
return undefined; | |
case (28): | |
h$r28 = h$RTSD_2; | |
return undefined; | |
case (29): | |
h$r29 = h$RTSD_2; | |
return undefined; | |
case (30): | |
h$r30 = h$RTSD_2; | |
return undefined; | |
case (31): | |
h$r31 = h$RTSD_2; | |
return undefined; | |
case (32): | |
h$r32 = h$RTSD_2; | |
return undefined; | |
case (33): | |
h$regs[0] = h$RTSD_2; | |
return undefined; | |
case (34): | |
h$regs[1] = h$RTSD_2; | |
return undefined; | |
case (35): | |
h$regs[2] = h$RTSD_2; | |
return undefined; | |
case (36): | |
h$regs[3] = h$RTSD_2; | |
return undefined; | |
case (37): | |
h$regs[4] = h$RTSD_2; | |
return undefined; | |
case (38): | |
h$regs[5] = h$RTSD_2; | |
return undefined; | |
case (39): | |
h$regs[6] = h$RTSD_2; | |
return undefined; | |
case (40): | |
h$regs[7] = h$RTSD_2; | |
return undefined; | |
case (41): | |
h$regs[8] = h$RTSD_2; | |
return undefined; | |
case (42): | |
h$regs[9] = h$RTSD_2; | |
return undefined; | |
case (43): | |
h$regs[10] = h$RTSD_2; | |
return undefined; | |
case (44): | |
h$regs[11] = h$RTSD_2; | |
return undefined; | |
case (45): | |
h$regs[12] = h$RTSD_2; | |
return undefined; | |
case (46): | |
h$regs[13] = h$RTSD_2; | |
return undefined; | |
case (47): | |
h$regs[14] = h$RTSD_2; | |
return undefined; | |
case (48): | |
h$regs[15] = h$RTSD_2; | |
return undefined; | |
case (49): | |
h$regs[16] = h$RTSD_2; | |
return undefined; | |
case (50): | |
h$regs[17] = h$RTSD_2; | |
return undefined; | |
case (51): | |
h$regs[18] = h$RTSD_2; | |
return undefined; | |
case (52): | |
h$regs[19] = h$RTSD_2; | |
return undefined; | |
case (53): | |
h$regs[20] = h$RTSD_2; | |
return undefined; | |
case (54): | |
h$regs[21] = h$RTSD_2; | |
return undefined; | |
case (55): | |
h$regs[22] = h$RTSD_2; | |
return undefined; | |
case (56): | |
h$regs[23] = h$RTSD_2; | |
return undefined; | |
case (57): | |
h$regs[24] = h$RTSD_2; | |
return undefined; | |
case (58): | |
h$regs[25] = h$RTSD_2; | |
return undefined; | |
case (59): | |
h$regs[26] = h$RTSD_2; | |
return undefined; | |
case (60): | |
h$regs[27] = h$RTSD_2; | |
return undefined; | |
case (61): | |
h$regs[28] = h$RTSD_2; | |
return undefined; | |
case (62): | |
h$regs[29] = h$RTSD_2; | |
return undefined; | |
case (63): | |
h$regs[30] = h$RTSD_2; | |
return undefined; | |
case (64): | |
h$regs[31] = h$RTSD_2; | |
return undefined; | |
case (65): | |
h$regs[32] = h$RTSD_2; | |
return undefined; | |
case (66): | |
h$regs[33] = h$RTSD_2; | |
return undefined; | |
case (67): | |
h$regs[34] = h$RTSD_2; | |
return undefined; | |
case (68): | |
h$regs[35] = h$RTSD_2; | |
return undefined; | |
case (69): | |
h$regs[36] = h$RTSD_2; | |
return undefined; | |
case (70): | |
h$regs[37] = h$RTSD_2; | |
return undefined; | |
case (71): | |
h$regs[38] = h$RTSD_2; | |
return undefined; | |
case (72): | |
h$regs[39] = h$RTSD_2; | |
return undefined; | |
case (73): | |
h$regs[40] = h$RTSD_2; | |
return undefined; | |
case (74): | |
h$regs[41] = h$RTSD_2; | |
return undefined; | |
case (75): | |
h$regs[42] = h$RTSD_2; | |
return undefined; | |
case (76): | |
h$regs[43] = h$RTSD_2; | |
return undefined; | |
case (77): | |
h$regs[44] = h$RTSD_2; | |
return undefined; | |
case (78): | |
h$regs[45] = h$RTSD_2; | |
return undefined; | |
case (79): | |
h$regs[46] = h$RTSD_2; | |
return undefined; | |
case (80): | |
h$regs[47] = h$RTSD_2; | |
return undefined; | |
case (81): | |
h$regs[48] = h$RTSD_2; | |
return undefined; | |
case (82): | |
h$regs[49] = h$RTSD_2; | |
return undefined; | |
case (83): | |
h$regs[50] = h$RTSD_2; | |
return undefined; | |
case (84): | |
h$regs[51] = h$RTSD_2; | |
return undefined; | |
case (85): | |
h$regs[52] = h$RTSD_2; | |
return undefined; | |
case (86): | |
h$regs[53] = h$RTSD_2; | |
return undefined; | |
case (87): | |
h$regs[54] = h$RTSD_2; | |
return undefined; | |
case (88): | |
h$regs[55] = h$RTSD_2; | |
return undefined; | |
case (89): | |
h$regs[56] = h$RTSD_2; | |
return undefined; | |
case (90): | |
h$regs[57] = h$RTSD_2; | |
return undefined; | |
case (91): | |
h$regs[58] = h$RTSD_2; | |
return undefined; | |
case (92): | |
h$regs[59] = h$RTSD_2; | |
return undefined; | |
case (93): | |
h$regs[60] = h$RTSD_2; | |
return undefined; | |
case (94): | |
h$regs[61] = h$RTSD_2; | |
return undefined; | |
case (95): | |
h$regs[62] = h$RTSD_2; | |
return undefined; | |
case (96): | |
h$regs[63] = h$RTSD_2; | |
return undefined; | |
case (97): | |
h$regs[64] = h$RTSD_2; | |
return undefined; | |
case (98): | |
h$regs[65] = h$RTSD_2; | |
return undefined; | |
case (99): | |
h$regs[66] = h$RTSD_2; | |
return undefined; | |
case (100): | |
h$regs[67] = h$RTSD_2; | |
return undefined; | |
case (101): | |
h$regs[68] = h$RTSD_2; | |
return undefined; | |
case (102): | |
h$regs[69] = h$RTSD_2; | |
return undefined; | |
case (103): | |
h$regs[70] = h$RTSD_2; | |
return undefined; | |
case (104): | |
h$regs[71] = h$RTSD_2; | |
return undefined; | |
case (105): | |
h$regs[72] = h$RTSD_2; | |
return undefined; | |
case (106): | |
h$regs[73] = h$RTSD_2; | |
return undefined; | |
case (107): | |
h$regs[74] = h$RTSD_2; | |
return undefined; | |
case (108): | |
h$regs[75] = h$RTSD_2; | |
return undefined; | |
case (109): | |
h$regs[76] = h$RTSD_2; | |
return undefined; | |
case (110): | |
h$regs[77] = h$RTSD_2; | |
return undefined; | |
case (111): | |
h$regs[78] = h$RTSD_2; | |
return undefined; | |
case (112): | |
h$regs[79] = h$RTSD_2; | |
return undefined; | |
case (113): | |
h$regs[80] = h$RTSD_2; | |
return undefined; | |
case (114): | |
h$regs[81] = h$RTSD_2; | |
return undefined; | |
case (115): | |
h$regs[82] = h$RTSD_2; | |
return undefined; | |
case (116): | |
h$regs[83] = h$RTSD_2; | |
return undefined; | |
case (117): | |
h$regs[84] = h$RTSD_2; | |
return undefined; | |
case (118): | |
h$regs[85] = h$RTSD_2; | |
return undefined; | |
case (119): | |
h$regs[86] = h$RTSD_2; | |
return undefined; | |
case (120): | |
h$regs[87] = h$RTSD_2; | |
return undefined; | |
case (121): | |
h$regs[88] = h$RTSD_2; | |
return undefined; | |
case (122): | |
h$regs[89] = h$RTSD_2; | |
return undefined; | |
case (123): | |
h$regs[90] = h$RTSD_2; | |
return undefined; | |
case (124): | |
h$regs[91] = h$RTSD_2; | |
return undefined; | |
case (125): | |
h$regs[92] = h$RTSD_2; | |
return undefined; | |
case (126): | |
h$regs[93] = h$RTSD_2; | |
return undefined; | |
case (127): | |
h$regs[94] = h$RTSD_2; | |
return undefined; | |
case (128): | |
h$regs[95] = h$RTSD_2; | |
return undefined; | |
default: | |
}; | |
}; | |
function h$l1(x1) | |
{ | |
h$r1 = x1; | |
}; | |
function h$l2(x1, x2) | |
{ | |
h$r2 = x1; | |
h$r1 = x2; | |
}; | |
function h$l3(x1, x2, x3) | |
{ | |
h$r3 = x1; | |
h$r2 = x2; | |
h$r1 = x3; | |
}; | |
function h$l4(x1, x2, x3, x4) | |
{ | |
h$r4 = x1; | |
h$r3 = x2; | |
h$r2 = x3; | |
h$r1 = x4; | |
}; | |
function h$l5(x1, x2, x3, x4, x5) | |
{ | |
h$r5 = x1; | |
h$r4 = x2; | |
h$r3 = x3; | |
h$r2 = x4; | |
h$r1 = x5; | |
}; | |
function h$l6(x1, x2, x3, x4, x5, x6) | |
{ | |
h$r6 = x1; | |
h$r5 = x2; | |
h$r4 = x3; | |
h$r3 = x4; | |
h$r2 = x5; | |
h$r1 = x6; | |
}; | |
function h$l7(x1, x2, x3, x4, x5, x6, x7) | |
{ | |
h$r7 = x1; | |
h$r6 = x2; | |
h$r5 = x3; | |
h$r4 = x4; | |
h$r3 = x5; | |
h$r2 = x6; | |
h$r1 = x7; | |
}; | |
function h$l8(x1, x2, x3, x4, x5, x6, x7, x8) | |
{ | |
h$r8 = x1; | |
h$r7 = x2; | |
h$r6 = x3; | |
h$r5 = x4; | |
h$r4 = x5; | |
h$r3 = x6; | |
h$r2 = x7; | |
h$r1 = x8; | |
}; | |
function h$l9(x1, x2, x3, x4, x5, x6, x7, x8, x9) | |
{ | |
h$r9 = x1; | |
h$r8 = x2; | |
h$r7 = x3; | |
h$r6 = x4; | |
h$r5 = x5; | |
h$r4 = x6; | |
h$r3 = x7; | |
h$r2 = x8; | |
h$r1 = x9; | |
}; | |
function h$l10(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) | |
{ | |
h$r10 = x1; | |
h$r9 = x2; | |
h$r8 = x3; | |
h$r7 = x4; | |
h$r6 = x5; | |
h$r5 = x6; | |
h$r4 = x7; | |
h$r3 = x8; | |
h$r2 = x9; | |
h$r1 = x10; | |
}; | |
function h$l11(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11) | |
{ | |
h$r11 = x1; | |
h$r10 = x2; | |
h$r9 = x3; | |
h$r8 = x4; | |
h$r7 = x5; | |
h$r6 = x6; | |
h$r5 = x7; | |
h$r4 = x8; | |
h$r3 = x9; | |
h$r2 = x10; | |
h$r1 = x11; | |
}; | |
function h$l12(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12) | |
{ | |
h$r12 = x1; | |
h$r11 = x2; | |
h$r10 = x3; | |
h$r9 = x4; | |
h$r8 = x5; | |
h$r7 = x6; | |
h$r6 = x7; | |
h$r5 = x8; | |
h$r4 = x9; | |
h$r3 = x10; | |
h$r2 = x11; | |
h$r1 = x12; | |
}; | |
function h$l13(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13) | |
{ | |
h$r13 = x1; | |
h$r12 = x2; | |
h$r11 = x3; | |
h$r10 = x4; | |
h$r9 = x5; | |
h$r8 = x6; | |
h$r7 = x7; | |
h$r6 = x8; | |
h$r5 = x9; | |
h$r4 = x10; | |
h$r3 = x11; | |
h$r2 = x12; | |
h$r1 = x13; | |
}; | |
function h$l14(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14) | |
{ | |
h$r14 = x1; | |
h$r13 = x2; | |
h$r12 = x3; | |
h$r11 = x4; | |
h$r10 = x5; | |
h$r9 = x6; | |
h$r8 = x7; | |
h$r7 = x8; | |
h$r6 = x9; | |
h$r5 = x10; | |
h$r4 = x11; | |
h$r3 = x12; | |
h$r2 = x13; | |
h$r1 = x14; | |
}; | |
function h$l15(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15) | |
{ | |
h$r15 = x1; | |
h$r14 = x2; | |
h$r13 = x3; | |
h$r12 = x4; | |
h$r11 = x5; | |
h$r10 = x6; | |
h$r9 = x7; | |
h$r8 = x8; | |
h$r7 = x9; | |
h$r6 = x10; | |
h$r5 = x11; | |
h$r4 = x12; | |
h$r3 = x13; | |
h$r2 = x14; | |
h$r1 = x15; | |
}; | |
function h$l16(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16) | |
{ | |
h$r16 = x1; | |
h$r15 = x2; | |
h$r14 = x3; | |
h$r13 = x4; | |
h$r12 = x5; | |
h$r11 = x6; | |
h$r10 = x7; | |
h$r9 = x8; | |
h$r8 = x9; | |
h$r7 = x10; | |
h$r6 = x11; | |
h$r5 = x12; | |
h$r4 = x13; | |
h$r3 = x14; | |
h$r2 = x15; | |
h$r1 = x16; | |
}; | |
function h$l17(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17) | |
{ | |
h$r17 = x1; | |
h$r16 = x2; | |
h$r15 = x3; | |
h$r14 = x4; | |
h$r13 = x5; | |
h$r12 = x6; | |
h$r11 = x7; | |
h$r10 = x8; | |
h$r9 = x9; | |
h$r8 = x10; | |
h$r7 = x11; | |
h$r6 = x12; | |
h$r5 = x13; | |
h$r4 = x14; | |
h$r3 = x15; | |
h$r2 = x16; | |
h$r1 = x17; | |
}; | |
function h$l18(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18) | |
{ | |
h$r18 = x1; | |
h$r17 = x2; | |
h$r16 = x3; | |
h$r15 = x4; | |
h$r14 = x5; | |
h$r13 = x6; | |
h$r12 = x7; | |
h$r11 = x8; | |
h$r10 = x9; | |
h$r9 = x10; | |
h$r8 = x11; | |
h$r7 = x12; | |
h$r6 = x13; | |
h$r5 = x14; | |
h$r4 = x15; | |
h$r3 = x16; | |
h$r2 = x17; | |
h$r1 = x18; | |
}; | |
function h$l19(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19) | |
{ | |
h$r19 = x1; | |
h$r18 = x2; | |
h$r17 = x3; | |
h$r16 = x4; | |
h$r15 = x5; | |
h$r14 = x6; | |
h$r13 = x7; | |
h$r12 = x8; | |
h$r11 = x9; | |
h$r10 = x10; | |
h$r9 = x11; | |
h$r8 = x12; | |
h$r7 = x13; | |
h$r6 = x14; | |
h$r5 = x15; | |
h$r4 = x16; | |
h$r3 = x17; | |
h$r2 = x18; | |
h$r1 = x19; | |
}; | |
function h$l20(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20) | |
{ | |
h$r20 = x1; | |
h$r19 = x2; | |
h$r18 = x3; | |
h$r17 = x4; | |
h$r16 = x5; | |
h$r15 = x6; | |
h$r14 = x7; | |
h$r13 = x8; | |
h$r12 = x9; | |
h$r11 = x10; | |
h$r10 = x11; | |
h$r9 = x12; | |
h$r8 = x13; | |
h$r7 = x14; | |
h$r6 = x15; | |
h$r5 = x16; | |
h$r4 = x17; | |
h$r3 = x18; | |
h$r2 = x19; | |
h$r1 = x20; | |
}; | |
function h$l21(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21) | |
{ | |
h$r21 = x1; | |
h$r20 = x2; | |
h$r19 = x3; | |
h$r18 = x4; | |
h$r17 = x5; | |
h$r16 = x6; | |
h$r15 = x7; | |
h$r14 = x8; | |
h$r13 = x9; | |
h$r12 = x10; | |
h$r11 = x11; | |
h$r10 = x12; | |
h$r9 = x13; | |
h$r8 = x14; | |
h$r7 = x15; | |
h$r6 = x16; | |
h$r5 = x17; | |
h$r4 = x18; | |
h$r3 = x19; | |
h$r2 = x20; | |
h$r1 = x21; | |
}; | |
function h$l22(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22) | |
{ | |
h$r22 = x1; | |
h$r21 = x2; | |
h$r20 = x3; | |
h$r19 = x4; | |
h$r18 = x5; | |
h$r17 = x6; | |
h$r16 = x7; | |
h$r15 = x8; | |
h$r14 = x9; | |
h$r13 = x10; | |
h$r12 = x11; | |
h$r11 = x12; | |
h$r10 = x13; | |
h$r9 = x14; | |
h$r8 = x15; | |
h$r7 = x16; | |
h$r6 = x17; | |
h$r5 = x18; | |
h$r4 = x19; | |
h$r3 = x20; | |
h$r2 = x21; | |
h$r1 = x22; | |
}; | |
function h$l23(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23) | |
{ | |
h$r23 = x1; | |
h$r22 = x2; | |
h$r21 = x3; | |
h$r20 = x4; | |
h$r19 = x5; | |
h$r18 = x6; | |
h$r17 = x7; | |
h$r16 = x8; | |
h$r15 = x9; | |
h$r14 = x10; | |
h$r13 = x11; | |
h$r12 = x12; | |
h$r11 = x13; | |
h$r10 = x14; | |
h$r9 = x15; | |
h$r8 = x16; | |
h$r7 = x17; | |
h$r6 = x18; | |
h$r5 = x19; | |
h$r4 = x20; | |
h$r3 = x21; | |
h$r2 = x22; | |
h$r1 = x23; | |
}; | |
function h$l24(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, | |
x24) | |
{ | |
h$r24 = x1; | |
h$r23 = x2; | |
h$r22 = x3; | |
h$r21 = x4; | |
h$r20 = x5; | |
h$r19 = x6; | |
h$r18 = x7; | |
h$r17 = x8; | |
h$r16 = x9; | |
h$r15 = x10; | |
h$r14 = x11; | |
h$r13 = x12; | |
h$r12 = x13; | |
h$r11 = x14; | |
h$r10 = x15; | |
h$r9 = x16; | |
h$r8 = x17; | |
h$r7 = x18; | |
h$r6 = x19; | |
h$r5 = x20; | |
h$r4 = x21; | |
h$r3 = x22; | |
h$r2 = x23; | |
h$r1 = x24; | |
}; | |
function h$l25(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, | |
x24, x25) | |
{ | |
h$r25 = x1; | |
h$r24 = x2; | |
h$r23 = x3; | |
h$r22 = x4; | |
h$r21 = x5; | |
h$r20 = x6; | |
h$r19 = x7; | |
h$r18 = x8; | |
h$r17 = x9; | |
h$r16 = x10; | |
h$r15 = x11; | |
h$r14 = x12; | |
h$r13 = x13; | |
h$r12 = x14; | |
h$r11 = x15; | |
h$r10 = x16; | |
h$r9 = x17; | |
h$r8 = x18; | |
h$r7 = x19; | |
h$r6 = x20; | |
h$r5 = x21; | |
h$r4 = x22; | |
h$r3 = x23; | |
h$r2 = x24; | |
h$r1 = x25; | |
}; | |
function h$l26(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, | |
x24, x25, x26) | |
{ | |
h$r26 = x1; | |
h$r25 = x2; | |
h$r24 = x3; | |
h$r23 = x4; | |
h$r22 = x5; | |
h$r21 = x6; | |
h$r20 = x7; | |
h$r19 = x8; | |
h$r18 = x9; | |
h$r17 = x10; | |
h$r16 = x11; | |
h$r15 = x12; | |
h$r14 = x13; | |
h$r13 = x14; | |
h$r12 = x15; | |
h$r11 = x16; | |
h$r10 = x17; | |
h$r9 = x18; | |
h$r8 = x19; | |
h$r7 = x20; | |
h$r6 = x21; | |
h$r5 = x22; | |
h$r4 = x23; | |
h$r3 = x24; | |
h$r2 = x25; | |
h$r1 = x26; | |
}; | |
function h$l27(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, | |
x24, x25, x26, x27) | |
{ | |
h$r27 = x1; | |
h$r26 = x2; | |
h$r25 = x3; | |
h$r24 = x4; | |
h$r23 = x5; | |
h$r22 = x6; | |
h$r21 = x7; | |
h$r20 = x8; | |
h$r19 = x9; | |
h$r18 = x10; | |
h$r17 = x11; | |
h$r16 = x12; | |
h$r15 = x13; | |
h$r14 = x14; | |
h$r13 = x15; | |
h$r12 = x16; | |
h$r11 = x17; | |
h$r10 = x18; | |
h$r9 = x19; | |
h$r8 = x20; | |
h$r7 = x21; | |
h$r6 = x22; | |
h$r5 = x23; | |
h$r4 = x24; | |
h$r3 = x25; | |
h$r2 = x26; | |
h$r1 = x27; | |
}; | |
function h$l28(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, | |
x24, x25, x26, x27, x28) | |
{ | |
h$r28 = x1; | |
h$r27 = x2; | |
h$r26 = x3; | |
h$r25 = x4; | |
h$r24 = x5; | |
h$r23 = x6; | |
h$r22 = x7; | |
h$r21 = x8; | |
h$r20 = x9; | |
h$r19 = x10; | |
h$r18 = x11; | |
h$r17 = x12; | |
h$r16 = x13; | |
h$r15 = x14; | |
h$r14 = x15; | |
h$r13 = x16; | |
h$r12 = x17; | |
h$r11 = x18; | |
h$r10 = x19; | |
h$r9 = x20; | |
h$r8 = x21; | |
h$r7 = x22; | |
h$r6 = x23; | |
h$r5 = x24; | |
h$r4 = x25; | |
h$r3 = x26; | |
h$r2 = x27; | |
h$r1 = x28; | |
}; | |
function h$l29(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, | |
x24, x25, x26, x27, x28, x29) | |
{ | |
h$r29 = x1; | |
h$r28 = x2; | |
h$r27 = x3; | |
h$r26 = x4; | |
h$r25 = x5; | |
h$r24 = x6; | |
h$r23 = x7; | |
h$r22 = x8; | |
h$r21 = x9; | |
h$r20 = x10; | |
h$r19 = x11; | |
h$r18 = x12; | |
h$r17 = x13; | |
h$r16 = x14; | |
h$r15 = x15; | |
h$r14 = x16; | |
h$r13 = x17; | |
h$r12 = x18; | |
h$r11 = x19; | |
h$r10 = x20; | |
h$r9 = x21; | |
h$r8 = x22; | |
h$r7 = x23; | |
h$r6 = x24; | |
h$r5 = x25; | |
h$r4 = x26; | |
h$r3 = x27; | |
h$r2 = x28; | |
h$r1 = x29; | |
}; | |
function h$l30(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, | |
x24, x25, x26, x27, x28, x29, x30) | |
{ | |
h$r30 = x1; | |
h$r29 = x2; | |
h$r28 = x3; | |
h$r27 = x4; | |
h$r26 = x5; | |
h$r25 = x6; | |
h$r24 = x7; | |
h$r23 = x8; | |
h$r22 = x9; | |
h$r21 = x10; | |
h$r20 = x11; | |
h$r19 = x12; | |
h$r18 = x13; | |
h$r17 = x14; | |
h$r16 = x15; | |
h$r15 = x16; | |
h$r14 = x17; | |
h$r13 = x18; | |
h$r12 = x19; | |
h$r11 = x20; | |
h$r10 = x21; | |
h$r9 = x22; | |
h$r8 = x23; | |
h$r7 = x24; | |
h$r6 = x25; | |
h$r5 = x26; | |
h$r4 = x27; | |
h$r3 = x28; | |
h$r2 = x29; | |
h$r1 = x30; | |
}; | |
function h$l31(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, | |
x24, x25, x26, x27, x28, x29, x30, x31) | |
{ | |
h$r31 = x1; | |
h$r30 = x2; | |
h$r29 = x3; | |
h$r28 = x4; | |
h$r27 = x5; | |
h$r26 = x6; | |
h$r25 = x7; | |
h$r24 = x8; | |
h$r23 = x9; | |
h$r22 = x10; | |
h$r21 = x11; | |
h$r20 = x12; | |
h$r19 = x13; | |
h$r18 = x14; | |
h$r17 = x15; | |
h$r16 = x16; | |
h$r15 = x17; | |
h$r14 = x18; | |
h$r13 = x19; | |
h$r12 = x20; | |
h$r11 = x21; | |
h$r10 = x22; | |
h$r9 = x23; | |
h$r8 = x24; | |
h$r7 = x25; | |
h$r6 = x26; | |
h$r5 = x27; | |
h$r4 = x28; | |
h$r3 = x29; | |
h$r2 = x30; | |
h$r1 = x31; | |
}; | |
function h$l32(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, | |
x24, x25, x26, x27, x28, x29, x30, x31, x32) | |
{ | |
h$r32 = x1; | |
h$r31 = x2; | |
h$r30 = x3; | |
h$r29 = x4; | |
h$r28 = x5; | |
h$r27 = x6; | |
h$r26 = x7; | |
h$r25 = x8; | |
h$r24 = x9; | |
h$r23 = x10; | |
h$r22 = x11; | |
h$r21 = x12; | |
h$r20 = x13; | |
h$r19 = x14; | |
h$r18 = x15; | |
h$r17 = x16; | |
h$r16 = x17; | |
h$r15 = x18; | |
h$r14 = x19; | |
h$r13 = x20; | |
h$r12 = x21; | |
h$r11 = x22; | |
h$r10 = x23; | |
h$r9 = x24; | |
h$r8 = x25; | |
h$r7 = x26; | |
h$r6 = x27; | |
h$r5 = x28; | |
h$r4 = x29; | |
h$r3 = x30; | |
h$r2 = x31; | |
h$r1 = x32; | |
}; | |
var h$ret1; | |
var h$ret2; | |
var h$ret3; | |
var h$ret4; | |
var h$ret5; | |
var h$ret6; | |
var h$ret7; | |
var h$ret8; | |
var h$ret9; | |
var h$ret10; | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
/* platform-specific setup */ | |
// top-level debug initialization needs this. declare it in case we aren't in the same file as out.js | |
function h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e() { return h$stack[h$sp]; }; | |
/* | |
if browser mode is active (GHCJS_BROWSER is defined), all the runtime platform | |
detection code should be removed by the preprocessor. The h$isPlatform variables | |
are undeclared. | |
in non-browser mode, use h$isNode, h$isJsShell, h$isBrowser to find the current | |
platform. | |
more platforms should be added here in the future | |
*/ | |
var h$isNode = false; // runtime is node.js | |
var h$isJvm = false; // runtime is JVM | |
var h$isJsShell = false; // runtime is SpiderMonkey jsshell | |
var h$isJsCore = false; // runtime is JavaScriptCore jsc | |
var h$isBrowser = false; // running in browser or everything else | |
var h$isGHCJSi = false; // Code is GHCJSi (browser or node) | |
// load all required node.js modules | |
if(typeof process !== 'undefined' && (typeof h$TH !== 'undefined' || (typeof require !== 'undefined' && typeof module !== 'undefined' && module.exports))) { | |
h$isNode = true; | |
// we have to use these names for the closure compiler externs to work | |
var fs = require('fs'); | |
var path = require('path'); | |
var os = require('os'); | |
var child_process = require('child_process'); | |
var h$fs = fs; | |
var h$path = path; | |
var h$os = os; | |
var h$child = child_process; | |
var h$process = process; | |
function h$getProcessConstants() { | |
// this is a non-public API, but we need these values for things like file access modes | |
var cs = process['binding']('constants'); | |
if(typeof cs.os === 'object' && typeof cs.fs === 'object') { | |
return cs; | |
} else { | |
// earlier node.js versions (4.x and older) have all constants directly in the constants object | |
// construct something that resembles the hierarchy of the object in new versions: | |
return { 'fs': cs | |
, 'crypto': cs | |
, 'os': { 'UV_UDP_REUSEADDR': cs['UV_UDP_REUSEADDR'] | |
, 'errno': cs | |
, 'signals': cs | |
} | |
}; | |
} | |
} | |
var h$processConstants = h$getProcessConstants(); | |
} else if(typeof Java !== 'undefined') { | |
h$isJvm = true; | |
this.console = { | |
log: function(s) { | |
java.lang.System.out.print(s); | |
} | |
}; | |
} else if(typeof snarf !== 'undefined' && typeof print !== 'undefined' && typeof quit !== 'undefined') { | |
h$isJsShell = true; | |
this.console = { log: this.print }; | |
} else if(typeof numberOfDFGCompiles !== 'undefined' && typeof jscStack !== 'undefined') { | |
h$isJsCore = true; | |
} else { | |
h$isBrowser = true; | |
} | |
if(typeof global !== 'undefined' && global.h$GHCJSi) { | |
h$isGHCJSi = true; | |
} | |
function h$getGlobal(that) { | |
if(typeof global !== 'undefined') return global; | |
return that; | |
} | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
/* | |
set up the google closure library. this is a rather hacky setup | |
to make it work with our shims without requiring compilation | |
or pulling in the google closure library module loader | |
*/ | |
var goog = {}; | |
goog.global = h$getGlobal(this); | |
goog.provide = function() { }; | |
goog.require = function() { }; | |
goog.isDef = function(val) { return val !== undefined; }; | |
goog.inherits = function(childCtor, parentCtor) { | |
/** @constructor */ | |
function tempCtor() {}; | |
tempCtor.prototype = parentCtor.prototype; | |
childCtor.superClass_ = parentCtor.prototype; | |
childCtor.prototype = new tempCtor(); | |
/** @override */ | |
childCtor.prototype.constructor = childCtor; | |
/** | |
* Calls superclass constructor/method. | |
* | |
* This function is only available if you use goog.inherits to | |
* express inheritance relationships between classes. | |
* | |
* NOTE: This is a replacement for goog.base and for superClass_ | |
* property defined in childCtor. | |
* | |
* @param {!Object} me Should always be "this". | |
* @param {string} methodName The method name to call. Calling | |
* superclass constructor can be done with the special string | |
* 'constructor'. | |
* @param {...*} var_args The arguments to pass to superclass | |
* method/constructor. | |
* @return {*} The return value of the superclass method/constructor. | |
*/ | |
childCtor.base = function(me, methodName, var_args) { | |
// Copying using loop to avoid deop due to passing arguments object to | |
// function. This is faster in many JS engines as of late 2014. | |
var args = new Array(arguments.length - 2); | |
for (var i = 2; i < arguments.length; i++) { | |
args[i - 2] = arguments[i]; | |
} | |
return parentCtor.prototype[methodName].apply(me, args); | |
}; | |
}; | |
goog.isString = function(v) { | |
return typeof v === 'string'; | |
} | |
goog.math = {}; | |
goog.crypt = {}; | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
/* | |
Copyright (c) 2010, Linden Research, Inc. | |
Copyright (c) 2014, Joshua Bell | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in | |
all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |
THE SOFTWARE. | |
$/LicenseInfo$ | |
*/ | |
// Original can be found at: | |
// https://bitbucket.org/lindenlab/llsd | |
// Modifications by Joshua Bell [email protected] | |
// https://github.com/inexorabletash/polyfill | |
// ES3/ES5 implementation of the Krhonos Typed Array Specification | |
// Ref: http://www.khronos.org/registry/typedarray/specs/latest/ | |
// Date: 2011-02-01 | |
// | |
// Variations: | |
// * Allows typed_array.get/set() as alias for subscripts (typed_array[]) | |
// * Gradually migrating structure from Khronos spec to ES6 spec | |
(function(global) { | |
'use strict'; | |
var undefined = (void 0); // Paranoia | |
// Beyond this value, index getters/setters (i.e. array[0], array[1]) are so slow to | |
// create, and consume so much memory, that the browser appears frozen. | |
var MAX_ARRAY_LENGTH = 1e5; | |
// Approximations of internal ECMAScript conversion functions | |
function Type(v) { | |
switch(typeof v) { | |
case 'undefined': return 'undefined'; | |
case 'boolean': return 'boolean'; | |
case 'number': return 'number'; | |
case 'string': return 'string'; | |
default: return v === null ? 'null' : 'object'; | |
} | |
} | |
// Class returns internal [[Class]] property, used to avoid cross-frame instanceof issues: | |
function Class(v) { return Object.prototype.toString.call(v).replace(/^\[object *|\]$/g, ''); } | |
function IsCallable(o) { return typeof o === 'function'; } | |
function ToObject(v) { | |
if (v === null || v === undefined) throw TypeError(); | |
return Object(v); | |
} | |
function ToInt32(v) { return v >> 0; } | |
function ToUint32(v) { return v >>> 0; } | |
// Snapshot intrinsics | |
var LN2 = Math.LN2, | |
abs = Math.abs, | |
floor = Math.floor, | |
log = Math.log, | |
max = Math.max, | |
min = Math.min, | |
pow = Math.pow, | |
round = Math.round; | |
// emulate ES5 getter/setter API using legacy APIs | |
// http://blogs.msdn.com/b/ie/archive/2010/09/07/transitioning-existing-code-to-the-es5-getter-setter-apis.aspx | |
// (second clause tests for Object.defineProperty() in IE<9 that only supports extending DOM prototypes, but | |
// note that IE<9 does not support __defineGetter__ or __defineSetter__ so it just renders the method harmless) | |
(function() { | |
var orig = Object.defineProperty; | |
var dom_only = !(function(){try{return Object.defineProperty({},'x',{});}catch(_){return false;}}()); | |
if (!orig || dom_only) { | |
Object.defineProperty = function (o, prop, desc) { | |
// In IE8 try built-in implementation for defining properties on DOM prototypes. | |
if (orig) | |
try { return orig(o, prop, desc); } catch (_) {} | |
if (o !== Object(o)) | |
throw TypeError('Object.defineProperty called on non-object'); | |
if (Object.prototype.__defineGetter__ && ('get' in desc)) | |
Object.prototype.__defineGetter__.call(o, prop, desc.get); | |
if (Object.prototype.__defineSetter__ && ('set' in desc)) | |
Object.prototype.__defineSetter__.call(o, prop, desc.set); | |
if ('value' in desc) | |
o[prop] = desc.value; | |
return o; | |
}; | |
} | |
}()); | |
// ES5: Make obj[index] an alias for obj._getter(index)/obj._setter(index, value) | |
// for index in 0 ... obj.length | |
function makeArrayAccessors(obj) { | |
if (obj.length > MAX_ARRAY_LENGTH) throw RangeError('Array too large for polyfill'); | |
function makeArrayAccessor(index) { | |
Object.defineProperty(obj, index, { | |
'get': function() { return obj._getter(index); }, | |
'set': function(v) { obj._setter(index, v); }, | |
enumerable: true, | |
configurable: false | |
}); | |
} | |
var i; | |
for (i = 0; i < obj.length; i += 1) { | |
makeArrayAccessor(i); | |
} | |
} | |
// Internal conversion functions: | |
// pack<Type>() - take a number (interpreted as Type), output a byte array | |
// unpack<Type>() - take a byte array, output a Type-like number | |
function as_signed(value, bits) { var s = 32 - bits; return (value << s) >> s; } | |
function as_unsigned(value, bits) { var s = 32 - bits; return (value << s) >>> s; } | |
function packI8(n) { return [n & 0xff]; } | |
function unpackI8(bytes) { return as_signed(bytes[0], 8); } | |
function packU8(n) { return [n & 0xff]; } | |
function unpackU8(bytes) { return as_unsigned(bytes[0], 8); } | |
function packU8Clamped(n) { n = round(Number(n)); return [n < 0 ? 0 : n > 0xff ? 0xff : n & 0xff]; } | |
function packI16(n) { return [n & 0xff, (n >> 8) & 0xff]; } | |
function unpackI16(bytes) { return as_signed(bytes[1] << 8 | bytes[0], 16); } | |
function packU16(n) { return [n & 0xff, (n >> 8) & 0xff]; } | |
function unpackU16(bytes) { return as_unsigned(bytes[1] << 8 | bytes[0], 16); } | |
function packI32(n) { return [n & 0xff, (n >> 8) & 0xff, (n >> 16) & 0xff, (n >> 24) & 0xff]; } | |
function unpackI32(bytes) { return as_signed(bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0], 32); } | |
function packU32(n) { return [n & 0xff, (n >> 8) & 0xff, (n >> 16) & 0xff, (n >> 24) & 0xff]; } | |
function unpackU32(bytes) { return as_unsigned(bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0], 32); } | |
function packIEEE754(v, ebits, fbits) { | |
var bias = (1 << (ebits - 1)) - 1, | |
s, e, f, ln, | |
i, bits, str, bytes; | |
function roundToEven(n) { | |
var w = floor(n), f = n - w; | |
if (f < 0.5) | |
return w; | |
if (f > 0.5) | |
return w + 1; | |
return w % 2 ? w + 1 : w; | |
} | |
// Compute sign, exponent, fraction | |
if (v !== v) { | |
// NaN | |
// http://dev.w3.org/2006/webapi/WebIDL/#es-type-mapping | |
e = (1 << ebits) - 1; f = pow(2, fbits - 1); s = 0; | |
} else if (v === Infinity || v === -Infinity) { | |
e = (1 << ebits) - 1; f = 0; s = (v < 0) ? 1 : 0; | |
} else if (v === 0) { | |
e = 0; f = 0; s = (1 / v === -Infinity) ? 1 : 0; | |
} else { | |
s = v < 0; | |
v = abs(v); | |
if (v >= pow(2, 1 - bias)) { | |
e = min(floor(log(v) / LN2), 1023); | |
var significand = v / pow(2, e); | |
if (significand < 1) { | |
e -= 1; | |
significand *= 2; | |
} | |
if (significand >= 2) { | |
e += 1; | |
significand /= 2; | |
} | |
f = roundToEven(significand * pow(2, fbits)); | |
if (f / pow(2, fbits) >= 2) { | |
e = e + 1; | |
f = 1; | |
} | |
if (e > bias) { | |
// Overflow | |
e = (1 << ebits) - 1; | |
f = 0; | |
} else { | |
// Normalized | |
e = e + bias; | |
f = f - pow(2, fbits); | |
} | |
} else { | |
// Denormalized | |
e = 0; | |
f = roundToEven(v / pow(2, 1 - bias - fbits)); | |
} | |
} | |
// Pack sign, exponent, fraction | |
bits = []; | |
for (i = fbits; i; i -= 1) { bits.push(f % 2 ? 1 : 0); f = floor(f / 2); } | |
for (i = ebits; i; i -= 1) { bits.push(e % 2 ? 1 : 0); e = floor(e / 2); } | |
bits.push(s ? 1 : 0); | |
bits.reverse(); | |
str = bits.join(''); | |
// Bits to bytes | |
bytes = []; | |
while (str.length) { | |
bytes.unshift(parseInt(str.substring(0, 8), 2)); | |
str = str.substring(8); | |
} | |
return bytes; | |
} | |
function unpackIEEE754(bytes, ebits, fbits) { | |
// Bytes to bits | |
var bits = [], i, j, b, str, | |
bias, s, e, f; | |
for (i = 0; i < bytes.length; ++i) { | |
b = bytes[i]; | |
for (j = 8; j; j -= 1) { | |
bits.push(b % 2 ? 1 : 0); b = b >> 1; | |
} | |
} | |
bits.reverse(); | |
str = bits.join(''); | |
// Unpack sign, exponent, fraction | |
bias = (1 << (ebits - 1)) - 1; | |
s = parseInt(str.substring(0, 1), 2) ? -1 : 1; | |
e = parseInt(str.substring(1, 1 + ebits), 2); | |
f = parseInt(str.substring(1 + ebits), 2); | |
// Produce number | |
if (e === (1 << ebits) - 1) { | |
return f !== 0 ? NaN : s * Infinity; | |
} else if (e > 0) { | |
// Normalized | |
return s * pow(2, e - bias) * (1 + f / pow(2, fbits)); | |
} else if (f !== 0) { | |
// Denormalized | |
return s * pow(2, -(bias - 1)) * (f / pow(2, fbits)); | |
} else { | |
return s < 0 ? -0 : 0; | |
} | |
} | |
function unpackF64(b) { return unpackIEEE754(b, 11, 52); } | |
function packF64(v) { return packIEEE754(v, 11, 52); } | |
function unpackF32(b) { return unpackIEEE754(b, 8, 23); } | |
function packF32(v) { return packIEEE754(v, 8, 23); } | |
// | |
// 3 The ArrayBuffer Type | |
// | |
(function() { | |
function ArrayBuffer(length) { | |
length = ToInt32(length); | |
if (length < 0) throw RangeError('ArrayBuffer size is not a small enough positive integer.'); | |
Object.defineProperty(this, 'byteLength', {value: length}); | |
Object.defineProperty(this, '_bytes', {value: Array(length)}); | |
for (var i = 0; i < length; i += 1) | |
this._bytes[i] = 0; | |
} | |
global.ArrayBuffer = global.ArrayBuffer || ArrayBuffer; | |
// | |
// 5 The Typed Array View Types | |
// | |
function $TypedArray$() { | |
// %TypedArray% ( length ) | |
if (!arguments.length || typeof arguments[0] !== 'object') { | |
return (function(length) { | |
length = ToInt32(length); | |
if (length < 0) throw RangeError('length is not a small enough positive integer.'); | |
Object.defineProperty(this, 'length', {value: length}); | |
Object.defineProperty(this, 'byteLength', {value: length * this.BYTES_PER_ELEMENT}); | |
Object.defineProperty(this, 'buffer', {value: new ArrayBuffer(this.byteLength)}); | |
Object.defineProperty(this, 'byteOffset', {value: 0}); | |
}).apply(this, arguments); | |
} | |
// %TypedArray% ( typedArray ) | |
if (arguments.length >= 1 && | |
Type(arguments[0]) === 'object' && | |
arguments[0] instanceof $TypedArray$) { | |
return (function(typedArray){ | |
if (this.constructor !== typedArray.constructor) throw TypeError(); | |
var byteLength = typedArray.length * this.BYTES_PER_ELEMENT; | |
Object.defineProperty(this, 'buffer', {value: new ArrayBuffer(byteLength)}); | |
Object.defineProperty(this, 'byteLength', {value: byteLength}); | |
Object.defineProperty(this, 'byteOffset', {value: 0}); | |
Object.defineProperty(this, 'length', {value: typedArray.length}); | |
for (var i = 0; i < this.length; i += 1) | |
this._setter(i, typedArray._getter(i)); | |
}).apply(this, arguments); | |
} | |
// %TypedArray% ( array ) | |
if (arguments.length >= 1 && | |
Type(arguments[0]) === 'object' && | |
!(arguments[0] instanceof $TypedArray$) && | |
!(arguments[0] instanceof ArrayBuffer || Class(arguments[0]) === 'ArrayBuffer')) { | |
return (function(array) { | |
var byteLength = array.length * this.BYTES_PER_ELEMENT; | |
Object.defineProperty(this, 'buffer', {value: new ArrayBuffer(byteLength)}); | |
Object.defineProperty(this, 'byteLength', {value: byteLength}); | |
Object.defineProperty(this, 'byteOffset', {value: 0}); | |
Object.defineProperty(this, 'length', {value: array.length}); | |
for (var i = 0; i < this.length; i += 1) { | |
var s = array[i]; | |
this._setter(i, Number(s)); | |
} | |
}).apply(this, arguments); | |
} | |
// %TypedArray% ( buffer, byteOffset=0, length=undefined ) | |
if (arguments.length >= 1 && | |
Type(arguments[0]) === 'object' && | |
(arguments[0] instanceof ArrayBuffer || Class(arguments[0]) === 'ArrayBuffer')) { | |
return (function(buffer, byteOffset, length) { | |
byteOffset = ToUint32(byteOffset); | |
if (byteOffset > buffer.byteLength) | |
throw RangeError('byteOffset out of range'); | |
// The given byteOffset must be a multiple of the element | |
// size of the specific type, otherwise an exception is raised. | |
if (byteOffset % this.BYTES_PER_ELEMENT) | |
throw RangeError('buffer length minus the byteOffset is not a multiple of the element size.'); | |
if (length === undefined) { | |
var byteLength = buffer.byteLength - byteOffset; | |
if (byteLength % this.BYTES_PER_ELEMENT) | |
throw RangeError('length of buffer minus byteOffset not a multiple of the element size'); | |
length = byteLength / this.BYTES_PER_ELEMENT; | |
} else { | |
length = ToUint32(length); | |
byteLength = length * this.BYTES_PER_ELEMENT; | |
} | |
if ((byteOffset + byteLength) > buffer.byteLength) | |
throw RangeError('byteOffset and length reference an area beyond the end of the buffer'); | |
Object.defineProperty(this, 'buffer', {value: buffer}); | |
Object.defineProperty(this, 'byteLength', {value: byteLength}); | |
Object.defineProperty(this, 'byteOffset', {value: byteOffset}); | |
Object.defineProperty(this, 'length', {value: length}); | |
}).apply(this, arguments); | |
} | |
// %TypedArray% ( all other argument combinations ) | |
throw TypeError(); | |
} | |
// Properties of the %TypedArray Instrinsic Object | |
// %TypedArray%.from ( source , mapfn=undefined, thisArg=undefined ) | |
Object.defineProperty($TypedArray$, 'from', {value: function(iterable) { | |
return new this(iterable); | |
}}); | |
// %TypedArray%.of ( ...items ) | |
Object.defineProperty($TypedArray$, 'of', {value: function(/*...items*/) { | |
return new this(arguments); | |
}}); | |
// %TypedArray%.prototype | |
var $TypedArrayPrototype$ = {}; | |
$TypedArray$.prototype = $TypedArrayPrototype$; | |
// WebIDL: getter type (unsigned long index); | |
Object.defineProperty($TypedArray$.prototype, '_getter', {value: function(index) { | |
if (arguments.length < 1) throw SyntaxError('Not enough arguments'); | |
index = ToUint32(index); | |
if (index >= this.length) | |
return undefined; | |
var bytes = [], i, o; | |
for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT; | |
i < this.BYTES_PER_ELEMENT; | |
i += 1, o += 1) { | |
bytes.push(this.buffer._bytes[o]); | |
} | |
return this._unpack(bytes); | |
}}); | |
// NONSTANDARD: convenience alias for getter: type get(unsigned long index); | |
Object.defineProperty($TypedArray$.prototype, 'get', {value: $TypedArray$.prototype._getter}); | |
// WebIDL: setter void (unsigned long index, type value); | |
Object.defineProperty($TypedArray$.prototype, '_setter', {value: function(index, value) { | |
if (arguments.length < 2) throw SyntaxError('Not enough arguments'); | |
index = ToUint32(index); | |
if (index >= this.length) | |
return; | |
var bytes = this._pack(value), i, o; | |
for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT; | |
i < this.BYTES_PER_ELEMENT; | |
i += 1, o += 1) { | |
this.buffer._bytes[o] = bytes[i]; | |
} | |
}}); | |
// get %TypedArray%.prototype.buffer | |
// get %TypedArray%.prototype.byteLength | |
// get %TypedArray%.prototype.byteOffset | |
// -- applied directly to the object in the constructor | |
// %TypedArray%.prototype.constructor | |
Object.defineProperty($TypedArray$.prototype, 'constructor', {value: $TypedArray$}); | |
// %TypedArray%.prototype.copyWithin (target, start, end = this.length ) | |
Object.defineProperty($TypedArray$.prototype, 'copyWithin', {value: function(target, start) { | |
var end = arguments[2]; | |
var o = ToObject(this); | |
var lenVal = o.length; | |
var len = ToUint32(lenVal); | |
len = max(len, 0); | |
var relativeTarget = ToInt32(target); | |
var to; | |
if (relativeTarget < 0) | |
to = max(len + relativeTarget, 0); | |
else | |
to = min(relativeTarget, len); | |
var relativeStart = ToInt32(start); | |
var from; | |
if (relativeStart < 0) | |
from = max(len + relativeStart, 0); | |
else | |
from = min(relativeStart, len); | |
var relativeEnd; | |
if (end === undefined) | |
relativeEnd = len; | |
else | |
relativeEnd = ToInt32(end); | |
var final0; | |
if (relativeEnd < 0) | |
final0 = max(len + relativeEnd, 0); | |
else | |
final0 = min(relativeEnd, len); | |
var count = min(final0 - from, len - to); | |
var direction; | |
if (from < to && to < from + count) { | |
direction = -1; | |
from = from + count - 1; | |
to = to + count - 1; | |
} else { | |
direction = 1; | |
} | |
while (count > 0) { | |
o._setter(to, o._getter(from)); | |
from = from + direction; | |
to = to + direction; | |
count = count - 1; | |
} | |
return o; | |
}}); | |
// %TypedArray%.prototype.entries ( ) | |
// -- defined in es6.js to shim browsers w/ native TypedArrays | |
// %TypedArray%.prototype.every ( callbackfn, thisArg = undefined ) | |
Object.defineProperty($TypedArray$.prototype, 'every', {value: function(callbackfn) { | |
if (this === undefined || this === null) throw TypeError(); | |
var t = Object(this); | |
var len = ToUint32(t.length); | |
if (!IsCallable(callbackfn)) throw TypeError(); | |
var thisArg = arguments[1]; | |
for (var i = 0; i < len; i++) { | |
if (!callbackfn.call(thisArg, t._getter(i), i, t)) | |
return false; | |
} | |
return true; | |
}}); | |
// %TypedArray%.prototype.fill (value, start = 0, end = this.length ) | |
Object.defineProperty($TypedArray$.prototype, 'fill', {value: function(value) { | |
var start = arguments[1], | |
end = arguments[2]; | |
var o = ToObject(this); | |
var lenVal = o.length; | |
var len = ToUint32(lenVal); | |
len = max(len, 0); | |
var relativeStart = ToInt32(start); | |
var k; | |
if (relativeStart < 0) | |
k = max((len + relativeStart), 0); | |
else | |
k = min(relativeStart, len); | |
var relativeEnd; | |
if (end === undefined) | |
relativeEnd = len; | |
else | |
relativeEnd = ToInt32(end); | |
var final0; | |
if (relativeEnd < 0) | |
final0 = max((len + relativeEnd), 0); | |
else | |
final0 = min(relativeEnd, len); | |
while (k < final0) { | |
o._setter(k, value); | |
k += 1; | |
} | |
return o; | |
}}); | |
// %TypedArray%.prototype.filter ( callbackfn, thisArg = undefined ) | |
Object.defineProperty($TypedArray$.prototype, 'filter', {value: function(callbackfn) { | |
if (this === undefined || this === null) throw TypeError(); | |
var t = Object(this); | |
var len = ToUint32(t.length); | |
if (!IsCallable(callbackfn)) throw TypeError(); | |
var res = []; | |
var thisp = arguments[1]; | |
for (var i = 0; i < len; i++) { | |
var val = t._getter(i); // in case fun mutates this | |
if (callbackfn.call(thisp, val, i, t)) | |
res.push(val); | |
} | |
return new this.constructor(res); | |
}}); | |
// %TypedArray%.prototype.find (predicate, thisArg = undefined) | |
Object.defineProperty($TypedArray$.prototype, 'find', {value: function(predicate) { | |
var o = ToObject(this); | |
var lenValue = o.length; | |
var len = ToUint32(lenValue); | |
if (!IsCallable(predicate)) throw TypeError(); | |
var t = arguments.length > 1 ? arguments[1] : undefined; | |
var k = 0; | |
while (k < len) { | |
var kValue = o._getter(k); | |
var testResult = predicate.call(t, kValue, k, o); | |
if (Boolean(testResult)) | |
return kValue; | |
++k; | |
} | |
return undefined; | |
}}); | |
// %TypedArray%.prototype.findIndex ( predicate, thisArg = undefined ) | |
Object.defineProperty($TypedArray$.prototype, 'findIndex', {value: function(predicate) { | |
var o = ToObject(this); | |
var lenValue = o.length; | |
var len = ToUint32(lenValue); | |
if (!IsCallable(predicate)) throw TypeError(); | |
var t = arguments.length > 1 ? arguments[1] : undefined; | |
var k = 0; | |
while (k < len) { | |
var kValue = o._getter(k); | |
var testResult = predicate.call(t, kValue, k, o); | |
if (Boolean(testResult)) | |
return k; | |
++k; | |
} | |
return -1; | |
}}); | |
// %TypedArray%.prototype.forEach ( callbackfn, thisArg = undefined ) | |
Object.defineProperty($TypedArray$.prototype, 'forEach', {value: function(callbackfn) { | |
if (this === undefined || this === null) throw TypeError(); | |
var t = Object(this); | |
var len = ToUint32(t.length); | |
if (!IsCallable(callbackfn)) throw TypeError(); | |
var thisp = arguments[1]; | |
for (var i = 0; i < len; i++) | |
callbackfn.call(thisp, t._getter(i), i, t); | |
}}); | |
// %TypedArray%.prototype.indexOf (searchElement, fromIndex = 0 ) | |
Object.defineProperty($TypedArray$.prototype, 'indexOf', {value: function(searchElement) { | |
if (this === undefined || this === null) throw TypeError(); | |
var t = Object(this); | |
var len = ToUint32(t.length); | |
if (len === 0) return -1; | |
var n = 0; | |
if (arguments.length > 0) { | |
n = Number(arguments[1]); | |
if (n !== n) { | |
n = 0; | |
} else if (n !== 0 && n !== (1 / 0) && n !== -(1 / 0)) { | |
n = (n > 0 || -1) * floor(abs(n)); | |
} | |
} | |
if (n >= len) return -1; | |
var k = n >= 0 ? n : max(len - abs(n), 0); | |
for (; k < len; k++) { | |
if (t._getter(k) === searchElement) { | |
return k; | |
} | |
} | |
return -1; | |
}}); | |
// %TypedArray%.prototype.join ( separator ) | |
Object.defineProperty($TypedArray$.prototype, 'join', {value: function(separator) { | |
if (this === undefined || this === null) throw TypeError(); | |
var t = Object(this); | |
var len = ToUint32(t.length); | |
var tmp = Array(len); | |
for (var i = 0; i < len; ++i) | |
tmp[i] = t._getter(i); | |
return tmp.join(separator === undefined ? ',' : separator); // Hack for IE7 | |
}}); | |
// %TypedArray%.prototype.keys ( ) | |
// -- defined in es6.js to shim browsers w/ native TypedArrays | |
// %TypedArray%.prototype.lastIndexOf ( searchElement, fromIndex = this.length-1 ) | |
Object.defineProperty($TypedArray$.prototype, 'lastIndexOf', {value: function(searchElement) { | |
if (this === undefined || this === null) throw TypeError(); | |
var t = Object(this); | |
var len = ToUint32(t.length); | |
if (len === 0) return -1; | |
var n = len; | |
if (arguments.length > 1) { | |
n = Number(arguments[1]); | |
if (n !== n) { | |
n = 0; | |
} else if (n !== 0 && n !== (1 / 0) && n !== -(1 / 0)) { | |
n = (n > 0 || -1) * floor(abs(n)); | |
} | |
} | |
var k = n >= 0 ? min(n, len - 1) : len - abs(n); | |
for (; k >= 0; k--) { | |
if (t._getter(k) === searchElement) | |
return k; | |
} | |
return -1; | |
}}); | |
// get %TypedArray%.prototype.length | |
// -- applied directly to the object in the constructor | |
// %TypedArray%.prototype.map ( callbackfn, thisArg = undefined ) | |
Object.defineProperty($TypedArray$.prototype, 'map', {value: function(callbackfn) { | |
if (this === undefined || this === null) throw TypeError(); | |
var t = Object(this); | |
var len = ToUint32(t.length); | |
if (!IsCallable(callbackfn)) throw TypeError(); | |
var res = []; res.length = len; | |
var thisp = arguments[1]; | |
for (var i = 0; i < len; i++) | |
res[i] = callbackfn.call(thisp, t._getter(i), i, t); | |
return new this.constructor(res); | |
}}); | |
// %TypedArray%.prototype.reduce ( callbackfn [, initialValue] ) | |
Object.defineProperty($TypedArray$.prototype, 'reduce', {value: function(callbackfn) { | |
if (this === undefined || this === null) throw TypeError(); | |
var t = Object(this); | |
var len = ToUint32(t.length); | |
if (!IsCallable(callbackfn)) throw TypeError(); | |
// no value to return if no initial value and an empty array | |
if (len === 0 && arguments.length === 1) throw TypeError(); | |
var k = 0; | |
var accumulator; | |
if (arguments.length >= 2) { | |
accumulator = arguments[1]; | |
} else { | |
accumulator = t._getter(k++); | |
} | |
while (k < len) { | |
accumulator = callbackfn.call(undefined, accumulator, t._getter(k), k, t); | |
k++; | |
} | |
return accumulator; | |
}}); | |
// %TypedArray%.prototype.reduceRight ( callbackfn [, initialValue] ) | |
Object.defineProperty($TypedArray$.prototype, 'reduceRight', {value: function(callbackfn) { | |
if (this === undefined || this === null) throw TypeError(); | |
var t = Object(this); | |
var len = ToUint32(t.length); | |
if (!IsCallable(callbackfn)) throw TypeError(); | |
// no value to return if no initial value, empty array | |
if (len === 0 && arguments.length === 1) throw TypeError(); | |
var k = len - 1; | |
var accumulator; | |
if (arguments.length >= 2) { | |
accumulator = arguments[1]; | |
} else { | |
accumulator = t._getter(k--); | |
} | |
while (k >= 0) { | |
accumulator = callbackfn.call(undefined, accumulator, t._getter(k), k, t); | |
k--; | |
} | |
return accumulator; | |
}}); | |
// %TypedArray%.prototype.reverse ( ) | |
Object.defineProperty($TypedArray$.prototype, 'reverse', {value: function() { | |
if (this === undefined || this === null) throw TypeError(); | |
var t = Object(this); | |
var len = ToUint32(t.length); | |
var half = floor(len / 2); | |
for (var i = 0, j = len - 1; i < half; ++i, --j) { | |
var tmp = t._getter(i); | |
t._setter(i, t._getter(j)); | |
t._setter(j, tmp); | |
} | |
return t; | |
}}); | |
// %TypedArray%.prototype.set(array, offset = 0 ) | |
// %TypedArray%.prototype.set(typedArray, offset = 0 ) | |
// WebIDL: void set(TypedArray array, optional unsigned long offset); | |
// WebIDL: void set(sequence<type> array, optional unsigned long offset); | |
Object.defineProperty($TypedArray$.prototype, 'set', {value: function(index, value) { | |
if (arguments.length < 1) throw SyntaxError('Not enough arguments'); | |
var array, sequence, offset, len, | |
i, s, d, | |
byteOffset, byteLength, tmp; | |
if (typeof arguments[0] === 'object' && arguments[0].constructor === this.constructor) { | |
// void set(TypedArray array, optional unsigned long offset); | |
array = arguments[0]; | |
offset = ToUint32(arguments[1]); | |
if (offset + array.length > this.length) { | |
throw RangeError('Offset plus length of array is out of range'); | |
} | |
byteOffset = this.byteOffset + offset * this.BYTES_PER_ELEMENT; | |
byteLength = array.length * this.BYTES_PER_ELEMENT; | |
if (array.buffer === this.buffer) { | |
tmp = []; | |
for (i = 0, s = array.byteOffset; i < byteLength; i += 1, s += 1) { | |
tmp[i] = array.buffer._bytes[s]; | |
} | |
for (i = 0, d = byteOffset; i < byteLength; i += 1, d += 1) { | |
this.buffer._bytes[d] = tmp[i]; | |
} | |
} else { | |
for (i = 0, s = array.byteOffset, d = byteOffset; | |
i < byteLength; i += 1, s += 1, d += 1) { | |
this.buffer._bytes[d] = array.buffer._bytes[s]; | |
} | |
} | |
} else if (typeof arguments[0] === 'object' && typeof arguments[0].length !== 'undefined') { | |
// void set(sequence<type> array, optional unsigned long offset); | |
sequence = arguments[0]; | |
len = ToUint32(sequence.length); | |
offset = ToUint32(arguments[1]); | |
if (offset + len > this.length) { | |
throw RangeError('Offset plus length of array is out of range'); | |
} | |
for (i = 0; i < len; i += 1) { | |
s = sequence[i]; | |
this._setter(offset + i, Number(s)); | |
} | |
} else { | |
throw TypeError('Unexpected argument type(s)'); | |
} | |
}}); | |
// %TypedArray%.prototype.slice ( start, end ) | |
Object.defineProperty($TypedArray$.prototype, 'slice', {value: function(start, end) { | |
var o = ToObject(this); | |
var lenVal = o.length; | |
var len = ToUint32(lenVal); | |
var relativeStart = ToInt32(start); | |
var k = (relativeStart < 0) ? max(len + relativeStart, 0) : min(relativeStart, len); | |
var relativeEnd = (end === undefined) ? len : ToInt32(end); | |
var final0 = (relativeEnd < 0) ? max(len + relativeEnd, 0) : min(relativeEnd, len); | |
var count = final0 - k; | |
var c = o.constructor; | |
var a = new c(count); | |
var n = 0; | |
while (k < final0) { | |
var kValue = o._getter(k); | |
a._setter(n, kValue); | |
++k; | |
++n; | |
} | |
return a; | |
}}); | |
// %TypedArray%.prototype.some ( callbackfn, thisArg = undefined ) | |
Object.defineProperty($TypedArray$.prototype, 'some', {value: function(callbackfn) { | |
if (this === undefined || this === null) throw TypeError(); | |
var t = Object(this); | |
var len = ToUint32(t.length); | |
if (!IsCallable(callbackfn)) throw TypeError(); | |
var thisp = arguments[1]; | |
for (var i = 0; i < len; i++) { | |
if (callbackfn.call(thisp, t._getter(i), i, t)) { | |
return true; | |
} | |
} | |
return false; | |
}}); | |
// %TypedArray%.prototype.sort ( comparefn ) | |
Object.defineProperty($TypedArray$.prototype, 'sort', {value: function(comparefn) { | |
if (this === undefined || this === null) throw TypeError(); | |
var t = Object(this); | |
var len = ToUint32(t.length); | |
var tmp = Array(len); | |
for (var i = 0; i < len; ++i) | |
tmp[i] = t._getter(i); | |
if (comparefn) tmp.sort(comparefn); else tmp.sort(); // Hack for IE8/9 | |
for (i = 0; i < len; ++i) | |
t._setter(i, tmp[i]); | |
return t; | |
}}); | |
// %TypedArray%.prototype.subarray(begin = 0, end = this.length ) | |
// WebIDL: TypedArray subarray(long begin, optional long end); | |
Object.defineProperty($TypedArray$.prototype, 'subarray', {value: function(start, end) { | |
function clamp(v, min, max) { return v < min ? min : v > max ? max : v; } | |
start = ToInt32(start); | |
end = ToInt32(end); | |
if (arguments.length < 1) { start = 0; } | |
if (arguments.length < 2) { end = this.length; } | |
if (start < 0) { start = this.length + start; } | |
if (end < 0) { end = this.length + end; } | |
start = clamp(start, 0, this.length); | |
end = clamp(end, 0, this.length); | |
var len = end - start; | |
if (len < 0) { | |
len = 0; | |
} | |
return new this.constructor( | |
this.buffer, this.byteOffset + start * this.BYTES_PER_ELEMENT, len); | |
}}); | |
// %TypedArray%.prototype.toLocaleString ( ) | |
// %TypedArray%.prototype.toString ( ) | |
// %TypedArray%.prototype.values ( ) | |
// %TypedArray%.prototype [ @@iterator ] ( ) | |
// get %TypedArray%.prototype [ @@toStringTag ] | |
// -- defined in es6.js to shim browsers w/ native TypedArrays | |
function makeTypedArray(elementSize, pack, unpack) { | |
// Each TypedArray type requires a distinct constructor instance with | |
// identical logic, which this produces. | |
var TypedArray = function() { | |
Object.defineProperty(this, 'constructor', {value: TypedArray}); | |
$TypedArray$.apply(this, arguments); | |
makeArrayAccessors(this); | |
}; | |
if ('__proto__' in TypedArray) { | |
TypedArray.__proto__ = $TypedArray$; | |
} else { | |
TypedArray.from = $TypedArray$.from; | |
TypedArray.of = $TypedArray$.of; | |
} | |
TypedArray.BYTES_PER_ELEMENT = elementSize; | |
var TypedArrayPrototype = function() {}; | |
TypedArrayPrototype.prototype = $TypedArrayPrototype$; | |
TypedArray.prototype = new TypedArrayPrototype(); | |
Object.defineProperty(TypedArray.prototype, 'BYTES_PER_ELEMENT', {value: elementSize}); | |
Object.defineProperty(TypedArray.prototype, '_pack', {value: pack}); | |
Object.defineProperty(TypedArray.prototype, '_unpack', {value: unpack}); | |
return TypedArray; | |
} | |
var Int8Array = makeTypedArray(1, packI8, unpackI8); | |
var Uint8Array = makeTypedArray(1, packU8, unpackU8); | |
var Uint8ClampedArray = makeTypedArray(1, packU8Clamped, unpackU8); | |
var Int16Array = makeTypedArray(2, packI16, unpackI16); | |
var Uint16Array = makeTypedArray(2, packU16, unpackU16); | |
var Int32Array = makeTypedArray(4, packI32, unpackI32); | |
var Uint32Array = makeTypedArray(4, packU32, unpackU32); | |
var Float32Array = makeTypedArray(4, packF32, unpackF32); | |
var Float64Array = makeTypedArray(8, packF64, unpackF64); | |
global.Int8Array = global.Int8Array || Int8Array; | |
global.Uint8Array = global.Uint8Array || Uint8Array; | |
global.Uint8ClampedArray = global.Uint8ClampedArray || Uint8ClampedArray; | |
global.Int16Array = global.Int16Array || Int16Array; | |
global.Uint16Array = global.Uint16Array || Uint16Array; | |
global.Int32Array = global.Int32Array || Int32Array; | |
global.Uint32Array = global.Uint32Array || Uint32Array; | |
global.Float32Array = global.Float32Array || Float32Array; | |
global.Float64Array = global.Float64Array || Float64Array; | |
}()); | |
// | |
// 6 The DataView View Type | |
// | |
(function() { | |
function r(array, index) { | |
return IsCallable(array.get) ? array.get(index) : array[index]; | |
} | |
var IS_BIG_ENDIAN = (function() { | |
var u16array = new Uint16Array([0x1234]), | |
u8array = new Uint8Array(u16array.buffer); | |
return r(u8array, 0) === 0x12; | |
}()); | |
// DataView(buffer, byteOffset=0, byteLength=undefined) | |
// WebIDL: Constructor(ArrayBuffer buffer, | |
// optional unsigned long byteOffset, | |
// optional unsigned long byteLength) | |
function DataView(buffer, byteOffset, byteLength) { | |
if (!(buffer instanceof ArrayBuffer || Class(buffer) === 'ArrayBuffer')) throw TypeError(); | |
byteOffset = ToUint32(byteOffset); | |
if (byteOffset > buffer.byteLength) | |
throw RangeError('byteOffset out of range'); | |
if (byteLength === undefined) | |
byteLength = buffer.byteLength - byteOffset; | |
else | |
byteLength = ToUint32(byteLength); | |
if ((byteOffset + byteLength) > buffer.byteLength) | |
throw RangeError('byteOffset and length reference an area beyond the end of the buffer'); | |
Object.defineProperty(this, 'buffer', {value: buffer}); | |
Object.defineProperty(this, 'byteLength', {value: byteLength}); | |
Object.defineProperty(this, 'byteOffset', {value: byteOffset}); | |
}; | |
// get DataView.prototype.buffer | |
// get DataView.prototype.byteLength | |
// get DataView.prototype.byteOffset | |
// -- applied directly to instances by the constructor | |
function makeGetter(arrayType) { | |
return function GetViewValue(byteOffset, littleEndian) { | |
byteOffset = ToUint32(byteOffset); | |
if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) | |
throw RangeError('Array index out of range'); | |
byteOffset += this.byteOffset; | |
var uint8Array = new Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT), | |
bytes = []; | |
for (var i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) | |
bytes.push(r(uint8Array, i)); | |
if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) | |
bytes.reverse(); | |
return r(new arrayType(new Uint8Array(bytes).buffer), 0); | |
}; | |
} | |
Object.defineProperty(DataView.prototype, 'getUint8', {value: makeGetter(Uint8Array)}); | |
Object.defineProperty(DataView.prototype, 'getInt8', {value: makeGetter(Int8Array)}); | |
Object.defineProperty(DataView.prototype, 'getUint16', {value: makeGetter(Uint16Array)}); | |
Object.defineProperty(DataView.prototype, 'getInt16', {value: makeGetter(Int16Array)}); | |
Object.defineProperty(DataView.prototype, 'getUint32', {value: makeGetter(Uint32Array)}); | |
Object.defineProperty(DataView.prototype, 'getInt32', {value: makeGetter(Int32Array)}); | |
Object.defineProperty(DataView.prototype, 'getFloat32', {value: makeGetter(Float32Array)}); | |
Object.defineProperty(DataView.prototype, 'getFloat64', {value: makeGetter(Float64Array)}); | |
function makeSetter(arrayType) { | |
return function SetViewValue(byteOffset, value, littleEndian) { | |
byteOffset = ToUint32(byteOffset); | |
if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) | |
throw RangeError('Array index out of range'); | |
// Get bytes | |
var typeArray = new arrayType([value]), | |
byteArray = new Uint8Array(typeArray.buffer), | |
bytes = [], i, byteView; | |
for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) | |
bytes.push(r(byteArray, i)); | |
// Flip if necessary | |
if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) | |
bytes.reverse(); | |
// Write them | |
byteView = new Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT); | |
byteView.set(bytes); | |
}; | |
} | |
Object.defineProperty(DataView.prototype, 'setUint8', {value: makeSetter(Uint8Array)}); | |
Object.defineProperty(DataView.prototype, 'setInt8', {value: makeSetter(Int8Array)}); | |
Object.defineProperty(DataView.prototype, 'setUint16', {value: makeSetter(Uint16Array)}); | |
Object.defineProperty(DataView.prototype, 'setInt16', {value: makeSetter(Int16Array)}); | |
Object.defineProperty(DataView.prototype, 'setUint32', {value: makeSetter(Uint32Array)}); | |
Object.defineProperty(DataView.prototype, 'setInt32', {value: makeSetter(Int32Array)}); | |
Object.defineProperty(DataView.prototype, 'setFloat32', {value: makeSetter(Float32Array)}); | |
Object.defineProperty(DataView.prototype, 'setFloat64', {value: makeSetter(Float64Array)}); | |
global.DataView = global.DataView || DataView; | |
}()); | |
}(h$getGlobal(this))); | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
(function (global, undefined) { | |
"use strict"; | |
if (global.setImmediate) { | |
return; | |
} | |
var nextHandle = 1; // Spec says greater than zero | |
var tasksByHandle = {}; | |
var currentlyRunningATask = false; | |
var doc = global.document; | |
var setImmediate; | |
function addFromSetImmediateArguments(args) { | |
tasksByHandle[nextHandle] = partiallyApplied.apply(undefined, args); | |
return nextHandle++; | |
} | |
// This function accepts the same arguments as setImmediate, but | |
// returns a function that requires no arguments. | |
function partiallyApplied(handler) { | |
var args = [].slice.call(arguments, 1); | |
return function() { | |
if (typeof handler === "function") { | |
handler.apply(undefined, args); | |
} else { | |
(new Function("" + handler))(); | |
} | |
}; | |
} | |
function runIfPresent(handle) { | |
// From the spec: "Wait until any invocations of this algorithm started before this one have completed." | |
// So if we're currently running a task, we'll need to delay this invocation. | |
if (currentlyRunningATask) { | |
// Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a | |
// "too much recursion" error. | |
setTimeout(partiallyApplied(runIfPresent, handle), 0); | |
} else { | |
var task = tasksByHandle[handle]; | |
if (task) { | |
currentlyRunningATask = true; | |
try { | |
task(); | |
} finally { | |
clearImmediate(handle); | |
currentlyRunningATask = false; | |
} | |
} | |
} | |
} | |
function clearImmediate(handle) { | |
delete tasksByHandle[handle]; | |
} | |
function installNextTickImplementation() { | |
setImmediate = function() { | |
var handle = addFromSetImmediateArguments(arguments); | |
process.nextTick(partiallyApplied(runIfPresent, handle)); | |
return handle; | |
}; | |
} | |
function canUsePostMessage() { | |
// The test against `importScripts` prevents this implementation from being installed inside a web worker, | |
// where `global.postMessage` means something completely different and can't be used for this purpose. | |
if (global.postMessage && !global.importScripts) { | |
var postMessageIsAsynchronous = true; | |
var oldOnMessage = global.onmessage; | |
global.onmessage = function() { | |
postMessageIsAsynchronous = false; | |
}; | |
global.postMessage("", "*"); | |
global.onmessage = oldOnMessage; | |
return postMessageIsAsynchronous; | |
} | |
} | |
function installPostMessageImplementation() { | |
// Installs an event handler on `global` for the `message` event: see | |
// * https://developer.mozilla.org/en/DOM/window.postMessage | |
// * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages | |
var messagePrefix = "setImmediate$" + Math.random() + "$"; | |
var onGlobalMessage = function(event) { | |
if (event.source === global && | |
typeof event.data === "string" && | |
event.data.indexOf(messagePrefix) === 0) { | |
runIfPresent(+event.data.slice(messagePrefix.length)); | |
} | |
}; | |
if (global.addEventListener) { | |
global.addEventListener("message", onGlobalMessage, false); | |
} else { | |
global.attachEvent("onmessage", onGlobalMessage); | |
} | |
setImmediate = function() { | |
var handle = addFromSetImmediateArguments(arguments); | |
global.postMessage(messagePrefix + handle, "*"); | |
return handle; | |
}; | |
} | |
function installMessageChannelImplementation() { | |
var channel = new MessageChannel(); | |
channel.port1.onmessage = function(event) { | |
var handle = event.data; | |
runIfPresent(handle); | |
}; | |
setImmediate = function() { | |
var handle = addFromSetImmediateArguments(arguments); | |
channel.port2.postMessage(handle); | |
return handle; | |
}; | |
} | |
function installReadyStateChangeImplementation() { | |
var html = doc.documentElement; | |
setImmediate = function() { | |
var handle = addFromSetImmediateArguments(arguments); | |
// Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted | |
// into the document. Do so, thus queuing up the task. Remember to clean up once it's been called. | |
var script = doc.createElement("script"); | |
script.onreadystatechange = function () { | |
runIfPresent(handle); | |
script.onreadystatechange = null; | |
html.removeChild(script); | |
script = null; | |
}; | |
html.appendChild(script); | |
return handle; | |
}; | |
} | |
function installSetTimeoutImplementation() { | |
// jsshell doesn't even have setTimeout | |
if(typeof setTimeout === 'undefined') setImmediate = function() { return null; }; | |
else | |
setImmediate = function() { | |
var handle = addFromSetImmediateArguments(arguments); | |
setTimeout(partiallyApplied(runIfPresent, handle), 0); | |
return handle; | |
}; | |
} | |
// If supported, we should attach to the prototype of global, since that is where setTimeout et al. live. | |
var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global); | |
attachTo = attachTo && attachTo.setTimeout ? attachTo : global; | |
// Don't get fooled by e.g. browserify environments. | |
if ({}.toString.call(global.process) === "[object process]") { | |
// For Node.js before 0.9 | |
installNextTickImplementation(); | |
} else | |
if (canUsePostMessage()) { | |
// For non-IE10 modern browsers | |
installPostMessageImplementation(); | |
} else if (global.MessageChannel) { | |
// For web workers, where supported | |
installMessageChannelImplementation(); | |
} else if (doc && "onreadystatechange" in doc.createElement("script")) { | |
// For IE 6–8 | |
installReadyStateChangeImplementation(); | |
} else { | |
// For older browsers | |
installSetTimeoutImplementation(); | |
} | |
attachTo.setImmediate = setImmediate; | |
attachTo.clearImmediate = clearImmediate; | |
}(h$getGlobal(this))); | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
// Copyright 2009 The Closure Library Authors. All Rights Reserved. | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS-IS" BASIS, | |
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
// See the License for the specific language governing permissions and | |
// limitations under the License. | |
/** | |
* @fileoverview Defines a Long class for representing a 64-bit two's-complement | |
* integer value, which faithfully simulates the behavior of a Java "long". This | |
* implementation is derived from LongLib in GWT. | |
* | |
*/ | |
goog.provide('goog.math.Long'); | |
/** | |
* Constructs a 64-bit two's-complement integer, given its low and high 32-bit | |
* values as *signed* integers. See the from* functions below for more | |
* convenient ways of constructing Longs. | |
* | |
* The internal representation of a long is the two given signed, 32-bit values. | |
* We use 32-bit pieces because these are the size of integers on which | |
* Javascript performs bit-operations. For operations like addition and | |
* multiplication, we split each number into 16-bit pieces, which can easily be | |
* multiplied within Javascript's floating-point representation without overflow | |
* or change in sign. | |
* | |
* In the algorithms below, we frequently reduce the negative case to the | |
* positive case by negating the input(s) and then post-processing the result. | |
* Note that we must ALWAYS check specially whether those values are MIN_VALUE | |
* (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as | |
* a positive number, it overflows back into a negative). Not handling this | |
* case would often result in infinite recursion. | |
* | |
* @param {number} low The low (signed) 32 bits of the long. | |
* @param {number} high The high (signed) 32 bits of the long. | |
* @struct | |
* @constructor | |
* @final | |
*/ | |
goog.math.Long = function(low, high) { | |
/** | |
* @type {number} | |
* @private | |
*/ | |
this.low_ = low | 0; // force into 32 signed bits. | |
/** | |
* @type {number} | |
* @private | |
*/ | |
this.high_ = high | 0; // force into 32 signed bits. | |
}; | |
// NOTE: Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the | |
// from* methods on which they depend. | |
/** | |
* A cache of the Long representations of small integer values. | |
* @type {!Object} | |
* @private | |
*/ | |
goog.math.Long.IntCache_ = {}; | |
/** | |
* Returns a Long representing the given (32-bit) integer value. | |
* @param {number} value The 32-bit integer in question. | |
* @return {!goog.math.Long} The corresponding Long value. | |
*/ | |
goog.math.Long.fromInt = function(value) { | |
if (-128 <= value && value < 128) { | |
var cachedObj = goog.math.Long.IntCache_[value]; | |
if (cachedObj) { | |
return cachedObj; | |
} | |
} | |
var obj = new goog.math.Long(value | 0, value < 0 ? -1 : 0); | |
if (-128 <= value && value < 128) { | |
goog.math.Long.IntCache_[value] = obj; | |
} | |
return obj; | |
}; | |
/** | |
* Returns a Long representing the given value, provided that it is a finite | |
* number. Otherwise, zero is returned. | |
* @param {number} value The number in question. | |
* @return {!goog.math.Long} The corresponding Long value. | |
*/ | |
goog.math.Long.fromNumber = function(value) { | |
if (isNaN(value) || !isFinite(value)) { | |
return goog.math.Long.ZERO; | |
} else if (value <= -goog.math.Long.TWO_PWR_63_DBL_) { | |
return goog.math.Long.MIN_VALUE; | |
} else if (value + 1 >= goog.math.Long.TWO_PWR_63_DBL_) { | |
return goog.math.Long.MAX_VALUE; | |
} else if (value < 0) { | |
return goog.math.Long.fromNumber(-value).negate(); | |
} else { | |
return new goog.math.Long( | |
(value % goog.math.Long.TWO_PWR_32_DBL_) | 0, | |
(value / goog.math.Long.TWO_PWR_32_DBL_) | 0); | |
} | |
}; | |
/** | |
* Returns a Long representing the 64-bit integer that comes by concatenating | |
* the given high and low bits. Each is assumed to use 32 bits. | |
* @param {number} lowBits The low 32-bits. | |
* @param {number} highBits The high 32-bits. | |
* @return {!goog.math.Long} The corresponding Long value. | |
*/ | |
goog.math.Long.fromBits = function(lowBits, highBits) { | |
return new goog.math.Long(lowBits, highBits); | |
}; | |
/** | |
* Returns a Long representation of the given string, written using the given | |
* radix. | |
* @param {string} str The textual representation of the Long. | |
* @param {number=} opt_radix The radix in which the text is written. | |
* @return {!goog.math.Long} The corresponding Long value. | |
*/ | |
goog.math.Long.fromString = function(str, opt_radix) { | |
if (str.length == 0) { | |
throw Error('number format error: empty string'); | |
} | |
var radix = opt_radix || 10; | |
if (radix < 2 || 36 < radix) { | |
throw Error('radix out of range: ' + radix); | |
} | |
if (str.charAt(0) == '-') { | |
return goog.math.Long.fromString(str.substring(1), radix).negate(); | |
} else if (str.indexOf('-') >= 0) { | |
throw Error('number format error: interior "-" character: ' + str); | |
} | |
// Do several (8) digits each time through the loop, so as to | |
// minimize the calls to the very expensive emulated div. | |
var radixToPower = goog.math.Long.fromNumber(Math.pow(radix, 8)); | |
var result = goog.math.Long.ZERO; | |
for (var i = 0; i < str.length; i += 8) { | |
var size = Math.min(8, str.length - i); | |
var value = parseInt(str.substring(i, i + size), radix); | |
if (size < 8) { | |
var power = goog.math.Long.fromNumber(Math.pow(radix, size)); | |
result = result.multiply(power).add(goog.math.Long.fromNumber(value)); | |
} else { | |
result = result.multiply(radixToPower); | |
result = result.add(goog.math.Long.fromNumber(value)); | |
} | |
} | |
return result; | |
}; | |
// NOTE: the compiler should inline these constant values below and then remove | |
// these variables, so there should be no runtime penalty for these. | |
/** | |
* Number used repeated below in calculations. This must appear before the | |
* first call to any from* function below. | |
* @type {number} | |
* @private | |
*/ | |
goog.math.Long.TWO_PWR_16_DBL_ = 1 << 16; | |
/** | |
* @type {number} | |
* @private | |
*/ | |
goog.math.Long.TWO_PWR_24_DBL_ = 1 << 24; | |
/** | |
* @type {number} | |
* @private | |
*/ | |
goog.math.Long.TWO_PWR_32_DBL_ = | |
goog.math.Long.TWO_PWR_16_DBL_ * goog.math.Long.TWO_PWR_16_DBL_; | |
/** | |
* @type {number} | |
* @private | |
*/ | |
goog.math.Long.TWO_PWR_31_DBL_ = | |
goog.math.Long.TWO_PWR_32_DBL_ / 2; | |
/** | |
* @type {number} | |
* @private | |
*/ | |
goog.math.Long.TWO_PWR_48_DBL_ = | |
goog.math.Long.TWO_PWR_32_DBL_ * goog.math.Long.TWO_PWR_16_DBL_; | |
/** | |
* @type {number} | |
* @private | |
*/ | |
goog.math.Long.TWO_PWR_64_DBL_ = | |
goog.math.Long.TWO_PWR_32_DBL_ * goog.math.Long.TWO_PWR_32_DBL_; | |
/** | |
* @type {number} | |
* @private | |
*/ | |
goog.math.Long.TWO_PWR_63_DBL_ = | |
goog.math.Long.TWO_PWR_64_DBL_ / 2; | |
/** @type {!goog.math.Long} */ | |
goog.math.Long.ZERO = goog.math.Long.fromInt(0); | |
/** @type {!goog.math.Long} */ | |
goog.math.Long.ONE = goog.math.Long.fromInt(1); | |
/** @type {!goog.math.Long} */ | |
goog.math.Long.NEG_ONE = goog.math.Long.fromInt(-1); | |
/** @type {!goog.math.Long} */ | |
goog.math.Long.MAX_VALUE = | |
goog.math.Long.fromBits(0xFFFFFFFF | 0, 0x7FFFFFFF | 0); | |
/** @type {!goog.math.Long} */ | |
goog.math.Long.MIN_VALUE = goog.math.Long.fromBits(0, 0x80000000 | 0); | |
/** | |
* @type {!goog.math.Long} | |
* @private | |
*/ | |
goog.math.Long.TWO_PWR_24_ = goog.math.Long.fromInt(1 << 24); | |
/** @return {number} The value, assuming it is a 32-bit integer. */ | |
goog.math.Long.prototype.toInt = function() { | |
return this.low_; | |
}; | |
/** @return {number} The closest floating-point representation to this value. */ | |
goog.math.Long.prototype.toNumber = function() { | |
return this.high_ * goog.math.Long.TWO_PWR_32_DBL_ + | |
this.getLowBitsUnsigned(); | |
}; | |
/** | |
* @param {number=} opt_radix The radix in which the text should be written. | |
* @return {string} The textual representation of this value. | |
* @override | |
*/ | |
goog.math.Long.prototype.toString = function(opt_radix) { | |
var radix = opt_radix || 10; | |
if (radix < 2 || 36 < radix) { | |
throw Error('radix out of range: ' + radix); | |
} | |
if (this.isZero()) { | |
return '0'; | |
} | |
if (this.isNegative()) { | |
if (this.equals(goog.math.Long.MIN_VALUE)) { | |
// We need to change the Long value before it can be negated, so we remove | |
// the bottom-most digit in this base and then recurse to do the rest. | |
var radixLong = goog.math.Long.fromNumber(radix); | |
var div = this.div(radixLong); | |
var rem = div.multiply(radixLong).subtract(this); | |
return div.toString(radix) + rem.toInt().toString(radix); | |
} else { | |
return '-' + this.negate().toString(radix); | |
} | |
} | |
// Do several (6) digits each time through the loop, so as to | |
// minimize the calls to the very expensive emulated div. | |
var radixToPower = goog.math.Long.fromNumber(Math.pow(radix, 6)); | |
var rem = this; | |
var result = ''; | |
while (true) { | |
var remDiv = rem.div(radixToPower); | |
var intval = rem.subtract(remDiv.multiply(radixToPower)).toInt(); | |
var digits = intval.toString(radix); | |
rem = remDiv; | |
if (rem.isZero()) { | |
return digits + result; | |
} else { | |
while (digits.length < 6) { | |
digits = '0' + digits; | |
} | |
result = '' + digits + result; | |
} | |
} | |
}; | |
/** @return {number} The high 32-bits as a signed value. */ | |
goog.math.Long.prototype.getHighBits = function() { | |
return this.high_; | |
}; | |
/** @return {number} The low 32-bits as a signed value. */ | |
goog.math.Long.prototype.getLowBits = function() { | |
return this.low_; | |
}; | |
/** @return {number} The low 32-bits as an unsigned value. */ | |
goog.math.Long.prototype.getLowBitsUnsigned = function() { | |
return (this.low_ >= 0) ? | |
this.low_ : goog.math.Long.TWO_PWR_32_DBL_ + this.low_; | |
}; | |
/** | |
* @return {number} Returns the number of bits needed to represent the absolute | |
* value of this Long. | |
*/ | |
goog.math.Long.prototype.getNumBitsAbs = function() { | |
if (this.isNegative()) { | |
if (this.equals(goog.math.Long.MIN_VALUE)) { | |
return 64; | |
} else { | |
return this.negate().getNumBitsAbs(); | |
} | |
} else { | |
var val = this.high_ != 0 ? this.high_ : this.low_; | |
for (var bit = 31; bit > 0; bit--) { | |
if ((val & (1 << bit)) != 0) { | |
break; | |
} | |
} | |
return this.high_ != 0 ? bit + 33 : bit + 1; | |
} | |
}; | |
/** @return {boolean} Whether this value is zero. */ | |
goog.math.Long.prototype.isZero = function() { | |
return this.high_ == 0 && this.low_ == 0; | |
}; | |
/** @return {boolean} Whether this value is negative. */ | |
goog.math.Long.prototype.isNegative = function() { | |
return this.high_ < 0; | |
}; | |
/** @return {boolean} Whether this value is odd. */ | |
goog.math.Long.prototype.isOdd = function() { | |
return (this.low_ & 1) == 1; | |
}; | |
/** | |
* @param {goog.math.Long} other Long to compare against. | |
* @return {boolean} Whether this Long equals the other. | |
*/ | |
goog.math.Long.prototype.equals = function(other) { | |
return (this.high_ == other.high_) && (this.low_ == other.low_); | |
}; | |
/** | |
* @param {goog.math.Long} other Long to compare against. | |
* @return {boolean} Whether this Long does not equal the other. | |
*/ | |
goog.math.Long.prototype.notEquals = function(other) { | |
return (this.high_ != other.high_) || (this.low_ != other.low_); | |
}; | |
/** | |
* @param {goog.math.Long} other Long to compare against. | |
* @return {boolean} Whether this Long is less than the other. | |
*/ | |
goog.math.Long.prototype.lessThan = function(other) { | |
return this.compare(other) < 0; | |
}; | |
/** | |
* @param {goog.math.Long} other Long to compare against. | |
* @return {boolean} Whether this Long is less than or equal to the other. | |
*/ | |
goog.math.Long.prototype.lessThanOrEqual = function(other) { | |
return this.compare(other) <= 0; | |
}; | |
/** | |
* @param {goog.math.Long} other Long to compare against. | |
* @return {boolean} Whether this Long is greater than the other. | |
*/ | |
goog.math.Long.prototype.greaterThan = function(other) { | |
return this.compare(other) > 0; | |
}; | |
/** | |
* @param {goog.math.Long} other Long to compare against. | |
* @return {boolean} Whether this Long is greater than or equal to the other. | |
*/ | |
goog.math.Long.prototype.greaterThanOrEqual = function(other) { | |
return this.compare(other) >= 0; | |
}; | |
/** | |
* Compares this Long with the given one. | |
* @param {goog.math.Long} other Long to compare against. | |
* @return {number} 0 if they are the same, 1 if the this is greater, and -1 | |
* if the given one is greater. | |
*/ | |
goog.math.Long.prototype.compare = function(other) { | |
if (this.equals(other)) { | |
return 0; | |
} | |
var thisNeg = this.isNegative(); | |
var otherNeg = other.isNegative(); | |
if (thisNeg && !otherNeg) { | |
return -1; | |
} | |
if (!thisNeg && otherNeg) { | |
return 1; | |
} | |
// at this point, the signs are the same, so subtraction will not overflow | |
if (this.subtract(other).isNegative()) { | |
return -1; | |
} else { | |
return 1; | |
} | |
}; | |
/** @return {!goog.math.Long} The negation of this value. */ | |
goog.math.Long.prototype.negate = function() { | |
if (this.equals(goog.math.Long.MIN_VALUE)) { | |
return goog.math.Long.MIN_VALUE; | |
} else { | |
return this.not().add(goog.math.Long.ONE); | |
} | |
}; | |
/** | |
* Returns the sum of this and the given Long. | |
* @param {goog.math.Long} other Long to add to this one. | |
* @return {!goog.math.Long} The sum of this and the given Long. | |
*/ | |
goog.math.Long.prototype.add = function(other) { | |
// Divide each number into 4 chunks of 16 bits, and then sum the chunks. | |
var a48 = this.high_ >>> 16; | |
var a32 = this.high_ & 0xFFFF; | |
var a16 = this.low_ >>> 16; | |
var a00 = this.low_ & 0xFFFF; | |
var b48 = other.high_ >>> 16; | |
var b32 = other.high_ & 0xFFFF; | |
var b16 = other.low_ >>> 16; | |
var b00 = other.low_ & 0xFFFF; | |
var c48 = 0, c32 = 0, c16 = 0, c00 = 0; | |
c00 += a00 + b00; | |
c16 += c00 >>> 16; | |
c00 &= 0xFFFF; | |
c16 += a16 + b16; | |
c32 += c16 >>> 16; | |
c16 &= 0xFFFF; | |
c32 += a32 + b32; | |
c48 += c32 >>> 16; | |
c32 &= 0xFFFF; | |
c48 += a48 + b48; | |
c48 &= 0xFFFF; | |
return goog.math.Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32); | |
}; | |
/** | |
* Returns the difference of this and the given Long. | |
* @param {goog.math.Long} other Long to subtract from this. | |
* @return {!goog.math.Long} The difference of this and the given Long. | |
*/ | |
goog.math.Long.prototype.subtract = function(other) { | |
return this.add(other.negate()); | |
}; | |
/** | |
* Returns the product of this and the given long. | |
* @param {goog.math.Long} other Long to multiply with this. | |
* @return {!goog.math.Long} The product of this and the other. | |
*/ | |
goog.math.Long.prototype.multiply = function(other) { | |
if (this.isZero()) { | |
return goog.math.Long.ZERO; | |
} else if (other.isZero()) { | |
return goog.math.Long.ZERO; | |
} | |
if (this.equals(goog.math.Long.MIN_VALUE)) { | |
return other.isOdd() ? goog.math.Long.MIN_VALUE : goog.math.Long.ZERO; | |
} else if (other.equals(goog.math.Long.MIN_VALUE)) { | |
return this.isOdd() ? goog.math.Long.MIN_VALUE : goog.math.Long.ZERO; | |
} | |
if (this.isNegative()) { | |
if (other.isNegative()) { | |
return this.negate().multiply(other.negate()); | |
} else { | |
return this.negate().multiply(other).negate(); | |
} | |
} else if (other.isNegative()) { | |
return this.multiply(other.negate()).negate(); | |
} | |
// If both longs are small, use float multiplication | |
if (this.lessThan(goog.math.Long.TWO_PWR_24_) && | |
other.lessThan(goog.math.Long.TWO_PWR_24_)) { | |
return goog.math.Long.fromNumber(this.toNumber() * other.toNumber()); | |
} | |
// Divide each long into 4 chunks of 16 bits, and then add up 4x4 products. | |
// We can skip products that would overflow. | |
var a48 = this.high_ >>> 16; | |
var a32 = this.high_ & 0xFFFF; | |
var a16 = this.low_ >>> 16; | |
var a00 = this.low_ & 0xFFFF; | |
var b48 = other.high_ >>> 16; | |
var b32 = other.high_ & 0xFFFF; | |
var b16 = other.low_ >>> 16; | |
var b00 = other.low_ & 0xFFFF; | |
var c48 = 0, c32 = 0, c16 = 0, c00 = 0; | |
c00 += a00 * b00; | |
c16 += c00 >>> 16; | |
c00 &= 0xFFFF; | |
c16 += a16 * b00; | |
c32 += c16 >>> 16; | |
c16 &= 0xFFFF; | |
c16 += a00 * b16; | |
c32 += c16 >>> 16; | |
c16 &= 0xFFFF; | |
c32 += a32 * b00; | |
c48 += c32 >>> 16; | |
c32 &= 0xFFFF; | |
c32 += a16 * b16; | |
c48 += c32 >>> 16; | |
c32 &= 0xFFFF; | |
c32 += a00 * b32; | |
c48 += c32 >>> 16; | |
c32 &= 0xFFFF; | |
c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48; | |
c48 &= 0xFFFF; | |
return goog.math.Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32); | |
}; | |
/** | |
* Returns this Long divided by the given one. | |
* @param {goog.math.Long} other Long by which to divide. | |
* @return {!goog.math.Long} This Long divided by the given one. | |
*/ | |
goog.math.Long.prototype.div = function(other) { | |
if (other.isZero()) { | |
throw Error('division by zero'); | |
} else if (this.isZero()) { | |
return goog.math.Long.ZERO; | |
} | |
if (this.equals(goog.math.Long.MIN_VALUE)) { | |
if (other.equals(goog.math.Long.ONE) || | |
other.equals(goog.math.Long.NEG_ONE)) { | |
return goog.math.Long.MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE | |
} else if (other.equals(goog.math.Long.MIN_VALUE)) { | |
return goog.math.Long.ONE; | |
} else { | |
// At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|. | |
var halfThis = this.shiftRight(1); | |
var approx = halfThis.div(other).shiftLeft(1); | |
if (approx.equals(goog.math.Long.ZERO)) { | |
return other.isNegative() ? goog.math.Long.ONE : goog.math.Long.NEG_ONE; | |
} else { | |
var rem = this.subtract(other.multiply(approx)); | |
var result = approx.add(rem.div(other)); | |
return result; | |
} | |
} | |
} else if (other.equals(goog.math.Long.MIN_VALUE)) { | |
return goog.math.Long.ZERO; | |
} | |
if (this.isNegative()) { | |
if (other.isNegative()) { | |
return this.negate().div(other.negate()); | |
} else { | |
return this.negate().div(other).negate(); | |
} | |
} else if (other.isNegative()) { | |
return this.div(other.negate()).negate(); | |
} | |
// Repeat the following until the remainder is less than other: find a | |
// floating-point that approximates remainder / other *from below*, add this | |
// into the result, and subtract it from the remainder. It is critical that | |
// the approximate value is less than or equal to the real value so that the | |
// remainder never becomes negative. | |
var res = goog.math.Long.ZERO; | |
var rem = this; | |
while (rem.greaterThanOrEqual(other)) { | |
// Approximate the result of division. This may be a little greater or | |
// smaller than the actual value. | |
var approx = Math.max(1, Math.floor(rem.toNumber() / other.toNumber())); | |
// We will tweak the approximate result by changing it in the 48-th digit or | |
// the smallest non-fractional digit, whichever is larger. | |
var log2 = Math.ceil(Math.log(approx) / Math.LN2); | |
var delta = (log2 <= 48) ? 1 : Math.pow(2, log2 - 48); | |
// Decrease the approximation until it is smaller than the remainder. Note | |
// that if it is too large, the product overflows and is negative. | |
var approxRes = goog.math.Long.fromNumber(approx); | |
var approxRem = approxRes.multiply(other); | |
while (approxRem.isNegative() || approxRem.greaterThan(rem)) { | |
approx -= delta; | |
approxRes = goog.math.Long.fromNumber(approx); | |
approxRem = approxRes.multiply(other); | |
} | |
// We know the answer can't be zero... and actually, zero would cause | |
// infinite recursion since we would make no progress. | |
if (approxRes.isZero()) { | |
approxRes = goog.math.Long.ONE; | |
} | |
res = res.add(approxRes); | |
rem = rem.subtract(approxRem); | |
} | |
return res; | |
}; | |
/** | |
* Returns this Long modulo the given one. | |
* @param {goog.math.Long} other Long by which to mod. | |
* @return {!goog.math.Long} This Long modulo the given one. | |
*/ | |
goog.math.Long.prototype.modulo = function(other) { | |
return this.subtract(this.div(other).multiply(other)); | |
}; | |
/** @return {!goog.math.Long} The bitwise-NOT of this value. */ | |
goog.math.Long.prototype.not = function() { | |
return goog.math.Long.fromBits(~this.low_, ~this.high_); | |
}; | |
/** | |
* Returns the bitwise-AND of this Long and the given one. | |
* @param {goog.math.Long} other The Long with which to AND. | |
* @return {!goog.math.Long} The bitwise-AND of this and the other. | |
*/ | |
goog.math.Long.prototype.and = function(other) { | |
return goog.math.Long.fromBits(this.low_ & other.low_, | |
this.high_ & other.high_); | |
}; | |
/** | |
* Returns the bitwise-OR of this Long and the given one. | |
* @param {goog.math.Long} other The Long with which to OR. | |
* @return {!goog.math.Long} The bitwise-OR of this and the other. | |
*/ | |
goog.math.Long.prototype.or = function(other) { | |
return goog.math.Long.fromBits(this.low_ | other.low_, | |
this.high_ | other.high_); | |
}; | |
/** | |
* Returns the bitwise-XOR of this Long and the given one. | |
* @param {goog.math.Long} other The Long with which to XOR. | |
* @return {!goog.math.Long} The bitwise-XOR of this and the other. | |
*/ | |
goog.math.Long.prototype.xor = function(other) { | |
return goog.math.Long.fromBits(this.low_ ^ other.low_, | |
this.high_ ^ other.high_); | |
}; | |
/** | |
* Returns this Long with bits shifted to the left by the given amount. | |
* @param {number} numBits The number of bits by which to shift. | |
* @return {!goog.math.Long} This shifted to the left by the given amount. | |
*/ | |
goog.math.Long.prototype.shiftLeft = function(numBits) { | |
numBits &= 63; | |
if (numBits == 0) { | |
return this; | |
} else { | |
var low = this.low_; | |
if (numBits < 32) { | |
var high = this.high_; | |
return goog.math.Long.fromBits( | |
low << numBits, | |
(high << numBits) | (low >>> (32 - numBits))); | |
} else { | |
return goog.math.Long.fromBits(0, low << (numBits - 32)); | |
} | |
} | |
}; | |
/** | |
* Returns this Long with bits shifted to the right by the given amount. | |
* @param {number} numBits The number of bits by which to shift. | |
* @return {!goog.math.Long} This shifted to the right by the given amount. | |
*/ | |
goog.math.Long.prototype.shiftRight = function(numBits) { | |
numBits &= 63; | |
if (numBits == 0) { | |
return this; | |
} else { | |
var high = this.high_; | |
if (numBits < 32) { | |
var low = this.low_; | |
return goog.math.Long.fromBits( | |
(low >>> numBits) | (high << (32 - numBits)), | |
high >> numBits); | |
} else { | |
return goog.math.Long.fromBits( | |
high >> (numBits - 32), | |
high >= 0 ? 0 : -1); | |
} | |
} | |
}; | |
/** | |
* Returns this Long with bits shifted to the right by the given amount, with | |
* zeros placed into the new leading bits. | |
* @param {number} numBits The number of bits by which to shift. | |
* @return {!goog.math.Long} This shifted to the right by the given amount, with | |
* zeros placed into the new leading bits. | |
*/ | |
goog.math.Long.prototype.shiftRightUnsigned = function(numBits) { | |
numBits &= 63; | |
if (numBits == 0) { | |
return this; | |
} else { | |
var high = this.high_; | |
if (numBits < 32) { | |
var low = this.low_; | |
return goog.math.Long.fromBits( | |
(low >>> numBits) | (high << (32 - numBits)), | |
high >>> numBits); | |
} else if (numBits == 32) { | |
return goog.math.Long.fromBits(high, 0); | |
} else { | |
return goog.math.Long.fromBits(high >>> (numBits - 32), 0); | |
} | |
} | |
}; | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
/* | |
simple set with reasonably fast iteration though an array, which may contain nulls | |
elements must be objects that have a unique _key property | |
collections are expected to be homogeneous | |
when iterating over a set with an iterator, the following operations are safe: | |
- adding an element to the set (the existing iterator will iterate over the new elements) | |
- removing the last returned element through the iterator | |
behaviour for deleting elements is unpredictable and unsafe | |
*/ | |
/** @constructor */ | |
function h$Set(s) { | |
this._vals = []; | |
this._keys = []; | |
this._size = 0; | |
} | |
h$Set.prototype.size = function() { | |
return this._size; | |
} | |
h$Set.prototype.add = function(o) { | |
var k = this._keys, v = this._vals; | |
if(k[o._key] === undefined) { | |
k[o._key] = this._size; | |
v[this._size++] = o; | |
} | |
} | |
h$Set.prototype.remove = function(o) { | |
if(this._size === 0) return; | |
var k = this._keys, v = this._vals, x = k[o._key]; | |
if(x !== undefined) { | |
delete k[o._key]; | |
var ls = --this._size; | |
if(ls !== x) { | |
var l = v[ls]; | |
v[x] = l; | |
k[l._key] = x; | |
} | |
v[ls] = null; | |
if(v.length > 10 && 2 * v.length > 3 * ls) this._vals = v.slice(0, ls); | |
} | |
} | |
h$Set.prototype.has = function(o) { | |
return this._keys[o._key] !== undefined; | |
} | |
h$Set.prototype.clear = function() { | |
if(this._size > 0) { | |
this._keys = []; | |
this._vals = []; | |
this._size = 0; | |
} | |
} | |
h$Set.prototype.iter = function() { | |
return new h$SetIter(this); | |
} | |
// returns an array with all values, might contain additional nulls at the end | |
h$Set.prototype.values = function() { | |
return this._vals; | |
} | |
/** @constructor */ | |
function h$SetIter(s) { | |
this._n = 0; | |
this._s = s; | |
this._r = true; | |
} | |
h$SetIter.prototype.next = function() { | |
if(this._n < this._s._size) { | |
this._r = false; | |
return this._s._vals[this._n++]; | |
} else { | |
this._r = true; | |
return null; | |
} | |
} | |
h$SetIter.prototype.peek = function() { | |
if(this._n < this._s._size) { | |
return this._s.vals[this._n]; | |
} else { | |
return null; | |
} | |
} | |
// remove the last element returned | |
h$SetIter.prototype.remove = function() { | |
if(!this._r) { | |
this._s.remove(this._s._vals[--this._n]); | |
this._r = true; | |
} | |
} | |
/* | |
map, iteration restrictions are the same as for set | |
keys need to be objects with a unique _key property | |
keys are expected to have the same prototype | |
values may be anything (but note that the values array might have additional nulls) | |
*/ | |
/** @constructor */ | |
function h$Map() { | |
this._pairsKeys = []; | |
this._pairsValues = []; | |
this._keys = []; | |
this._size = 0; | |
} | |
h$Map.prototype.size = function() { | |
return this._size; | |
} | |
h$Map.prototype.put = function(k,v) { | |
var ks = this._keys, pk = this._pairsKeys, pv = this._pairsValues, x = ks[k._key]; | |
if(x === undefined) { | |
var n = this._size++; | |
ks[k._key] = n; | |
pk[n] = k; | |
pv[n] = v; | |
} else { | |
pv[x] = v; | |
} | |
} | |
h$Map.prototype.remove = function(k) { | |
var kk = k._key, ks = this._keys, pk = this._pairsKeys, pv = this._pairsValues, x = ks[kk]; | |
if(x !== undefined) { | |
delete ks[kk]; | |
var ss = --this._size; | |
if(ss !== x) { | |
pks = pk[ss]; | |
pk[x] = pks; | |
pv[x] = pv[ss]; | |
ks[pks._key] = x; | |
} | |
pv[ss] = null; | |
pk[ss] = null; | |
if(pk.length > 10 && 2 * pk.length > 3 * this._size) { | |
this._pairsKeys = pk.slice(0,ss); | |
this._pairsValues = pv.slice(0,ss); | |
} | |
} | |
} | |
h$Map.prototype.has = function(k) { | |
return this._keys[k._key] !== undefined; | |
} | |
h$Map.prototype.get = function(k) { | |
var n = this._keys[k._key]; | |
if(n !== undefined) { | |
return this._pairsValues[n]; | |
} else { | |
return null; | |
} | |
} | |
h$Map.prototype.iter = function() { | |
return new h$MapIter(this); | |
} | |
// returned array might have some trailing nulls | |
h$Map.prototype.keys = function () { | |
return this._pairsKeys; | |
} | |
// returned array might have some trailing nulls | |
h$Map.prototype.values = function() { | |
return this._pairsValues; | |
} | |
/** @constructor */ | |
function h$MapIter(m) { | |
this._n = 0; | |
this._m = m; | |
} | |
h$MapIter.prototype.next = function() { | |
return this._n < this._m._size ? this._m._pairsKeys[this._n++] : null; | |
} | |
h$MapIter.prototype.nextVal = function() { | |
return this._n < this._m._size ? this._m._pairsValues[this._n++] : null; | |
} | |
h$MapIter.prototype.peek = function() { | |
return this._n < this._m._size ? this._m._pairsKeys[this._n] : null; | |
} | |
h$MapIter.prototype.peekVal = function() { | |
return this._n < this._m._size ? this._m._pairsValues[this._n] : null; | |
} | |
/* | |
simple queue, returns null when empty | |
it's safe to enqueue new items while iterating, not safe to dequeue | |
(new items will not be iterated over) | |
*/ | |
/** @constructor */ | |
function h$Queue() { | |
var b = { b: [], n: null }; | |
this._blocks = 1; | |
this._first = b; | |
this._fp = 0; | |
this._last = b; | |
this._lp = 0; | |
} | |
h$Queue.prototype.length = function() { | |
return 1000 * (this._blocks - 1) + this._lp - this._fp; | |
} | |
h$Queue.prototype.isEmpty = function() { | |
return this._blocks === 1 && this._lp >= this._fp; | |
} | |
h$Queue.prototype.enqueue = function(o) { | |
if(this._lp === 1000) { | |
var newBlock = { b: [o], n: null }; | |
this._blocks++; | |
this._last.n = newBlock; | |
this._last = newBlock; | |
this._lp = 1; | |
} else { | |
this._last.b[this._lp++] = o; | |
} | |
} | |
h$Queue.prototype.dequeue = function() { | |
if(this._blocks === 1 && this._fp >= this._lp) { | |
return null; | |
} else { | |
var qfb = this._first.b, r = qfb[this._fp]; | |
qfb[this._fp] = null; | |
if(++this._fp === 1000) { | |
if(this._blocks === 1) { | |
this._lp = 0; | |
} else { | |
this._blocks--; | |
this._first = this._first.n; | |
} | |
this._fp = 0; | |
} else if(this._blocks === 1 && this._fp >= this._lp) { | |
this._lp = this._fp = 0; | |
} | |
return r; | |
} | |
} | |
h$Queue.prototype.peek = function() { | |
if(this._blocks === 0 || (this._blocks === 1 && this._fp >= this._lp)) { | |
return null; | |
} else { | |
return this._first.b[this._fp]; | |
} | |
} | |
h$Queue.prototype.iter = function() { | |
var b = this._first, bp = this._fp, lb = this._last, lp = this._lp; | |
return function() { | |
if(b === null || (b === lb && bp >= lp)) { | |
return null; | |
} else { | |
var r = b.b[bp]; | |
if(++bp === 1000) { | |
b = b.n; | |
bp = 0; | |
if(b === null) lb = null; | |
} | |
return r; | |
} | |
} | |
} | |
/* | |
binary min-heap / set | |
- iteration is not in order of priority | |
- values can be removed, need to have the ._key property | |
*/ | |
/** @constructor */ | |
function h$HeapSet() { | |
this._keys = []; | |
this._prios = []; | |
this._vals = []; | |
this._size = 0; | |
} | |
h$HeapSet.prototype.size = function() { | |
return this._size; | |
} | |
// add a node, if it already exists, it's moved to the new priority | |
h$HeapSet.prototype.add = function(op,o) { | |
var p = this._prios, k = this._keys, v = this._vals, x = k[o._key]; | |
if(x !== undefined) { // adjust node | |
var oop = p[x]; | |
if(oop !== op) { | |
p[x] = op; | |
if(op < oop) { | |
this._upHeap(x); | |
} else { | |
this._downHeap(x); | |
} | |
} | |
} else { // new node | |
var s = this._size++; | |
k[o._key] = s; | |
p[s] = op; | |
v[s] = o; | |
this._upHeap(s); | |
} | |
} | |
h$HeapSet.prototype.has = function(o) { | |
return this._keys[o._key] !== undefined; | |
} | |
h$HeapSet.prototype.prio = function(o) { | |
var x = this._keys[o._key]; | |
if(x !== undefined) { | |
return this._prios[x]; | |
} else { | |
return null; | |
} | |
} | |
h$HeapSet.prototype.peekPrio = function() { | |
return this._size > 0 ? this._prios[0] : null; | |
} | |
h$HeapSet.prototype.peek = function() { | |
return this._size > 0 ? this._vals[0] : null; | |
} | |
h$HeapSet.prototype.pop = function() { | |
if(this._size > 0) { | |
var v = this._vals[0]; | |
this._removeNode(0); | |
return v; | |
} else { | |
return null; | |
} | |
} | |
h$HeapSet.prototype.remove = function(o) { | |
var x = this._keys[o._key]; | |
if(x !== undefined) this._removeNode(x); | |
} | |
h$HeapSet.prototype.iter = function() { | |
var n = 0, v = this._vals, s = this._size; | |
return function() { | |
return n < s ? v[n++] : null; | |
} | |
} | |
// may be longer than this.size(), remainder is filled with nulls | |
h$HeapSet.prototype.values = function() { | |
return this._vals; | |
} | |
h$HeapSet.prototype._removeNode = function(i) { | |
var p = this._prios, v = this._vals, s = --this._size, k = this._keys; | |
delete k[v[i]._key]; | |
if(i !== s) { | |
v[i] = v[s]; | |
p[i] = p[s]; | |
k[v[i]._key] = i; | |
} | |
v[s] = null; | |
p[s] = null; | |
this._downHeap(i,s); | |
} | |
h$HeapSet.prototype._downHeap = function(i,s) { | |
var p = this._prios, v = this._vals, k = this._keys; | |
var j,l,r,ti,tj; | |
while(true) { | |
j = i, r = 2*(i+1), l = r-1; | |
if(l < s && p[l] < p[i]) i = l; | |
if(r < s && p[r] < p[i]) i = r; | |
if(i !== j) { | |
ti = v[i]; | |
tj = v[j]; | |
v[j] = ti; | |
v[i] = tj; | |
k[ti._key] = j; | |
k[tj._key] = i; | |
ti = p[i]; | |
p[i] = p[j]; | |
p[j] = ti; | |
} else { | |
break; | |
} | |
} | |
} | |
h$HeapSet.prototype._upHeap = function(i) { | |
var ti, tj, j, p = this._prios, v = this._vals, k = this._keys; | |
while(i !== 0) { | |
j = (i-1) >> 1; | |
if(p[i] < p[j]) { | |
ti = v[i]; | |
tj = v[j]; | |
v[j] = ti; | |
v[i] = tj; | |
k[ti._key] = j; | |
k[tj._key] = i; | |
ti = p[i]; | |
p[i] = p[j]; | |
p[j] = ti; | |
i = j; | |
} else { | |
break; | |
} | |
} | |
} | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
// values defined in Gen2.ClosureInfo | |
// thread status | |
/* | |
* low-level heap object manipulation macros | |
*/ | |
// GHCJS.Prim.JSVal | |
// GHCJS.Prim.JSException | |
// Exception dictionary for JSException | |
// SomeException | |
// GHC.Ptr.Ptr | |
// GHC.Integer.GMP.Internals | |
// Data.Maybe.Maybe | |
// #define HS_NOTHING h$nothing | |
// Data.List | |
// Data.Text | |
// Data.Text.Lazy | |
// black holes | |
// can we skip the indirection for black holes? | |
// resumable thunks | |
// general deconstruction | |
// retrieve a numeric value that's possibly stored as an indirection | |
// generic lazy values | |
// generic data constructors and selectors | |
// unboxed tuple returns | |
// #define RETURN_UBX_TUP1(x) return x; | |
// #define GHCJS_TRACE_META 1 | |
// memory management and pointer emulation | |
// static init, non-caf | |
function h$sti(i,c,xs) { | |
i.f = c; | |
h$init_closure(i,xs); | |
} | |
// static init, caf | |
function h$stc(i,c,xs) { | |
i.f = c; | |
h$init_closure(i,xs); | |
h$addCAF(i); | |
} | |
function h$stl(o, xs, t) { | |
var r = t ? t : h$ghczmprimZCGHCziTypesziZMZN; | |
var x; | |
if(xs.length > 0) { | |
for(var i=xs.length-1;i>=0;i--) { | |
x = xs[i]; | |
if(!x && x !== false && x !== 0) throw "h$toHsList: invalid element"; | |
r = (h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, (x), (r))); | |
} | |
} | |
// fixme direct object manip | |
o.f = r.f; | |
o.d1 = r.d1; | |
o.d2 = r.d2; | |
o.m = r.m; | |
} | |
// some utilities for constructing common objects from JS in the RTS or foreign code. | |
// when profiling, the current ccs is assigned | |
// #ifdef GHCJS_PROF | |
// var h$nil = h$c(h$ghczmprimZCGHCziTypesziZMZN_con_e, h$CCS_SYSTEM); | |
// #else | |
// var h$nil = h$c(h$ghczmprimZCGHCziTypesziZMZN_con_e); | |
// #endif | |
// #ifdef GHCJS_PROF | |
// var h$nothing = h$c(h$baseZCGHCziBaseziNothing_con_e, h$CCS_SYSTEM); | |
// #else | |
//var h$nothing = h$c(h$baseZCGHCziBaseziNothing_con_e); | |
// #endif | |
// delayed init for top-level closures | |
var h$staticDelayed = []; | |
function h$d() { | |
var c = h$c(null); | |
h$staticDelayed.push(c); | |
return c; | |
} | |
var h$allocN = 0; | |
function h$traceAlloc(x) { | |
h$log("allocating: " + (++h$allocN)); | |
x.alloc = h$allocN; | |
} | |
// fixme remove this when we have a better way to immediately init these things | |
function h$di(c) { | |
h$staticDelayed.push(c); | |
} | |
// initialize global object to primitive value | |
function h$p(x) { | |
h$staticDelayed.push(x); | |
return x; | |
} | |
var h$entriesStack = []; | |
var h$staticsStack = []; | |
var h$labelsStack = []; | |
function h$scheduleInit(entries, objs, lbls, infos, statics) { | |
var d = h$entriesStack.length; | |
h$entriesStack.push(entries); | |
h$staticsStack.push(objs); | |
h$labelsStack.push(lbls); | |
h$initStatic.push(function() { | |
h$initInfoTables(d, entries, objs, lbls, infos, statics); | |
}); | |
} | |
function h$runInitStatic() { | |
if(h$initStatic.length > 0) { | |
for(var i=h$initStatic.length - 1;i>=0;i--) { | |
h$initStatic[i](); | |
} | |
h$initStatic = []; | |
} | |
// free the references to the temporary tables used for | |
// initialising all our static data | |
h$entriesStack = null; | |
h$staticsStack = null; | |
} | |
// initialize packed info tables | |
// see Gen2.Compactor for how the data is encoded | |
function h$initInfoTables ( depth // depth in the base chain | |
, funcs // array with all entry functions | |
, objects // array with all the global heap objects | |
, lbls // array with non-haskell labels | |
, infoMeta // packed info | |
, infoStatic | |
) { | |
; | |
var n, i, j, o, pos = 0, info; | |
function code(c) { | |
if(c < 34) return c - 32; | |
if(c < 92) return c - 33; | |
return c - 34; | |
} | |
function next() { | |
var c = info.charCodeAt(pos); | |
if(c < 124) { | |
; | |
pos++; | |
return code(c); | |
} | |
if(c === 124) { | |
pos+=3; | |
var r = 90 + 90 * code(info.charCodeAt(pos-2)) | |
+ code(info.charCodeAt(pos-1)); | |
; | |
return r; | |
} | |
if(c === 125) { | |
pos+=4; | |
var r = 8190 + 8100 * code(info.charCodeAt(pos-3)) | |
+ 90 * code(info.charCodeAt(pos-2)) | |
+ code(info.charCodeAt(pos-1)); | |
; | |
return r; | |
} | |
throw ("h$initInfoTables: invalid code in info table: " + c + " at " + pos) | |
} | |
function nextCh() { | |
return next(); // fixme map readable chars | |
} | |
function nextInt() { | |
var n = next(); | |
var r; | |
if(n === 0) { | |
var n1 = next(); | |
var n2 = next(); | |
r = n1 << 16 | n2; | |
} else { | |
r = n - 12; | |
} | |
; | |
return r; | |
} | |
function nextSignificand() { | |
var n = next(); | |
var n1, n2, n3, n4, n5; | |
var r; | |
if(n < 2) { | |
n1 = next(); | |
n2 = next(); | |
n3 = next(); | |
n4 = next(); | |
n5 = n1 * 281474976710656 + n2 * 4294967296 + n3 * 65536 + n4; | |
r = n === 0 ? -n5 : n5; | |
} else { | |
r = n - 12; | |
} | |
; | |
return r; | |
} | |
function nextEntry(o) { return nextIndexed("nextEntry", h$entriesStack, o); } | |
function nextObj(o) { return nextIndexed("nextObj", h$staticsStack, o); } | |
function nextLabel(o) { return nextIndexed("nextLabel", h$labelsStack, o); } | |
function nextIndexed(msg, stack, o) { | |
var n = (o === undefined) ? next() : o; | |
var i = depth; | |
while(n > stack[i].length) { | |
n -= stack[i].length; | |
i--; | |
if(i < 0) throw (msg + ": cannot find item " + n + ", stack length: " + stack.length + " depth: " + depth); | |
} | |
return stack[i][n]; | |
} | |
function nextArg() { | |
var o = next(); | |
var n, n1, n2, d0, d1, d2, d3; | |
var isString = false; | |
switch(o) { | |
case 0: | |
; | |
return false; | |
case 1: | |
; | |
return true; | |
case 2: | |
; | |
return 0; | |
case 3: | |
; | |
return 1; | |
case 4: | |
; | |
return nextInt(); | |
case 5: | |
; | |
return null; | |
case 6: | |
; | |
n = next(); | |
switch(n) { | |
case 0: | |
return -0.0; | |
case 1: | |
return 0.0; | |
case 2: | |
return 1/0; | |
case 3: | |
return -1/0; | |
case 4: | |
return 0/0; | |
case 5: | |
n1 = nextInt(); | |
var ns = nextSignificand(); | |
if(n1 > 600) { | |
return ns * Math.pow(2,n1-600) * Math.pow(2,600); | |
} else if(n1 < -600) { | |
return ns * Math.pow(2,n1+600) * Math.pow(2,-600); | |
} else { | |
return ns * Math.pow(2, n1); | |
} | |
default: | |
n1 = n - 36; | |
return nextSignificand() * Math.pow(2, n1); | |
} | |
case 7: | |
; | |
isString = true; | |
// no break, strings are null temrinated UTF8 encoded binary with | |
case 8: | |
; | |
n = next(); | |
var ba = h$newByteArray(isString ? (n+1) : n); | |
var b8 = ba.u8; | |
if(isString) b8[n] = 0; | |
var p = 0; | |
while(n > 0) { | |
switch(n) { | |
case 1: | |
d0 = next(); | |
d1 = next(); | |
b8[p] = ((d0 << 2) | (d1 >> 4)); | |
break; | |
case 2: | |
d0 = next(); | |
d1 = next(); | |
d2 = next(); | |
b8[p++] = ((d0 << 2) | (d1 >> 4)); | |
b8[p] = ((d1 << 4) | (d2 >> 2)); | |
break; | |
default: | |
d0 = next(); | |
d1 = next(); | |
d2 = next(); | |
d3 = next(); | |
b8[p++] = ((d0 << 2) | (d1 >> 4)); | |
b8[p++] = ((d1 << 4) | (d2 >> 2)); | |
b8[p++] = ((d2 << 6) | d3); | |
break; | |
} | |
n -= 3; | |
} | |
return ba; | |
case 9: | |
var isFun = next() === 1; | |
var lbl = nextLabel(); | |
return h$initPtrLbl(isFun, lbl); | |
case 10: | |
var c = { f: nextEntry(), d1: null, d2: null, m: 0 }; | |
var n = next(); | |
var args = []; | |
while(n--) { | |
args.push(nextArg()); | |
} | |
return h$init_closure(c, args); | |
default: | |
; | |
return nextObj(o-11); | |
} | |
} | |
info = infoMeta; pos = 0; | |
for(i=0;i<funcs.length;i++) { | |
o = funcs[i]; | |
var ot; | |
var oa = 0; | |
var oregs = 256; // one register no skip | |
switch(next()) { | |
case 0: // thunk | |
ot = 0; | |
break; | |
case 1: // fun | |
ot = 1; | |
var arity = next(); | |
var skipRegs = next()-1; | |
if(skipRegs === -1) throw "h$initInfoTables: unknown register info for function"; | |
var skip = skipRegs & 1; | |
var regs = skipRegs >>> 1; | |
oregs = (regs << 8) | skip; | |
oa = arity + ((regs-1+skip) << 8); | |
break; | |
case 2: // con | |
ot = 2; | |
oa = next(); | |
break; | |
case 3: // stack frame | |
ot = -1; | |
oa = 0; | |
oregs = next() - 1; | |
if(oregs !== -1) oregs = ((oregs >>> 1) << 8) | (oregs & 1); | |
break; | |
default: throw ("h$initInfoTables: invalid closure type") | |
} | |
var size = next() - 1; | |
var nsrts = next(); | |
var srt = null; | |
if(nsrts > 0) { | |
srt = []; | |
for(var j=0;j<nsrts;j++) { | |
srt.push(nextObj()); | |
} | |
} | |
// h$log("result: " + ot + " " + oa + " " + oregs + " [" + srt + "] " + size); | |
// h$log("orig: " + o.t + " " + o.a + " " + o.r + " [" + o.s + "] " + o.size); | |
// if(ot !== o.t || oa !== o.a || oregs !== o.r || size !== o.size) throw "inconsistent"; | |
o.t = ot; | |
o.i = []; | |
o.n = ""; | |
o.a = oa; | |
o.r = oregs; | |
o.s = srt; | |
o.m = 0; | |
o.size = size; | |
} | |
info = infoStatic; | |
pos = 0; | |
for(i=0;i<objects.length;i++) { | |
; | |
o = objects[i]; | |
// traceMetaObjBefore(o); | |
var nx = next(); | |
; | |
switch(nx) { | |
case 0: // no init, could be a primitive value (still in the list since others might reference it) | |
// h$log("zero init"); | |
break; | |
case 1: // staticfun | |
o.f = nextEntry(); | |
; | |
n = next(); | |
; | |
if(n === 0) { | |
o.d1 = null; | |
o.d2 = null; | |
} else if(n === 1) { | |
o.d1 = nextArg(); | |
o.d2 = null; | |
} else if(n === 2) { | |
o.d1 = nextArg(); | |
o.d2 = nextArg(); | |
} else { | |
for(j=0;j<n;j++) { | |
h$setField(o, j, nextArg()); | |
} | |
} | |
break; | |
case 2: // staticThunk | |
; | |
o.f = nextEntry(); | |
n = next(); | |
; | |
if(n === 0) { | |
o.d1 = null; | |
o.d2 = null; | |
} else if(n === 1) { | |
o.d1 = nextArg(); | |
o.d2 = null; | |
} else if(n === 2) { | |
o.d1 = nextArg(); | |
o.d2 = nextArg(); | |
} else { | |
for(j=0;j<n;j++) { | |
h$setField(o, j, nextArg()); | |
} | |
} | |
h$addCAF(o); | |
break; | |
case 3: // staticPrim false, no init | |
; | |
break; | |
case 4: // staticPrim true, no init | |
; | |
break; | |
case 5: | |
; | |
break; | |
case 6: // staticString | |
; | |
break; | |
case 7: // staticBin | |
; | |
n = next(); | |
var b = h$newByteArray(n); | |
for(j=0;j>n;j++) { | |
b.u8[j] = next(); | |
} | |
break; | |
case 8: // staticEmptyList | |
; | |
o.f = h$ghczmprimZCGHCziTypesziZMZN_con_e; | |
break; | |
case 9: // staticList | |
; | |
n = next(); | |
var hasTail = next(); | |
var c = (hasTail === 1) ? nextObj() : h$ghczmprimZCGHCziTypesziZMZN; | |
; | |
while(n--) { | |
c = (h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, (nextArg()), (c))); | |
} | |
o.f = c.f; | |
o.d1 = c.d1; | |
o.d2 = c.d2; | |
break; | |
case 10: // staticData n args | |
; | |
n = next(); | |
; | |
o.f = nextEntry(); | |
for(j=0;j<n;j++) { | |
h$setField(o, j, nextArg()); | |
} | |
break; | |
case 11: // staticData 0 args | |
; | |
o.f = nextEntry(); | |
break; | |
case 12: // staticData 1 args | |
; | |
o.f = nextEntry(); | |
o.d1 = nextArg(); | |
break; | |
case 13: // staticData 2 args | |
; | |
o.f = nextEntry(); | |
o.d1 = nextArg(); | |
o.d2 = nextArg(); | |
break; | |
case 14: // staticData 3 args | |
; | |
o.f = nextEntry(); | |
o.d1 = nextArg(); | |
// should be the correct order | |
o.d2 = { d1: nextArg(), d2: nextArg()}; | |
break; | |
case 15: // staticData 4 args | |
; | |
o.f = nextEntry(); | |
o.d1 = nextArg(); | |
// should be the correct order | |
o.d2 = { d1: nextArg(), d2: nextArg(), d3: nextArg() }; | |
break; | |
case 16: // staticData 5 args | |
; | |
o.f = nextEntry(); | |
o.d1 = nextArg(); | |
o.d2 = { d1: nextArg(), d2: nextArg(), d3: nextArg(), d4: nextArg() }; | |
break; | |
case 17: // staticData 6 args | |
; | |
o.f = nextEntry(); | |
o.d1 = nextArg(); | |
o.d2 = { d1: nextArg(), d2: nextArg(), d3: nextArg(), d4: nextArg(), d5: nextArg() }; | |
break; | |
default: | |
throw ("invalid static data initializer: " + nx); | |
} | |
} | |
h$staticDelayed = null; | |
} | |
function h$initPtrLbl(isFun, lbl) { | |
return lbl; | |
} | |
function h$callDynamic(f) { | |
return f.apply(f, Array.prototype.slice.call(arguments, 2)); | |
} | |
// slice an array of heap objects | |
function h$sliceArray(a, start, n) { | |
return a.slice(start, start+n); | |
} | |
function h$memcpy() { | |
if(arguments.length === 3) { // ByteArray# -> ByteArray# copy | |
var dst = arguments[0]; | |
var src = arguments[1]; | |
var n = arguments[2]; | |
for(var i=n-1;i>=0;i--) { | |
dst.u8[i] = src.u8[i]; | |
} | |
{ h$ret1 = (0); return (dst); }; | |
} else if(arguments.length === 5) { // Addr# -> Addr# copy | |
var dst = arguments[0]; | |
var dst_off = arguments[1] | |
var src = arguments[2]; | |
var src_off = arguments[3]; | |
var n = arguments[4]; | |
for(var i=n-1;i>=0;i--) { | |
dst.u8[i+dst_off] = src.u8[i+src_off]; | |
} | |
{ h$ret1 = (dst_off); return (dst); }; | |
} else { | |
throw "h$memcpy: unexpected argument"; | |
} | |
} | |
// note: only works for objects bigger than two! | |
function h$setField(o,n,v) { | |
if(n > 0 && !o.d2) o.d2 = {}; | |
switch(n) { | |
case 0: | |
o.d1 = v; | |
return; | |
case 1: | |
o.d2.d1 = v; | |
return; | |
case 2: | |
o.d2.d2 = v; | |
return; | |
case 3: | |
o.d2.d3 = v; | |
return; | |
case 4: | |
o.d2.d4 = v; | |
return; | |
case 5: | |
o.d2.d5 = v; | |
return; | |
case 6: | |
o.d2.d6 = v; | |
return; | |
case 7: | |
o.d2.d7 = v; | |
return; | |
case 8: | |
o.d2.d8 = v; | |
return; | |
case 9: | |
o.d2.d9 = v; | |
return; | |
case 10: | |
o.d2.d10 = v; | |
return; | |
case 11: | |
o.d2.d11 = v; | |
return; | |
case 12: | |
o.d2.d12 = v; | |
return; | |
case 13: | |
o.d2.d13 = v; | |
return; | |
case 14: | |
o.d2.d14 = v; | |
return; | |
case 15: | |
o.d2.d15 = v; | |
return; | |
case 16: | |
o.d2.d16 = v; | |
return; | |
case 17: | |
o.d2.d17 = v; | |
return; | |
case 18: | |
o.d2.d18 = v; | |
return; | |
case 19: | |
o.d2.d19 = v; | |
return; | |
case 20: | |
o.d2.d20 = v; | |
return; | |
case 21: | |
o.d2.d21 = v; | |
return; | |
case 22: | |
o.d2.d22 = v; | |
return; | |
case 23: | |
o.d2.d23 = v; | |
return; | |
case 24: | |
o.d2.d24 = v; | |
return; | |
case 25: | |
o.d2.d25 = v; | |
return; | |
case 26: | |
o.d2.d26 = v; | |
return; | |
case 27: | |
o.d2.d27 = v; | |
return; | |
case 28: | |
o.d2.d28 = v; | |
return; | |
case 29: | |
o.d2.d29 = v; | |
return; | |
case 30: | |
o.d2.d30 = v; | |
return; | |
case 31: | |
o.d2.d31 = v; | |
return; | |
case 32: | |
o.d2.d32 = v; | |
return; | |
case 33: | |
o.d2.d33 = v; | |
return; | |
case 34: | |
o.d2.d34 = v; | |
return; | |
case 35: | |
o.d2.d35 = v; | |
return; | |
case 36: | |
o.d2.d36 = v; | |
return; | |
case 37: | |
o.d2.d37 = v; | |
return; | |
case 38: | |
o.d2.d38 = v; | |
return; | |
case 39: | |
o.d2.d39 = v; | |
return; | |
case 40: | |
o.d2.d40 = v; | |
return; | |
case 41: | |
o.d2.d41 = v; | |
return; | |
case 42: | |
o.d2.d42 = v; | |
return; | |
case 43: | |
o.d2.d43 = v; | |
return; | |
case 44: | |
o.d2.d44 = v; | |
return; | |
case 45: | |
o.d2.d45 = v; | |
return; | |
case 45: | |
o.d2.d45 = v; | |
return; | |
case 46: | |
o.d2.d46 = v; | |
return; | |
case 47: | |
o.d2.d47 = v; | |
return; | |
case 48: | |
o.d2.d48 = v; | |
return; | |
case 49: | |
o.d2.d49 = v; | |
return; | |
case 50: | |
o.d2.d50 = v; | |
return; | |
case 51: | |
o.d2.d51 = v; | |
return; | |
case 52: | |
o.d2.d52 = v; | |
return; | |
case 53: | |
o.d2.d53 = v; | |
return; | |
case 54: | |
o.d2.d54 = v; | |
return; | |
case 55: | |
o.d2.d55 = v; | |
return; | |
case 56: | |
o.d2.d56 = v; | |
return; | |
case 57: | |
o.d2.d57 = v; | |
return; | |
case 58: | |
o.d2.d58 = v; | |
return; | |
case 59: | |
o.d2.d59 = v; | |
return; | |
case 60: | |
o.d2.d60 = v; | |
return; | |
case 61: | |
o.d2.d61 = v; | |
return; | |
case 62: | |
o.d2.d62 = v; | |
return; | |
case 63: | |
o.d2.d63 = v; | |
return; | |
case 64: | |
o.d2.d64 = v; | |
return; | |
case 65: | |
o.d2.d65 = v; | |
return; | |
case 66: | |
o.d2.d66 = v; | |
return; | |
case 67: | |
o.d2.d67 = v; | |
return; | |
case 68: | |
o.d2.d68 = v; | |
return; | |
case 69: | |
o.d2.d69 = v; | |
return; | |
case 70: | |
o.d2.d70 = v; | |
return; | |
case 71: | |
o.d2.d71 = v; | |
return; | |
case 72: | |
o.d2.d72 = v; | |
return; | |
case 73: | |
o.d2.d73 = v; | |
return; | |
case 74: | |
o.d2.d74 = v; | |
return; | |
case 75: | |
o.d2.d75 = v; | |
return; | |
case 76: | |
o.d2.d76 = v; | |
return; | |
case 77: | |
o.d2.d77 = v; | |
return; | |
case 78: | |
o.d2.d78 = v; | |
return; | |
case 79: | |
o.d2.d79 = v; | |
return; | |
case 80: | |
o.d2.d80 = v; | |
return; | |
case 81: | |
o.d2.d81 = v; | |
return; | |
case 82: | |
o.d2.d82 = v; | |
return; | |
case 83: | |
o.d2.d83 = v; | |
return; | |
case 84: | |
o.d2.d84 = v; | |
return; | |
case 85: | |
o.d2.d85 = v; | |
return; | |
case 86: | |
o.d2.d86 = v; | |
return; | |
case 87: | |
o.d2.d87 = v; | |
return; | |
case 88: | |
o.d2.d88 = v; | |
return; | |
case 89: | |
o.d2.d89 = v; | |
return; | |
case 90: | |
o.d2.d90 = v; | |
return; | |
case 91: | |
o.d2.d91 = v; | |
return; | |
case 92: | |
o.d2.d92 = v; | |
return; | |
case 93: | |
o.d2.d93 = v; | |
return; | |
case 94: | |
o.d2.d94 = v; | |
return; | |
case 95: | |
o.d2.d95 = v; | |
return; | |
case 96: | |
o.d2.d96 = v; | |
return; | |
case 97: | |
o.d2.d97 = v; | |
return; | |
case 98: | |
o.d2.d98 = v; | |
return; | |
case 99: | |
o.d2.d99 = v; | |
return; | |
case 100: | |
o.d2.d100 = v; | |
return; | |
case 101: | |
o.d2.d101 = v; | |
return; | |
case 102: | |
o.d2.d102 = v; | |
return; | |
case 103: | |
o.d2.d103 = v; | |
return; | |
case 104: | |
o.d2.d104 = v; | |
return; | |
case 105: | |
o.d2.d105 = v; | |
return; | |
case 106: | |
o.d2.d106 = v; | |
return; | |
case 107: | |
o.d2.d107 = v; | |
return; | |
default: | |
throw ("h$setField: setter not implemented for field: " + n); | |
} | |
} | |
function h$mkExportDyn(t, f) { | |
h$log("making dynamic export: " + t); | |
h$log("haskell fun: " + f + " " + h$collectProps(f)); | |
// fixme register things, global static data | |
var ff = function() { | |
h$log("running some haskell for you"); | |
return 12; | |
}; | |
return h$mkPtr(ff, 0); | |
} | |
function h$memchr(a_v, a_o, c, n) { | |
for(var i=0;i<n;i++) { | |
if(a_v.u8[a_o+i] === c) { | |
{ h$ret1 = (a_o+i); return (a_v); }; | |
} | |
} | |
{ h$ret1 = (0); return (null); }; | |
} | |
function h$strlen(a_v, a_o) { | |
var i=0; | |
while(true) { | |
if(a_v.u8[a_o+i] === 0) { return i; } | |
i++; | |
} | |
} | |
function h$newArray(len, e) { | |
var r = []; | |
r.__ghcjsArray = true; | |
r.m = 0; | |
if(e === null) e = r; | |
for(var i=0;i<len;i++) r[i] = e; | |
return r; | |
} | |
function h$roundUpToMultipleOf(n,m) { | |
var rem = n % m; | |
return rem === 0 ? n : n - rem + m; | |
} | |
function h$newByteArray(len) { | |
var len0 = Math.max(h$roundUpToMultipleOf(len, 8), 8); | |
var buf = new ArrayBuffer(len0); | |
return { buf: buf | |
, len: len | |
, i3: new Int32Array(buf) | |
, u8: new Uint8Array(buf) | |
, u1: new Uint16Array(buf) | |
, f3: new Float32Array(buf) | |
, f6: new Float64Array(buf) | |
, dv: new DataView(buf) | |
} | |
} | |
/* | |
Unboxed arrays in GHC use the ByteArray# and MutableByteArray# | |
primitives. In GHCJS these primitives are represented by an | |
object that contains a JavaScript ArrayBuffer and several views | |
(typed arrays) on that buffer. | |
Usually you can use GHCJS.Foreign.wrapBuffer and | |
GHCJS.Foreign.wrapMutableBuffer to do the conversion. If you need | |
more control or lower level acces, read on. | |
You can use h$wrapBuffer to wrap any JavaScript ArrayBuffer | |
into such an object, without copying the buffer. Since typed array | |
access is aligned, not all views are available | |
if the offset of the buffer is not a multiple of 8. | |
Since IO has kind * -> *, you cannot return IO ByteArray# | |
from a foreign import, even with the UnliftedFFITypes | |
extension. Return a JSVal instead and use unsafeCoerce | |
to convert it to a Data.Primitive.ByteArray.ByteArray or | |
Data.Primitive.ByteArray.MutableByteArray (primitive package) | |
and pattern match on the constructor to get the | |
primitive value out. | |
These types have the same runtime representation (a data | |
constructor with one regular (one JavaScript variable) | |
field) as a JSVal, so the conversion is safe, as long | |
as everything is fully evaluated. | |
*/ | |
function h$wrapBuffer(buf, unalignedOk, offset, length) { | |
if(!unalignedOk && offset && offset % 8 !== 0) { | |
throw ("h$wrapBuffer: offset not aligned:" + offset); | |
} | |
if(!buf || !(buf instanceof ArrayBuffer)) | |
throw "h$wrapBuffer: not an ArrayBuffer" | |
if(!offset) { offset = 0; } | |
if(!length || length < 0) { length = buf.byteLength - offset; } | |
return { buf: buf | |
, len: length | |
, i3: (offset%4) ? null : new Int32Array(buf, offset, length >> 2) | |
, u8: new Uint8Array(buf, offset, length) | |
, u1: (offset%2) ? null : new Uint16Array(buf, offset, length >> 1) | |
, f3: (offset%4) ? null : new Float32Array(buf, offset, length >> 2) | |
, f6: (offset%8) ? null : new Float64Array(buf, offset, length >> 3) | |
, dv: new DataView(buf, offset, length) | |
}; | |
} | |
/* | |
A StableName is represented as either a h$StableName object (for most heap objects) | |
or a number (for heap objects with unboxed representation) | |
Holding on to a StableName does not keep the original object alive. | |
*/ | |
var h$stableNameN = 1; | |
/** @constructor */ | |
function h$StableName(m) { | |
this.m = m; | |
this.s = null; | |
} | |
function h$makeStableName(x) { | |
if(typeof x === 'number') { | |
return x; | |
} else if(((typeof(x)==='object')&&(x).f === h$unbox_e)) { | |
return ((typeof(x) === 'number')?(x):(x).d1); | |
} else if(typeof x === 'object') { | |
if(typeof x.m !== 'object') { | |
x.m = new h$StableName(x.m); | |
} | |
return x.m; | |
} else { | |
throw new Error("h$makeStableName: invalid argument"); | |
} | |
} | |
function h$stableNameInt(s) { | |
if(typeof s === 'number') { | |
if(s!=s) return 999999; // NaN | |
var s0 = s|0; | |
if(s0 === s) return s0; | |
h$convertDouble[0] = s; | |
return h$convertInt[0] ^ h$convertInt[1]; | |
} else { | |
var x = s.s; | |
if(x === null) { | |
x = s.s = h$stableNameN = (h$stableNameN+1)|0; | |
} | |
return x; | |
} | |
} | |
function h$eqStableName(s1o,s2o) { | |
if(s1o!=s1o && s2o!=s2o) return 1; // NaN | |
return s1o === s2o ? 1 : 0; | |
} | |
function h$makeStablePtr(v) { | |
var buf = h$newByteArray(4); | |
buf.arr = [v]; | |
{ h$ret1 = (0); return (buf); }; | |
} | |
function h$hs_free_stable_ptr(stable) { | |
} | |
function h$malloc(n) { | |
{ h$ret1 = (0); return (h$newByteArray(n)); }; | |
} | |
function h$free() { | |
} | |
function h$memset() { | |
var buf_v, buf_off, chr, n; | |
buf_v = arguments[0]; | |
if(arguments.length == 4) { // Addr# | |
buf_off = arguments[1]; | |
chr = arguments[2]; | |
n = arguments[3]; | |
} else if(arguments.length == 3) { // ByteString# | |
buf_off = 0; | |
chr = arguments[1]; | |
n = arguments[2]; | |
} else { | |
throw("h$memset: unexpected argument") | |
} | |
var end = buf_off + n; | |
for(var i=buf_off;i<end;i++) { | |
buf_v.u8[i] = chr; | |
} | |
{ h$ret1 = (buf_off); return (buf_v); }; | |
} | |
function h$memcmp(a_v, a_o, b_v, b_o, n) { | |
for(var i=0;i<n;i++) { | |
var a = a_v.u8[a_o+i]; | |
var b = b_v.u8[b_o+i]; | |
var c = a-b; | |
if(c !== 0) { return c; } | |
} | |
return 0; | |
} | |
function h$memmove(a_v, a_o, b_v, b_o, n) { | |
if(n > 0) { | |
var tmp = new Uint8Array(b_v.buf.slice(b_o,b_o+n)); | |
for(var i=0;i<n;i++) { | |
a_v.u8[a_o+i] = tmp[i]; | |
} | |
} | |
{ h$ret1 = (a_o); return (a_v); }; | |
} | |
function h$mkPtr(v, o) { | |
return (h$c2(baseZCGHCziPtrziPtr_con_e, (v), (o))); | |
}; | |
function h$mkFunctionPtr(f) { | |
var d = h$newByteArray(4); | |
d.arr = [f]; | |
return d; | |
} | |
var h$freeHaskellFunctionPtr = function () { | |
} | |
// extra roots for the heap scanner: objects with root property | |
var h$extraRootsN = 0; | |
var h$extraRoots = new h$Set(); | |
function h$makeCallback(f, extraArgs, action) { | |
var args = extraArgs.slice(0); | |
args.unshift(action); | |
var c = function() { | |
return f.apply(this, args); | |
} | |
c._key = ++h$extraRootsN; | |
c.root = action; | |
h$extraRoots.add(c); | |
return c; | |
} | |
function h$makeCallbackApply(n, f, extraArgs, fun) { | |
var c; | |
if(n === 1) { | |
c = function(x) { | |
var args = extraArgs.slice(0); | |
var action = (h$c2(h$ap1_e,(fun),((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (x)))))); | |
args.unshift(action); | |
return f.apply(this, args); | |
} | |
} else if (n === 2) { | |
c = function(x,y) { | |
var args = extraArgs.slice(0); | |
var action = (h$c3(h$ap2_e,(fun),((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (x)))),((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (y)))))); | |
args.unshift(action); | |
return f.apply(this, args); | |
} | |
} else if (n === 3) { | |
c = function(x,y,z) { | |
var args = extraArgs.slice(0); | |
var action = (h$c2(h$ap1_e,((h$c3(h$ap2_e,(fun),((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (x)))),((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (y))))))),((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (z)))))); | |
args.unshift(action); | |
return f.apply(this, args); | |
} | |
} else { | |
throw new Error("h$makeCallbackApply: unsupported arity"); | |
} | |
c.root = fun; | |
c._key = ++h$extraRootsN; | |
h$extraRoots.add(c); | |
return c; | |
} | |
function h$retain(c) { | |
var k = c._key; | |
if(typeof k !== 'number') throw new Error("retained object does not have a key"); | |
if(k === -1) c._key = ++h$extraRootsN; | |
h$extraRoots.add(c); | |
} | |
function h$release(c) { | |
h$extraRoots.remove(c); | |
} | |
function h$isInstanceOf(o,c) { | |
return o instanceof c; | |
} | |
function h$getpagesize() { | |
return 4096; | |
} | |
var h$MAP_ANONYMOUS = 0x20; | |
function h$mmap(addr_d, addr_o, len, prot, flags, fd, offset1, offset2) { | |
if(flags & h$MAP_ANONYMOUS || fd === -1) { | |
{ h$ret1 = (0); return (h$newByteArray(len)); }; | |
} else { | |
throw "h$mmap: mapping a file is not yet supported"; | |
} | |
} | |
function h$mprotect(addr_d, addr_o, size, prot) { | |
return 0; | |
} | |
function h$munmap(addr_d, addr_o, size) { | |
if(addr_d && addr_o === 0 && size >= addr_d.len) { | |
addr_d.buf = null; | |
addr_d.i3 = null; | |
addr_d.u8 = null; | |
addr_d.u1 = null; | |
addr_d.f3 = null; | |
addr_d.f6 = null; | |
addr_d.dv = null; | |
} | |
return 0; | |
} | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
/* | |
Do garbage collection where the JavaScript GC doesn't suffice or needs some help: | |
- run finalizers for weak references | |
- find unreferenced CAFs and reset them (unless h$retainCAFs is set) | |
- shorten stacks that are mostly empty | |
- reset unused parts of stacks to null | |
- reset registers to null | |
- reset return variables to null | |
- throw exceptions to threads that are blocked on an unreachable MVar/STM transaction | |
- drop unnecessary references for selector thunks | |
The gc uses the .m field to store its mark in all the objects it marks. for heap objects, | |
the .m field is also used for other things, like stable names, the gc only changes | |
the two least significant bits for these. | |
The gc starts with all threads as roots in addition to callbacks passed to JavaScript | |
that that are retained. If you have custom JavaScript data structures that contain | |
Haskell heap object references, you can use extensible retention to find these | |
references and add thm to the work queue. h$registerExtensibleRetensionRoot(f) calls | |
f(currentMark) at the start of every gc, h$registerExtensibleRetention(f) calls f(o, currentMark) | |
for every unknown object found on the Haskell heap. | |
Extensible retention is a low-level mechanism and should typically only be used by | |
bindings that guarantee that the shape of the JS objects exactly matches what | |
the scanner expects. Care should be taken to make sure that the objects never | |
escape the reach of the scanner. | |
Having correct reachability information is important, even if you choose to turn off | |
features like weak references and deallocating CAFs in production, since it helps | |
debugging by providing the profiler with accurate data and by properly raising | |
exceptions when threads become blocked indefinitely, usually indicating a bug or | |
memory leak. | |
assumptions: | |
- all threads suspended, no active registers | |
- h$currentThread == null or at least unused: | |
1. all reachable threads must be in h$threads or h$blocked | |
2. no registers contain any usable value | |
notes: | |
- gc() may replace the stack of any thread, make sure to reload h$stack after gc() | |
*/ | |
/* | |
fixme, todo: | |
- mark posted exceptions to thread | |
*/ | |
// values defined in Gen2.ClosureInfo | |
// thread status | |
/* | |
* low-level heap object manipulation macros | |
*/ | |
// GHCJS.Prim.JSVal | |
// GHCJS.Prim.JSException | |
// Exception dictionary for JSException | |
// SomeException | |
// GHC.Ptr.Ptr | |
// GHC.Integer.GMP.Internals | |
// Data.Maybe.Maybe | |
// #define HS_NOTHING h$nothing | |
// Data.List | |
// Data.Text | |
// Data.Text.Lazy | |
// black holes | |
// can we skip the indirection for black holes? | |
// resumable thunks | |
// general deconstruction | |
// retrieve a numeric value that's possibly stored as an indirection | |
// generic lazy values | |
// generic data constructors and selectors | |
// unboxed tuple returns | |
// #define RETURN_UBX_TUP1(x) return x; | |
// these macros use a local mark variable | |
var h$gcMark = 2; // 2 or 3 (objects initialized with 0) | |
var h$retainCAFs = false; | |
var h$CAFs = []; | |
var h$CAFsReset = []; | |
// | |
var h$extensibleRetentionRoots = []; | |
var h$extensibleRetentionCallbacks = []; | |
/* | |
after registering an extensible extension root f, | |
f(currentMark) is called at the start of each gc invocation and is | |
expected to return an array with Haskell heap objects | |
to be treated as extra roots. | |
*/ | |
function h$registerExtensibleRetentionRoot(f) { | |
h$extensibleRetentionRoots.push(f); | |
} | |
function h$unregisterExtensibleRetentionRoot(f) { | |
h$extensibleRetentionRoots = h$extensibleRetentionRoots.filter(function(g) { return f !== g; }); | |
} | |
/* | |
after registering an extensible retention callback f, | |
f(o, currentMark) is called for every unknown object encountered on the | |
Haskell heap. f should return an array with found objects. If no objects | |
are found, f should return a boolean indicating whether the gc should skip | |
processing the objects with other extensible retention callbacks. | |
The gc may encounter the same object multiple times during the same scan, | |
so a callback should attempt to quickly return if the object has been scanned | |
already. | |
return value: | |
- array scan objects contained in array, do not call other extension callbacks | |
- true do not call other extension callbacks with this object | |
- false call other extension callbacks with this object | |
Use -DGHCJS_TRACE_GC_UNKNOWN to find the JavaScript objects reachable | |
(through JSVal) on the Haskell heap for which none of the registered | |
extensible retention callbacks has returned true or an array. | |
*/ | |
function h$registerExtensibleRetention(f) { | |
h$extensibleRetentionCallbacks.push(f); | |
} | |
function h$unregisterExtensibleRetention(f) { | |
h$extensibleRetentionCallbacks = h$extensibleRetentionCallbacks.filter(function(g) { return f !== g; }); | |
} | |
// check whether the object is marked by the latest gc | |
function h$isMarked(obj) { | |
return (typeof obj === 'object' || typeof obj === 'function') && | |
((typeof obj.m === 'number' && (obj.m & 3) === h$gcMark) || (obj.m && typeof obj.m === 'object' && obj.m.m === h$gcMark)); | |
} | |
// do a quick gc of a thread: | |
// - reset the stack (possibly shrinking storage for it) | |
// - reset all global data | |
// checks all known threads if t is null, but not h$currentThread | |
function h$gcQuick(t) { | |
if(h$currentThread !== null) throw "h$gcQuick: GC can only run when no thread is running"; | |
h$resetRegisters(); | |
h$resetResultVars(); | |
var i; | |
if(t !== null) { // reset specified threads | |
if(t instanceof h$Thread) { // only thread t | |
h$resetThread(t); | |
} else { // assume it's an array | |
for(var i=0;i<t.length;i++) h$resetThread(t[i]); | |
} | |
} else { // all threads, h$currentThread assumed unused | |
var nt, runnable = h$threads.iter(); | |
while((nt = runnable()) !== null) h$resetThread(nt); | |
var iter = h$blocked.iter(); | |
while((nt = iter.next()) !== null) h$resetThread(nt); | |
} | |
} | |
// run full marking for threads in h$blocked and h$threads, optionally t if t /= null | |
function h$gc(t) { | |
// fixme, should enable again later when proper CAF management | |
// and retention of the standard handles in GHCJSi work | |
if(h$isGHCJSi) return; | |
if(h$currentThread !== null) throw "h$gc: GC can only be run when no thread is running"; | |
; | |
h$resetRegisters(); | |
h$resetResultVars(); | |
h$gcMark = 5-h$gcMark; | |
var i; | |
for(i=h$extensibleRetentionRoots.length-1;i>=0;i--) { | |
var a = h$extensibleRetentionRoots[i](h$gcMark); | |
if(a) h$follow(a, a.length-1); | |
} | |
; | |
// mark al runnable threads and the running thread | |
if(t !== null) { | |
h$markThread(t); | |
h$resetThread(t); | |
} | |
var nt, runnable = h$threads.iter(); | |
while((nt = runnable()) !== null) { | |
h$markThread(nt); | |
h$resetThread(nt); | |
} | |
// some blocked threads are always considered reachable, mark them | |
// - delayed threads | |
// - threads blocked on async FFI | |
var iter = h$blocked.iter(); | |
while((nt = iter.next()) !== null) { | |
if(nt.delayed || | |
(nt.blockedOn instanceof h$MVar && nt.stack && nt.stack[nt.sp] === h$unboxFFIResult)) { | |
h$markThread(nt); | |
} | |
h$resetThread(nt); | |
} | |
; | |
iter = h$extraRoots.iter(); | |
while((nt = iter.next()) !== null) h$follow(nt.root); | |
// clean up threads waiting on unreachable synchronization primitives | |
h$resolveDeadlocks(); | |
// clean up unreachable weak refs | |
var toFinalize = h$markRetained(); | |
h$finalizeWeaks(toFinalize); | |
h$finalizeCAFs(); // restore all unreachable CAFs to unevaluated state | |
var now = Date.now(); | |
h$lastGc = now; | |
} | |
function h$markWeaks() { | |
var i, w, marked, mark = h$gcMark; | |
do { | |
marked = false; | |
for (i = 0; i < h$weakPointerList.length; ++i) { | |
w = h$weakPointerList[i]; | |
if (((w.keym.m & 3) === mark)) { | |
if (w.val !== null && !((typeof w.val.m === 'number' && (w.val.m & 3) === mark) || (typeof w.val.m === 'object' && ((w.val.m.m & 3) === mark)))) { | |
h$follow(w.val); | |
marked = true; | |
} | |
if (w.finalizer !== null && !((typeof w.finalizer.m === 'number' && (w.finalizer.m & 3) === mark) || (typeof w.finalizer.m === 'object' && ((w.finalizer.m.m & 3) === mark)))) { | |
h$follow(w.finalizer); | |
marked = true; | |
} | |
} | |
} | |
} while(marked); | |
} | |
function h$markRetained() { | |
var iter, marked, w, i, mark = h$gcMark; | |
var newList = []; | |
var toFinalize = []; | |
/* | |
2. Scan the Weak Pointer List. If a weak pointer object has a key that is | |
marked (i.e. reachable), then mark all heap reachable from its value | |
or its finalizer, and move the weak pointer object to a new list | |
*/ | |
do { | |
; | |
marked = false; | |
for (i = 0; i < h$weakPointerList.length; ++i) { | |
w = h$weakPointerList[i]; | |
if (w === null) { | |
// don't handle items deleted in earlier iteration | |
continue; | |
} | |
if (((w.keym.m & 3) === mark)) { | |
if (w.val !== null && !((typeof w.val.m === 'number' && (w.val.m & 3) === mark) || (typeof w.val.m === 'object' && ((w.val.m.m & 3) === mark)))) { | |
h$follow(w.val); | |
} | |
if (w.finalizer !== null && !((typeof w.finalizer.m === 'number' && (w.finalizer.m & 3) === mark) || (typeof w.finalizer.m === 'object' && ((w.finalizer.m.m & 3) === mark)))) { | |
h$follow(w.finalizer); | |
} | |
newList.push(w); | |
// instead of removing the item from the h$weakpointerList | |
// we set it to null if we push it to newList. | |
h$weakPointerList[i] = null; | |
marked = true; | |
} | |
} | |
/* | |
3. Repeat from step (2), until a complete scan of Weak Pointer List finds | |
no weak pointer object with a marked keym. | |
*/ | |
} while(marked); | |
/* | |
4. Scan the Weak Pointer List again. If the weak pointer object is reachable | |
then tombstone it. If the weak pointer object has a finalizer then move | |
it to the Finalization Pending List, and mark all the heap reachable | |
from the finalizer. If the finalizer refers to the key (and/or value), | |
this step will "resurrect" it. | |
*/ | |
for (i = 0; i < h$weakPointerList.length; ++i) { | |
w = h$weakPointerList[i]; | |
if (w === null) { | |
// don't handle items deleted in step 2 | |
continue; | |
} | |
; | |
if(w.val !== null) { | |
w.val = null; | |
} | |
if(w.finalizer !== null) { | |
if(!((typeof w.finalizer.m === 'number' && (w.finalizer.m & 3) === mark) || (typeof w.finalizer.m === 'object' && ((w.finalizer.m.m & 3) === mark)))) { | |
; | |
h$follow(w.finalizer); | |
} | |
toFinalize.push(w); | |
} | |
} | |
/* | |
5. The list accumulated in step (3) becomes the new Weak Pointer List. | |
Mark any unreachable weak pointer objects on this list as reachable. | |
*/ | |
h$weakPointerList = newList; | |
// marking the weak pointer objects as reachable is not necessary | |
return toFinalize; | |
} | |
function h$markThread(t) { | |
var mark = h$gcMark; | |
; | |
if(((typeof t.m === 'number' && (t.m & 3) === mark) || (typeof t.m === 'object' && ((t.m.m & 3) === mark)))) return; | |
h$follow(t); | |
} | |
// big object, not handled by 0..7 cases | |
// keep out of h$follow to prevent deopt | |
function h$followObjGen(c, work, w) { | |
work[w++] = c.d1;; | |
var d = c.d2; | |
for(var x in d) { | |
// if(d.hasOwnProperty(x)) { | |
work[w++] = d[x];; | |
// } | |
} | |
return w; | |
} | |
// follow all references in the object obj and mark them with the current mark | |
// if sp is a number, obj is assumed to be an array for which indices [0..sp] need | |
// to be followed (used for thread stacks) | |
function h$follow(obj, sp) { | |
var i, ii, iter, c, work, w; | |
; | |
var work, mark = h$gcMark; | |
if(typeof sp === 'number') { | |
work = obj.slice(0, sp+1); | |
w = sp + 1; | |
} else { | |
work = [obj]; | |
w = 1; | |
} | |
while(w > 0) { | |
; | |
c = work[--w]; | |
; | |
if(c !== null && c !== undefined && typeof c === 'object' && ((typeof c.m === 'number' && (c.m&3) !== mark) || (typeof c.m === 'object' && c.m !== null && typeof c.m.m === 'number' && (c.m.m&3) !== mark))) { | |
var doMark = false; | |
var cf = c.f; | |
; | |
if(typeof cf === 'function' && (typeof c.m === 'number' || typeof c.m === 'object')) { | |
; | |
// only change the two least significant bits for heap objects | |
if(typeof c.m === 'number') c.m = (c.m&-4)|mark; else c.m.m = (c.m.m & -4)|mark;; | |
// dynamic references | |
var d = c.d2; | |
switch(cf.size) { | |
case 0: break; | |
case 1: work[w++] = c.d1;; break; | |
case 2: { work[w++] = c.d1; work[w++] = d; }; break; | |
case 3: var d3=c.d2; { work[w++] = c.d1; work[w++] = d3.d1; work[w++] = d3.d2; }; break; | |
case 4: var d4=c.d2; { work[w++] = c.d1; work[w++] = d4.d1; work[w++] = d4.d2; work[w++] = d4.d3; }; break; | |
case 5: var d5=c.d2; { work[w++] = c.d1; work[w++] = d5.d1; work[w++] = d5.d2; work[w++] = d5.d3; }; work[w++] = d5.d4;; break; | |
case 6: var d6=c.d2; { work[w++] = c.d1; work[w++] = d6.d1; work[w++] = d6.d2; work[w++] = d6.d3; }; { work[w++] = d6.d4; work[w++] = d6.d5; }; break; | |
case 7: var d7=c.d2; { work[w++] = c.d1; work[w++] = d7.d1; work[w++] = d7.d2; work[w++] = d7.d3; }; { work[w++] = d7.d4; work[w++] = d7.d5; work[w++] = d7.d6; }; break; | |
case 8: var d8=c.d2; { work[w++] = c.d1; work[w++] = d8.d1; work[w++] = d8.d2; work[w++] = d8.d3; }; { work[w++] = d8.d4; work[w++] = d8.d5; work[w++] = d8.d6; work[w++] = d8.d7; }; break; | |
case 9: var d9=c.d2; { work[w++] = c.d1; work[w++] = d9.d1; work[w++] = d9.d2; work[w++] = d9.d3; }; { work[w++] = d9.d4; work[w++] = d9.d5; work[w++] = d9.d6; work[w++] = d9.d7; }; work[w++] = d9.d8;; break; | |
case 10: var d10=c.d2; { work[w++] = c.d1; work[w++] = d10.d1; work[w++] = d10.d2; work[w++] = d10.d3; }; { work[w++] = d10.d4; work[w++] = d10.d5; work[w++] = d10.d6; work[w++] = d10.d7; }; { work[w++] = d10.d8; work[w++] = d10.d9; }; break; | |
case 11: var d11=c.d2; { work[w++] = c.d1; work[w++] = d11.d1; work[w++] = d11.d2; work[w++] = d11.d3; }; { work[w++] = d11.d4; work[w++] = d11.d5; work[w++] = d11.d6; work[w++] = d11.d7; }; { work[w++] = d11.d8; work[w++] = d11.d9; work[w++] = d11.d10; }; break; | |
case 12: var d12=c.d2; { work[w++] = c.d1; work[w++] = d12.d1; work[w++] = d12.d2; work[w++] = d12.d3; }; { work[w++] = d12.d4; work[w++] = d12.d5; work[w++] = d12.d6; work[w++] = d12.d7; }; { work[w++] = d12.d8; work[w++] = d12.d9; work[w++] = d12.d10; work[w++] = d12.d11; }; break; | |
default: w = h$followObjGen(c,work,w); | |
} | |
// static references | |
var s = cf.s; | |
if(s !== null) { | |
; | |
for(var i=0;i<s.length;i++) work[w++] = s[i];; | |
} | |
} else if(c instanceof h$Weak) { | |
if(typeof c.m === 'number') c.m = (c.m&-4)|mark; else c.m.m = (c.m.m & -4)|mark;; | |
} else if(c instanceof h$MVar) { | |
; | |
if(typeof c.m === 'number') c.m = (c.m&-4)|mark; else c.m.m = (c.m.m & -4)|mark;; | |
iter = c.writers.iter(); | |
while((ii = iter()) !== null) { | |
work[w++] = ii[1];; // value | |
work[w++] = ii[0];; // thread | |
} | |
iter = c.readers.iter(); | |
while((ii = iter()) !== null) { | |
work[w++] = ii;; | |
} | |
if(c.waiters) { | |
for(i=c.waiters.length-1;i>=0;i--) { | |
work[w++] = c.waiters[i];; | |
} | |
} | |
if(c.val !== null && !((typeof c.val.m === 'number' && (c.val.m & 3) === mark) || (typeof c.val.m === 'object' && ((c.val.m.m & 3) === mark)))) work[w++] = c.val;; | |
} else if(c instanceof h$MutVar) { | |
; | |
if(typeof c.m === 'number') c.m = (c.m&-4)|mark; else c.m.m = (c.m.m & -4)|mark;; | |
work[w++] = c.val;; | |
} else if(c instanceof h$TVar) { | |
; | |
if(typeof c.m === 'number') c.m = (c.m&-4)|mark; else c.m.m = (c.m.m & -4)|mark;; | |
work[w++] = c.val;; | |
iter = c.blocked.iter(); | |
while((ii = iter.next()) !== null) { | |
work[w++] = ii;; | |
} | |
if(c.invariants) { | |
iter = c.invariants.iter(); | |
while((ii = iter.next()) !== null) { | |
work[w++] = ii;; | |
} | |
} | |
} else if(c instanceof h$Thread) { | |
; | |
if(typeof c.m === 'number') c.m = (c.m&-4)|mark; else c.m.m = (c.m.m & -4)|mark;; | |
if(c.stack) { | |
for(i=c.sp;i>=0;i--) { | |
work[w++] = c.stack[i];; | |
} | |
} | |
for(i=0;i<c.excep.length;i++) { | |
work[w++] = c.excep[i];; | |
} | |
} else if(c instanceof h$Transaction) { | |
// - the accessed TVar values don't need to be marked | |
// - parents are also on the stack, so they should've been marked already | |
; | |
if(typeof c.m === 'number') c.m = (c.m&-4)|mark; else c.m.m = (c.m.m & -4)|mark;; | |
for(i=c.invariants.length-1;i>=0;i--) { | |
work[w++] = c.invariants[i].action;; | |
} | |
work[w++] = c.action;; | |
iter = c.tvars.iter(); | |
while((ii = iter.nextVal()) !== null) { | |
work[w++] = ii.val;; | |
} | |
} else if(c instanceof Array && c.__ghcjsArray) { | |
// only for Haskell arrays with lifted values | |
if(typeof c.m === 'number') c.m = (c.m&-4)|mark; else c.m.m = (c.m.m & -4)|mark;; | |
; | |
for(i=0;i<c.length;i++) { | |
var x = c[i]; | |
if(typeof x === 'object' && x !== null && !((typeof x.m === 'number' && (x.m & 3) === mark) || (typeof x.m === 'object' && ((x.m.m & 3) === mark)))) { | |
work[w++] = x;; | |
} | |
} | |
} else if(typeof c === 'object') { | |
; | |
for(i=h$extensibleRetentionCallbacks.length-1;i>=0;i--) { | |
var x = h$extensibleRetentionCallbacks[i](c, mark); | |
if(x === false) continue; | |
if(x !== true) { | |
for(j=x.length-1;j>=0;j--) { | |
work[w++] = x[j];; | |
} | |
} | |
break; | |
} | |
} // otherwise: not an object, no followable values | |
} | |
} | |
; | |
} | |
// resetThread clears the stack above the stack pointer | |
// and shortens the stack array if there is too much | |
// unused space | |
function h$resetThread(t) { | |
var stack = t.stack; | |
if(!stack) return; | |
var sp = t.sp; | |
if(stack.length - sp > sp && stack.length > 100) { | |
t.stack = t.stack.slice(0,sp+1); | |
} else { | |
for(var i=sp+1;i<stack.length;i++) { | |
stack[i] = null; | |
} | |
} | |
; | |
} | |
/* | |
Post exceptions to all threads that are waiting on an unreachable synchronization | |
object and haven't been marked reachable themselves. | |
All woken up threads are marked. | |
*/ | |
function h$resolveDeadlocks() { | |
; | |
var kill, t, iter, bo, mark = h$gcMark; | |
do { | |
h$markWeaks(); | |
// deal with unreachable blocked threads: kill an unreachable thread and restart the process | |
kill = null; | |
iter = h$blocked.iter(); | |
while((t = iter.next()) !== null) { | |
// we're done if the thread is already reachable | |
if(((typeof t.m === 'number' && (t.m & 3) === mark) || (typeof t.m === 'object' && ((t.m.m & 3) === mark)))) continue; | |
// check what we're blocked on | |
bo = t.blockedOn; | |
if(bo instanceof h$MVar) { | |
// blocked on MVar | |
if(bo.m === mark) throw "assertion failed: thread should have been marked"; | |
// MVar unreachable | |
kill = h$ghcjszmprimZCGHCJSziPrimziInternalziblockedIndefinitelyOnMVar; | |
break; | |
} else if(t.blockedOn instanceof h$TVarsWaiting) { | |
// blocked in STM transaction | |
kill = h$ghcjszmprimZCGHCJSziPrimziInternalziblockedIndefinitelyOnSTM; | |
break; | |
} else { | |
// blocked on something else, we can't do anything | |
} | |
} | |
if(kill) { | |
h$killThread(t, kill); | |
h$markThread(t); | |
} | |
} while(kill); | |
} | |
// register a CAF (after initialising the heap object) | |
function h$addCAF(o) { | |
h$CAFs.push(o); | |
h$CAFsReset.push([o.f, o.d1, o.d2]); | |
} | |
// reset unreferenced CAFs to their initial value | |
function h$finalizeCAFs() { | |
if(h$retainCAFs) return; | |
var mark = h$gcMark; | |
for(var i=0;i<h$CAFs.length;i++) { | |
var c = h$CAFs[i]; | |
if(c.m & 3 !== mark) { | |
var cr = h$CAFsReset[i]; | |
if(c.f !== cr[0]) { // has been updated, reset it | |
; | |
c.f = cr[0]; | |
c.d1 = cr[1]; | |
c.d2 = cr[2]; | |
} | |
} | |
} | |
; | |
} | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
// values defined in Gen2.ClosureInfo | |
// thread status | |
/* | |
* low-level heap object manipulation macros | |
*/ | |
// GHCJS.Prim.JSVal | |
// GHCJS.Prim.JSException | |
// Exception dictionary for JSException | |
// SomeException | |
// GHC.Ptr.Ptr | |
// GHC.Integer.GMP.Internals | |
// Data.Maybe.Maybe | |
// #define HS_NOTHING h$nothing | |
// Data.List | |
// Data.Text | |
// Data.Text.Lazy | |
// black holes | |
// can we skip the indirection for black holes? | |
// resumable thunks | |
// general deconstruction | |
// retrieve a numeric value that's possibly stored as an indirection | |
// generic lazy values | |
// generic data constructors and selectors | |
// unboxed tuple returns | |
// #define RETURN_UBX_TUP1(x) return x; | |
/* include/HsBaseConfig.h. Generated from HsBaseConfig.h.in by configure. */ | |
/* include/HsBaseConfig.h.in. Generated from configure.ac by autoheader. */ | |
/* The value of E2BIG. */ | |
/* The value of EACCES. */ | |
/* The value of EADDRINUSE. */ | |
/* The value of EADDRNOTAVAIL. */ | |
/* The value of EADV. */ | |
/* The value of EAFNOSUPPORT. */ | |
/* The value of EAGAIN. */ | |
/* The value of EALREADY. */ | |
/* The value of EBADF. */ | |
/* The value of EBADMSG. */ | |
/* The value of EBADRPC. */ | |
/* The value of EBUSY. */ | |
/* The value of ECHILD. */ | |
/* The value of ECOMM. */ | |
/* The value of ECONNABORTED. */ | |
/* The value of ECONNREFUSED. */ | |
/* The value of ECONNRESET. */ | |
/* The value of EDEADLK. */ | |
/* The value of EDESTADDRREQ. */ | |
/* The value of EDIRTY. */ | |
/* The value of EDOM. */ | |
/* The value of EDQUOT. */ | |
/* The value of EEXIST. */ | |
/* The value of EFAULT. */ | |
/* The value of EFBIG. */ | |
/* The value of EFTYPE. */ | |
/* The value of EHOSTDOWN. */ | |
/* The value of EHOSTUNREACH. */ | |
/* The value of EIDRM. */ | |
/* The value of EILSEQ. */ | |
/* The value of EINPROGRESS. */ | |
/* The value of EINTR. */ | |
/* The value of EINVAL. */ | |
/* The value of EIO. */ | |
/* The value of EISCONN. */ | |
/* The value of EISDIR. */ | |
/* The value of ELOOP. */ | |
/* The value of EMFILE. */ | |
/* The value of EMLINK. */ | |
/* The value of EMSGSIZE. */ | |
/* The value of EMULTIHOP. */ | |
/* The value of ENAMETOOLONG. */ | |
/* The value of ENETDOWN. */ | |
/* The value of ENETRESET. */ | |
/* The value of ENETUNREACH. */ | |
/* The value of ENFILE. */ | |
/* The value of ENOBUFS. */ | |
/* The value of ENOCIGAR. */ | |
/* The value of ENODATA. */ | |
/* The value of ENODEV. */ | |
/* The value of ENOENT. */ | |
/* The value of ENOEXEC. */ | |
/* The value of ENOLCK. */ | |
/* The value of ENOLINK. */ | |
/* The value of ENOMEM. */ | |
/* The value of ENOMSG. */ | |
/* The value of ENONET. */ | |
/* The value of ENOPROTOOPT. */ | |
/* The value of ENOSPC. */ | |
/* The value of ENOSR. */ | |
/* The value of ENOSTR. */ | |
/* The value of ENOSYS. */ | |
/* The value of ENOTBLK. */ | |
/* The value of ENOTCONN. */ | |
/* The value of ENOTDIR. */ | |
/* The value of ENOTEMPTY. */ | |
/* The value of ENOTSOCK. */ | |
/* The value of ENOTSUP. */ | |
/* The value of ENOTTY. */ | |
/* The value of ENXIO. */ | |
/* The value of EOPNOTSUPP. */ | |
/* The value of EPERM. */ | |
/* The value of EPFNOSUPPORT. */ | |
/* The value of EPIPE. */ | |
/* The value of EPROCLIM. */ | |
/* The value of EPROCUNAVAIL. */ | |
/* The value of EPROGMISMATCH. */ | |
/* The value of EPROGUNAVAIL. */ | |
/* The value of EPROTO. */ | |
/* The value of EPROTONOSUPPORT. */ | |
/* The value of EPROTOTYPE. */ | |
/* The value of ERANGE. */ | |
/* The value of EREMCHG. */ | |
/* The value of EREMOTE. */ | |
/* The value of EROFS. */ | |
/* The value of ERPCMISMATCH. */ | |
/* The value of ERREMOTE. */ | |
/* The value of ESHUTDOWN. */ | |
/* The value of ESOCKTNOSUPPORT. */ | |
/* The value of ESPIPE. */ | |
/* The value of ESRCH. */ | |
/* The value of ESRMNT. */ | |
/* The value of ESTALE. */ | |
/* The value of ETIME. */ | |
/* The value of ETIMEDOUT. */ | |
/* The value of ETOOMANYREFS. */ | |
/* The value of ETXTBSY. */ | |
/* The value of EUSERS. */ | |
/* The value of EWOULDBLOCK. */ | |
/* The value of EXDEV. */ | |
/* The value of O_BINARY. */ | |
/* The value of SIGINT. */ | |
/* Define to 1 if you have the `clock_gettime' function. */ | |
/* #undef HAVE_CLOCK_GETTIME */ | |
/* Define to 1 if you have the <ctype.h> header file. */ | |
/* Define if you have epoll support. */ | |
/* #undef HAVE_EPOLL */ | |
/* Define to 1 if you have the `epoll_ctl' function. */ | |
/* #undef HAVE_EPOLL_CTL */ | |
/* Define to 1 if you have the <errno.h> header file. */ | |
/* Define to 1 if you have the `eventfd' function. */ | |
/* #undef HAVE_EVENTFD */ | |
/* Define to 1 if you have the <fcntl.h> header file. */ | |
/* Define to 1 if you have the `ftruncate' function. */ | |
/* Define to 1 if you have the `getclock' function. */ | |
/* #undef HAVE_GETCLOCK */ | |
/* Define to 1 if you have the `getrusage' function. */ | |
/* Define to 1 if you have the <inttypes.h> header file. */ | |
/* Define to 1 if you have the `iswspace' function. */ | |
/* Define to 1 if you have the `kevent' function. */ | |
/* Define to 1 if you have the `kevent64' function. */ | |
/* Define if you have kqueue support. */ | |
/* Define to 1 if you have the <langinfo.h> header file. */ | |
/* Define to 1 if you have libcharset. */ | |
/* Define to 1 if you have the `rt' library (-lrt). */ | |
/* #undef HAVE_LIBRT */ | |
/* Define to 1 if you have the <limits.h> header file. */ | |
/* Define to 1 if the system has the type `long long'. */ | |
/* Define to 1 if you have the `lstat' function. */ | |
/* Define to 1 if you have the <memory.h> header file. */ | |
/* Define if you have poll support. */ | |
/* Define to 1 if you have the <poll.h> header file. */ | |
/* Define to 1 if you have the <signal.h> header file. */ | |
/* Define to 1 if you have the <stdint.h> header file. */ | |
/* Define to 1 if you have the <stdlib.h> header file. */ | |
/* Define to 1 if you have the <strings.h> header file. */ | |
/* Define to 1 if you have the <string.h> header file. */ | |
/* Define to 1 if you have the <sys/epoll.h> header file. */ | |
/* #undef HAVE_SYS_EPOLL_H */ | |
/* Define to 1 if you have the <sys/eventfd.h> header file. */ | |
/* #undef HAVE_SYS_EVENTFD_H */ | |
/* Define to 1 if you have the <sys/event.h> header file. */ | |
/* Define to 1 if you have the <sys/resource.h> header file. */ | |
/* Define to 1 if you have the <sys/select.h> header file. */ | |
/* Define to 1 if you have the <sys/stat.h> header file. */ | |
/* Define to 1 if you have the <sys/syscall.h> header file. */ | |
/* Define to 1 if you have the <sys/timeb.h> header file. */ | |
/* Define to 1 if you have the <sys/timers.h> header file. */ | |
/* #undef HAVE_SYS_TIMERS_H */ | |
/* Define to 1 if you have the <sys/times.h> header file. */ | |
/* Define to 1 if you have the <sys/time.h> header file. */ | |
/* Define to 1 if you have the <sys/types.h> header file. */ | |
/* Define to 1 if you have the <sys/utsname.h> header file. */ | |
/* Define to 1 if you have the <sys/wait.h> header file. */ | |
/* Define to 1 if you have the <termios.h> header file. */ | |
/* Define to 1 if you have the `times' function. */ | |
/* Define to 1 if you have the <time.h> header file. */ | |
/* Define to 1 if you have the <unistd.h> header file. */ | |
/* Define to 1 if you have the <utime.h> header file. */ | |
/* Define to 1 if you have the <wctype.h> header file. */ | |
/* Define to 1 if you have the <windows.h> header file. */ | |
/* #undef HAVE_WINDOWS_H */ | |
/* Define to 1 if you have the <winsock.h> header file. */ | |
/* #undef HAVE_WINSOCK_H */ | |
/* Define to 1 if you have the `_chsize' function. */ | |
/* #undef HAVE__CHSIZE */ | |
/* Define to Haskell type for cc_t */ | |
/* Define to Haskell type for char */ | |
/* Define to Haskell type for clock_t */ | |
/* Define to Haskell type for dev_t */ | |
/* Define to Haskell type for double */ | |
/* Define to Haskell type for float */ | |
/* Define to Haskell type for gid_t */ | |
/* Define to Haskell type for ino_t */ | |
/* Define to Haskell type for int */ | |
/* Define to Haskell type for intmax_t */ | |
/* Define to Haskell type for intptr_t */ | |
/* Define to Haskell type for long */ | |
/* Define to Haskell type for long long */ | |
/* Define to Haskell type for mode_t */ | |
/* Define to Haskell type for nlink_t */ | |
/* Define to Haskell type for off_t */ | |
/* Define to Haskell type for pid_t */ | |
/* Define to Haskell type for ptrdiff_t */ | |
/* Define to Haskell type for rlim_t */ | |
/* Define to Haskell type for short */ | |
/* Define to Haskell type for signed char */ | |
/* Define to Haskell type for sig_atomic_t */ | |
/* Define to Haskell type for size_t */ | |
/* Define to Haskell type for speed_t */ | |
/* Define to Haskell type for ssize_t */ | |
/* Define to Haskell type for suseconds_t */ | |
/* Define to Haskell type for tcflag_t */ | |
/* Define to Haskell type for time_t */ | |
/* Define to Haskell type for uid_t */ | |
/* Define to Haskell type for uintmax_t */ | |
/* Define to Haskell type for uintptr_t */ | |
/* Define to Haskell type for unsigned char */ | |
/* Define to Haskell type for unsigned int */ | |
/* Define to Haskell type for unsigned long */ | |
/* Define to Haskell type for unsigned long long */ | |
/* Define to Haskell type for unsigned short */ | |
/* Define to Haskell type for useconds_t */ | |
/* Define to Haskell type for wchar_t */ | |
/* Define to the address where bug reports for this package should be sent. */ | |
/* Define to the full name of this package. */ | |
/* Define to the full name and version of this package. */ | |
/* Define to the one symbol short name of this package. */ | |
/* Define to the home page for this package. */ | |
/* Define to the version of this package. */ | |
/* The size of `kev.filter', as computed by sizeof. */ | |
/* The size of `kev.flags', as computed by sizeof. */ | |
/* The size of `struct MD5Context', as computed by sizeof. */ | |
/* Define to 1 if you have the ANSI C header files. */ | |
/* Number of bits in a file offset, on hosts where this is settable. */ | |
/* #undef _FILE_OFFSET_BITS */ | |
/* Define for large files, on AIX-style hosts. */ | |
/* #undef _LARGE_FILES */ | |
var h$errno = 0; | |
function h$__hscore_get_errno() { | |
; | |
return h$errno; | |
} | |
function h$unsupported(status, c) { | |
h$errno = 12456; | |
if(c) c(status); | |
return status; | |
} | |
function h$strerror(err) { | |
if(err === 12456) { | |
{ h$ret1 = (0); return (h$encodeUtf8("operation unsupported on this platform")); }; | |
} | |
{ h$ret1 = (0); return (h$encodeUtf8(h$errorStrs[err] || "unknown error")); }; | |
} | |
function h$setErrno(e) { | |
; | |
var es = e.toString(); | |
var getErr = function() { | |
if(es.indexOf('ENOTDIR') !== -1) return 20; | |
if(es.indexOf('ENOENT') !== -1) return 2; | |
if(es.indexOf('EEXIST') !== -1) return 17; | |
if(es.indexOf('ENETUNREACH') !== -1) return 22; // fixme | |
if(es.indexOf('EPERM') !== -1) return 1; | |
if(es.indexOf('EMFILE') !== -1) return 24; | |
if(es.indexOf('EPIPE') !== -1) return 32; | |
if(es.indexOf('EAGAIN') !== -1) return 35; | |
if(es.indexOf('Bad argument') !== -1) return 2; // fixme? | |
throw ("setErrno not yet implemented: " + e); | |
} | |
h$errno = getErr(); | |
} | |
var h$errorStrs = { 7: "too big" | |
, CONST_EACCESS: "no access" | |
, 22: "invalid" | |
, 9: "bad file descriptor" | |
, 20: "not a directory" | |
, 2: "no such file or directory" | |
, 1: "operation not permitted" | |
, 17: "file exists" | |
, 24: "too many open files" | |
, 32: "broken pipe" | |
, 35: "resource temporarily unavailable" | |
} | |
function h$handleErrno(r_err, f) { | |
try { | |
return f(); | |
} catch(e) { | |
h$setErrno(e); | |
return r_err; | |
} | |
} | |
function h$handleErrnoS(r_err, r_success, f) { | |
try { | |
f(); | |
return r_success; | |
} catch(e) { | |
h$setErrno(e); | |
return r_err; | |
} | |
} | |
function h$handleErrnoC(err, r_err, r_success, c) { | |
if(err) { | |
h$setErrno(err); | |
c(r_err); | |
} else { | |
c(r_success); | |
} | |
} | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
function h$MD5Init(ctx, ctx_off) { | |
if(!ctx.arr) { ctx.arr = []; } | |
ctx.arr[ctx_off] = new goog.crypt.Md5(); | |
} | |
var h$__hsbase_MD5Init = h$MD5Init; | |
function h$MD5Update(ctx, ctx_off, data, data_off, len) { | |
var arr = new Uint8Array(data.buf, data_off); | |
ctx.arr[ctx_off].update(arr, len); | |
} | |
var h$__hsbase_MD5Update = h$MD5Update; | |
function h$MD5Final(dst, dst_off, ctx, ctx_off) { | |
var digest = ctx.arr[ctx_off].digest(); | |
for(var i=0;i<16;i++) { | |
dst.u8[dst_off+i] = digest[i]; | |
} | |
} | |
var h$__hsbase_MD5Final = h$MD5Final; | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
// values defined in Gen2.ClosureInfo | |
// thread status | |
/* | |
* low-level heap object manipulation macros | |
*/ | |
// GHCJS.Prim.JSVal | |
// GHCJS.Prim.JSException | |
// Exception dictionary for JSException | |
// SomeException | |
// GHC.Ptr.Ptr | |
// GHC.Integer.GMP.Internals | |
// Data.Maybe.Maybe | |
// #define HS_NOTHING h$nothing | |
// Data.List | |
// Data.Text | |
// Data.Text.Lazy | |
// black holes | |
// can we skip the indirection for black holes? | |
// resumable thunks | |
// general deconstruction | |
// retrieve a numeric value that's possibly stored as an indirection | |
// generic lazy values | |
// generic data constructors and selectors | |
// unboxed tuple returns | |
// #define RETURN_UBX_TUP1(x) return x; | |
// #define GHCJS_TRACE_ARITH 1 | |
function h$hs_eqWord64(a1,a2,b1,b2) { | |
return (a1===b1 && a2===b2) ? 1 : 0; | |
} | |
function h$hs_neWord64(a1,a2,b1,b2) { | |
return (a1 !== b1 || a2 !== b2) ? 1 : 0; | |
} | |
function h$hs_word64ToWord(a1,a2) { | |
return a2; | |
} | |
function h$hs_wordToWord64(w) { | |
{ h$ret1 = (w); return (0); }; | |
} | |
function h$hs_intToInt64(a) { | |
{ h$ret1 = (a); return ((a < 0) ? -1 : 0); }; | |
} | |
function h$hs_int64ToWord64(a1,a2) { | |
{ h$ret1 = (a2); return (a1); }; | |
} | |
function h$hs_word64ToInt64(a1,a2) { | |
{ h$ret1 = (a2); return (a1); }; | |
} | |
function h$hs_int64ToInt(a1,a2) { | |
return a2; | |
} | |
function h$hs_negateInt64(a1,a2) { | |
var c = goog.math.Long.fromBits(a2,a1).negate(); | |
{ h$ret1 = (c.getLowBits()); return (c.getHighBits()); }; | |
} | |
function h$hs_not64(a1,a2) { | |
{ h$ret1 = (~a2); return (~a1); }; | |
} | |
function h$hs_xor64(a1,a2,b1,b2) { | |
{ h$ret1 = (a2 ^ b2); return (a1 ^ b1); }; | |
} | |
function h$hs_and64(a1,a2,b1,b2) { | |
{ h$ret1 = (a2 & b2); return (a1 & b1); }; | |
} | |
function h$hs_or64(a1,a2,b1,b2) { | |
{ h$ret1 = (a2 | b2); return (a1 | b1); }; | |
} | |
function h$hs_eqInt64(a1,a2,b1,b2) { | |
return (a1 === b1 && a2 === b2) ? 1 : 0; | |
} | |
function h$hs_neInt64(a1,a2,b1,b2) { | |
return (a1 !== b1 || a2 !== b2) ? 1 : 0; | |
} | |
function h$hs_leInt64(a1,a2,b1,b2) { | |
if(a1 === b1) { | |
var a2s = a2 >>> 1; | |
var b2s = b2 >>> 1; | |
return (a2s < b2s || (a2s === b2s && ((a2&1) <= (b2&1)))) ? 1 : 0; | |
} else { | |
return (a1 < b1) ? 1 : 0; | |
} | |
} | |
function h$hs_ltInt64(a1,a2,b1,b2) { | |
if(a1 === b1) { | |
var a2s = a2 >>> 1; | |
var b2s = b2 >>> 1; | |
return (a2s < b2s || (a2s === b2s && ((a2&1) < (b2&1)))) ? 1 : 0; | |
} else { | |
return (a1 < b1) ? 1 : 0; | |
} | |
} | |
function h$hs_geInt64(a1,a2,b1,b2) { | |
if(a1 === b1) { | |
var a2s = a2 >>> 1; | |
var b2s = b2 >>> 1; | |
return (a2s > b2s || (a2s === b2s && ((a2&1) >= (b2&1)))) ? 1 : 0; | |
} else { | |
return (a1 > b1) ? 1 : 0; | |
} | |
} | |
function h$hs_gtInt64(a1,a2,b1,b2) { | |
if(a1 === b1) { | |
var a2s = a2 >>> 1; | |
var b2s = b2 >>> 1; | |
return (a2s > b2s || (a2s === b2s && ((a2&1) > (b2&1)))) ? 1 : 0; | |
} else { | |
return (a1 > b1) ? 1 : 0; | |
} | |
} | |
function h$hs_quotWord64(a1,a2,b1,b2) { | |
// var a = h$ghcjsbn_mkBigNat_ww(a1,a2); // bigFromWord64(a1,a2); | |
// var b = h$ghcjsbn_mkBigNat_ww(b1,b2); // bigFromWord64(b1,b2); | |
var q = h$ghcjsbn_quot_bb(h$ghcjsbn_mkBigNat_ww(a1,a2), | |
h$ghcjsbn_mkBigNat_ww(b1,b2)); | |
return h$ghcjsbn_toWord64_b(q); // this should return the tuple | |
//RETURN_UBX_TUP2(h$ghcjsbn_toWord_b(h$ghcjsbn_shr_b(q, 32)) | |
// a.divide(b); | |
// RETURN_UBX_TUP2(c.shiftRight(32).intValue(), c.intValue()); | |
} | |
function h$hs_timesInt64(a1,a2,b1,b2) { | |
var c = goog.math.Long.fromBits(a2,a1).multiply(goog.math.Long.fromBits(b2,b1)); | |
{ h$ret1 = (c.getLowBits()); return (c.getHighBits()); }; | |
} | |
function h$hs_quotInt64(a1,a2,b1,b2) { | |
var c = goog.math.Long.fromBits(a2,a1).div(goog.math.Long.fromBits(b2,b1)); | |
{ h$ret1 = (c.getLowBits()); return (c.getHighBits()); }; | |
} | |
function h$hs_remInt64(a1,a2,b1,b2) { | |
var c = goog.math.Long.fromBits(a2,a1).modulo(goog.math.Long.fromBits(b2,b1)); | |
{ h$ret1 = (c.getLowBits()); return (c.getHighBits()); }; | |
} | |
function h$hs_plusInt64(a1,a2,b1,b2) { | |
var c = goog.math.Long.fromBits(a2,a1).add(goog.math.Long.fromBits(b2,b1)); | |
{ h$ret1 = (c.getLowBits()); return (c.getHighBits()); }; | |
} | |
function h$hs_minusInt64(a1,a2,b1,b2) { | |
var c = goog.math.Long.fromBits(a2,a1).subtract(goog.math.Long.fromBits(b2,b1)); | |
{ h$ret1 = (c.getLowBits()); return (c.getHighBits()); }; | |
} | |
function h$hs_leWord64(a1,a2,b1,b2) { | |
if(a1 === b1) { | |
var a2s = a2 >>> 1; | |
var b2s = b2 >>> 1; | |
return (a2s < b2s || (a2s === b2s && ((a2&1) <= (b2&1)))) ? 1 : 0; | |
} else { | |
var a1s = a1 >>> 1; | |
var b1s = b1 >>> 1; | |
return (a1s < b1s || (a1s === b1s && ((a1&1) <= (b1&1)))) ? 1 : 0; | |
} | |
} | |
function h$hs_ltWord64(a1,a2,b1,b2) { | |
if(a1 === b1) { | |
var a2s = a2 >>> 1; | |
var b2s = b2 >>> 1; | |
return (a2s < b2s || (a2s === b2s && ((a2&1) < (b2&1)))) ? 1 : 0; | |
} else { | |
var a1s = a1 >>> 1; | |
var b1s = b1 >>> 1; | |
return (a1s < b1s || (a1s === b1s && ((a1&1) < (b1&1)))) ? 1 : 0; | |
} | |
} | |
function h$hs_geWord64(a1,a2,b1,b2) { | |
if(a1 === b1) { | |
var a2s = a2 >>> 1; | |
var b2s = b2 >>> 1; | |
return (a2s > b2s || (a2s === b2s && ((a2&1) >= (b2&1)))) ? 1 : 0; | |
} else { | |
var a1s = a1 >>> 1; | |
var b1s = b1 >>> 1; | |
return (a1s > b1s || (a1s === b1s && ((a1&1) >= (b1&1)))) ? 1 : 0; | |
} | |
} | |
function h$hs_gtWord64(a1,a2,b1,b2) { | |
if(a1 === b1) { | |
var a2s = a2 >>> 1; | |
var b2s = b2 >>> 1; | |
return (a2s > b2s || (a2s === b2s && ((a2&1) > (b2&1)))) ? 1 : 0; | |
} else { | |
var a1s = a1 >>> 1; | |
var b1s = b1 >>> 1; | |
return (a1s > b1s || (a1s === b1s && ((a1&1) > (b1&1)))) ? 1 : 0; | |
} | |
} | |
function h$hs_remWord64(a1,a2,b1,b2) { | |
/* var a = h$bigFromWord64(a1,a2); | |
var b = h$bigFromWord64(b1,b2); | |
var c = a.mod(b); */ | |
var r = h$ghcjsbn_rem_bb(h$ghcjsbn_mkBigNat_ww(a1,a2) | |
,h$ghcjsbn_mkBigNat_ww(b1,b2)); | |
return h$ghcjsbn_toWord64_b(r); | |
// RETURN_UBX_TUP2(c.shiftRight(32).intValue(), c.intValue()); | |
} | |
function h$hs_uncheckedIShiftL64(a1,a2,n) { | |
; | |
var num = new goog.math.Long(a2,a1).shiftLeft(n); | |
; | |
{ h$ret1 = (num.getLowBits()); return (num.getHighBits()); }; | |
} | |
function h$hs_uncheckedIShiftRA64(a1,a2,n) { | |
; | |
var num = new goog.math.Long(a2,a1).shiftRight(n); | |
{ h$ret1 = (num.getLowBits()); return (num.getHighBits()); }; | |
} | |
// always nonnegative n? | |
function h$hs_uncheckedShiftL64(a1,a2,n) { | |
; | |
n &= 63; | |
; | |
if(n == 0) { | |
; | |
{ h$ret1 = (a2); return (a1); }; | |
} else if(n < 32) { | |
; | |
{ h$ret1 = (a2 << n); return ((a1 << n) | (a2 >>> (32-n))); }; | |
} else { | |
; | |
{ h$ret1 = (0); return (((a2 << (n-32))|0)); }; | |
} | |
} | |
function h$hs_uncheckedShiftRL64(a1,a2,n) { | |
; | |
n &= 63; | |
if(n == 0) { | |
{ h$ret1 = (a2); return (a1); }; | |
} else if(n < 32) { | |
{ h$ret1 = ((a2 >>> n ) | (a1 << (32-n))); return (a1 >>> n); }; | |
} else { | |
{ h$ret1 = ((a1 >>> (n-32))|0); return (0); }; | |
} | |
} | |
// fixme this function appears to deoptimize a lot due to smallint overflows | |
function h$imul_shim(a, b) { | |
var ah = (a >>> 16) & 0xffff; | |
var al = a & 0xffff; | |
var bh = (b >>> 16) & 0xffff; | |
var bl = b & 0xffff; | |
// the shift by 0 fixes the sign on the high part | |
// the final |0 converts the unsigned value into a signed value | |
return (((al * bl)|0) + (((ah * bl + al * bh) << 16) >>> 0)|0); | |
} | |
var h$mulInt32 = Math.imul ? Math.imul : h$imul_shim; | |
// function h$mulInt32(a,b) { | |
// return goog.math.Long.fromInt(a).multiply(goog.math.Long.fromInt(b)).getLowBits(); | |
// } | |
// var hs_mulInt32 = h$mulInt32; | |
function h$mulWord32(a,b) { | |
return goog.math.Long.fromBits(a,0).multiply(goog.math.Long.fromBits(b,0)).getLowBits(); | |
} | |
function h$mul2Word32(a,b) { | |
var c = goog.math.Long.fromBits(a,0).multiply(goog.math.Long.fromBits(b,0)); | |
{ h$ret1 = (c.getLowBits()); return (c.getHighBits()); }; | |
} | |
function h$quotWord32(a,b) { | |
return goog.math.Long.fromBits(a,0).div(goog.math.Long.fromBits(b,0)).getLowBits(); | |
} | |
function h$remWord32(a,b) { | |
return goog.math.Long.fromBits(a,0).modulo(goog.math.Long.fromBits(b,0)).getLowBits(); | |
} | |
function h$quotRem2Word32(a1,a2,b) { | |
/* var a = h$bigFromWord64(a1,a2); | |
var b = h$bigFromWord(b); | |
var d = a.divide(b); */ | |
/* var a = h$ghcjsbn_mkBigNat_ww(a1,a2); | |
var b = h$ghcjsbn_mkBigNat_w(b); */ | |
var q = [], r = []; | |
h$ghcjsbn_quotRem_bb(q,r,h$ghcjsbn_mkBigNat_ww(a1,a2),h$ghcjsbn_mkBigNat_w(b)); | |
{ h$ret1 = (h$ghcjsbn_toWord_b(r)); return (h$ghcjsbn_toWord_b(q)); }; | |
// RETURN_UBX_TUP2(d.intValue(), a.subtract(b.multiply(d)).intValue()); | |
} | |
function h$wordAdd2(a,b) { | |
var c = goog.math.Long.fromBits(a,0).add(goog.math.Long.fromBits(b,0)); | |
{ h$ret1 = (c.getLowBits()); return (c.getHighBits()); }; | |
} | |
// this does an unsigned shift, is that ok? | |
function h$uncheckedShiftRL64(a1,a2,n) { | |
if(n < 0) throw "unexpected right shift"; | |
n &= 63; | |
if(n == 0) { | |
{ h$ret1 = (a2); return (a1); }; | |
} else if(n < 32) { | |
{ h$ret1 = ((a2 >>> n) | (a1 << (32 - n))); return ((a1 >>> n)); }; | |
} else { | |
{ h$ret1 = (a2 >>> (n - 32)); return (0); }; | |
} | |
} | |
function h$isDoubleNegativeZero(d) { | |
; | |
return (d===0 && (1/d) === -Infinity) ? 1 : 0; | |
} | |
function h$isFloatNegativeZero(d) { | |
; | |
return (d===0 && (1/d) === -Infinity) ? 1 : 0; | |
} | |
function h$isDoubleInfinite(d) { | |
return (d === Number.NEGATIVE_INFINITY || d === Number.POSITIVE_INFINITY) ? 1 : 0; | |
} | |
function h$isFloatInfinite(d) { | |
return (d === Number.NEGATIVE_INFINITY || d === Number.POSITIVE_INFINITY) ? 1 : 0; | |
} | |
function h$isFloatFinite(d) { | |
return (d !== Number.NEGATIVE_INFINITY && d !== Number.POSITIVE_INFINITY && !isNaN(d)) ? 1 : 0; | |
} | |
function h$isDoubleFinite(d) { | |
return (d !== Number.NEGATIVE_INFINITY && d !== Number.POSITIVE_INFINITY && !isNaN(d)) ? 1 : 0; | |
} | |
function h$isDoubleNaN(d) { | |
return (isNaN(d)) ? 1 : 0; | |
} | |
function h$isFloatNaN(d) { | |
return (isNaN(d)) ? 1 : 0; | |
} | |
function h$isDoubleDenormalized(d) { | |
return (d !== 0 && Math.abs(d) < 2.2250738585072014e-308) ? 1 : 0; | |
} | |
function h$isFloatDenormalized(d) { | |
return (d !== 0 && Math.abs(d) < 2.2250738585072014e-308) ? 1 : 0; | |
} | |
var h$convertBuffer = new ArrayBuffer(8); | |
var h$convertDouble = new Float64Array(h$convertBuffer); | |
var h$convertFloat = new Float32Array(h$convertBuffer); | |
var h$convertInt = new Int32Array(h$convertBuffer); | |
// use direct inspection through typed array for decoding floating point numbers if this test gives | |
// the expected answer. fixme: does this test catch all non-ieee or weird endianness situations? | |
h$convertFloat[0] = 0.75; | |
// h$convertFloat[0] = 1/0; // to force using fallbacks | |
var h$decodeFloatInt = h$convertInt[0] === 1061158912 ? h$decodeFloatIntArray : h$decodeFloatIntFallback; | |
var h$decodeDouble2Int = h$convertInt[0] === 1061158912 ? h$decodeDouble2IntArray : h$decodeDouble2IntFallback; | |
function h$decodeFloatIntArray(d) { | |
; | |
if(isNaN(d)) { | |
{ h$ret1 = (105); return (-12582912); }; | |
} | |
h$convertFloat[0] = d; | |
var i = h$convertInt[0]; | |
var exp = (i >> 23) & 0xff; | |
var sgn = 2 * (i >> 31) + 1; | |
var s = i&8388607; | |
if(exp === 0) { // zero or denormal | |
if(s === 0) { | |
; | |
{ h$ret1 = (0); return (0); }; | |
} else { | |
h$convertFloat[0] = d*8388608; | |
i = h$convertInt[0]; | |
; | |
{ h$ret1 = (((i&2139095040) >> 23) - 173); return (sgn*(i&8388607)); } | |
} | |
} else { | |
; | |
{ h$ret1 = (exp - 150); return (sgn * (s|8388608)); }; | |
} | |
} | |
function h$decodeFloatIntFallback(d) { | |
; | |
if(isNaN(d)) { | |
{ h$ret1 = (105); return (-12582912); }; | |
} | |
var ret0, ret1; | |
{ (ret0) = (h$integer_cmm_decodeDoublezhFallback(d)); (ret1) = h$ret1; }; | |
var exponent = ret0 + 29; | |
var significand = ret1.shiftRight(28).add(h$bigOne).shiftRight(1).intValue(); | |
if(exponent > 105) { | |
exponent = 105; | |
significand = d > 0 ? 8388608 : -8388608; | |
} else if(exponent < -151 || significand === 0) { | |
significand = 0; | |
exponent = 0; | |
} | |
; | |
{ h$ret1 = (exponent); return (significand); }; | |
} | |
function h$decodeDouble2IntArray(d) { | |
; | |
if(isNaN(d)) { | |
{ h$ret1 = (-1572864); h$ret2 = (0); h$ret3 = (972); return (1); }; | |
} | |
h$convertDouble[0] = d; | |
; | |
var i1 = h$convertInt[1]; | |
var ret1, ret2 = h$convertInt[0], ret3; | |
var exp = (i1&2146435072)>>>20; | |
if(exp === 0) { // denormal or zero | |
if((i1&2147483647) === 0 && ret2 === 0) { | |
ret1 = 0; | |
ret3 = 0; | |
} else { | |
h$convertDouble[0] = d*9007199254740992; | |
i1 = h$convertInt[1]; | |
ret1 = (i1&1048575)|1048576; | |
ret2 = h$convertInt[0]; | |
ret3 = ((i1&2146435072)>>>20)-1128; | |
} | |
} else { | |
ret3 = exp-1075; | |
ret1 = (i1&1048575)|1048576; | |
} | |
; | |
{ h$ret1 = (ret1); h$ret2 = (ret2); h$ret3 = (ret3); return (i1<0?-1:1); }; | |
} | |
function h$decodeDouble2IntFallback(d) { | |
; | |
if(isNaN(d)) { | |
{ h$ret1 = (-1572864); h$ret2 = (0); h$ret3 = (972); return (1); }; | |
} | |
var exponent, significand; | |
{ (exponent) = (h$integer_cmm_decodeDoublezhFallback(d)); (significand) = h$ret1; }; | |
var sign = d<0?-1:1; | |
var s = significand.abs(); | |
var ret1 = s.shiftRight(32).intValue(); | |
var ret2 = s.intValue(); | |
var ret3 = exponent; | |
; | |
{ h$ret1 = (ret1); h$ret2 = (ret2); h$ret3 = (ret3); return (sign); }; | |
} | |
// round .5 to nearest even number | |
function h$rintDouble(a) { | |
var rounda = Math.round(a); | |
if(a >= 0) { | |
if(a%1===0.5 && rounda%2===1) { // tie | |
return rounda-1; | |
} else { | |
return rounda; | |
} | |
} else { | |
if(a%1===-0.5 && rounda%2===-1) { // tie | |
return rounda-1; | |
} else { | |
return rounda; | |
} | |
} | |
} | |
var h$rintFloat = h$rintDouble; | |
function h$acos(d) { return Math.acos(d); } | |
function h$acosf(f) { return Math.acos(f); } | |
function h$asin(d) { return Math.asin(d); } | |
function h$asinf(f) { return Math.asin(f); } | |
function h$atan(d) { return Math.atan(d); } | |
function h$atanf(f) { return Math.atan(f); } | |
function h$atan2(x,y) { return Math.atan2(x,y); } | |
function h$atan2f(x,y) { return Math.atan2(x,y); } | |
function h$cos(d) { return Math.cos(d); } | |
function h$cosf(f) { return Math.cos(f); } | |
function h$sin(d) { return Math.sin(d); } | |
function h$sinf(f) { return Math.sin(f); } | |
function h$tan(d) { return Math.tan(d); } | |
function h$tanf(f) { return Math.tan(f); } | |
function h$cosh(d) { return (Math.exp(d)+Math.exp(-d))/2; } | |
function h$coshf(f) { return h$cosh(f); } | |
function h$sinh(d) { return (Math.exp(d)-Math.exp(-d))/2; } | |
function h$sinhf(f) { return h$sinh(f); } | |
function h$tanh(d) { return (Math.exp(2*d)-1)/(Math.exp(2*d)+1); } | |
function h$tanhf(f) { return h$tanh(f); } | |
var h$popCntTab = | |
[0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5, | |
1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6, | |
1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6, | |
2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7, | |
1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6, | |
2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7, | |
2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7, | |
3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,4,5,5,6,5,6,6,7,5,6,6,7,6,7,7,8]; | |
function h$popCnt32(x) { | |
return h$popCntTab[x&0xFF] + | |
h$popCntTab[(x>>>8)&0xFF] + | |
h$popCntTab[(x>>>16)&0xFF] + | |
h$popCntTab[(x>>>24)&0xFF]; | |
} | |
function h$popCnt64(x1,x2) { | |
return h$popCntTab[x1&0xFF] + | |
h$popCntTab[(x1>>>8)&0xFF] + | |
h$popCntTab[(x1>>>16)&0xFF] + | |
h$popCntTab[(x1>>>24)&0xFF] + | |
h$popCntTab[x2&0xFF] + | |
h$popCntTab[(x2>>>8)&0xFF] + | |
h$popCntTab[(x2>>>16)&0xFF] + | |
h$popCntTab[(x2>>>24)&0xFF]; | |
} | |
function h$bswap64(x1,x2) { | |
{ h$ret1 = ((x1 >>> 24) | (x1 << 24) | ((x1 & 0xFF00) << 8) | ((x1 & 0xFF0000) >> 8)); return ((x2 >>> 24) | (x2 << 24) | ((x2 & 0xFF00) << 8) | ((x2 & 0xFF0000) >> 8)); }; | |
} | |
var h$clz32 = Math.clz32 || function(x) { | |
if (x < 0) return 0; | |
if (x === 0) return 32; | |
return 31 - ((Math.log(x) / Math.LN2) | 0); | |
} | |
function h$clz8(x) { | |
return h$clz32(x&255)-24; | |
} | |
function h$clz16(x) { | |
return h$clz32(x&65535)-16; | |
} | |
function h$clz64(x1,x2) { | |
return (x1 === 0) ? 32 + h$clz32(x2) : h$clz32(x1); | |
} | |
var h$ctz32tbl = [32,0,1,26,2,23,27,0,3,16,24,30,28,11,0,13,4,7,17,0,25,22,31,15,29,10,12,6,0,21,14,9,5,20,8,19,18,0,0,0,0,0,31]; | |
function h$ctz32(x) { | |
return h$ctz32tbl[((x&-x)%37)&63]; | |
} | |
function h$ctz16(x) { | |
return h$ctz32(x|65536); | |
} | |
function h$ctz8(x) { | |
return h$ctz32(x|256); | |
} | |
function h$ctz64(x1,x2) { | |
return (x2 === 0) ? 32 + h$ctz32(x1) : h$ctz32(x2); | |
} | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
// Unicode tables generated by ghcjs/utils/genUnicode.hs | |
var h$printRanges = "f|!-f=|/q'/+1$J|(mo'1q&')| 63Y--EO'|$9| ('| ?'|!9?| ?-| %'AZ'| JI| +|#U2'''O0$)+'5'''+3*','O-).+''O0&&&'$-+''))0+$1C9)4(N0&,'7(('@+';A)2'''O0&,'5''')3'+','G7'.))*)'$&)')));+-))*'.>M-+2(PB)3(*1'&/+'733(2(P6,'5(*1'1$+'7&?)2(u'3(,32+'C)1''F)S4$'1)*/$2/7');| =+^n'$''$'.+0( #''<('-$.'7'+d| Yk+rk@<n|$G$-&|(E*'1$*'v*'f*'1$*'A| :*'| O'd)W/| t9|.r)|! 1=09Q5K;=(&;|!+'7/7/?'7/| z3z-| U7b:+;+(x'-9| +W/9)| E'| K]'9/7/?'A| K| b+| #)|!W3| A)A)| /| I33r&/|%M/|&;'/'p'/'3 $a'| 3@>'/H')48-S1| +C''Y<)`GfA|#)/|-h-rU9M|H;'d'h);2| %| '| &|#<-| #$-&| 91'?S510000000|!4| CW| {;|$hW;+| I| u'|!=-v)|!+y-l;| '|$y} ^y7}%0j| /|9t)| 75|'fK|!+| {3|#3_''| S| 3+7/| 93| S5;/[+| r9`)| f8+f| 65?'7'|!=S[7/'/'/510| (+'|!#| %'7/}!e;;Q+| +}!'n|(/'|!Cp1;--W,$&&|!gE|(-C| I'| 5t?'W/?'jH*+-|#!+|$7)/'/'/'))10='';VH&@'?h|!f-)+| #)| v);+| &| %|!t^)| +A[+l;Y-z-`m+?x|#Q'7| vt3| 19|#4|&v5O73|#E/'$| &)&Q| X35| j[)Y-| H| 9/'| I+&-3(X+)+5351| Idr+;5| 5)^'Y-W1+;1| j| [|+tb|(U| f+`A| E*?U17/| 3>;r5| [+&9/K9Gy|!S| ?-71)2'''O0&,'5''')5,1'1)-|%x| Y37|#b| 5'G| 5| S97p| 937|*K| p;|)y| ;|<Y|4M|!=|!M,|b`|7l}#8j|,^1b6+'|!/`'/7| U770L-I|3U| S9| 'CE}$&7'|e7|!E-=)517'+} 47|%M7r'| ^3|!5h| U|$/| x5G|#1| t| V&'&''+:$0| J*'30Z*,$)1|'T'|&O'| -} %|$E'C|=C+X&$'$7* #/* $)&$' &'$'+0**$6D-),D| 1'|&#| +|!7;A'A@m7=)b| @+z| `^=z-51'|#r| #)| f'| h-l3|%`| _-xu|#P'|#+C=)+;|!W;| tz;+| 937/t3`|I^}*Q/v} !59|$x}$#I|,'|G1|%A"; | |
var h$alnumRanges = "| +71W/W| '0'$)'(Pa|*2+;?-1$D|!Y&'+$/$)$J| o|#*|#oo'0r5| #$&&$3Y-)^9-| ^+|!;2'7H'B| ?'|!9?| 5+,| %G[| QI| +|!p'7H2'''O0$)+'5'''+3*',';'/1).+''O0&&&'$-+''))0+$1C9)4(N0&,'7(('@+'7E)2'''O0&,'5''')3'+','707'.))*)'$&)')));+-))*'.>==+2(PB)3(*1'&/+'731')2(P6,'5(*1'1$+'7&?)2(u'3(,32+'C+/''F)S4$'1)*/$2/7''=| =-A6r'$''$'.+0( #''<('-$.'7'+dP'/K $+7k+KFk5| :| ^/| f'p$-&z|'F*'1$*'v*'f*'1$*'A| :*'| O')5K)CC| t;|-j'EV-| `)91=09M9K;=(&;| r)*''7/7E)'7/| z3z-| U7b:+;7t'-9| +W/9n[+| G]'9/7=2A| K| b+7E5;|!W;| 937)| +| n)i&/|%M/|&;'/'p'/'3 $a'| 30$))0)+'/+=-)0|!U''/-9/=| /fE*&7$)-/ $+8'+--+$| =|0/| A| fO|.#`|91| '| &|!y/55&p$-&| 91@S510000000c| '|*H)UA,'-+| v''')|!!*-v)|!+)+7Y| 3Cd7`3@d7rA|'-} X;| ^}%/C| /|9t| O| %'|& )[K| /6a| on5'|!='+_''| S| +3/7| 1;| S97/S)*| %'l;^)| K?9/b| 65?'7/Q)| [S)'C'-7/'/'/510y*+'|!#z&'7/}!e;;Q+| +}!'n|(/'|!Cp1;--;<,$&&|!Ff|()G| I'| 5t;+CC?| M-|#!I71W/W9|! )/'/'/')j;VH&@'?h|!f;| #;| ;E'|!Q|!s^)| +A[+l;Y-z-`'l+3,x|#Q'7| vt3| 1|#M|&v5O73|#E/'$| &)&Q'b'p35| j[+W| U| 9/'| I+&-3(X+)+5Sbcd3_+-C| 57O'Y-WQ1| j| [|+tb|(U| W9`A| AMU17/| 36Cl'4| S99/K9Gm|!`| ?-71)2'''O0&,'5''')5,1'1)-|%x| U$37|#b| 5'5| G| K)87p| 937|*K| p;|)y| ;|<Y|4M|!=|!M|bl|7l}#8j|,^1b6|!;`'-9| 75+;70L-I|3U| S9| 'CE}$&7'|e7|!E-=)517)'} <3-)/33'1`+|#=)|&=G|#1| t| V&'&''+:$0| J*'30Z*,$)1|'T'UTaTaTaTaT2'| -} %|$E'C|=C+X&$'$7* #/* $)&$' &'$'+0**$6D-),D|,t=|v'}*Q/v} !59|$x}$#I|,'|G1|%A"; | |
var h$lowerRanges = "|!3W| =uS2 <& (& 8' #)'$&('+&()'& #&$'$'($&'')/&& )' )&'$( >1'&'$+ %| SX|$=$(()GXj&)) ,,$'&'| /| ) 25 ;& '' Q| +r} KQ| | G=g|!; l5 Q43/73333/73333?'333333-&/()&3+''337)&|&+(')X**&'3++| 2|]a| ''(' $+$'.- R'1$*:p$-}'Zi 7H .|#! ') @2 #' %*$&$) +| j|28z5'}%!p1;-|7`W|;?t} :;d}+l-WW1FWWW+$08WWWWWWWWWWWWWWWWW[[U.WU.WU.WU.WU.$"; | |
var h$upperRanges = "| MW|!9Q0f <& (& 8' #)'$&('+&()'& #&$'$'($&)0'&& )' )&'$( >1'&'$+ %|&I$(2.$)$&D4j&)) ,,&$''| /| ) 14 <' '' P&p|a5p$-|l( l4 Q433/73333/9 $23S333333-9-9+;-9-|%l*()')'(-/ $+'+7'-| B|[]| '| +$)' $+$'2) R3$*}']( 7H .|#! '( ?6 #' %+$&$( ++''}%OGW|;/t} :Kd}+l9WWWWWW$''&''+2WWW'*'30Y'*,$)1YWWWWWWWWWWW`UfUfUfUfUf%"; | |
var h$alphaRanges = "| MW/W| '6*,Qa|*2+;?-1$|!q-&'+$/$)$J| o|#*3|#bo'0r| YY-)| #zj'|!4$A'1'7)'B$`^|! 9Rf5'+,O+4(PU| WI| l| 5)F07AC+3'''O0$)+)B<'(?'I/+''O0&&&b+$I)C5(N0&,)F@'j3'''O0&,)_'(AD$/))*)'$&)')));O| 03(PB)V'/'j3(P6,)c$'A'G3(u'BD'S/-G)S4$'1| =| )&;1| ='$''$'.+0( #''*&5&-$M+d| F3kY-|!UzKB/++)('1)+=;Dp$-&z|'F*'1$*'v*'f*'1$*'A| :*'| OnCC| t;|-j'EV-| `/31=*?G?G?=(A| 1j*| N| z3v$-| U7b| +`'-9| M1| 9Q5| 3| n|!(| 'E1| 7`='7| Wlv)7l|!E+*)'5|$;| I|&3'/'p'/'3 $a'| 30$))0)+'/+=-)0|!W<B=|!9*&7$)-/ $+8'+--+| 0'|[[| '| &|!y/+)';p$-&| 91BQ510000000| j|*H'x--'+| v/)|!!*-v)|!+EY| 3C|+E} X;| ^}%/C| /|9t| O| %'|& )C7'K| 'Cb'| U| +5'|!='+_''| S9(*P^| 1?| -| E/)>[7QU^1| '[B-67-uQ)2KQ)(| -$)''-'$R)'91);/'/'/510y*+'|!#j^}!e;;Q+| +}!'n|(/'|!Cp1;--$7<,$&&|!Ff|()G| I'| 5t;|!W-|#!lW/W9|! )/'/'/')j;VH&@'?h|!f|(^^)| +| 'dCE2/p7`'l+3| )|#Q|!3t3| 1|#M|&v5O73|#E/'$| &)&Q7Q5b|!1O7W| U| 9/'| I@+(X| ^)^j3ZY| 57O7I=G|!K| [|55| 3| `| #dUWlvj):| )?+MmGT|!x| 'p3'''O0&,)a-|&C| )K'$|$+| '| l| )K| >z|+/| Ib|)y| ;|<Y|4M|gU|7l}#8j|,^1b|!Q`G| )C+bM-I|3U| S9| L=}$&7'|e7|!E-=)517} K-| t| V&'&''+:$0| J*'30Z*,$)1|'T'UTaTaTaTaT2} !3|$E|=h+X&$'$7* #/* $)&$' &'$'+0**$6D-),D} (7}*Q/v} !59|$x}$#I|,'"; | |
var h$toLowerMapping = "| K Wb|!9 Qb!1bf 9# !|$F ## &' (# &' 8# !|!_# # #) !|$^# ! # ! |$U !# '|$S&' !| f|$M !|$O# ! |$S !|$W !|$`|$[&) !|$`|$d ! |$f $# !|$n# ! |$n' !# !|$n#!'|$l ## !|$p#) &1 !%# ! % !# !%# ) #' )# &' !%# ! # ! |!. !| 6# 4 # ! |!q * #1 !}![r# ! |#X}%=]' !# !|$>| Q !| U# % #|&I !# &) &3 |%0/ !n )l ! | G!'| E!Eb!5bj B3 ,# &- |!]' !# !.#' )|!qC| hdb| ) 1# &5 <# !?# ' #' P# &' p| '|a5 p} hG ! } hG- }#To|l) l# &5 !} p4 P# &5 303 /07 303 303 /09 $0 @3 30S 303 303 303 '0'| ZD9 +| sD9 '0'|!4; '0'|!L<9 '|!m'|!iD|&Y }#a() !}!&:}!#V/ | 8| # CAI &|23 WU|Ht | '| '| + !# !}!Zc|ue}%:e' $# !}![R}!Zo !}![X}![V ! #' &3 '}!]> R# &3 !# &+ &}']) 7# &I .# &|## '# &) ?# &7 ## !}(b.# % #+ !# }4p*' !# &) +# !}*H0}*HF !}*H>}*H*' !}*G&}*GV}%OG Wb|;/ tr} :K db}p? "; | |
var h$toUpperMapping = "|!1 Wa| = |A$x Qa!1a !|!` 9! !|%. #! $' (! $' 7! $' #! !!|&]|(_' !! $' $) $- $' |$>) !!|#Y) |%i' #! $' $+ $' $) !! $' $) !! |!N- !!$ ! ! !$ !!$ ) ! !| e )! $' !!$ ! !) 4! $) )! $3 $' '}!]? ! !+ %! !!}![Y !}![S}![W !|$]|$T!'|$R ! |$L ! |$N}4qo) !|$R}*H? ! |$V ! }*GS !}*H1 !|$Z|$_ ! }!Zd}4q6' !|$_ !}!Zp|$c' |)N1 }%:g' |)_' |)_) !}*GW|$m|#&'|$k|#.- |)c9 }4o.|#b |#ez !! $) $) )|!r| % | _)k!Ea| B5a|!m'| D ! | B|!P) !| $| 2 !0 ,! !!| s !| g/ !|!T |$8' $' $| 1 daC| g 2 !5 ;! $' '! !!> Q !| + p| &} N7 }1H>) } pP|!v l! $- |!X- P! $313 /17 313 313 /19 $1 B3 313 '| [+| t'|!5'|!n'|!M'|!j' 313 313 313 '1 ! 37 }#R4+ F; '1? '1) >= F|'b | 6f C@+ $|2f WT|IE | '| &' $) !}![q}![k $ !/ $' $7 R! $3 !! $+ $; p} hF ! } hF- }#Tm}'Zj 7! $I .! $|## '! $) ?! $7 !! $' %! $+ $+ !! $) *! $}%P= Wa|;? tq} :; da}p>; "; | |
var h$catMapping = "d;P)3J)3 !/0 !34 !3.'37*'3)4'3W! !/3 !06 !-6W# !/4 !04f; !83+5 !73 !67 !&1 !4< !76 !74', !6#'3 !6, !&2),FQ!H1!S#H3# <!#$'# (!#$'# 8!#'! ##!)#'! !#!&'!&)!'#+!&'!&)!)#'!&'! ##!&'! !#!'# !!#'!&)! !#!&'!'# !&!)#+& !!$ !#! !$# !!$ )#!'# )!#$'# !!$ !#!&)! >#!1#'!&'!'# !!#+! %#!| S#,Y#G%+6;%?6-%16 !%6*E6|!O' #!# !%6 !!#' *)# !3!+ '6 !!3)! ! !!'!&E!!5!j#$'#)!)# ,!#$-# !!# !4!&'!'#| /!| )# 2!#N-'') <!#'! '#!'# Q!#!p!' */3!r# ! 3<' '7 !5 | #' !.'F''F'' !3'3 Y&- )&'39 /<)4'3J'3'79' !3<!'3d&*7&M'7*+3'&.|!5& !3&1' !<7/''%''N+''&7*)&'7,?3 ! < !&'`&Y'' |! &9',? 7*f&5''%N)3*- O&+'*5'*)'*-'' A3!U&)'' F| K I&| + b'0| 5& !'( !'&)(3'+(.'(,1'7&'''37* !3%A&.'(!3&' '&' O&!1& ! &) +&' !'&)(+'' '(' '( !'&3 0+ '&!)&''' 7*'&'5/, !75- '' !( /&+ '&' O&!1&!'&!'&!'&' !' )(''+ ''' )') .1 +& ! &1 7*'')&.9 '' !( 5&!)&!O&!1&!'&!-&' !'&)(-'!'' !( '(.' ,A '&''' 7* !35A .'(!3&' '&' O&!1&!'&!-&' !'& !('0+'' '(' '(.3 !'(+ '&!)&''' 7* !7&/,7 !'&!/&) )&!+&) '& ! &!'&) '&) )&) ;&+ '(.'() )(!)(.' ,/ 0? 7*),/7 !57- .)(!3&!)&!Q&!C&) ,)'+(!)'!+'1 ''!'&/ '&''' 7*3 1, !7 .'(!3&!)&!Q&!7&!-&' !'& !('-( ! ''(!'(''1 '(1 !& '&''' 7*!'&? .'(!3&!)&!v&' ,)(+'!)(!)( !'&3 03 '&''' 7*/,) N/&' '(!G&) S&!5& ! &' 1&) .+ )()' ! '!3(/ 7*' '(F; | )&.'&1'+ J/&*3'F7*'3n '& ! &' '& ! &' ,/ +&!1&!)& # &' '&!+&.'&/'!'',' -& ! %!/'' 7*' +&d ,)7A3 !73)7''/77*7, $7' #/0'(3&!l&+ ?'0-'F''-&9'!l'!37./7!'7-3+7'3n z&'(+'0/'0'''('',7*/3/&'(''+&)',)('&1()&+'=&.'(''/( !'&07*)(.'7p! ! !- $' z& !3%|'E&!+&' 1& ! &!+&' v&!+&' f&!+&' 1& ! &!+&' A&!| ;&!+&' | O&' )'53K,) C&77/ | t&9 <|-j&'3E&PW& !/0) | `&)3)+3&1 =&!+&)'9 G&)''35 G&''; =&!)&!''; | 1&''01'3(.'(9')3*)3 !5&.' 7*/ 7,/ /3<+3)' !< 7*/ j&*| 1&3 v& !'&- | U&7 b&!)'+('')(+ '(./()'+ N) '37*`&' -&9 | &+ E(1&'(/ 7*8) h7Q&'''(.' '3| 3& !('01' ! ' !(''(3'/(7'' .7*/ 7*/ 13*/3' ?'2| K +'0| '& !'(-' !('-(.'(1&+ 7*13775'57) ''0`&0+''(''0)''&7*| & !'('')( !'()''(3 +3l&3(3''('') -37*) )&7*`&/%'3| I 333 )'F='01'+&.+&'(.'&!''/ | #| G%=#*h#n%| 5'/ +' l!#$5# Q!#$5#3!/#' /!' 3#3!3#3!/#' /!' 3# % !3#3!?#' 3#3$3#3$3#3$-#!'#+! !$6&)6)#!'#+!()6+#' '#+!!)63#-!)6' )#!'#+!('6!98-</.'3 !12>'1 !2/B33 !9:-<P53 !12+3'-)3 !4/@93 !43:73P-<!7< !,%' /,)4 !/0*7,)4 !/0!=%) `5G ='+).));'A '7$+7$'7&)!'#)! !#7$'7H-!/7 $!7+! !7#+!&+&&'7'#'!-4$+# !74'7 !#7C,j+ !!#++8/ -4-7'4+7H'7H'7H17Hb7'4'7 !47Hb7|%z437 #/0K7'417 !/0| l7H`7U4t7/4U7- r7U 97M | A,| f7O,|$)7H57H| 5734|!M7H|%Q7 (/0`,| 7-4 !/0b4 &/0C4|%b7|!v4 ,/0| G4 #/0d4 !/0|%f4| )7M4'7/4r7' d7' h7) ;7!37| % | '!!| '# ! !&)!'# $!#+! !#!'#$/#'%)! R#!'#/7 #!#)' !!#- +38'3p# ! #- &' | 9&1 !%3? .Q&5 1&!1&!1&!1&!1&!1&!1&!1&!d''3 #12)3 !12 !31D53<'3 !.3 !12'3 !12 %/0-3*73'.+3 !.3>| C W7!|! 7; |$h7W ;7+ P)3 !7% !&+ &/0'7 %/0 !./'0N5++''(<-%'7)+ !%&F'7!| v&' '''6'% !&.|!#&F)%,- v&) |!+&!'7+,77Y&- l7; C&b7!7,`73,NA,d77,r7A,| G7!|%b7} X;&7 | I7}%/C&| / M&*|9G&) | 775 t&/%'3|%z&*)3C&7*'&K 8!# !&'))F7' !3% /!#'% ! '| U&7+''/33 Q65%'6 '!#$)# @!#*3# #!#'! %#! !#%'6 #!# ! ! !#!)# +!#+!' '!| S ,'%&1&.)&.+&.Q&'(''0+7+ /,'7 !57/ | 1&+33 '(| -&C(.5 '37*/ G'/&)3,+ 7*[&3''3Q&9''(9 F^&) )'0| '&.'(+''(.+(=3 ! %7*+ '3-& !'%5&7*-&!v&/''('''(''5 )&.3& !'(' 7*' +3C&*/&)7 !&( !'(| -& !'&)''&''-&'' !&',S '&*'39&0'''('3,'% !('7 /&' /&' /&5 1&!1&!z#L+%+ '#|!# j&'(.'(.'( !3(.' 7*/ }!e;&; Q&+ | +&+ |MQ=} T7 |(/&' |!C&p 1#; -#- !&'7&H=&!-& ! &!'&!'&!|!G&C6E |()& !0/C | I&' | 5&t ;& !57' C'13 !/0F/ ?'' F'.'- )/0'3 !/0+3)-)3!+3 !./ #0/@)3 !4.)4 ! 3J'3+ -&!|##&' !< )3J)3 !/0 !34 !3.'37*'3)4'3W! !/3 !06 !-6W# !/4 !04 !/0 !3/@'37&*| #&'%b&) /&' /&' /&' )&) '5 !46N'5 ! 7+4'77 )<'7' ;&!W&!I&!'&!A&' ?&h |!f&- )3+ | #,) 57| 3++,E7',N) ;7+ N| ' | #7.|!t ^&) | +&A .Y,+ d&+,; E&63&6- p&-'- `& ! 3l&+ 3&F-+x t!t#| f&' 7*| v t&3 | 1&9 F|#5 |&v&5 O&7 3&|#E /&' !& | &!'&) ,' Q& ! 33,Q&'71,b&3 5,| j O&/,) FW&- F| I | 9&/ '&| I ,)'!''- +'+&!)&!Y&+ )'+ .3,3 531 ^&',F^&),d 3&N[&''+ -,135 | 5&) 13O&' 3,I&- 3,G&1 +3; 1,| j | [&|+t b,|(U !('0| 3&A'13+ K,7*A )'0| #&)(+''('''3X+3? U&1 7*/ )'l&-'03'!7*+3; j&.'3,5 ''0| )&)(5''(+&+3+ F' 7*,/ K,9 G&!U&)()''( !'(''/3|!S | '&.)(3'- 7*1 .'(!3&' '&' O&!1&!'&!-&' !'&'(.+(' '(' )(5 0- -&'(' 1') -'|%x | )&)(/' !('+(''0'''& !3&3 7*|#b | '&)(+'' +(''0''53| 5 | )&)(3''( !'('')3,9 7*p z& !'(.'(/' !('3 7*|*K d!d#7*5,; ,|)z | ;&|<Y |4M&|!= |!M+!-3|b` |7l&}#8j |,^&1 b&!7*+ '3|!/ `&' -'F7 | )&1'-3+7+% !377 7*!1,!M&- I&|3U | S&9 ,| %(C +'=%}$&7 '&|e7 |!E&- =&) 5&1 7&' N''F+<} 4/ |%M77 r7' | A7'()')7/(3<3''71'`7+'| )7h | M7)'N|$/ | x75 G,|#1 W!W#W!1#!G#W!W# !! '!' $' '!' +!!3!+# ! #!1#!9#W!W#'!!+!' 3!!1!!W#'!!+!!-! ! !) 1!!W#W!W#W!W#W!W#W!W#W!W#W![#' U!HU#H/#U!HU#H/#U!HU#H/#U!HU#H/#U!HU#H/# !!#' | -*} % |$E&' 5,1'|=C +&!Y&!'& ! &' !& 7&!+& # &/ ,+ $& )&!'& ! &' && '& ! &' +&!1&!+&!+& ! &!7&!E&- )&!-&!E&| 1 '4|&# | 7+ |!77; A7' A7!A7!n77 =,) b7!| A7+ z7| ` ^7= z7- 571 '7|#r | #7) | f7' | h7- l73 |%`7!| `7- x7!v7!|#Q7' |#+7C =7) +7; |!W7; | t7z ;7+ | 973 77/ t73 `7|I^ }*Q/&v } !5&9 |$x&}$#I |,'&|AO X` |!/<|!p |%A'}PF' "; | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
// values defined in Gen2.ClosureInfo | |
// thread status | |
/* | |
* low-level heap object manipulation macros | |
*/ | |
// GHCJS.Prim.JSVal | |
// GHCJS.Prim.JSException | |
// Exception dictionary for JSException | |
// SomeException | |
// GHC.Ptr.Ptr | |
// GHC.Integer.GMP.Internals | |
// Data.Maybe.Maybe | |
// #define HS_NOTHING h$nothing | |
// Data.List | |
// Data.Text | |
// Data.Text.Lazy | |
// black holes | |
// can we skip the indirection for black holes? | |
// resumable thunks | |
// general deconstruction | |
// retrieve a numeric value that's possibly stored as an indirection | |
// generic lazy values | |
// generic data constructors and selectors | |
// unboxed tuple returns | |
// #define RETURN_UBX_TUP1(x) return x; | |
// encode a string constant | |
function h$str(s) { | |
var enc = null; | |
return function() { | |
if(enc === null) { | |
enc = h$encodeUtf8(s); | |
} | |
return enc; | |
} | |
} | |
// encode a raw string from bytes | |
function h$rstr(d) { | |
var enc = null; | |
return function() { | |
if(enc === null) { | |
enc = h$rawStringData(d); | |
} | |
return enc; | |
} | |
} | |
// these aren't added to the CAFs, so the list stays in mem indefinitely, is that a problem? | |
function h$strt(str) { return (h$c1(h$lazy_e, (function() { return h$toHsString(str); }))); } | |
function h$strta(str) { return (h$c1(h$lazy_e, (function() { return h$toHsStringA(str); }))); } | |
function h$strtb(arr) { return (h$c1(h$lazy_e, (function() { return h$toHsStringMU8(arr); }))); } | |
// unpack strings without thunks | |
function h$ustra(str) { return h$toHsStringA(str); } | |
function h$ustr(str) { return h$toHsString(str); } | |
function h$urstra(arr) { return h$toHsList(arr); } | |
function h$urstr(arr) { return h$toHsStringMU8(arr); } | |
function h$caseMapping(x) { | |
return (x%2)?-((x+1)>>1):(x>>1); | |
} | |
var h$toUpper = null; | |
function h$u_towupper(ch) { | |
if(h$toUpper == null) { h$toUpper = h$decodeMapping(h$toUpperMapping, h$caseMapping); } | |
return ch+(h$toUpper[ch]|0); | |
} | |
var h$toLower = null; | |
function h$u_towlower(ch) { | |
if(h$toLower == null) { h$toLower = h$decodeMapping(h$toLowerMapping, h$caseMapping); } | |
return ch+(h$toLower[ch]|0); | |
} | |
var h$alpha = null; | |
function h$u_iswalpha(a) { | |
if(h$alpha == null) { h$alpha = h$decodeRLE(h$alphaRanges); } | |
return h$alpha[a]|0; | |
} | |
var h$alnum = null; | |
function h$u_iswalnum(a) { | |
if(h$alnum == null) { h$alnum = h$decodeRLE(h$alnumRanges); } | |
return h$alnum[a] == 1 ? 1 : 0; | |
} | |
// var h$spaceChars = [9,10,11,12,13,32,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288]; | |
function h$isSpace(a) { | |
if(a<5760) return a===32||(a>=9&&a<=13)||a===160; | |
return (a>=8192&&a<=8202)||a===5760||a===8239||a===8287||a===12288; | |
} | |
function h$u_iswspace(a) { | |
return h$isSpace(a)?1:0; | |
} | |
var h$lower = null; | |
function h$u_iswlower(a) { | |
if(h$lower == null) { h$lower = h$decodeRLE(h$lowerRanges); } | |
if(a < 0x30000) return h$lower[a]|0; | |
if(a < 0xE0000) return 0; | |
return h$lower[a-0xB0000]|0; | |
} | |
var h$upper = null; | |
function h$u_iswupper(a) { | |
if(h$upper == null) { h$upper = h$decodeRLE(h$upperRanges); } | |
if(a < 0x30000) return h$upper[a]|0; | |
if(a < 0xE0000) return 0; | |
return h$upper[a-0xB0000]|0; | |
} | |
var h$cntrlChars = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159]; | |
var h$cntrl = null; | |
function h$u_iswcntrl(a) { | |
if(h$cntrl === null) { | |
h$cntrl = []; | |
for(var i=0;i<=159;i++) h$cntrl[i] = (h$cntrlChars.indexOf(i) !== -1) ? 1 : 0; | |
} | |
return a <= 159 ? h$cntrl[a] : 0; | |
} | |
var h$print = null; | |
function h$u_iswprint(a) { | |
if(h$print == null) { h$print = h$decodeRLE(h$printRanges); } | |
if(a < 0x30000) return h$print[a]|0; | |
if(a < 0xE0000) return 0; | |
return h$print[a-0xB0000]|0; | |
} | |
// decode a packed string (Compactor encoding method) to an array of numbers | |
function h$decodePacked(s) { | |
function f(o) { | |
var c = s.charCodeAt(o); | |
return c<34?c-32:c<92?c-33:c-34; | |
} | |
var r=[], i=0; | |
while(i < s.length) { | |
var c = s.charCodeAt(i); | |
if(c < 124) r.push(f(i++)); | |
else if(c === 124) { | |
i += 3; r.push(90+90*f(i-2)+f(i-1)); | |
} else if(c === 125) { | |
i += 4; | |
r.push(8190+8100*f(i-3)+90*f(i-2)+f(i-1)); | |
} else throw ("h$decodePacked: invalid: " + c); | |
} | |
return r; | |
} | |
// decode string with encoded character ranges | |
function h$decodeRLE(str) { | |
var r = [], x = 0, i = 0, j = 0, v, k, a = h$decodePacked(str); | |
while(i < a.length) { | |
v = a[i++]; | |
if(v === 0) { // alternating | |
k = a[i++]; | |
while(k--) { | |
r[j++] = x; | |
r[j++] = 1-x; | |
} | |
} else { | |
if(v <= 2) { | |
k = (a[i]<<16)+a[i+1]; | |
i+=2; | |
} else k = (v-1)>>1; | |
if(v%2) { | |
r[j++] = x; | |
x = 1-x; | |
} | |
while(k--) r[j++] = x; | |
x = 1-x; | |
} | |
} | |
r.shift(); | |
return r; | |
} | |
function h$decodeMapping(str, f) { | |
var r = [], i = 0, j = 0, k, v, v2, a = h$decodePacked(str); | |
while(i < a.length) { | |
v = a[i++]; | |
if(v === 0) { // alternating | |
k = a[i]; | |
v = f(a[i+1]); | |
v2 = f(a[i+2]); | |
while(k--) { | |
r[j++] = v; | |
r[j++] = v2; | |
} | |
i+=3; | |
} else { | |
if(v === 2) { | |
k = (a[i] << 16) + a[i+1]; | |
v = a[i+2]; | |
i += 3; | |
} else if(v%2) { | |
k = 1; | |
v = v>>1; | |
} else { | |
k = (v>>1)-1; | |
v = a[i++]; | |
} | |
v = f(v); | |
while(k--) r[j++] = v; | |
} | |
} | |
return r; | |
} | |
var h$unicodeCat = null; | |
function h$u_gencat(a) { | |
if(h$unicodeCat == null) h$unicodeCat = h$decodeMapping(h$catMapping, function(x) { return x; }); | |
// private use | |
if(a >= 0xE000 && a <= 0xF8FF || a >= 0xF0000 & a <= 0xFFFFD || a >= 0x100000 && a <= 0x10FFFD) return 28; | |
var c = a < 0x30000 ? (h$unicodeCat[a]|0) : | |
(a < 0xE0000 ? 0 : (h$unicodeCat[a-0xB0000]|0)); | |
return c?c-1:29; | |
} | |
function h$localeEncoding() { | |
// h$log("### localeEncoding"); | |
{ h$ret1 = (0); return (h$encodeUtf8("UTF-8")); }; // offset 0 | |
} | |
function h$rawStringData(str) { | |
var v = h$newByteArray(str.length+1); | |
var u8 = v.u8; | |
for(var i=0;i<str.length;i++) { | |
u8[i] = str[i]; | |
} | |
u8[str.length] = 0; | |
return v; | |
} | |
// encode a javascript string to a zero terminated utf8 byte array | |
function h$encodeUtf8(str) { | |
var i, low; | |
var n = 0; | |
for(i=0;i<str.length;i++) { | |
// non-BMP encoded as surrogate pair in JavaScript string, get actual codepoint | |
var c = str.charCodeAt(i); | |
if (0xD800 <= c && c <= 0xDBFF) { | |
low = str.charCodeAt(i+1); | |
c = ((c - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000; | |
i++; | |
} | |
if(c <= 0x7F) { | |
n++; | |
} else if(c <= 0x7FF) { | |
n+=2; | |
} else if(c <= 0xFFFF) { | |
n+=3; | |
} else if(c <= 0x1FFFFF) { | |
n+=4; | |
} else if(c <= 0x3FFFFFF) { | |
n+=5; | |
} else { | |
n+=6; | |
} | |
} | |
var v = h$newByteArray(n+1); | |
var u8 = v.u8; | |
n = 0; | |
for(i=0;i<str.length;i++) { | |
var c = str.charCodeAt(i); | |
// non-BMP encoded as surrogate pair in JavaScript string, get actual codepoint | |
if (0xD800 <= c && c <= 0xDBFF) { | |
low = str.charCodeAt(i+1); | |
c = ((c - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000; | |
i++; | |
} | |
// h$log("### encoding char " + c + " to UTF-8: " + String.fromCodePoint(c)); | |
if(c <= 0x7F) { | |
u8[n] = c; | |
n++; | |
} else if(c <= 0x7FF) { | |
u8[n] = (c >> 6) | 0xC0; | |
u8[n+1] = (c & 0x3F) | 0x80; | |
n+=2; | |
} else if(c <= 0xFFFF) { | |
u8[n] = (c >> 12) | 0xE0; | |
u8[n+1] = ((c >> 6) & 0x3F) | 0x80; | |
u8[n+2] = (c & 0x3F) | 0x80; | |
n+=3; | |
} else if(c <= 0x1FFFFF) { | |
u8[n] = (c >> 18) | 0xF0; | |
u8[n+1] = ((c >> 12) & 0x3F) | 0x80; | |
u8[n+2] = ((c >> 6) & 0x3F) | 0x80; | |
u8[n+3] = (c & 0x3F) | 0x80; | |
n+=4; | |
} else if(c <= 0x3FFFFFF) { | |
u8[n] = (c >> 24) | 0xF8; | |
u8[n+1] = ((c >> 18) & 0x3F) | 0x80; | |
u8[n+2] = ((c >> 12) & 0x3F) | 0x80; | |
u8[n+3] = ((c >> 6) & 0x3F) | 0x80; | |
u8[n+4] = (c & 0x3F) | 0x80; | |
n+=5; | |
} else { | |
u8[n] = (c >>> 30) | 0xFC; | |
u8[n+1] = ((c >> 24) & 0x3F) | 0x80; | |
u8[n+2] = ((c >> 18) & 0x3F) | 0x80; | |
u8[n+3] = ((c >> 12) & 0x3F) | 0x80; | |
u8[n+4] = ((c >> 6) & 0x3F) | 0x80; | |
u8[n+5] = (c & 0x3F) | 0x80; | |
n+=6; | |
} | |
} | |
u8[v.len-1] = 0; // terminator | |
// h$log("### encodeUtf8: " + str); | |
// h$log(v); | |
return v; | |
} | |
// encode a javascript string to a zero terminated utf16 byte array | |
function h$encodeUtf16(str) { | |
var n = 0; | |
var i; | |
for(i=0;i<str.length;i++) { | |
var c = str.charCodeAt(i); | |
if(c <= 0xFFFF) { | |
n += 2; | |
} else { | |
n += 4; | |
} | |
} | |
var v = h$newByteArray(n+1); | |
var dv = v.dv; | |
n = 0; | |
for(i=0;i<str.length;i++) { | |
var c = str.charCodeAt(i); | |
if(c <= 0xFFFF) { | |
dv.setUint16(n, c, true); | |
n+=2; | |
} else { | |
var c0 = c - 0x10000; | |
dv.setUint16(n, c0 >> 10, true); | |
dv.setUint16(n+2, c0 & 0x3FF, true); | |
n+=4; | |
} | |
} | |
dv.setUint8(v.len-1,0); // terminator | |
return v; | |
} | |
/* | |
function h$encodeUtf16(str) { | |
var b = new DataView(new ArrayBuffer(str.length * 2)); | |
for(var i=str.length-1;i>=0;i--) { | |
b.setUint16(i<<1, str.charCodeAt(i)); | |
} | |
h$ret1 = 0; | |
return b; | |
} | |
var h$eU16 = h$encodeUtf16; | |
function h$decodeUtf16(v,start) { | |
return h$decodeUtf16(v, v.byteLength - start, start); | |
} | |
function h$decodeUtf16z(v,start) { | |
var len = v.byteLength - start; | |
for(var i=start;i<l;i+=2) { | |
if(v.getUint16(i) === 0) { | |
len = i; | |
break; | |
} | |
} | |
return h$decodeUtf16l(v,l,start) | |
} | |
*/ | |
function h$decodeUtf16l(v, byteLen, start) { | |
// perhaps we can apply it with an Uint16Array view, but that might give us endianness problems | |
var a = []; | |
for(var i=0;i<byteLen;i+=2) { | |
a[i>>1] = v.dv.getUint16(i+start,true); | |
} | |
return h$charCodeArrayToString(arr); | |
} | |
var h$dU16 = h$decodeUtf16; | |
// decode a buffer with UTF-8 chars to a JS string | |
// stop at the first zero | |
function h$decodeUtf8z(v,start) { | |
// h$log("h$decodeUtf8z"); | |
var n = start; | |
var max = v.len; | |
while(n < max) { | |
// h$log("### " + n + " got char: " + v.u8[n]); | |
if(v.u8[n] === 0) { break; } | |
n++; | |
} | |
return h$decodeUtf8(v,n,start); | |
} | |
// decode a buffer with Utf8 chars to a JS string | |
// invalid characters are ignored | |
function h$decodeUtf8(v,n0,start) { | |
// h$log("### decodeUtf8"); | |
// h$log(v); | |
var n = n0 || v.len; | |
var arr = []; | |
var i = start || 0; | |
var code; | |
var u8 = v.u8; | |
// h$log("### decoding, starting at: " + i); | |
while(i < n) { | |
var c = u8[i]; | |
while((c & 0xC0) === 0x80) { | |
c = u8[++i]; | |
} | |
// h$log("### lead char: " + c); | |
if((c & 0x80) === 0) { | |
code = (c & 0x7F); | |
i++; | |
} else if((c & 0xE0) === 0xC0) { | |
code = ( ((c & 0x1F) << 6) | |
| (u8[i+1] & 0x3F) | |
); | |
i+=2; | |
} else if((c & 0xF0) === 0xE0) { | |
code = ( ((c & 0x0F) << 12) | |
| ((u8[i+1] & 0x3F) << 6) | |
| (u8[i+2] & 0x3F) | |
); | |
i+=3; | |
} else if ((c & 0xF8) === 0xF0) { | |
code = ( ((c & 0x07) << 18) | |
| ((u8[i+1] & 0x3F) << 12) | |
| ((u8[i+2] & 0x3F) << 6) | |
| (u8[i+3] & 0x3F) | |
); | |
i+=4; | |
} else if((c & 0xFC) === 0xF8) { | |
code = ( ((c & 0x03) << 24) | |
| ((u8[i+1] & 0x3F) << 18) | |
| ((u8[i+2] & 0x3F) << 12) | |
| ((u8[i+3] & 0x3F) << 6) | |
| (u8[i+4] & 0x3F) | |
); | |
i+=5; | |
} else { | |
code = ( ((c & 0x01) << 30) | |
| ((u8[i+1] & 0x3F) << 24) | |
| ((u8[i+2] & 0x3F) << 18) | |
| ((u8[i+3] & 0x3F) << 12) | |
| ((u8[i+4] & 0x3F) << 6) | |
| (u8[i+5] & 0x3F) | |
); | |
i+=6; | |
} | |
// h$log("### decoded codePoint: " + code + " - " + String.fromCharCode(code)); // String.fromCodePoint(code)); | |
// need to deal with surrogate pairs | |
if(code > 0xFFFF) { | |
var offset = code - 0x10000; | |
arr.push(0xD800 + (offset >> 10), 0xDC00 + (offset & 0x3FF)); | |
} else { | |
arr.push(code); | |
} | |
} | |
return h$charCodeArrayToString(arr); | |
} | |
// fixme what if terminator, then we read past end | |
function h$decodeUtf16(v) { | |
var n = v.len; | |
var arr = []; | |
var dv = v.dv; | |
for(var i=0;i<n;i+=2) { | |
arr.push(dv.getUint16(i,true)); | |
} | |
return h$charCodeArrayToString(arr); | |
} | |
function h$charCodeArrayToString(arr) { | |
if(arr.length <= 60000) { | |
return String.fromCharCode.apply(this, arr); | |
} | |
var r = ''; | |
for(var i=0;i<arr.length;i+=60000) { | |
r += String.fromCharCode.apply(this, arr.slice(i, i+60000)); | |
} | |
return r; | |
} | |
function h$hs_iconv_open(to,to_off,from,from_off) { | |
h$errno = h$EINVAL; // no encodings supported | |
return -1; | |
// var fromStr = decodeUtf8(from, from_off); | |
// var toStr = decodeUtf8(to, to_off); | |
// h$log("#### hs_iconv_open: " + fromStr + " -> " + toStr); | |
// return 1; // fixme? | |
} | |
function h$hs_iconv_close(iconv) { | |
return 0; | |
} | |
// ptr* -> ptr (array) | |
function h$derefPtrA(ptr, ptr_off) { | |
return ptr.arr[ptr_off][0]; | |
} | |
// ptr* -> ptr (offset) | |
function h$derefPtrO(ptr, ptr_off) { | |
return ptr.arr[ptr_off][1]; | |
} | |
// word** -> word ptr[x][y] | |
function h$readPtrPtrU32(ptr, ptr_off, x, y) { | |
x = x || 0; | |
y = y || 0; | |
var arr = ptr.arr[ptr_off + 4 * x]; | |
return arr[0].dv.getInt32(arr[1] + 4 * y, true); | |
} | |
// char** -> char ptr[x][y] | |
function h$readPtrPtrU8(ptr, ptr_off, x, y) { | |
x = x || 0; | |
y = y || 0; | |
var arr = ptr.arr[ptr_off + 4 * x]; | |
return arr[0].dv.getUint8(arr[1] + y); | |
} | |
// word** ptr[x][y] = v | |
function h$writePtrPtrU32(ptr, ptr_off, v, x, y) { | |
x = x || 0; | |
y = y || 0; | |
var arr = ptr.arr[ptr_off + 4 * x]; | |
arr[0].dv.setInt32(arr[1] + y, v); | |
} | |
// unsigned char** ptr[x][y] = v | |
function h$writePtrPtrU8(ptr, ptr_off, v, x, y) { | |
x = x || 0; | |
y = y || 0; | |
var arr = ptr.arr[ptr_off+ 4 * x]; | |
arr[0].dv.setUint8(arr[1] + y, v); | |
} | |
// convert JavaScript String to a Haskell String | |
function h$toHsString(str) { | |
if(typeof str !== 'string') return h$ghczmprimZCGHCziTypesziZMZN; | |
var i = str.length - 1; | |
var r = h$ghczmprimZCGHCziTypesziZMZN; | |
while(i>=0) { | |
var cp = str.charCodeAt(i); | |
if(cp >= 0xDC00 && cp <= 0xDFFF && i > 0) { | |
--i; | |
cp = (cp - 0xDC00) + (str.charCodeAt(i) - 0xD800) * 1024 + 0x10000; | |
} | |
r = (h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, (cp), (r))); | |
--i; | |
} | |
return r; | |
} | |
// string must have been completely forced first | |
function h$fromHsString(str) { | |
var xs = ''; | |
while(((str).f === h$ghczmprimZCGHCziTypesziZC_con_e)) { | |
var h = ((str).d1); | |
xs += String.fromCharCode(((typeof(h) === 'number')?(h):(h).d1)); | |
str = ((str).d2); | |
} | |
return xs; | |
} | |
// list of JSVal to array, list must have been completely forced first | |
function h$fromHsListJSVal(xs) { | |
var arr = []; | |
while(((xs).f === h$ghczmprimZCGHCziTypesziZC_con_e)) { | |
arr.push(((((xs).d1)).d1)); | |
xs = ((xs).d2); | |
} | |
return arr; | |
} | |
// ascii only version of the above | |
function h$toHsStringA(str) { | |
if(typeof str !== 'string') return h$ghczmprimZCGHCziTypesziZMZN; | |
var i = str.length - 1; | |
var r = h$ghczmprimZCGHCziTypesziZMZN; | |
while(i>=0) { | |
r = (h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, (str.charCodeAt(i)), (r))); | |
--i; | |
} | |
return r; | |
} | |
// convert array with modified UTF-8 encoded text | |
function h$toHsStringMU8(arr) { | |
var accept = false, b, n = 0, cp = 0, r = h$ghczmprimZCGHCziTypesziZMZN; | |
while(i >= 0) { | |
b = arr[i]; | |
if(!(b & 128)) { | |
cp = b; | |
accept = true; | |
} else if((b & 192) === 128) { | |
cp += (b & 32) * Math.pow(64, n) | |
} else { | |
cp += (b&((1<<(6-n))-1)) * Math.pow(64, n); | |
accept = true; | |
} | |
if(accept) { | |
r = (h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, (cp), (r))); | |
cp = 0 | |
n = 0; | |
} else { | |
n++; | |
} | |
accept = false; | |
i--; | |
} | |
return r; | |
} | |
function h$toHsList(arr) { | |
var r = h$ghczmprimZCGHCziTypesziZMZN; | |
for(var i=arr.length-1;i>=0;i--) { | |
r = (h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, (arr[i]), (r))); | |
} | |
return r; | |
} | |
// array of JS values to Haskell list of JSVal | |
function h$toHsListJSVal(arr) { | |
var r = h$ghczmprimZCGHCziTypesziZMZN; | |
for(var i=arr.length-1;i>=0;i--) { | |
r = (h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, ((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (arr[i])))), (r))); | |
} | |
return r; | |
} | |
// unpack ascii string, append to existing Haskell string | |
function h$appendToHsStringA(str, appendTo) { | |
var i = str.length - 1; | |
var r = appendTo; | |
while(i>=0) { | |
r = (h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, (str.charCodeAt(i)), (r))); | |
--i; | |
} | |
return r; | |
} | |
// throw e wrapped in a GHCJS.Prim.JSException in the current thread | |
function h$throwJSException(e) { | |
// create a JSException object and wrap it in a SomeException | |
// adding the Exception dictionary | |
var someE = (h$c2(h$baseZCGHCziExceptionziSomeException_con_e,(h$ghcjszmprimZCGHCJSziPrimzizdfExceptionJSException),((h$c2(h$ghcjszmprimZCGHCJSziPrimziJSException_con_e,((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (e)))),(h$toHsString(e.toString()))))))); | |
return h$throw(someE, true); | |
} | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
// values defined in Gen2.ClosureInfo | |
// thread status | |
/* | |
* low-level heap object manipulation macros | |
*/ | |
// GHCJS.Prim.JSVal | |
// GHCJS.Prim.JSException | |
// Exception dictionary for JSException | |
// SomeException | |
// GHC.Ptr.Ptr | |
// GHC.Integer.GMP.Internals | |
// Data.Maybe.Maybe | |
// #define HS_NOTHING h$nothing | |
// Data.List | |
// Data.Text | |
// Data.Text.Lazy | |
// black holes | |
// can we skip the indirection for black holes? | |
// resumable thunks | |
// general deconstruction | |
// retrieve a numeric value that's possibly stored as an indirection | |
// generic lazy values | |
// generic data constructors and selectors | |
// unboxed tuple returns | |
// #define RETURN_UBX_TUP1(x) return x; | |
// set up debug logging for the current JS environment/engine | |
// browser also logs to <div id="output"> if jquery is detected | |
// the various debug tracing options use h$log | |
var h$glbl; | |
function h$getGlbl() { h$glbl = this; } | |
h$getGlbl(); | |
function h$log() { | |
try { | |
if(h$glbl) { | |
if(h$glbl.console && h$glbl.console.log) { | |
h$glbl.console.log.apply(h$glbl.console,arguments); | |
} else { | |
h$glbl.print.apply(this,arguments); | |
} | |
} else { | |
if(typeof console !== 'undefined') { | |
console.log.apply(console, arguments); | |
} else if(typeof print !== 'undefined') { | |
print.apply(null, arguments); | |
} | |
} | |
} catch(ex) { | |
// ignore console.log exceptions (for example for IE9 when console is closed) | |
} | |
} | |
function h$collectProps(o) { | |
var props = []; | |
for(var p in o) { props.push(p); } | |
return("{"+props.join(",")+"}"); | |
} | |
// load the command line arguments in h$programArgs | |
// the first element is the program name | |
var h$programArgs; | |
if(h$isNode) { | |
h$programArgs = process.argv.slice(1); | |
} else if(h$isJvm) { | |
h$programArgs = h$getGlobal(this).arguments.slice(0); | |
h$programArgs.unshift("a.js"); | |
} else if(h$isJsShell && typeof h$getGlobal(this).scriptArgs !== 'undefined') { | |
h$programArgs = h$getGlobal(this).scriptArgs.slice(0); | |
h$programArgs.unshift("a.js"); | |
} else if((h$isJsShell || h$isJsCore) && typeof h$getGlobal(this).arguments !== 'undefined') { | |
h$programArgs = h$getGlobal(this).arguments.slice(0); | |
h$programArgs.unshift("a.js"); | |
} else { | |
h$programArgs = [ "a.js" ]; | |
} | |
function h$getProgArgv(argc_v,argc_off,argv_v,argv_off) { | |
; | |
var c = h$programArgs.length; | |
if(c === 0) { | |
argc_v.dv.setInt32(argc_off, 0, true); | |
} else { | |
argc_v.dv.setInt32(argc_off, c, true); | |
var argv = h$newByteArray(4*c); | |
argv.arr = []; | |
for(var i=0;i<h$programArgs.length;i++) { | |
argv.arr[4*i] = [ h$encodeUtf8(h$programArgs[i]), 0 ]; | |
} | |
if(!argv_v.arr) { argv_v.arr = []; } | |
argv_v.arr[argv_off] = [argv, 0]; | |
} | |
} | |
function h$setProgArgv(n, ptr_d, ptr_o) { | |
args = []; | |
for(var i=0;i<n;i++) { | |
var p = ptr_d.arr[ptr_o+4*i]; | |
var arg = h$decodeUtf8z(p[0], p[1]); | |
args.push(arg); | |
} | |
h$programArgs = args; | |
} | |
function h$getpid() { | |
if(h$isNode) return process.id; | |
return 0; | |
} | |
function h$__hscore_environ() { | |
; | |
if(h$isNode) { | |
var env = [], i; | |
for(i in process.env) env.push(i + '=' + process.env[i]); | |
if(env.length === 0) return null; | |
var p = h$newByteArray(4*env.length+1); | |
p.arr = []; | |
for(i=0;i<env.length;i++) p.arr[4*i] = [h$encodeUtf8(env[i]), 0]; | |
p.arr[4*env.length] = [null, 0]; | |
{ h$ret1 = (0); return (p); }; | |
} | |
{ h$ret1 = (0); return (null); }; | |
} | |
function h$getenv(name, name_off) { | |
; | |
if(h$isNode) { | |
var n = h$decodeUtf8z(name, name_off); | |
if(typeof process.env[n] !== 'undefined') | |
{ h$ret1 = (0); return (h$encodeUtf8(process.env[n])); }; | |
} | |
{ h$ret1 = (0); return (null); }; | |
} | |
function h$errorBelch() { | |
h$log("### errorBelch: do we need to handle a vararg function here?"); | |
} | |
function h$errorBelch2(buf1, buf_offset1, buf2, buf_offset2) { | |
// log("### errorBelch2"); | |
h$errorMsg(h$decodeUtf8z(buf1, buf_offset1), h$decodeUtf8z(buf2, buf_offset2)); | |
} | |
function h$debugBelch2(buf1, buf_offset1, buf2, buf_offset2) { | |
h$errorMsg(h$decodeUtf8z(buf1, buf_offset1), h$decodeUtf8z(buf2, buf_offset2)); | |
} | |
function h$errorMsg(pat) { | |
function stripTrailingNewline(xs) { | |
return xs.replace(/\r?\n$/, ""); | |
} | |
// poor man's vprintf | |
var str = pat; | |
for(var i=1;i<arguments.length;i++) { | |
str = str.replace(/%s/, arguments[i]); | |
} | |
if(h$isGHCJSi) { | |
// ignore message | |
} else if(h$isNode) { | |
process.stderr.write(str); | |
} else if (h$isJsShell && typeof printErr !== 'undefined') { | |
if(str.length) printErr(stripTrailingNewline(str)); | |
} else if (h$isJsShell && typeof putstr !== 'undefined') { | |
putstr(str); | |
} else if (h$isJsCore) { | |
if(str.length) { | |
if(h$base_stderrLeftover.val !== null) { | |
debug(h$base_stderrLeftover.val + stripTrailingNewline(str)); | |
h$base_stderrLeftover.val = null; | |
} else { | |
debug(stripTrailingNewline(str)); | |
} | |
} | |
} else { | |
if(typeof console !== 'undefined') { | |
console.log(str); | |
} | |
} | |
} | |
// this needs to be imported with foreign import ccall safe/interruptible | |
function h$performMajorGC() { | |
// save current thread state so we can enter the GC | |
var t = h$currentThread, err = null; | |
t.sp = h$sp; | |
h$currentThread = null; | |
try { | |
h$gc(t); | |
} catch(e) { | |
err = e; | |
} | |
// restore thread state | |
h$currentThread = t; | |
h$sp = t.sp; | |
h$stack = t.stack; | |
if(err) throw err; | |
} | |
function h$baseZCSystemziCPUTimeZCgetrusage() { | |
return 0; | |
} | |
function h$getrusage() { | |
return 0; | |
} | |
// fixme need to fix these struct locations | |
function h$gettimeofday(tv_v,tv_o,tz_v,tz_o) { | |
var now = Date.now(); | |
tv_v.dv.setInt32(tv_o, (now / 1000)|0, true); | |
tv_v.dv.setInt32(tv_o + 4, ((now % 1000) * 1000)|0, true); | |
if(tv_v.len >= tv_o + 12) { | |
tv_v.dv.setInt32(tv_o + 8, ((now % 1000) * 1000)|0, true); | |
} | |
return 0; | |
} | |
function h$traceEvent(ev_v,ev_o) { | |
h$errorMsg(h$decodeUtf8z(ev_v, ev_o)); | |
} | |
function h$traceMarker(ev_v,ev_o) { | |
h$errorMsg(h$decodeUtf8z(ev_v, ev_o)); | |
} | |
var h$__hscore_gettimeofday = h$gettimeofday; | |
var h$myTimeZone = h$encodeUtf8("UTC"); | |
function h$localtime_r(timep_v, timep_o, result_v, result_o) { | |
var t = timep_v.i3[timep_o]; | |
var d = new Date(t * 1000); | |
result_v.dv.setInt32(result_o , d.getSeconds(), true); | |
result_v.dv.setInt32(result_o + 4 , d.getMinutes(), true); | |
result_v.dv.setInt32(result_o + 8 , d.getHours(), true); | |
result_v.dv.setInt32(result_o + 12, d.getDate(), true); | |
result_v.dv.setInt32(result_o + 16, d.getMonth(), true); | |
result_v.dv.setInt32(result_o + 20, d.getFullYear()-1900, true); | |
result_v.dv.setInt32(result_o + 24, d.getDay(), true); | |
result_v.dv.setInt32(result_o + 28, 0, true); // fixme yday 1-365 (366?) | |
result_v.dv.setInt32(result_o + 32, -1, true); // dst information unknown | |
result_v.dv.setInt32(result_o + 40, 0, true); // gmtoff? | |
if(!result_v.arr) result_v.arr = []; | |
result_v.arr[result_o + 40] = [h$myTimeZone, 0]; | |
result_v.arr[result_o + 48] = [h$myTimeZone, 0]; | |
{ h$ret1 = (result_o); return (result_v); }; | |
} | |
var h$__hscore_localtime_r = h$localtime_r; | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
// some Enum conversion things | |
// an array of generic enums | |
var h$enums = []; | |
function h$initEnums() { | |
for(var i=0;i<256;i++) { | |
h$enums[i] = h$makeEnum(i); | |
} | |
} | |
h$initStatic.push(h$initEnums); | |
function h$makeEnum(tag) { | |
var f = function() { | |
return h$stack[h$sp]; | |
} | |
h$setObjInfo(f, 2, "Enum", [], tag+1, 0, [1], null); | |
return h$c0(f); | |
} | |
// used for all non-Bool enums | |
function h$tagToEnum(tag) { | |
if(tag >= h$enums.length) { | |
return h$makeEnum(tag); | |
} else { | |
return h$enums[tag]; | |
} | |
} | |
function h$dataTag(e) { | |
return (e===true)?1:((typeof e !== 'object')?0:(e.f.a-1)); | |
} | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
// weak reference support | |
// values defined in Gen2.ClosureInfo | |
// thread status | |
/* | |
* low-level heap object manipulation macros | |
*/ | |
// GHCJS.Prim.JSVal | |
// GHCJS.Prim.JSException | |
// Exception dictionary for JSException | |
// SomeException | |
// GHC.Ptr.Ptr | |
// GHC.Integer.GMP.Internals | |
// Data.Maybe.Maybe | |
// #define HS_NOTHING h$nothing | |
// Data.List | |
// Data.Text | |
// Data.Text.Lazy | |
// black holes | |
// can we skip the indirection for black holes? | |
// resumable thunks | |
// general deconstruction | |
// retrieve a numeric value that's possibly stored as an indirection | |
// generic lazy values | |
// generic data constructors and selectors | |
// unboxed tuple returns | |
// #define RETURN_UBX_TUP1(x) return x; | |
var h$weakPointerList = []; | |
// called by the GC after marking the heap | |
function h$finalizeWeaks(toFinalize) { | |
var mark = h$gcMark; | |
var i, w; | |
; | |
// start a finalizer thread if any finalizers need to be run | |
if(toFinalize.length > 0) { | |
var t = new h$Thread(); | |
for(i=0;i<toFinalize.length;i++) { | |
w = toFinalize[i]; | |
t.sp += 6; | |
t.stack[t.sp-5] = 0; // mask | |
t.stack[t.sp-4] = h$noop; // handler, dummy | |
t.stack[t.sp-3] = h$catch_e; | |
t.stack[t.sp-2] = h$ap_1_0; | |
t.stack[t.sp-1] = w.finalizer; | |
t.stack[t.sp] = h$return; | |
w.finalizer = null; | |
} | |
h$wakeupThread(t); | |
} | |
} | |
var h$weakN = 0; | |
/** @constructor */ | |
function h$Weak(key, val, finalizer) { | |
if(typeof key !== 'object') { | |
// can't attach a StableName to objects with unboxed storage | |
// our weak ref will be finalized soon. | |
; | |
this.keym = new h$StableName(0); | |
} else { | |
if(typeof key.m !== 'object') key.m = new h$StableName(key.m); | |
this.keym = key.m; | |
} | |
; | |
this.keym = key.m; | |
this.val = val; | |
this.finalizer = null; | |
if(finalizer !== null) { | |
this.finalizer = finalizer; | |
} | |
this.m = 0; | |
this._key = ++h$weakN; | |
h$weakPointerList.push(this); | |
} | |
function h$makeWeak(key, val, fin) { | |
; | |
return new h$Weak(key, val, fin) | |
} | |
function h$makeWeakNoFinalizer(key, val) { | |
; | |
return new h$Weak(key, val, null); | |
} | |
function h$finalizeWeak(w) { | |
; | |
w.val = null; | |
if(w.finalizer === null || w.finalizer.finalizer === null) { | |
{ h$ret1 = (0); return (null); }; | |
} else { | |
var r = w.finalizer; | |
w.finalizer = null; | |
{ h$ret1 = (1); return (r); }; | |
} | |
} | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
// values defined in Gen2.ClosureInfo | |
// thread status | |
/* | |
* low-level heap object manipulation macros | |
*/ | |
// GHCJS.Prim.JSVal | |
// GHCJS.Prim.JSException | |
// Exception dictionary for JSException | |
// SomeException | |
// GHC.Ptr.Ptr | |
// GHC.Integer.GMP.Internals | |
// Data.Maybe.Maybe | |
// #define HS_NOTHING h$nothing | |
// Data.List | |
// Data.Text | |
// Data.Text.Lazy | |
// black holes | |
// can we skip the indirection for black holes? | |
// resumable thunks | |
// general deconstruction | |
// retrieve a numeric value that's possibly stored as an indirection | |
// generic lazy values | |
// generic data constructors and selectors | |
// unboxed tuple returns | |
// #define RETURN_UBX_TUP1(x) return x; | |
// preemptive threading support | |
// run gc when this much time has passed (ms) | |
// preempt threads after the scheduling quantum (ms) | |
// check sched quantum after 10*GHCJS_SCHED_CHECK calls | |
// yield to js after running haskell for GHCJS_BUSY_YIELD ms | |
var h$threadIdN = 0; | |
// all threads except h$currentThread | |
// that are not finished/died can be found here | |
var h$threads = new h$Queue(); | |
var h$blocked = new h$Set(); | |
/** @constructor */ | |
function h$Thread() { | |
this.tid = ++h$threadIdN; | |
this.status = (0); | |
this.stack = [h$done, 0, h$baseZCGHCziConcziSynczireportError, h$catch_e]; | |
this.sp = 3; | |
this.mask = 0; // async exceptions masked (0 unmasked, 1: uninterruptible, 2: interruptible) | |
this.interruptible = false; // currently in an interruptible operation | |
this.excep = []; // async exceptions waiting for unmask of this thread | |
this.delayed = false; // waiting for threadDelay | |
this.blockedOn = null; // object on which thread is blocked | |
this.retryInterrupted = null; // how to retry blocking operation when interrupted | |
this.transaction = null; // for STM | |
this.noPreemption = false; | |
this.isSynchronous = false; | |
this.continueAsync = false; | |
this.m = 0; // gc mark | |
this.result = null; // result value (used for GHCJS.Foreign.Callback) | |
this.resultIsException = false; | |
this._key = this.tid; // for storing in h$Set / h$Map | |
} | |
function h$rts_getThreadId(t) { | |
return t.tid; | |
} | |
function h$cmp_thread(t1,t2) { | |
if(t1.tid < t2.tid) return -1; | |
if(t1.tid > t2.tid) return 1; | |
return 0; | |
} | |
// description of the thread, if unlabeled then just the thread id | |
function h$threadString(t) { | |
if(t === null) { | |
return "<no thread>"; | |
} else if(t.label) { | |
var str = h$decodeUtf8z(t.label[0], t.label[1]); | |
return str + " (" + t.tid + ")"; | |
} else { | |
return (""+t.tid); | |
} | |
} | |
function h$fork(a, inherit) { | |
h$r1 = h$forkThread(a, inherit); | |
return h$yield(); | |
} | |
function h$forkThread(a, inherit) { | |
var t = new h$Thread(); | |
; | |
if(inherit && h$currentThread) { | |
t.mask = h$currentThread.mask; | |
} | |
// TRACE_SCHEDULER("sched: action forked: " + a.f.n); | |
t.stack[4] = h$ap_1_0; | |
t.stack[5] = a; | |
t.stack[6] = h$return; | |
t.sp = 6; | |
h$wakeupThread(t); | |
return t; | |
} | |
function h$threadStatus(t) { | |
// status, capability, locked | |
{ h$ret1 = (1); h$ret2 = (0); return (t.status); }; | |
} | |
function h$waitRead(fd) { | |
h$fds[fd].waitRead.push(h$currentThread); | |
h$currentThread.interruptible = true; | |
return h$blockThread(h$currentThread,fd,[h$waitRead,fd]); | |
} | |
function h$waitWrite(fd) { | |
h$fds[fd].waitWrite.push(h$currentThread); | |
h$currentThread.interruptible = true; | |
return h$blockThread(h$currentThread,fd,[h$waitWrite,fd]); | |
} | |
// threadDelay support: | |
var h$delayed = new h$HeapSet(); | |
function h$wakeupDelayed(now) { | |
while(h$delayed.size() > 0 && h$delayed.peekPrio() < now) { | |
var t = h$delayed.pop(); | |
; | |
// might have been woken up early, don't wake up again in that case | |
if(t.delayed) { | |
t.delayed = false; | |
h$wakeupThread(t); | |
} | |
} | |
} | |
function h$delayThread(time) { | |
var now = Date.now(); | |
var ms = time/1000; // we have no microseconds in JS | |
; | |
h$delayed.add(now+ms, h$currentThread); | |
h$currentThread.delayed = true; | |
return h$blockThread(h$currentThread, h$delayed,[h$resumeDelayThread]); | |
} | |
function h$resumeDelayThread() { | |
h$r1 = false; | |
return h$rs(); // stack[h$sp]; | |
} | |
function h$yield() { | |
if(h$currentThread.isSynchronous) { | |
return h$stack[h$sp]; | |
} else { | |
h$sp += 2; | |
h$stack[h$sp-1] = h$r1; | |
h$stack[h$sp] = h$return; | |
h$currentThread.sp = h$sp; | |
return h$reschedule; | |
} | |
} | |
// raise the async exception in the thread if not masked | |
function h$killThread(t, ex) { | |
; | |
if(t === h$currentThread) { | |
// if target is self, then throw even if masked | |
h$sp += 2; | |
h$stack[h$sp-1] = h$r1; | |
h$stack[h$sp] = h$return; | |
return h$throw(ex,true); | |
} else { | |
; | |
if(t.mask === 0 || (t.mask === 2 && t.interruptible)) { | |
if(t.stack) { // finished threads don't have a stack anymore | |
h$forceWakeupThread(t); | |
t.sp += 2; | |
t.stack[t.sp-1] = ex; | |
t.stack[t.sp] = h$raiseAsync_frame; | |
} | |
return h$stack ? h$stack[h$sp] : null; | |
} else { | |
t.excep.push([h$currentThread,ex]); | |
h$currentThread.interruptible = true; | |
h$sp += 2; | |
h$stack[h$sp-1] = h$r1; | |
h$stack[h$sp] = h$return; | |
return h$blockThread(h$currentThread,t,null); | |
} | |
} | |
} | |
function h$maskStatus() { | |
; | |
return h$currentThread.mask; | |
} | |
function h$maskAsync(a) { | |
; | |
if(h$currentThread.mask !== 2) { | |
if(h$currentThread.mask === 0 && h$stack[h$sp] !== h$maskFrame && h$stack[h$sp] !== h$maskUnintFrame) { | |
h$stack[++h$sp] = h$unmaskFrame; | |
} | |
if(h$currentThread.mask === 1) { | |
h$stack[++h$sp] = h$maskUnintFrame; | |
} | |
h$currentThread.mask = 2; | |
} | |
h$r1 = a; | |
return h$ap_1_0_fast(); | |
} | |
function h$maskUnintAsync(a) { | |
; | |
if(h$currentThread.mask !== 1) { | |
if(h$currentThread.mask === 2) { | |
h$stack[++h$sp] = h$maskFrame; | |
} else { | |
h$stack[++h$sp] = h$unmaskFrame; | |
} | |
h$currentThread.mask = 1; | |
} | |
h$r1 = a; | |
return h$ap_1_0_fast(); | |
} | |
function h$unmaskAsync(a) { | |
; | |
if(h$currentThread.excep.length > 0) { | |
h$currentThread.mask = 0; | |
h$sp += 3; | |
h$stack[h$sp-2] = h$ap_1_0; | |
h$stack[h$sp-1] = a; | |
h$stack[h$sp] = h$return; | |
return h$reschedule; | |
} | |
if(h$currentThread.mask !== 0) { | |
if(h$stack[h$sp] !== h$unmaskFrame) { | |
if(h$currentThread.mask === 2) { | |
h$stack[++h$sp] = h$maskFrame; | |
} else { | |
h$stack[++h$sp] = h$maskUnintFrame; | |
} | |
} | |
h$currentThread.mask = 0; | |
} | |
h$r1 = a; | |
return h$ap_1_0_fast(); | |
} | |
function h$pendingAsync() { | |
var t = h$currentThread; | |
return (t.excep.length > 0 && (t.mask === 0 || (t.mask === 2 && t.interruptible))); | |
} | |
// post the first of the queued async exceptions to | |
// this thread, restore frame is in thread if alreadySuspended | |
function h$postAsync(alreadySuspended,next) { | |
var t = h$currentThread; | |
var v = t.excep.shift(); | |
; | |
var tposter = v[0]; // posting thread, blocked | |
var ex = v[1]; // the exception | |
if(v !== null && tposter !== null) { | |
h$wakeupThread(tposter); | |
} | |
if(!alreadySuspended) { | |
h$suspendCurrentThread(next); | |
} | |
h$sp += 2; | |
h$stack[h$sp-1] = ex; | |
h$stack[h$sp] = h$raiseAsync_frame; | |
t.sp = h$sp; | |
} | |
// wakeup thread, thread has already been removed | |
// from any queues it was blocked on | |
function h$wakeupThread(t) { | |
; | |
if(t.status === (1)) { | |
t.blockedOn = null; | |
t.status = (0); | |
h$blocked.remove(t); | |
} | |
t.interruptible = false; | |
t.retryInterrupted = null; | |
h$threads.enqueue(t); | |
h$startMainLoop(); | |
} | |
// force wakeup, remove this thread from any | |
// queue it's blocked on | |
function h$forceWakeupThread(t) { | |
; | |
if(t.status === (1)) { | |
h$removeThreadBlock(t); | |
h$wakeupThread(t); | |
} | |
} | |
function h$removeThreadBlock(t) { | |
var i; | |
if(t.status === (1)) { | |
var o = t.blockedOn; | |
if(o === null || o === undefined) { | |
throw ("h$removeThreadBlock: blocked on null or undefined: " + h$threadString(t)); | |
} else if(o === h$delayed) { | |
// thread delayed | |
h$delayed.remove(t); | |
t.delayed = false; | |
} else if(o instanceof h$MVar) { | |
; | |
; | |
// fixme this is rather inefficient | |
var r, rq = new h$Queue(); | |
while((r = o.readers.dequeue()) !== null) { | |
if(r !== t) rq.enqueue(r); | |
} | |
var w, wq = new h$Queue(); | |
while ((w = o.writers.dequeue()) !== null) { | |
if(w[0] !== t) wq.enqueue(w); | |
} | |
o.readers = rq; | |
o.writers = wq; | |
if(o.waiters) { | |
var wa = [], wat; | |
for(i=0;i<o.waiters.length;i++) { | |
wat = o.waiters[i]; | |
if(wat !== t) wa.push(wat); | |
} | |
o.waiters = wa; | |
} | |
; | |
/* } else if(o instanceof h$Fd) { | |
TRACE_SCHEDULER("blocked on fd"); | |
h$removeFromArray(o.waitRead,t); | |
h$removeFromArray(o.waitWrite,t); */ | |
} else if(o instanceof h$Thread) { | |
; | |
// set thread (first in pair) to null, exception will still be delivered | |
// but this thread not woken up again | |
// fixme: are these the correct semantics? | |
for(i=0;i<o.excep.length;i++) { | |
if(o.excep[i][0] === t) { | |
o.excep[i][0] = null; | |
break; | |
} | |
} | |
} else if (o instanceof h$TVarsWaiting) { | |
h$stmRemoveBlockedThread(o, t) | |
} else if((typeof (o) === 'object' && (o) && (o).f && (o).f.t === (5))) { | |
; | |
h$removeFromArray(((o).d2),t); | |
} else { | |
throw ("h$removeThreadBlock: blocked on unknown object: " + h$collectProps(o)); | |
} | |
if(t.retryInterrupted) { | |
t.sp+=2; | |
t.stack[t.sp-1] = t.retryInterrupted; | |
t.stack[t.sp] = h$retryInterrupted; | |
} | |
} | |
} | |
function h$removeFromArray(a,o) { | |
var i; | |
while((i = a.indexOf(o)) !== -1) { | |
a.splice(i,1); | |
} | |
} | |
function h$finishThread(t) { | |
; | |
t.status = (16); | |
h$blocked.remove(t); | |
t.stack = null; | |
t.mask = 0; | |
for(var i=0;i<t.excep.length;i++) { | |
var v = t.excep[i]; | |
var tposter = v[0]; | |
if(v !== null && tposter !== null) { | |
h$wakeupThread(tposter); | |
} | |
} | |
t.excep = []; | |
} | |
function h$blockThread(t,o,resume) { | |
; | |
if(t !== h$currentThread) { | |
throw "h$blockThread: blocked thread is not the current thread"; | |
} | |
if(o === undefined || o === null) { | |
throw ("h$blockThread, no block object: " + h$threadString(t)); | |
} | |
t.status = (1); | |
t.blockedOn = o; | |
t.retryInterrupted = resume; | |
t.sp = h$sp; | |
h$blocked.add(t); | |
return h$reschedule; | |
} | |
// the main scheduler, called from h$mainLoop | |
// returns null if nothing to do, otherwise | |
// the next function to run | |
var h$lastGc = Date.now(); | |
var h$gcInterval = 1000; // ms | |
function h$scheduler(next) { | |
; | |
// if we have a running synchronous thread, the only thing we can do is continue | |
if(h$currentThread && | |
h$currentThread.isSynchronous && | |
h$currentThread.status === (0)) { | |
return next; | |
} | |
var now = Date.now(); | |
h$wakeupDelayed(now); | |
// find the next runnable thread in the run queue | |
// remove non-runnable threads | |
if(h$currentThread && h$pendingAsync()) { | |
; | |
if(h$currentThread.status !== (0)) { | |
h$forceWakeupThread(h$currentThread); | |
h$currentThread.status = (0); | |
} | |
h$postAsync(next === h$reschedule, next); | |
return h$stack[h$sp]; | |
} | |
var t; | |
while(t = h$threads.dequeue()) { | |
if(t.status === (0)) { break; } | |
} | |
// if no other runnable threads, just continue current (if runnable) | |
if(t === null) { | |
; | |
if(h$currentThread && h$currentThread.status === (0)) { | |
// do gc after a while | |
if(now - h$lastGc > h$gcInterval) { | |
// save active data for the thread on its stack | |
if(next !== h$reschedule && next !== null) { | |
h$suspendCurrentThread(next); | |
next = h$stack[h$sp]; | |
} | |
var ct = h$currentThread; | |
h$currentThread = null; | |
h$gc(ct); | |
h$currentThread = ct; | |
// gc might replace the stack of a thread, so reload it | |
h$stack = h$currentThread.stack; | |
h$sp = h$currentThread.sp | |
} | |
; | |
return (next===h$reschedule || next === null)?h$stack[h$sp]:next; // just continue | |
} else { | |
; | |
h$currentThread = null; | |
// We could set a timer here so we do a gc even if Haskell pauses for a long time. | |
// However, currently this isn't necessary because h$mainLoop always sets a timer | |
// before it pauses. | |
if(now - h$lastGc > h$gcInterval) | |
h$gc(null); | |
return null; // pause the haskell runner | |
} | |
} else { // runnable thread in t, switch to it | |
; | |
if(h$currentThread !== null) { | |
if(h$currentThread.status === (0)) { | |
h$threads.enqueue(h$currentThread); | |
} | |
// if h$reschedule called, thread takes care of suspend | |
if(next !== h$reschedule && next !== null) { | |
; | |
// suspend thread: push h$restoreThread stack frame | |
h$suspendCurrentThread(next); | |
} else { | |
; | |
h$currentThread.sp = h$sp; | |
} | |
if(h$pendingAsync()) h$postAsync(true, next); | |
} else { | |
; | |
} | |
// gc if needed | |
if(now - h$lastGc > h$gcInterval) { | |
h$currentThread = null; | |
h$gc(t); | |
} | |
// schedule new one | |
h$currentThread = t; | |
h$stack = t.stack; | |
h$sp = t.sp; | |
; | |
// TRACE_SCHEDULER("sp thing: " + h$stack[h$sp].n); | |
// h$dumpStackTop(h$stack,0,h$sp); | |
return h$stack[h$sp]; | |
} | |
} | |
function h$scheduleMainLoop() { | |
; | |
if(h$mainLoopImmediate) return; | |
h$clearScheduleMainLoop(); | |
if(h$delayed.size() === 0) { | |
if(typeof setTimeout !== 'undefined') { | |
; | |
h$mainLoopTimeout = setTimeout(h$mainLoop, h$gcInterval); | |
} | |
return; | |
} | |
var now = Date.now(); | |
var delay = Math.min(Math.max(h$delayed.peekPrio()-now, 0), h$gcInterval); | |
if(typeof setTimeout !== 'undefined') { | |
if(delay >= 1) { | |
; | |
// node.js 0.10.30 has trouble with non-integral delays | |
h$mainLoopTimeout = setTimeout(h$mainLoop, Math.round(delay)); | |
} else { | |
h$mainLoopImmediate = setImmediate(h$mainLoop); | |
} | |
} | |
} | |
var h$animationFrameMainLoop = false; | |
function h$clearScheduleMainLoop() { | |
if(h$mainLoopTimeout) { | |
clearTimeout(h$mainLoopTimeout); | |
h$mainLoopTimeout = null; | |
} | |
if(h$mainLoopImmediate) { | |
clearImmediate(h$mainLoopImmediate); | |
h$mainLoopImmediate = null; | |
} | |
if(h$mainLoopFrame) { | |
cancelAnimationFrame(h$mainLoopFrame); | |
h$mainLoopFrame = null; | |
} | |
} | |
function h$startMainLoop() { | |
; | |
if(h$running) return; | |
if(typeof setTimeout !== 'undefined') { | |
if(!h$mainLoopImmediate) { | |
h$clearScheduleMainLoop(); | |
h$mainLoopImmediate = setImmediate(h$mainLoop); | |
} | |
} else { | |
while(true) { | |
// the try/catch block appears to prevent a crash with | |
// Safari on iOS 10, even though this path is never taken | |
// in a browser. | |
try { | |
h$mainLoop(); | |
} catch(e) { | |
throw e; | |
} | |
} | |
} | |
} | |
var h$busyYield = 500; | |
var h$schedQuantum = 25; | |
var h$mainLoopImmediate = null; // immediate id if main loop has been scheduled immediately | |
var h$mainLoopTimeout = null; // timeout id if main loop has been scheduled with a timeout | |
var h$mainLoopFrame = null; // timeout id if main loop has been scheduled with an animation frame | |
var h$running = false; | |
var h$nextThread = null; | |
function h$mainLoop() { | |
if(h$running) return; | |
h$clearScheduleMainLoop(); | |
if(h$currentThread) { | |
h$scheduleMainLoop(); | |
return; | |
} | |
h$running = true; | |
h$runInitStatic(); | |
h$currentThread = h$nextThread; | |
if(h$nextThread !== null) { | |
h$stack = h$currentThread.stack; | |
h$sp = h$currentThread.sp; | |
} | |
var c = null; | |
var start = Date.now(); | |
do { | |
c = h$scheduler(c); | |
if(c === null) { // no running threads | |
h$nextThread = null; | |
h$running = false; | |
h$currentThread = null; | |
h$scheduleMainLoop(); | |
return; | |
} | |
// yield to js after h$busyYield (default value GHCJS_BUSY_YIELD) | |
if(!h$currentThread.isSynchronous && Date.now() - start > h$busyYield) { | |
; | |
if(c !== h$reschedule) h$suspendCurrentThread(c); | |
h$nextThread = h$currentThread; | |
h$currentThread = null; | |
h$running = false; | |
if(h$animationFrameMainLoop) { | |
h$mainLoopFrame = requestAnimationFrame(h$mainLoop); | |
} else { | |
h$mainLoopImmediate = setImmediate(h$mainLoop); | |
} | |
return; | |
} | |
c = h$runThreadSliceCatch(c); | |
} while(true); | |
} | |
function h$runThreadSliceCatch(c) { | |
try { | |
return h$runThreadSlice(c); | |
} catch(e) { | |
// uncaught exception in haskell code, kill thread | |
c = null; | |
if(h$stack && h$stack[0] === h$doneMain_e) { | |
h$stack = null; | |
h$reportMainLoopException(e, true); | |
h$doneMain_e(); | |
} else { | |
h$stack = null; | |
h$reportMainLoopException(e, false); | |
} | |
h$finishThread(h$currentThread); | |
h$currentThread.status = (17); | |
h$currentThread = null; | |
} | |
return h$reschedule; | |
} | |
/* | |
run thread h$currentThread for a single time slice | |
- c: the next function to call from the trampoline | |
returns: | |
the next function to call in this thread | |
preconditions: | |
h$currentThread is the thread to run | |
h$stack is the stack of this thread | |
h$sp is the stack pointer | |
any global variables needed to pass arguments have been set | |
the caller has to update the thread state object | |
*/ | |
function h$runThreadSlice(c) { | |
var count, scheduled = Date.now(); | |
while(c !== h$reschedule && | |
(h$currentThread.noPreemption || h$currentThread.isSynchronous || | |
(Date.now() - scheduled < h$schedQuantum))) { | |
count = 0; | |
while(c !== h$reschedule && ++count < 1000) { | |
c = c(); | |
c = c(); | |
c = c(); | |
c = c(); | |
c = c(); | |
c = c(); | |
c = c(); | |
c = c(); | |
c = c(); | |
c = c(); | |
} | |
if(c === h$reschedule && | |
(h$currentThread.noPreemption || h$currentThread.isSynchronous) && | |
h$currentThread.status === (1)) { | |
c = h$handleBlockedSyncThread(c); | |
} | |
} | |
return c; | |
} | |
function h$reportMainLoopException(e, isMainThread) { | |
if(e instanceof h$ThreadAbortedError) return; | |
var main = isMainThread ? " main" : ""; | |
h$log("uncaught exception in Haskell" + main + " thread: " + e.toString()); | |
if(e.stack) h$log(e.stack); | |
} | |
function h$handleBlockedSyncThread(c) { | |
; | |
/* | |
if we have a blocked synchronous/non-preemptible thread, | |
and it's blocked on a black hole, first try to clear | |
it. | |
*/ | |
var bo = h$currentThread.blockedOn; | |
if(h$currentThread.status === (1) && | |
(typeof (bo) === 'object' && (bo) && (bo).f && (bo).f.t === (5)) && | |
h$runBlackholeThreadSync(bo)) { | |
; | |
c = h$stack[h$sp]; | |
} | |
/* | |
if still blocked, then either fall back to async, | |
or throw a WouldBlock exception | |
*/ | |
if(h$currentThread.isSynchronous && h$currentThread.status === (1)) { | |
if(h$currentThread.continueAsync) { | |
h$currentThread.isSynchronous = false; | |
h$currentThread.continueAsync = false; | |
} else if(h$currentThread.isSynchronous) { | |
; | |
h$sp += 2; | |
h$currentThread.sp = h$sp; | |
h$stack[h$sp-1] = h$ghcjszmprimZCGHCJSziPrimziInternalziwouldBlock; | |
h$stack[h$sp] = h$raiseAsync_frame; | |
h$forceWakeupThread(h$currentThread); | |
c = h$raiseAsync_frame; | |
} // otherwise a non-preemptible thread, keep it in the same state | |
} | |
return c; | |
} | |
// run the supplied IO action in a new thread | |
// returns immediately, thread is started in background | |
function h$run(a) { | |
; | |
var t = h$forkThread(a, false); | |
h$startMainLoop(); | |
return t; | |
} | |
/** @constructor */ | |
function h$WouldBlock() { | |
} | |
h$WouldBlock.prototype.toString = function() { | |
return "Haskell Operation would block"; | |
} | |
/** @constructor */ | |
function h$HaskellException(msg) { | |
this._msg = msg; | |
} | |
h$HaskellException.prototype.toString = function() { | |
return this._msg; | |
} | |
function h$setCurrentThreadResultWouldBlock() { | |
h$currentThread.result = new h$WouldBlock(); | |
h$currentThread.resultIsException = true; | |
} | |
function h$setCurrentThreadResultJSException(e) { | |
h$currentThread.result = e; | |
h$currentThread.resultIsException = true; | |
} | |
function h$setCurrentThreadResultHaskellException(msg) { | |
h$currentThread.result = new h$HaskellException(msg); | |
h$currentThread.resultIsException = true; | |
} | |
function h$setCurrentThreadResultValue(v) { | |
h$currentThread.result = v; | |
h$currentThread.resultIsException = false; | |
} | |
/* | |
run a Haskell (IO JSVal) action synchronously, returning | |
the result. Uncaught Haskell exceptions are thrown as a | |
h$HaskellException. If the action could not finish due to | |
blocking, a h$WouldBlock exception is thrown instead. | |
- a: the (IO JSVal) action | |
- cont: continue async if blocked | |
(the call to h$runSyncReturn would still throw h$WouldBlock, | |
since there would be no return value) | |
returns: the result of the IO action | |
*/ | |
function h$runSyncReturn(a, cont) { | |
var t = new h$Thread(); | |
; | |
var aa = (h$c2(h$ap1_e,(h$ghcjszmprimZCGHCJSziPrimziInternalzisetCurrentThreadResultValue),(a))); | |
h$runSyncAction(t, aa, cont); | |
if(t.status === (16)) { | |
if(t.resultIsException) { | |
throw t.result; | |
} else { | |
return t.result; | |
} | |
} else if(t.status === (1)) { | |
throw new h$WouldBlock(); | |
} else { | |
throw new Error("h$runSyncReturn: Unexpected thread status: " + t.status); | |
} | |
} | |
/* | |
run a Haskell IO action synchronously, ignoring the result | |
or any exception in the Haskell code | |
- a: the IO action | |
- cont: continue async if blocked | |
returns: true if the action ran to completion, false otherwise | |
throws: any uncaught Haskell or JS exception except WouldBlock | |
*/ | |
function h$runSync(a, cont) { | |
var t = new h$Thread(); | |
; | |
h$runSyncAction(t, a, cont); | |
if(t.resultIsException) { | |
if(t.result instanceof h$WouldBlock) { | |
return false; | |
} else { | |
throw t.result; | |
} | |
} | |
return t.status === (16); | |
} | |
function h$runSyncAction(t, a, cont) { | |
h$runInitStatic(); | |
var c = h$return; | |
t.stack[2] = h$ghcjszmprimZCGHCJSziPrimziInternalzisetCurrentThreadResultException; | |
t.stack[4] = h$ap_1_0; | |
t.stack[5] = a; | |
t.stack[6] = h$return; | |
t.sp = 6; | |
t.status = (0); | |
t.isSynchronous = true; | |
t.continueAsync = cont; | |
var ct = h$currentThread; | |
var csp = h$sp; | |
var cr1 = h$r1; // do we need to save more than this? | |
var caught = false, excep = null; | |
h$currentThread = t; | |
h$stack = t.stack; | |
h$sp = t.sp; | |
try { | |
c = h$runThreadSlice(c); | |
if(c !== h$reschedule) { | |
throw new Error("h$runSyncAction: h$reschedule expected"); | |
} | |
} catch(e) { | |
h$finishThread(h$currentThread); | |
h$currentThread.status = (17); | |
caught = true; | |
excep = e; | |
} | |
if(ct !== null) { | |
h$currentThread = ct; | |
h$stack = ct.stack; | |
h$sp = csp; | |
h$r1 = cr1; | |
} else { | |
h$currentThread = null; | |
h$stack = null; | |
} | |
if(t.status !== (16) && !cont) { | |
h$removeThreadBlock(t); | |
h$finishThread(t); | |
} | |
if(caught) throw excep; | |
} | |
// run other threads synchronously until the blackhole is 'freed' | |
// returns true for success, false for failure, a thread blocks | |
function h$runBlackholeThreadSync(bh) { | |
; | |
var ct = h$currentThread; | |
var sp = h$sp; | |
var success = false; | |
var bhs = []; | |
var currentBh = bh; | |
// we don't handle async exceptions here, | |
// don't run threads with pending exceptions | |
if(((bh).d1).excep.length > 0) { | |
; | |
return false; | |
} | |
h$currentThread = ((bh).d1); | |
h$stack = h$currentThread.stack; | |
h$sp = h$currentThread.sp; | |
var c = (h$currentThread.status === (0))?h$stack[h$sp]:h$reschedule; | |
; | |
try { | |
while(true) { | |
while(c !== h$reschedule && (typeof (currentBh) === 'object' && (currentBh) && (currentBh).f && (currentBh).f.t === (5))) { | |
c = c(); | |
c = c(); | |
c = c(); | |
c = c(); | |
c = c(); | |
} | |
if(c === h$reschedule) { | |
// perhaps new blackhole, then continue with that thread, | |
// otherwise fail | |
if((typeof (h$currentThread.blockedOn) === 'object' && (h$currentThread.blockedOn) && (h$currentThread.blockedOn).f && (h$currentThread.blockedOn).f.t === (5))) { | |
; | |
bhs.push(currentBh); | |
currentBh = h$currentThread.blockedOn; | |
h$currentThread = ((h$currentThread.blockedOn).d1); | |
if(h$currentThread.excep.length > 0) { | |
break; | |
} | |
h$stack = h$currentThread.stack; | |
h$sp = h$currentThread.sp; | |
c = (h$currentThread.status === (0))?h$stack[h$sp]:h$reschedule; | |
} else { | |
; | |
break; | |
} | |
} else { // blackhole updated: suspend thread and pick up the old one | |
; | |
; | |
h$suspendCurrentThread(c); | |
if(bhs.length > 0) { | |
; | |
currentBh = bhs.pop(); | |
h$currentThread = ((currentBh).d1); | |
h$stack = h$currentThread.stack; | |
h$sp = h$currentThread.sp; | |
} else { | |
; | |
success = true; | |
break; | |
} | |
} | |
} | |
} catch(e) { } | |
// switch back to original thread | |
h$sp = sp; | |
h$stack = ct.stack; | |
h$currentThread = ct; | |
return success; | |
} | |
function h$syncThreadState(tid) { | |
return (tid.isSynchronous ? 1 : 0) | | |
((tid.continueAsync || !tid.isSynchronous) ? 2 : 0) | | |
((tid.noPreemption || tid.isSynchronous) ? 4 : 0); | |
} | |
// run the supplied IO action in a main thread | |
// (program exits when this thread finishes) | |
function h$main(a) { | |
var t = new h$Thread(); | |
//TRACE_SCHEDULER("sched: starting main thread"); | |
t.stack[0] = h$doneMain_e; | |
if(!h$isBrowser && !h$isGHCJSi) { | |
t.stack[2] = h$baseZCGHCziTopHandlerzitopHandler; | |
} | |
t.stack[4] = h$ap_1_0; | |
t.stack[5] = h$flushStdout; | |
t.stack[6] = h$return; | |
t.stack[7] = h$ap_1_0; | |
t.stack[8] = a; | |
t.stack[9] = h$return; | |
t.sp = 9; | |
t.label = [h$encodeUtf8("main"), 0]; | |
h$wakeupThread(t); | |
h$startMainLoop(); | |
return t; | |
} | |
function h$doneMain() { | |
if(h$isGHCJSi) { | |
if(h$currentThread.stack) { | |
global.h$GHCJSi.done(h$currentThread); | |
} | |
} else { | |
h$exitProcess(0); | |
} | |
h$finishThread(h$currentThread); | |
return h$reschedule; | |
} | |
/** @constructor */ | |
function h$ThreadAbortedError(code) { | |
this.code = code; | |
} | |
h$ThreadAbortedError.prototype.toString = function() { | |
return "Thread aborted, exit code: " + this.code; | |
} | |
function h$exitProcess(code) { | |
if(h$isNode) { | |
process.exit(code); | |
} else if(h$isJvm) { | |
java.lang.System.exit(code); | |
} else if(h$isJsShell) { | |
quit(code); | |
} else if(h$isJsCore) { | |
if(h$base_stdoutLeftover.val !== null) print(h$base_stdoutLeftover.val); | |
if(h$base_stderrLeftover.val !== null) debug(h$base_stderrLeftover.val); | |
// jsc does not support returning a nonzero value, print it instead | |
if(code !== 0) debug("GHCJS JSC exit status: " + code); | |
quit(); | |
} else { | |
if(h$currentThread) { | |
h$finishThread(h$currentThread); | |
h$stack = null; | |
throw new h$ThreadAbortedError(code); | |
} | |
} | |
} | |
// MVar support | |
var h$mvarId = 0; | |
/** @constructor */ | |
function h$MVar() { | |
; | |
this.val = null; | |
this.readers = new h$Queue(); | |
this.writers = new h$Queue(); | |
this.waiters = null; // waiting for a value in the MVar with ReadMVar | |
this.m = 0; // gc mark | |
this.id = ++h$mvarId; | |
} | |
// set the MVar to empty unless there are writers | |
function h$notifyMVarEmpty(mv) { | |
var w = mv.writers.dequeue(); | |
if(w !== null) { | |
var thread = w[0]; | |
var val = w[1]; | |
; | |
mv.val = val; | |
// thread is null if some JavaScript outside Haskell wrote to the MVar | |
if(thread !== null) { | |
h$wakeupThread(thread); | |
} | |
} else { | |
; | |
mv.val = null; | |
} | |
; | |
} | |
// set the MVar to val unless there are readers | |
function h$notifyMVarFull(mv,val) { | |
if(mv.waiters && mv.waiters.length > 0) { | |
for(var i=0;i<mv.waiters.length;i++) { | |
var w = mv.waiters[i]; | |
; | |
w.sp += 2; | |
w.stack[w.sp-1] = val; | |
w.stack[w.sp] = h$return; | |
h$wakeupThread(w); | |
} | |
mv.waiters = null; | |
} | |
var r = mv.readers.dequeue(); | |
if(r !== null) { | |
; | |
r.sp += 2; | |
r.stack[r.sp-1] = val; | |
r.stack[r.sp] = h$return; | |
h$wakeupThread(r); | |
mv.val = null; | |
} else { | |
; | |
mv.val = val; | |
} | |
; | |
} | |
function h$takeMVar(mv) { | |
; | |
if(mv.val !== null) { | |
h$r1 = mv.val; | |
h$notifyMVarEmpty(mv); | |
return h$stack[h$sp]; | |
} else { | |
mv.readers.enqueue(h$currentThread); | |
h$currentThread.interruptible = true; | |
return h$blockThread(h$currentThread,mv,[h$takeMVar,mv]); | |
} | |
} | |
function h$tryTakeMVar(mv) { | |
; | |
if(mv.val === null) { | |
{ h$ret1 = (null); return (0); }; | |
} else { | |
var v = mv.val; | |
h$notifyMVarEmpty(mv); | |
{ h$ret1 = (v); return (1); }; | |
} | |
} | |
function h$readMVar(mv) { | |
; | |
if(mv.val === null) { | |
if(mv.waiters) { | |
mv.waiters.push(h$currentThread); | |
} else { | |
mv.waiters = [h$currentThread]; | |
} | |
h$currentThread.interruptible = true; | |
return h$blockThread(h$currentThread,mv,[h$readMVar,mv]); | |
} else { | |
h$r1 = mv.val; | |
return h$stack[h$sp]; | |
} | |
} | |
function h$putMVar(mv,val) { | |
; | |
if(mv.val !== null) { | |
mv.writers.enqueue([h$currentThread,val]); | |
h$currentThread.interruptible = true; | |
return h$blockThread(h$currentThread,mv,[h$putMVar,mv,val]); | |
} else { | |
h$notifyMVarFull(mv,val); | |
return h$stack[h$sp]; | |
} | |
} | |
function h$tryPutMVar(mv,val) { | |
; | |
if(mv.val !== null) { | |
return 0; | |
} else { | |
h$notifyMVarFull(mv,val); | |
return 1; | |
} | |
} | |
// box up a JavaScript value and write it to the MVar synchronously | |
function h$writeMVarJs1(mv,val) { | |
var v = (h$c1(h$data1_e, (val))); | |
if(mv.val !== null) { | |
; | |
mv.writers.enqueue([null,v]); | |
} else { | |
; | |
h$notifyMVarFull(mv,v); | |
} | |
} | |
function h$writeMVarJs2(mv,val1,val2) { | |
var v = (h$c2(h$data1_e, (val1), (val2))); | |
if(mv.val !== null) { | |
; | |
mv.writers.enqueue([null,v]); | |
} else { | |
; | |
h$notifyMVarFull(mv,v); | |
} | |
} | |
// IORef support | |
/** @constructor */ | |
function h$MutVar(v) { | |
this.val = v; | |
this.m = 0; | |
} | |
function h$atomicModifyMutVar(mv, fun) { | |
var thunk = (h$c2(h$ap1_e,(fun),(mv.val))); | |
mv.val = (h$c1(h$select1_e, (thunk))); | |
return (h$c1(h$select2_e, (thunk))); | |
} | |
// Black holes and updates | |
// caller must save registers on stack | |
function h$blockOnBlackhole(c) { | |
; | |
if(((c).d1) === h$currentThread) { | |
; | |
return h$throw(h$baseZCControlziExceptionziBasezinonTermination, false); // is this an async exception? | |
} | |
; | |
if(((c).d2) === null) { | |
((c).d2 = ([h$currentThread])); | |
} else { | |
((c).d2).push(h$currentThread); | |
} | |
return h$blockThread(h$currentThread,c,[h$resumeBlockOnBlackhole,c]); | |
} | |
function h$resumeBlockOnBlackhole(c) { | |
h$r1 = c; | |
return h$ap_0_0_fast(); | |
} | |
// async exception happened in a black hole, make a thunk | |
// to resume the computation | |
// var h$debugResumableId = 0; | |
function h$makeResumable(bh,start,end,extra) { | |
var s = h$stack.slice(start,end+1); | |
if(extra) { | |
s = s.concat(extra); | |
} | |
// TRACE_SCHEDULER("making resumable " + (h$debugResumableId+1) + ", stack: "); | |
// h$dumpStackTop(s,0,s.length-1); | |
{ (bh).f = h$resume_e; (bh).d1 = (s), (bh).d2 = null; }; | |
} | |
var h$enabled_capabilities = h$newByteArray(4); | |
h$enabled_capabilities.i3[0] = 1; | |
function h$rtsSupportsBoundThreads() { | |
return 0; | |
} | |
// async foreign calls | |
function h$mkForeignCallback(x) { | |
return function() { | |
if(x.mv === null) { // callback called synchronously | |
x.mv = arguments; | |
} else { | |
h$notifyMVarFull(x.mv, (h$c1(h$data1_e, (arguments)))); | |
h$mainLoop(); | |
} | |
} | |
} | |
// event listeners through MVar | |
function h$makeMVarListener(mv, stopProp, stopImmProp, preventDefault) { | |
var f = function(event) { | |
; | |
h$writeMVarJs1(mv,event); | |
if(stopProp) { event.stopPropagation(); } | |
if(stopImmProp) { event.stopImmediatePropagation(); } | |
if(preventDefault) { event.preventDefault(); } | |
} | |
f.root = mv; | |
return f; | |
} | |
function h$rs() { | |
return h$stack[h$sp]; | |
} | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
// software transactional memory | |
var h$stmTransactionActive = 0; | |
var h$stmTransactionWaiting = 4; | |
/** @constructor */ | |
function h$Transaction(o, parent) { | |
; | |
this.action = o; | |
// h$TVar -> h$WrittenTVar, transaction-local changed values | |
this.tvars = new h$Map(); | |
// h$TVar -> h$LocalTVar, all local tvars accessed anywhere in the transaction | |
this.accessed = parent===null?new h$Map():parent.accessed; | |
// nonnull while running a check, contains read variables in this part of the transaction | |
this.checkRead = parent===null?null:parent.checkRead; | |
this.parent = parent; | |
this.state = h$stmTransactionActive; | |
this.invariants = []; // invariants added in this transaction | |
this.m = 0; // gc mark | |
} | |
var h$stmInvariantN = 0; | |
/** @constructor */ | |
function h$StmInvariant(a) { | |
this.action = a; | |
this._key = ++h$stmInvariantN; | |
} | |
/** @constructor */ | |
function h$WrittenTVar(tv,v) { | |
this.tvar = tv; | |
this.val = v; | |
} | |
var h$TVarN = 0; | |
/** @constructor */ | |
function h$TVar(v) { | |
; | |
this.val = v; // current value | |
this.blocked = new h$Set(); // threads that get woken up if this TVar is updated | |
this.invariants = null; // invariants that use this TVar (h$Set) | |
this.m = 0; // gc mark | |
this._key = ++h$TVarN; // for storing in h$Map/h$Set | |
} | |
/** @constructor */ | |
function h$TVarsWaiting(s) { | |
this.tvars = s; // h$Set of TVars we're waiting on | |
} | |
/** @constructor */ | |
function h$LocalInvariant(o) { | |
this.action = o; | |
this.dependencies = new h$Set(); | |
} | |
// local view of a TVar | |
/** @constructor */ | |
function h$LocalTVar(v) { | |
; | |
this.readVal = v.val; // the value when read from environment | |
this.val = v.val; // the current uncommitted value | |
this.tvar = v; | |
} | |
function h$atomically(o) { | |
h$p3(o, h$atomically_e, h$checkInvariants_e); | |
return h$stmStartTransaction(o); | |
} | |
function h$stmStartTransaction(o) { | |
; | |
var t = new h$Transaction(o, null); | |
h$currentThread.transaction = t; | |
h$r1 = o; | |
return h$ap_1_0_fast(); | |
} | |
function h$stmUpdateInvariantDependencies(inv) { | |
var ii, iter = h$currentThread.transaction.checkRead.iter(); | |
if(inv instanceof h$LocalInvariant) { | |
while((ii = iter.next()) !== null) inv.dependencies.add(ii); | |
} else { | |
while((ii = iter.next()) !== null) h$stmAddTVarInvariant(ii, inv); | |
} | |
} | |
function h$stmAddTVarInvariant(tv, inv) { | |
if(tv.invariants === null) tv.invariants = new h$Set(); | |
tv.invariants.add(inv); | |
} | |
// commit current transaction, | |
// if it's top-level, commit the TVars, otherwise commit to parent | |
function h$stmCommitTransaction() { | |
var t = h$currentThread.transaction; | |
var tvs = t.tvars; | |
var wtv, i = tvs.iter(); | |
if(t.parent === null) { // top-level commit | |
; | |
// write new value to TVars and collect blocked threads | |
var thread, threadi, blockedThreads = new h$Set(); | |
while((wtv = i.nextVal()) !== null) { | |
h$stmCommitTVar(wtv.tvar, wtv.val, blockedThreads); | |
} | |
// wake up all blocked threads | |
threadi = blockedThreads.iter(); | |
while((thread = threadi.next()) !== null) { | |
h$stmRemoveBlockedThread(thread.blockedOn, thread); | |
h$wakeupThread(thread); | |
} | |
// commit our new invariants | |
for(var j=0;j<t.invariants.length;j++) { | |
h$stmCommitInvariant(t.invariants[j]); | |
} | |
} else { // commit subtransaction | |
; | |
var tpvs = t.parent.tvars; | |
while((wtv = i.nextVal()) !== null) tpvs.put(wtv.tvar, wtv); | |
t.parent.invariants = t.parent.invariants.concat(t.invariants); | |
} | |
h$currentThread.transaction = t.parent; | |
} | |
function h$stmValidateTransaction() { | |
var ltv, i = h$currentThread.transaction.accessed.iter(); | |
while((ltv = i.nextVal()) !== null) { | |
if(ltv.readVal !== ltv.tvar.val) return false; | |
} | |
return true; | |
} | |
function h$stmAbortTransaction() { | |
h$currentThread.transaction = h$currentThread.transaction.parent; | |
} | |
// add an invariant | |
function h$stmCheck(o) { | |
h$currentThread.transaction.invariants.push(new h$LocalInvariant(o)); | |
return false; | |
} | |
function h$stmRetry() { | |
// unwind stack to h$atomically_e or h$stmCatchRetry_e frame | |
while(h$sp > 0) { | |
var f = h$stack[h$sp]; | |
if(f === h$atomically_e || f === h$stmCatchRetry_e) { | |
break; | |
} | |
var size; | |
if(f === h$ap_gen) { | |
size = ((h$stack[h$sp-1] >> 8) + 2); | |
} else { | |
var tag = f.gtag; | |
if(tag < 0) { // dynamic size | |
size = h$stack[h$sp-1]; | |
} else { | |
size = (tag & 0xff) + 1; | |
} | |
} | |
h$sp -= size; | |
} | |
// either h$sp == 0 or at a handler | |
if(h$sp > 0) { | |
if(f === h$atomically_e) { | |
return h$stmSuspendRetry(); | |
} else { // h$stmCatchRetry_e | |
var b = h$stack[h$sp-1]; | |
h$stmAbortTransaction(); | |
h$sp -= 2; | |
h$r1 = b; | |
return h$ap_1_0_fast(); | |
} | |
} else { | |
throw "h$stmRetry: STM retry outside a transaction"; | |
} | |
} | |
function h$stmSuspendRetry() { | |
var tv, i = h$currentThread.transaction.accessed.iter(); | |
var tvs = new h$Set(); | |
while((tv = i.next()) !== null) { | |
; | |
tv.blocked.add(h$currentThread); | |
tvs.add(tv); | |
} | |
var waiting = new h$TVarsWaiting(tvs); | |
h$currentThread.interruptible = true; | |
h$p2(waiting, h$stmResumeRetry_e); | |
return h$blockThread(h$currentThread, waiting); | |
} | |
function h$stmCatchRetry(a,b) { | |
h$currentThread.transaction = new h$Transaction(b, h$currentThread.transaction); | |
h$p2(b, h$stmCatchRetry_e); | |
h$r1 = a; | |
return h$ap_1_0_fast(); | |
} | |
function h$catchStm(a,handler) { | |
h$p4(h$currentThread.transaction, h$currentThread.mask, handler, h$catchStm_e); | |
h$r1 = a; | |
return h$ap_1_0_fast(); | |
} | |
function h$newTVar(v) { | |
return new h$TVar(v); | |
} | |
function h$readTVar(tv) { | |
return h$readLocalTVar(h$currentThread.transaction,tv); | |
} | |
function h$readTVarIO(tv) { | |
return tv.val; | |
} | |
function h$writeTVar(tv, v) { | |
h$setLocalTVar(h$currentThread.transaction, tv, v); | |
} | |
function h$sameTVar(tv1, tv2) { | |
return tv1 === tv2; | |
} | |
// get the local value of the TVar in the transaction t | |
// tvar is added to the read set | |
function h$readLocalTVar(t, tv) { | |
if(t.checkRead !== null) { | |
t.checkRead.add(tv); | |
} | |
var t0 = t; | |
while(t0 !== null) { | |
var v = t0.tvars.get(tv); | |
if(v !== null) { | |
; | |
return v.val; | |
} | |
t0 = t0.parent; | |
} | |
var lv = t.accessed.get(tv); | |
if(lv !== null) { | |
; | |
return lv.val; | |
} else { | |
; | |
t.accessed.put(tv, new h$LocalTVar(tv)); | |
return tv.val; | |
} | |
} | |
function h$setLocalTVar(t, tv, v) { | |
if(!t.accessed.has(tv)) t.accessed.put(tv, new h$LocalTVar(tv)); | |
if(t.tvars.has(tv)) { | |
t.tvars.get(tv).val = v; | |
} else { | |
t.tvars.put(tv, new h$WrittenTVar(tv, v)); | |
} | |
} | |
function h$stmCheckInvariants() { | |
var t = h$currentThread.transaction; | |
function addCheck(inv) { | |
h$p5(inv, h$stmCheckInvariantResult_e, t, inv, h$stmCheckInvariantStart_e); | |
} | |
h$p2(h$r1, h$return); | |
var wtv, i = t.tvars.iter(); | |
while((wtv = i.nextVal()) !== null) { | |
; | |
var ii = wtv.tvar.invariants; | |
if(ii) { | |
var iv, iii = ii.iter(); | |
while((iv = iii.next()) !== null) addCheck(iv); | |
} | |
} | |
for(var j=0;j<t.invariants.length;j++) { | |
addCheck(t.invariants[j]); | |
} | |
return h$stack[h$sp]; | |
} | |
function h$stmCommitTVar(tv, v, threads) { | |
; | |
if(v !== tv.val) { | |
var thr, iter = tv.blocked.iter(); | |
while((thr = iter.next()) !== null) threads.add(thr); | |
tv.blocked.clear(); | |
tv.val = v; | |
} | |
} | |
// remove the thread from the queues of the TVars in s | |
function h$stmRemoveBlockedThread(s, thread) { | |
var tv, i = s.tvars.iter(); | |
while((tv = i.next()) !== null) { | |
tv.blocked.remove(thread); | |
} | |
} | |
function h$stmCommitInvariant(localInv) { | |
var inv = new h$StmInvariant(localInv.action); | |
var dep, i = localInv.dependencies.iter(); | |
while((dep = i.next()) !== null) { | |
h$stmAddTVarInvariant(dep, inv); | |
} | |
} | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
// values defined in Gen2.ClosureInfo | |
// thread status | |
/* | |
* low-level heap object manipulation macros | |
*/ | |
// GHCJS.Prim.JSVal | |
// GHCJS.Prim.JSException | |
// Exception dictionary for JSException | |
// SomeException | |
// GHC.Ptr.Ptr | |
// GHC.Integer.GMP.Internals | |
// Data.Maybe.Maybe | |
// #define HS_NOTHING h$nothing | |
// Data.List | |
// Data.Text | |
// Data.Text.Lazy | |
// black holes | |
// can we skip the indirection for black holes? | |
// resumable thunks | |
// general deconstruction | |
// retrieve a numeric value that's possibly stored as an indirection | |
// generic lazy values | |
// generic data constructors and selectors | |
// unboxed tuple returns | |
// #define RETURN_UBX_TUP1(x) return x; | |
// static pointers | |
var h$static_pointer_table = null; | |
var h$static_pointer_table_keys = null; | |
function h$hs_spt_insert(key1,key2,key3,key4,ref) { | |
// h$log("hs_spt_insert: " + key1 + " " + key2 + " " + key3 + " " + key4 + " -> " + h$collectProps(ref)); | |
if(!h$static_pointer_table) { | |
h$static_pointer_table = []; | |
h$static_pointer_table_keys = []; | |
} | |
if(!h$hs_spt_lookup_key(key1,key2,key3,key4)) { | |
var ba = h$newByteArray(16); | |
ba.i3[0] = key1; | |
ba.i3[1] = key2; | |
ba.i3[2] = key3; | |
ba.i3[3] = key4; | |
h$static_pointer_table_keys.push([ba,0]); | |
h$retain({ root: ref, _key: -1 }); | |
} | |
var s = h$static_pointer_table; | |
if(!s[key1]) s[key1] = []; | |
if(!s[key1][key2]) s[key1][key2] = []; | |
if(!s[key1][key2][key3]) s[key1][key2][key3] = []; | |
s[key1][key2][key3][key4] = ref; | |
} | |
function h$hs_spt_key_count() { | |
return h$static_pointer_table_keys ? | |
h$static_pointer_table_keys.length : 0; | |
} | |
function h$hs_spt_keys(tgt_d, tgt_o, n) { | |
var ks = h$static_pointer_table_keys; | |
if(!tgt_d.arr) tgt_d.arr = []; | |
for(var i=0;(i<n&&i<ks.length);i++) tgt_d.arr[tgt_o+4*i] = ks[i]; | |
return Math.min(n,ks.length); | |
} | |
function h$hs_spt_lookup(key_d, key_o) { | |
var i3 = key_d.i3, o = key_o >> 2; | |
{ h$ret1 = (0); return (h$hs_spt_lookup_key(i3[o],i3[o+1],i3[o+2],i3[o+3])); }; | |
} | |
function h$hs_spt_lookup_key(key1,key2,key3,key4) { | |
var s = h$static_pointer_table; | |
if(s && s[key1] && s[key1][key2] && s[key1][key2][key3] && | |
s[key1][key2][key3][key4]) return s[key1][key2][key3][key4]; | |
return null; | |
} | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
// values defined in Gen2.ClosureInfo | |
// thread status | |
/* | |
* low-level heap object manipulation macros | |
*/ | |
// GHCJS.Prim.JSVal | |
// GHCJS.Prim.JSException | |
// Exception dictionary for JSException | |
// SomeException | |
// GHC.Ptr.Ptr | |
// GHC.Integer.GMP.Internals | |
// Data.Maybe.Maybe | |
// #define HS_NOTHING h$nothing | |
// Data.List | |
// Data.Text | |
// Data.Text.Lazy | |
// black holes | |
// can we skip the indirection for black holes? | |
// resumable thunks | |
// general deconstruction | |
// retrieve a numeric value that's possibly stored as an indirection | |
// generic lazy values | |
// generic data constructors and selectors | |
// unboxed tuple returns | |
// #define RETURN_UBX_TUP1(x) return x; | |
function h$__hscore_sizeof_termios() { | |
; | |
return 4; | |
} | |
function h$tcgetattr(x, y, z) { | |
; | |
return 0; | |
} | |
function h$__hscore_get_saved_termios(r) { | |
; | |
{ h$ret1 = (0); return (null); }; | |
} | |
function h$__hscore_set_saved_termios(a, b, c) { | |
; | |
{ h$ret1 = (0); return (null); }; | |
} | |
function h$__hscore_sizeof_sigset_t() { | |
; | |
return 4; | |
} | |
function h$sigemptyset(a, b) { | |
; | |
{ h$ret1 = (0); return (null); }; | |
} | |
function h$__hscore_sigttou() { | |
; | |
return 0; | |
} | |
function h$sigaddset(a, b, c) { | |
; | |
return 0; | |
} | |
function h$__hscore_sig_block() { | |
; | |
return 0; | |
} | |
function h$sigprocmask(a,b,c,d,e) { | |
; | |
{ h$ret1 = (0); return (0); }; | |
} | |
function h$__hscore_lflag(a,b) { | |
; | |
return 0; | |
} | |
function h$__hscore_icanon() { | |
; | |
return 0; | |
} | |
function h$__hscore_poke_lflag(a, b, c) { | |
; | |
return 0; | |
} | |
function h$__hscore_ptr_c_cc(a, b) { | |
; | |
{ h$ret1 = (0); return (h$newByteArray(8)); }; // null; | |
} | |
function h$__hscore_vmin() { | |
; | |
{ h$ret1 = (0); return (h$newByteArray(8)); }; // null; | |
} | |
function h$__hscore_vtime() { | |
; | |
return 0; | |
} | |
function h$__hscore_tcsanow() { | |
; | |
return 0; | |
} | |
function h$tcsetattr(a,b,c,d) { | |
; | |
return 0; | |
} | |
function h$__hscore_sig_setmask() { | |
; | |
return 0; | |
} | |
function h$c(f) | |
{ | |
var h$RTS_0 = { d1: null, d2: null, f: f, m: 0 | |
}; | |
return h$RTS_0; | |
}; | |
function h$c0(f) | |
{ | |
var h$RTS_1 = { d1: null, d2: null, f: f, m: 0 | |
}; | |
return h$RTS_1; | |
}; | |
function h$c1(f, x1) | |
{ | |
var h$RTS_2 = { d1: x1, d2: null, f: f, m: 0 | |
}; | |
return h$RTS_2; | |
}; | |
function h$c2(f, x1, x2) | |
{ | |
var h$RTS_3 = { d1: x1, d2: x2, f: f, m: 0 | |
}; | |
return h$RTS_3; | |
}; | |
function h$c3(f, x1, x2, x3) | |
{ | |
var h$RTS_4 = { d1: x1, d2: { d1: x2, d2: x3 | |
}, f: f, m: 0 | |
}; | |
return h$RTS_4; | |
}; | |
function h$c4(f, x1, x2, x3, x4) | |
{ | |
var h$RTS_5 = { d1: x1, d2: { d1: x2, d2: x3, d3: x4 | |
}, f: f, m: 0 | |
}; | |
return h$RTS_5; | |
}; | |
function h$c5(f, x1, x2, x3, x4, x5) | |
{ | |
var h$RTS_6 = { d1: x1, d2: { d1: x2, d2: x3, d3: x4, d4: x5 | |
}, f: f, m: 0 | |
}; | |
return h$RTS_6; | |
}; | |
function h$c6(f, x1, x2, x3, x4, x5, x6) | |
{ | |
var h$RTS_7 = { d1: x1, d2: { d1: x2, d2: x3, d3: x4, d4: x5, d5: x6 | |
}, f: f, m: 0 | |
}; | |
return h$RTS_7; | |
}; | |
function h$c7(f, x1, x2, x3, x4, x5, x6, x7) | |
{ | |
var h$RTS_8 = { d1: x1, d2: { d1: x2, d2: x3, d3: x4, d4: x5, d5: x6, d6: x7 | |
}, f: f, m: 0 | |
}; | |
return h$RTS_8; | |
}; | |
function h$c8(f, x1, x2, x3, x4, x5, x6, x7, x8) | |
{ | |
var h$RTS_9 = { d1: x1, d2: { d1: x2, d2: x3, d3: x4, d4: x5, d5: x6, d6: x7, d7: x8 | |
}, f: f, m: 0 | |
}; | |
return h$RTS_9; | |
}; | |
function h$c9(f, x1, x2, x3, x4, x5, x6, x7, x8, x9) | |
{ | |
var h$RTS_10 = { d1: x1, d2: { d1: x2, d2: x3, d3: x4, d4: x5, d5: x6, d6: x7, d7: x8, d8: x9 | |
}, f: f, m: 0 | |
}; | |
return h$RTS_10; | |
}; | |
function h$c10(f, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) | |
{ | |
var h$RTS_11 = { d1: x1, d2: { d1: x2, d2: x3, d3: x4, d4: x5, d5: x6, d6: x7, d7: x8, d8: x9, d9: x10 | |
}, f: f, m: 0 | |
}; | |
return h$RTS_11; | |
}; | |
function h$c11(f, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11) | |
{ | |
var h$RTS_12 = { d1: x1, d2: { d1: x2, d10: x11, d2: x3, d3: x4, d4: x5, d5: x6, d6: x7, d7: x8, d8: x9, d9: x10 | |
}, f: f, m: 0 | |
}; | |
return h$RTS_12; | |
}; | |
function h$c12(f, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12) | |
{ | |
var h$RTS_13 = { d1: x1, d2: { d1: x2, d10: x11, d11: x12, d2: x3, d3: x4, d4: x5, d5: x6, d6: x7, d7: x8, d8: x9, | |
d9: x10 | |
}, f: f, m: 0 | |
}; | |
return h$RTS_13; | |
}; | |
function h$c13(f, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13) | |
{ | |
var h$RTS_14 = { d1: x1, d2: { d1: x2, d10: x11, d11: x12, d12: x13, d2: x3, d3: x4, d4: x5, d5: x6, d6: x7, d7: x8, | |
d8: x9, d9: x10 | |
}, f: f, m: 0 | |
}; | |
return h$RTS_14; | |
}; | |
function h$c14(f, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14) | |
{ | |
var h$RTS_15 = { d1: x1, d2: { d1: x2, d10: x11, d11: x12, d12: x13, d13: x14, d2: x3, d3: x4, d4: x5, d5: x6, d6: x7, | |
d7: x8, d8: x9, d9: x10 | |
}, f: f, m: 0 | |
}; | |
return h$RTS_15; | |
}; | |
function h$c15(f, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15) | |
{ | |
var h$RTS_16 = { d1: x1, d2: { d1: x2, d10: x11, d11: x12, d12: x13, d13: x14, d14: x15, d2: x3, d3: x4, d4: x5, d5: x6, | |
d6: x7, d7: x8, d8: x9, d9: x10 | |
}, f: f, m: 0 | |
}; | |
return h$RTS_16; | |
}; | |
function h$c16(f, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16) | |
{ | |
var h$RTS_17 = { d1: x1, d2: { d1: x2, d10: x11, d11: x12, d12: x13, d13: x14, d14: x15, d15: x16, d2: x3, d3: x4, | |
d4: x5, d5: x6, d6: x7, d7: x8, d8: x9, d9: x10 | |
}, f: f, m: 0 | |
}; | |
return h$RTS_17; | |
}; | |
function h$c17(f, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17) | |
{ | |
var h$RTS_18 = { d1: x1, d2: { d1: x2, d10: x11, d11: x12, d12: x13, d13: x14, d14: x15, d15: x16, d16: x17, d2: x3, | |
d3: x4, d4: x5, d5: x6, d6: x7, d7: x8, d8: x9, d9: x10 | |
}, f: f, m: 0 | |
}; | |
return h$RTS_18; | |
}; | |
function h$c18(f, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18) | |
{ | |
var h$RTS_19 = { d1: x1, d2: { d1: x2, d10: x11, d11: x12, d12: x13, d13: x14, d14: x15, d15: x16, d16: x17, d17: x18, | |
d2: x3, d3: x4, d4: x5, d5: x6, d6: x7, d7: x8, d8: x9, d9: x10 | |
}, f: f, m: 0 | |
}; | |
return h$RTS_19; | |
}; | |
function h$c19(f, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19) | |
{ | |
var h$RTS_20 = { d1: x1, d2: { d1: x2, d10: x11, d11: x12, d12: x13, d13: x14, d14: x15, d15: x16, d16: x17, d17: x18, | |
d18: x19, d2: x3, d3: x4, d4: x5, d5: x6, d6: x7, d7: x8, d8: x9, d9: x10 | |
}, f: f, m: 0 | |
}; | |
return h$RTS_20; | |
}; | |
function h$c20(f, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20) | |
{ | |
var h$RTS_21 = { d1: x1, d2: { d1: x2, d10: x11, d11: x12, d12: x13, d13: x14, d14: x15, d15: x16, d16: x17, d17: x18, | |
d18: x19, d19: x20, d2: x3, d3: x4, d4: x5, d5: x6, d6: x7, d7: x8, d8: x9, d9: x10 | |
}, f: f, m: 0 | |
}; | |
return h$RTS_21; | |
}; | |
function h$c21(f, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21) | |
{ | |
var h$RTS_22 = { d1: x1, d2: { d1: x2, d10: x11, d11: x12, d12: x13, d13: x14, d14: x15, d15: x16, d16: x17, d17: x18, | |
d18: x19, d19: x20, d2: x3, d20: x21, d3: x4, d4: x5, d5: x6, d6: x7, d7: x8, d8: x9, d9: x10 | |
}, f: f, m: 0 | |
}; | |
return h$RTS_22; | |
}; | |
function h$c22(f, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22) | |
{ | |
var h$RTS_23 = { d1: x1, d2: { d1: x2, d10: x11, d11: x12, d12: x13, d13: x14, d14: x15, d15: x16, d16: x17, d17: x18, | |
d18: x19, d19: x20, d2: x3, d20: x21, d21: x22, d3: x4, d4: x5, d5: x6, d6: x7, d7: x8, d8: x9, d9: x10 | |
}, f: f, m: 0 | |
}; | |
return h$RTS_23; | |
}; | |
function h$c23(f, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, | |
x23) | |
{ | |
var h$RTS_24 = { d1: x1, d2: { d1: x2, d10: x11, d11: x12, d12: x13, d13: x14, d14: x15, d15: x16, d16: x17, d17: x18, | |
d18: x19, d19: x20, d2: x3, d20: x21, d21: x22, d22: x23, d3: x4, d4: x5, d5: x6, d6: x7, d7: x8, d8: x9, d9: x10 | |
}, f: f, m: 0 | |
}; | |
return h$RTS_24; | |
}; | |
function h$c24(f, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, | |
x23, x24) | |
{ | |
var h$RTS_25 = { d1: x1, d2: { d1: x2, d10: x11, d11: x12, d12: x13, d13: x14, d14: x15, d15: x16, d16: x17, d17: x18, | |
d18: x19, d19: x20, d2: x3, d20: x21, d21: x22, d22: x23, d23: x24, d3: x4, d4: x5, d5: x6, d6: x7, d7: x8, d8: x9, | |
d9: x10 | |
}, f: f, m: 0 | |
}; | |
return h$RTS_25; | |
}; | |
function h$d1(d1) | |
{ | |
return { d1: d1 | |
}; | |
}; | |
function h$d2(d1, d2) | |
{ | |
return { d1: d1, d2: d2 | |
}; | |
}; | |
function h$d3(d1, d2, d3) | |
{ | |
return { d1: d1, d2: d2, d3: d3 | |
}; | |
}; | |
function h$d4(d1, d2, d3, d4) | |
{ | |
return { d1: d1, d2: d2, d3: d3, d4: d4 | |
}; | |
}; | |
function h$d5(d1, d2, d3, d4, d5) | |
{ | |
return { d1: d1, d2: d2, d3: d3, d4: d4, d5: d5 | |
}; | |
}; | |
function h$d6(d1, d2, d3, d4, d5, d6) | |
{ | |
return { d1: d1, d2: d2, d3: d3, d4: d4, d5: d5, d6: d6 | |
}; | |
}; | |
function h$d7(d1, d2, d3, d4, d5, d6, d7) | |
{ | |
return { d1: d1, d2: d2, d3: d3, d4: d4, d5: d5, d6: d6, d7: d7 | |
}; | |
}; | |
function h$d8(d1, d2, d3, d4, d5, d6, d7, d8) | |
{ | |
return { d1: d1, d2: d2, d3: d3, d4: d4, d5: d5, d6: d6, d7: d7, d8: d8 | |
}; | |
}; | |
function h$d9(d1, d2, d3, d4, d5, d6, d7, d8, d9) | |
{ | |
return { d1: d1, d2: d2, d3: d3, d4: d4, d5: d5, d6: d6, d7: d7, d8: d8, d9: d9 | |
}; | |
}; | |
function h$d10(d1, d2, d3, d4, d5, d6, d7, d8, d9, d10) | |
{ | |
return { d1: d1, d10: d10, d2: d2, d3: d3, d4: d4, d5: d5, d6: d6, d7: d7, d8: d8, d9: d9 | |
}; | |
}; | |
function h$d11(d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11) | |
{ | |
return { d1: d1, d10: d10, d11: d11, d2: d2, d3: d3, d4: d4, d5: d5, d6: d6, d7: d7, d8: d8, d9: d9 | |
}; | |
}; | |
function h$d12(d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12) | |
{ | |
return { d1: d1, d10: d10, d11: d11, d12: d12, d2: d2, d3: d3, d4: d4, d5: d5, d6: d6, d7: d7, d8: d8, d9: d9 | |
}; | |
}; | |
function h$d13(d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d13) | |
{ | |
return { d1: d1, d10: d10, d11: d11, d12: d12, d13: d13, d2: d2, d3: d3, d4: d4, d5: d5, d6: d6, d7: d7, d8: d8, d9: d9 | |
}; | |
}; | |
function h$d14(d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d13, d14) | |
{ | |
return { d1: d1, d10: d10, d11: d11, d12: d12, d13: d13, d14: d14, d2: d2, d3: d3, d4: d4, d5: d5, d6: d6, d7: d7, | |
d8: d8, d9: d9 | |
}; | |
}; | |
function h$d15(d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d13, d14, d15) | |
{ | |
return { d1: d1, d10: d10, d11: d11, d12: d12, d13: d13, d14: d14, d15: d15, d2: d2, d3: d3, d4: d4, d5: d5, d6: d6, | |
d7: d7, d8: d8, d9: d9 | |
}; | |
}; | |
function h$d16(d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d13, d14, d15, d16) | |
{ | |
return { d1: d1, d10: d10, d11: d11, d12: d12, d13: d13, d14: d14, d15: d15, d16: d16, d2: d2, d3: d3, d4: d4, d5: d5, | |
d6: d6, d7: d7, d8: d8, d9: d9 | |
}; | |
}; | |
function h$d17(d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d13, d14, d15, d16, d17) | |
{ | |
return { d1: d1, d10: d10, d11: d11, d12: d12, d13: d13, d14: d14, d15: d15, d16: d16, d17: d17, d2: d2, d3: d3, d4: d4, | |
d5: d5, d6: d6, d7: d7, d8: d8, d9: d9 | |
}; | |
}; | |
function h$d18(d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d13, d14, d15, d16, d17, d18) | |
{ | |
return { d1: d1, d10: d10, d11: d11, d12: d12, d13: d13, d14: d14, d15: d15, d16: d16, d17: d17, d18: d18, d2: d2, | |
d3: d3, d4: d4, d5: d5, d6: d6, d7: d7, d8: d8, d9: d9 | |
}; | |
}; | |
function h$d19(d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d13, d14, d15, d16, d17, d18, d19) | |
{ | |
return { d1: d1, d10: d10, d11: d11, d12: d12, d13: d13, d14: d14, d15: d15, d16: d16, d17: d17, d18: d18, d19: d19, | |
d2: d2, d3: d3, d4: d4, d5: d5, d6: d6, d7: d7, d8: d8, d9: d9 | |
}; | |
}; | |
function h$d20(d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d13, d14, d15, d16, d17, d18, d19, d20) | |
{ | |
return { d1: d1, d10: d10, d11: d11, d12: d12, d13: d13, d14: d14, d15: d15, d16: d16, d17: d17, d18: d18, d19: d19, | |
d2: d2, d20: d20, d3: d3, d4: d4, d5: d5, d6: d6, d7: d7, d8: d8, d9: d9 | |
}; | |
}; | |
function h$d21(d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d13, d14, d15, d16, d17, d18, d19, d20, d21) | |
{ | |
return { d1: d1, d10: d10, d11: d11, d12: d12, d13: d13, d14: d14, d15: d15, d16: d16, d17: d17, d18: d18, d19: d19, | |
d2: d2, d20: d20, d21: d21, d3: d3, d4: d4, d5: d5, d6: d6, d7: d7, d8: d8, d9: d9 | |
}; | |
}; | |
function h$d22(d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d13, d14, d15, d16, d17, d18, d19, d20, d21, d22) | |
{ | |
return { d1: d1, d10: d10, d11: d11, d12: d12, d13: d13, d14: d14, d15: d15, d16: d16, d17: d17, d18: d18, d19: d19, | |
d2: d2, d20: d20, d21: d21, d22: d22, d3: d3, d4: d4, d5: d5, d6: d6, d7: d7, d8: d8, d9: d9 | |
}; | |
}; | |
function h$d23(d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d13, d14, d15, d16, d17, d18, d19, d20, d21, d22, d23) | |
{ | |
return { d1: d1, d10: d10, d11: d11, d12: d12, d13: d13, d14: d14, d15: d15, d16: d16, d17: d17, d18: d18, d19: d19, | |
d2: d2, d20: d20, d21: d21, d22: d22, d23: d23, d3: d3, d4: d4, d5: d5, d6: d6, d7: d7, d8: d8, d9: d9 | |
}; | |
}; | |
function h$d24(d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d13, d14, d15, d16, d17, d18, d19, d20, d21, d22, d23, | |
d24) | |
{ | |
return { d1: d1, d10: d10, d11: d11, d12: d12, d13: d13, d14: d14, d15: d15, d16: d16, d17: d17, d18: d18, d19: d19, | |
d2: d2, d20: d20, d21: d21, d22: d22, d23: d23, d24: d24, d3: d3, d4: d4, d5: d5, d6: d6, d7: d7, d8: d8, d9: d9 | |
}; | |
}; | |
function h$resetRegisters() | |
{ | |
h$r1 = null; | |
h$r2 = null; | |
h$r3 = null; | |
h$r4 = null; | |
h$r5 = null; | |
h$r6 = null; | |
h$r7 = null; | |
h$r8 = null; | |
h$r9 = null; | |
h$r10 = null; | |
h$r11 = null; | |
h$r12 = null; | |
h$r13 = null; | |
h$r14 = null; | |
h$r15 = null; | |
h$r16 = null; | |
h$r17 = null; | |
h$r18 = null; | |
h$r19 = null; | |
h$r20 = null; | |
h$r21 = null; | |
h$r22 = null; | |
h$r23 = null; | |
h$r24 = null; | |
h$r25 = null; | |
h$r26 = null; | |
h$r27 = null; | |
h$r28 = null; | |
h$r29 = null; | |
h$r30 = null; | |
h$r31 = null; | |
h$r32 = null; | |
h$regs[0] = null; | |
h$regs[1] = null; | |
h$regs[2] = null; | |
h$regs[3] = null; | |
h$regs[4] = null; | |
h$regs[5] = null; | |
h$regs[6] = null; | |
h$regs[7] = null; | |
h$regs[8] = null; | |
h$regs[9] = null; | |
h$regs[10] = null; | |
h$regs[11] = null; | |
h$regs[12] = null; | |
h$regs[13] = null; | |
h$regs[14] = null; | |
h$regs[15] = null; | |
h$regs[16] = null; | |
h$regs[17] = null; | |
h$regs[18] = null; | |
h$regs[19] = null; | |
h$regs[20] = null; | |
h$regs[21] = null; | |
h$regs[22] = null; | |
h$regs[23] = null; | |
h$regs[24] = null; | |
h$regs[25] = null; | |
h$regs[26] = null; | |
h$regs[27] = null; | |
h$regs[28] = null; | |
h$regs[29] = null; | |
h$regs[30] = null; | |
h$regs[31] = null; | |
h$regs[32] = null; | |
h$regs[33] = null; | |
h$regs[34] = null; | |
h$regs[35] = null; | |
h$regs[36] = null; | |
h$regs[37] = null; | |
h$regs[38] = null; | |
h$regs[39] = null; | |
h$regs[40] = null; | |
h$regs[41] = null; | |
h$regs[42] = null; | |
h$regs[43] = null; | |
h$regs[44] = null; | |
h$regs[45] = null; | |
h$regs[46] = null; | |
h$regs[47] = null; | |
h$regs[48] = null; | |
h$regs[49] = null; | |
h$regs[50] = null; | |
h$regs[51] = null; | |
h$regs[52] = null; | |
h$regs[53] = null; | |
h$regs[54] = null; | |
h$regs[55] = null; | |
h$regs[56] = null; | |
h$regs[57] = null; | |
h$regs[58] = null; | |
h$regs[59] = null; | |
h$regs[60] = null; | |
h$regs[61] = null; | |
h$regs[62] = null; | |
h$regs[63] = null; | |
h$regs[64] = null; | |
h$regs[65] = null; | |
h$regs[66] = null; | |
h$regs[67] = null; | |
h$regs[68] = null; | |
h$regs[69] = null; | |
h$regs[70] = null; | |
h$regs[71] = null; | |
h$regs[72] = null; | |
h$regs[73] = null; | |
h$regs[74] = null; | |
h$regs[75] = null; | |
h$regs[76] = null; | |
h$regs[77] = null; | |
h$regs[78] = null; | |
h$regs[79] = null; | |
h$regs[80] = null; | |
h$regs[81] = null; | |
h$regs[82] = null; | |
h$regs[83] = null; | |
h$regs[84] = null; | |
h$regs[85] = null; | |
h$regs[86] = null; | |
h$regs[87] = null; | |
h$regs[88] = null; | |
h$regs[89] = null; | |
h$regs[90] = null; | |
h$regs[91] = null; | |
h$regs[92] = null; | |
h$regs[93] = null; | |
h$regs[94] = null; | |
h$regs[95] = null; | |
}; | |
function h$resetResultVars() | |
{ | |
h$ret1 = null; | |
h$ret2 = null; | |
h$ret3 = null; | |
h$ret4 = null; | |
h$ret5 = null; | |
h$ret6 = null; | |
h$ret7 = null; | |
h$ret8 = null; | |
h$ret9 = null; | |
h$ret10 = null; | |
}; | |
function h$p1(x1) | |
{ | |
++h$sp; | |
h$stack[(h$sp - 0)] = x1; | |
}; | |
function h$p2(x1, x2) | |
{ | |
h$sp += 2; | |
h$stack[(h$sp - 1)] = x1; | |
h$stack[(h$sp - 0)] = x2; | |
}; | |
function h$p3(x1, x2, x3) | |
{ | |
h$sp += 3; | |
h$stack[(h$sp - 2)] = x1; | |
h$stack[(h$sp - 1)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$p4(x1, x2, x3, x4) | |
{ | |
h$sp += 4; | |
h$stack[(h$sp - 3)] = x1; | |
h$stack[(h$sp - 2)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$p5(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 5; | |
h$stack[(h$sp - 4)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$p6(x1, x2, x3, x4, x5, x6) | |
{ | |
h$sp += 6; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 2)] = x4; | |
h$stack[(h$sp - 1)] = x5; | |
h$stack[(h$sp - 0)] = x6; | |
}; | |
function h$p7(x1, x2, x3, x4, x5, x6, x7) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 4)] = x3; | |
h$stack[(h$sp - 3)] = x4; | |
h$stack[(h$sp - 2)] = x5; | |
h$stack[(h$sp - 1)] = x6; | |
h$stack[(h$sp - 0)] = x7; | |
}; | |
function h$p8(x1, x2, x3, x4, x5, x6, x7, x8) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 6)] = x2; | |
h$stack[(h$sp - 5)] = x3; | |
h$stack[(h$sp - 4)] = x4; | |
h$stack[(h$sp - 3)] = x5; | |
h$stack[(h$sp - 2)] = x6; | |
h$stack[(h$sp - 1)] = x7; | |
h$stack[(h$sp - 0)] = x8; | |
}; | |
function h$p9(x1, x2, x3, x4, x5, x6, x7, x8, x9) | |
{ | |
h$sp += 9; | |
h$stack[(h$sp - 8)] = x1; | |
h$stack[(h$sp - 7)] = x2; | |
h$stack[(h$sp - 6)] = x3; | |
h$stack[(h$sp - 5)] = x4; | |
h$stack[(h$sp - 4)] = x5; | |
h$stack[(h$sp - 3)] = x6; | |
h$stack[(h$sp - 2)] = x7; | |
h$stack[(h$sp - 1)] = x8; | |
h$stack[(h$sp - 0)] = x9; | |
}; | |
function h$p10(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) | |
{ | |
h$sp += 10; | |
h$stack[(h$sp - 9)] = x1; | |
h$stack[(h$sp - 8)] = x2; | |
h$stack[(h$sp - 7)] = x3; | |
h$stack[(h$sp - 6)] = x4; | |
h$stack[(h$sp - 5)] = x5; | |
h$stack[(h$sp - 4)] = x6; | |
h$stack[(h$sp - 3)] = x7; | |
h$stack[(h$sp - 2)] = x8; | |
h$stack[(h$sp - 1)] = x9; | |
h$stack[(h$sp - 0)] = x10; | |
}; | |
function h$p11(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11) | |
{ | |
h$sp += 11; | |
h$stack[(h$sp - 10)] = x1; | |
h$stack[(h$sp - 9)] = x2; | |
h$stack[(h$sp - 8)] = x3; | |
h$stack[(h$sp - 7)] = x4; | |
h$stack[(h$sp - 6)] = x5; | |
h$stack[(h$sp - 5)] = x6; | |
h$stack[(h$sp - 4)] = x7; | |
h$stack[(h$sp - 3)] = x8; | |
h$stack[(h$sp - 2)] = x9; | |
h$stack[(h$sp - 1)] = x10; | |
h$stack[(h$sp - 0)] = x11; | |
}; | |
function h$p12(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12) | |
{ | |
h$sp += 12; | |
h$stack[(h$sp - 11)] = x1; | |
h$stack[(h$sp - 10)] = x2; | |
h$stack[(h$sp - 9)] = x3; | |
h$stack[(h$sp - 8)] = x4; | |
h$stack[(h$sp - 7)] = x5; | |
h$stack[(h$sp - 6)] = x6; | |
h$stack[(h$sp - 5)] = x7; | |
h$stack[(h$sp - 4)] = x8; | |
h$stack[(h$sp - 3)] = x9; | |
h$stack[(h$sp - 2)] = x10; | |
h$stack[(h$sp - 1)] = x11; | |
h$stack[(h$sp - 0)] = x12; | |
}; | |
function h$p13(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13) | |
{ | |
h$sp += 13; | |
h$stack[(h$sp - 12)] = x1; | |
h$stack[(h$sp - 11)] = x2; | |
h$stack[(h$sp - 10)] = x3; | |
h$stack[(h$sp - 9)] = x4; | |
h$stack[(h$sp - 8)] = x5; | |
h$stack[(h$sp - 7)] = x6; | |
h$stack[(h$sp - 6)] = x7; | |
h$stack[(h$sp - 5)] = x8; | |
h$stack[(h$sp - 4)] = x9; | |
h$stack[(h$sp - 3)] = x10; | |
h$stack[(h$sp - 2)] = x11; | |
h$stack[(h$sp - 1)] = x12; | |
h$stack[(h$sp - 0)] = x13; | |
}; | |
function h$p14(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14) | |
{ | |
h$sp += 14; | |
h$stack[(h$sp - 13)] = x1; | |
h$stack[(h$sp - 12)] = x2; | |
h$stack[(h$sp - 11)] = x3; | |
h$stack[(h$sp - 10)] = x4; | |
h$stack[(h$sp - 9)] = x5; | |
h$stack[(h$sp - 8)] = x6; | |
h$stack[(h$sp - 7)] = x7; | |
h$stack[(h$sp - 6)] = x8; | |
h$stack[(h$sp - 5)] = x9; | |
h$stack[(h$sp - 4)] = x10; | |
h$stack[(h$sp - 3)] = x11; | |
h$stack[(h$sp - 2)] = x12; | |
h$stack[(h$sp - 1)] = x13; | |
h$stack[(h$sp - 0)] = x14; | |
}; | |
function h$p15(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15) | |
{ | |
h$sp += 15; | |
h$stack[(h$sp - 14)] = x1; | |
h$stack[(h$sp - 13)] = x2; | |
h$stack[(h$sp - 12)] = x3; | |
h$stack[(h$sp - 11)] = x4; | |
h$stack[(h$sp - 10)] = x5; | |
h$stack[(h$sp - 9)] = x6; | |
h$stack[(h$sp - 8)] = x7; | |
h$stack[(h$sp - 7)] = x8; | |
h$stack[(h$sp - 6)] = x9; | |
h$stack[(h$sp - 5)] = x10; | |
h$stack[(h$sp - 4)] = x11; | |
h$stack[(h$sp - 3)] = x12; | |
h$stack[(h$sp - 2)] = x13; | |
h$stack[(h$sp - 1)] = x14; | |
h$stack[(h$sp - 0)] = x15; | |
}; | |
function h$p16(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16) | |
{ | |
h$sp += 16; | |
h$stack[(h$sp - 15)] = x1; | |
h$stack[(h$sp - 14)] = x2; | |
h$stack[(h$sp - 13)] = x3; | |
h$stack[(h$sp - 12)] = x4; | |
h$stack[(h$sp - 11)] = x5; | |
h$stack[(h$sp - 10)] = x6; | |
h$stack[(h$sp - 9)] = x7; | |
h$stack[(h$sp - 8)] = x8; | |
h$stack[(h$sp - 7)] = x9; | |
h$stack[(h$sp - 6)] = x10; | |
h$stack[(h$sp - 5)] = x11; | |
h$stack[(h$sp - 4)] = x12; | |
h$stack[(h$sp - 3)] = x13; | |
h$stack[(h$sp - 2)] = x14; | |
h$stack[(h$sp - 1)] = x15; | |
h$stack[(h$sp - 0)] = x16; | |
}; | |
function h$p17(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17) | |
{ | |
h$sp += 17; | |
h$stack[(h$sp - 16)] = x1; | |
h$stack[(h$sp - 15)] = x2; | |
h$stack[(h$sp - 14)] = x3; | |
h$stack[(h$sp - 13)] = x4; | |
h$stack[(h$sp - 12)] = x5; | |
h$stack[(h$sp - 11)] = x6; | |
h$stack[(h$sp - 10)] = x7; | |
h$stack[(h$sp - 9)] = x8; | |
h$stack[(h$sp - 8)] = x9; | |
h$stack[(h$sp - 7)] = x10; | |
h$stack[(h$sp - 6)] = x11; | |
h$stack[(h$sp - 5)] = x12; | |
h$stack[(h$sp - 4)] = x13; | |
h$stack[(h$sp - 3)] = x14; | |
h$stack[(h$sp - 2)] = x15; | |
h$stack[(h$sp - 1)] = x16; | |
h$stack[(h$sp - 0)] = x17; | |
}; | |
function h$p18(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18) | |
{ | |
h$sp += 18; | |
h$stack[(h$sp - 17)] = x1; | |
h$stack[(h$sp - 16)] = x2; | |
h$stack[(h$sp - 15)] = x3; | |
h$stack[(h$sp - 14)] = x4; | |
h$stack[(h$sp - 13)] = x5; | |
h$stack[(h$sp - 12)] = x6; | |
h$stack[(h$sp - 11)] = x7; | |
h$stack[(h$sp - 10)] = x8; | |
h$stack[(h$sp - 9)] = x9; | |
h$stack[(h$sp - 8)] = x10; | |
h$stack[(h$sp - 7)] = x11; | |
h$stack[(h$sp - 6)] = x12; | |
h$stack[(h$sp - 5)] = x13; | |
h$stack[(h$sp - 4)] = x14; | |
h$stack[(h$sp - 3)] = x15; | |
h$stack[(h$sp - 2)] = x16; | |
h$stack[(h$sp - 1)] = x17; | |
h$stack[(h$sp - 0)] = x18; | |
}; | |
function h$p19(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19) | |
{ | |
h$sp += 19; | |
h$stack[(h$sp - 18)] = x1; | |
h$stack[(h$sp - 17)] = x2; | |
h$stack[(h$sp - 16)] = x3; | |
h$stack[(h$sp - 15)] = x4; | |
h$stack[(h$sp - 14)] = x5; | |
h$stack[(h$sp - 13)] = x6; | |
h$stack[(h$sp - 12)] = x7; | |
h$stack[(h$sp - 11)] = x8; | |
h$stack[(h$sp - 10)] = x9; | |
h$stack[(h$sp - 9)] = x10; | |
h$stack[(h$sp - 8)] = x11; | |
h$stack[(h$sp - 7)] = x12; | |
h$stack[(h$sp - 6)] = x13; | |
h$stack[(h$sp - 5)] = x14; | |
h$stack[(h$sp - 4)] = x15; | |
h$stack[(h$sp - 3)] = x16; | |
h$stack[(h$sp - 2)] = x17; | |
h$stack[(h$sp - 1)] = x18; | |
h$stack[(h$sp - 0)] = x19; | |
}; | |
function h$p20(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20) | |
{ | |
h$sp += 20; | |
h$stack[(h$sp - 19)] = x1; | |
h$stack[(h$sp - 18)] = x2; | |
h$stack[(h$sp - 17)] = x3; | |
h$stack[(h$sp - 16)] = x4; | |
h$stack[(h$sp - 15)] = x5; | |
h$stack[(h$sp - 14)] = x6; | |
h$stack[(h$sp - 13)] = x7; | |
h$stack[(h$sp - 12)] = x8; | |
h$stack[(h$sp - 11)] = x9; | |
h$stack[(h$sp - 10)] = x10; | |
h$stack[(h$sp - 9)] = x11; | |
h$stack[(h$sp - 8)] = x12; | |
h$stack[(h$sp - 7)] = x13; | |
h$stack[(h$sp - 6)] = x14; | |
h$stack[(h$sp - 5)] = x15; | |
h$stack[(h$sp - 4)] = x16; | |
h$stack[(h$sp - 3)] = x17; | |
h$stack[(h$sp - 2)] = x18; | |
h$stack[(h$sp - 1)] = x19; | |
h$stack[(h$sp - 0)] = x20; | |
}; | |
function h$p21(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21) | |
{ | |
h$sp += 21; | |
h$stack[(h$sp - 20)] = x1; | |
h$stack[(h$sp - 19)] = x2; | |
h$stack[(h$sp - 18)] = x3; | |
h$stack[(h$sp - 17)] = x4; | |
h$stack[(h$sp - 16)] = x5; | |
h$stack[(h$sp - 15)] = x6; | |
h$stack[(h$sp - 14)] = x7; | |
h$stack[(h$sp - 13)] = x8; | |
h$stack[(h$sp - 12)] = x9; | |
h$stack[(h$sp - 11)] = x10; | |
h$stack[(h$sp - 10)] = x11; | |
h$stack[(h$sp - 9)] = x12; | |
h$stack[(h$sp - 8)] = x13; | |
h$stack[(h$sp - 7)] = x14; | |
h$stack[(h$sp - 6)] = x15; | |
h$stack[(h$sp - 5)] = x16; | |
h$stack[(h$sp - 4)] = x17; | |
h$stack[(h$sp - 3)] = x18; | |
h$stack[(h$sp - 2)] = x19; | |
h$stack[(h$sp - 1)] = x20; | |
h$stack[(h$sp - 0)] = x21; | |
}; | |
function h$p22(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22) | |
{ | |
h$sp += 22; | |
h$stack[(h$sp - 21)] = x1; | |
h$stack[(h$sp - 20)] = x2; | |
h$stack[(h$sp - 19)] = x3; | |
h$stack[(h$sp - 18)] = x4; | |
h$stack[(h$sp - 17)] = x5; | |
h$stack[(h$sp - 16)] = x6; | |
h$stack[(h$sp - 15)] = x7; | |
h$stack[(h$sp - 14)] = x8; | |
h$stack[(h$sp - 13)] = x9; | |
h$stack[(h$sp - 12)] = x10; | |
h$stack[(h$sp - 11)] = x11; | |
h$stack[(h$sp - 10)] = x12; | |
h$stack[(h$sp - 9)] = x13; | |
h$stack[(h$sp - 8)] = x14; | |
h$stack[(h$sp - 7)] = x15; | |
h$stack[(h$sp - 6)] = x16; | |
h$stack[(h$sp - 5)] = x17; | |
h$stack[(h$sp - 4)] = x18; | |
h$stack[(h$sp - 3)] = x19; | |
h$stack[(h$sp - 2)] = x20; | |
h$stack[(h$sp - 1)] = x21; | |
h$stack[(h$sp - 0)] = x22; | |
}; | |
function h$p23(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23) | |
{ | |
h$sp += 23; | |
h$stack[(h$sp - 22)] = x1; | |
h$stack[(h$sp - 21)] = x2; | |
h$stack[(h$sp - 20)] = x3; | |
h$stack[(h$sp - 19)] = x4; | |
h$stack[(h$sp - 18)] = x5; | |
h$stack[(h$sp - 17)] = x6; | |
h$stack[(h$sp - 16)] = x7; | |
h$stack[(h$sp - 15)] = x8; | |
h$stack[(h$sp - 14)] = x9; | |
h$stack[(h$sp - 13)] = x10; | |
h$stack[(h$sp - 12)] = x11; | |
h$stack[(h$sp - 11)] = x12; | |
h$stack[(h$sp - 10)] = x13; | |
h$stack[(h$sp - 9)] = x14; | |
h$stack[(h$sp - 8)] = x15; | |
h$stack[(h$sp - 7)] = x16; | |
h$stack[(h$sp - 6)] = x17; | |
h$stack[(h$sp - 5)] = x18; | |
h$stack[(h$sp - 4)] = x19; | |
h$stack[(h$sp - 3)] = x20; | |
h$stack[(h$sp - 2)] = x21; | |
h$stack[(h$sp - 1)] = x22; | |
h$stack[(h$sp - 0)] = x23; | |
}; | |
function h$p24(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, | |
x24) | |
{ | |
h$sp += 24; | |
h$stack[(h$sp - 23)] = x1; | |
h$stack[(h$sp - 22)] = x2; | |
h$stack[(h$sp - 21)] = x3; | |
h$stack[(h$sp - 20)] = x4; | |
h$stack[(h$sp - 19)] = x5; | |
h$stack[(h$sp - 18)] = x6; | |
h$stack[(h$sp - 17)] = x7; | |
h$stack[(h$sp - 16)] = x8; | |
h$stack[(h$sp - 15)] = x9; | |
h$stack[(h$sp - 14)] = x10; | |
h$stack[(h$sp - 13)] = x11; | |
h$stack[(h$sp - 12)] = x12; | |
h$stack[(h$sp - 11)] = x13; | |
h$stack[(h$sp - 10)] = x14; | |
h$stack[(h$sp - 9)] = x15; | |
h$stack[(h$sp - 8)] = x16; | |
h$stack[(h$sp - 7)] = x17; | |
h$stack[(h$sp - 6)] = x18; | |
h$stack[(h$sp - 5)] = x19; | |
h$stack[(h$sp - 4)] = x20; | |
h$stack[(h$sp - 3)] = x21; | |
h$stack[(h$sp - 2)] = x22; | |
h$stack[(h$sp - 1)] = x23; | |
h$stack[(h$sp - 0)] = x24; | |
}; | |
function h$p25(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, | |
x24, x25) | |
{ | |
h$sp += 25; | |
h$stack[(h$sp - 24)] = x1; | |
h$stack[(h$sp - 23)] = x2; | |
h$stack[(h$sp - 22)] = x3; | |
h$stack[(h$sp - 21)] = x4; | |
h$stack[(h$sp - 20)] = x5; | |
h$stack[(h$sp - 19)] = x6; | |
h$stack[(h$sp - 18)] = x7; | |
h$stack[(h$sp - 17)] = x8; | |
h$stack[(h$sp - 16)] = x9; | |
h$stack[(h$sp - 15)] = x10; | |
h$stack[(h$sp - 14)] = x11; | |
h$stack[(h$sp - 13)] = x12; | |
h$stack[(h$sp - 12)] = x13; | |
h$stack[(h$sp - 11)] = x14; | |
h$stack[(h$sp - 10)] = x15; | |
h$stack[(h$sp - 9)] = x16; | |
h$stack[(h$sp - 8)] = x17; | |
h$stack[(h$sp - 7)] = x18; | |
h$stack[(h$sp - 6)] = x19; | |
h$stack[(h$sp - 5)] = x20; | |
h$stack[(h$sp - 4)] = x21; | |
h$stack[(h$sp - 3)] = x22; | |
h$stack[(h$sp - 2)] = x23; | |
h$stack[(h$sp - 1)] = x24; | |
h$stack[(h$sp - 0)] = x25; | |
}; | |
function h$p26(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, | |
x24, x25, x26) | |
{ | |
h$sp += 26; | |
h$stack[(h$sp - 25)] = x1; | |
h$stack[(h$sp - 24)] = x2; | |
h$stack[(h$sp - 23)] = x3; | |
h$stack[(h$sp - 22)] = x4; | |
h$stack[(h$sp - 21)] = x5; | |
h$stack[(h$sp - 20)] = x6; | |
h$stack[(h$sp - 19)] = x7; | |
h$stack[(h$sp - 18)] = x8; | |
h$stack[(h$sp - 17)] = x9; | |
h$stack[(h$sp - 16)] = x10; | |
h$stack[(h$sp - 15)] = x11; | |
h$stack[(h$sp - 14)] = x12; | |
h$stack[(h$sp - 13)] = x13; | |
h$stack[(h$sp - 12)] = x14; | |
h$stack[(h$sp - 11)] = x15; | |
h$stack[(h$sp - 10)] = x16; | |
h$stack[(h$sp - 9)] = x17; | |
h$stack[(h$sp - 8)] = x18; | |
h$stack[(h$sp - 7)] = x19; | |
h$stack[(h$sp - 6)] = x20; | |
h$stack[(h$sp - 5)] = x21; | |
h$stack[(h$sp - 4)] = x22; | |
h$stack[(h$sp - 3)] = x23; | |
h$stack[(h$sp - 2)] = x24; | |
h$stack[(h$sp - 1)] = x25; | |
h$stack[(h$sp - 0)] = x26; | |
}; | |
function h$p27(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, | |
x24, x25, x26, x27) | |
{ | |
h$sp += 27; | |
h$stack[(h$sp - 26)] = x1; | |
h$stack[(h$sp - 25)] = x2; | |
h$stack[(h$sp - 24)] = x3; | |
h$stack[(h$sp - 23)] = x4; | |
h$stack[(h$sp - 22)] = x5; | |
h$stack[(h$sp - 21)] = x6; | |
h$stack[(h$sp - 20)] = x7; | |
h$stack[(h$sp - 19)] = x8; | |
h$stack[(h$sp - 18)] = x9; | |
h$stack[(h$sp - 17)] = x10; | |
h$stack[(h$sp - 16)] = x11; | |
h$stack[(h$sp - 15)] = x12; | |
h$stack[(h$sp - 14)] = x13; | |
h$stack[(h$sp - 13)] = x14; | |
h$stack[(h$sp - 12)] = x15; | |
h$stack[(h$sp - 11)] = x16; | |
h$stack[(h$sp - 10)] = x17; | |
h$stack[(h$sp - 9)] = x18; | |
h$stack[(h$sp - 8)] = x19; | |
h$stack[(h$sp - 7)] = x20; | |
h$stack[(h$sp - 6)] = x21; | |
h$stack[(h$sp - 5)] = x22; | |
h$stack[(h$sp - 4)] = x23; | |
h$stack[(h$sp - 3)] = x24; | |
h$stack[(h$sp - 2)] = x25; | |
h$stack[(h$sp - 1)] = x26; | |
h$stack[(h$sp - 0)] = x27; | |
}; | |
function h$p28(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, | |
x24, x25, x26, x27, x28) | |
{ | |
h$sp += 28; | |
h$stack[(h$sp - 27)] = x1; | |
h$stack[(h$sp - 26)] = x2; | |
h$stack[(h$sp - 25)] = x3; | |
h$stack[(h$sp - 24)] = x4; | |
h$stack[(h$sp - 23)] = x5; | |
h$stack[(h$sp - 22)] = x6; | |
h$stack[(h$sp - 21)] = x7; | |
h$stack[(h$sp - 20)] = x8; | |
h$stack[(h$sp - 19)] = x9; | |
h$stack[(h$sp - 18)] = x10; | |
h$stack[(h$sp - 17)] = x11; | |
h$stack[(h$sp - 16)] = x12; | |
h$stack[(h$sp - 15)] = x13; | |
h$stack[(h$sp - 14)] = x14; | |
h$stack[(h$sp - 13)] = x15; | |
h$stack[(h$sp - 12)] = x16; | |
h$stack[(h$sp - 11)] = x17; | |
h$stack[(h$sp - 10)] = x18; | |
h$stack[(h$sp - 9)] = x19; | |
h$stack[(h$sp - 8)] = x20; | |
h$stack[(h$sp - 7)] = x21; | |
h$stack[(h$sp - 6)] = x22; | |
h$stack[(h$sp - 5)] = x23; | |
h$stack[(h$sp - 4)] = x24; | |
h$stack[(h$sp - 3)] = x25; | |
h$stack[(h$sp - 2)] = x26; | |
h$stack[(h$sp - 1)] = x27; | |
h$stack[(h$sp - 0)] = x28; | |
}; | |
function h$p29(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, | |
x24, x25, x26, x27, x28, x29) | |
{ | |
h$sp += 29; | |
h$stack[(h$sp - 28)] = x1; | |
h$stack[(h$sp - 27)] = x2; | |
h$stack[(h$sp - 26)] = x3; | |
h$stack[(h$sp - 25)] = x4; | |
h$stack[(h$sp - 24)] = x5; | |
h$stack[(h$sp - 23)] = x6; | |
h$stack[(h$sp - 22)] = x7; | |
h$stack[(h$sp - 21)] = x8; | |
h$stack[(h$sp - 20)] = x9; | |
h$stack[(h$sp - 19)] = x10; | |
h$stack[(h$sp - 18)] = x11; | |
h$stack[(h$sp - 17)] = x12; | |
h$stack[(h$sp - 16)] = x13; | |
h$stack[(h$sp - 15)] = x14; | |
h$stack[(h$sp - 14)] = x15; | |
h$stack[(h$sp - 13)] = x16; | |
h$stack[(h$sp - 12)] = x17; | |
h$stack[(h$sp - 11)] = x18; | |
h$stack[(h$sp - 10)] = x19; | |
h$stack[(h$sp - 9)] = x20; | |
h$stack[(h$sp - 8)] = x21; | |
h$stack[(h$sp - 7)] = x22; | |
h$stack[(h$sp - 6)] = x23; | |
h$stack[(h$sp - 5)] = x24; | |
h$stack[(h$sp - 4)] = x25; | |
h$stack[(h$sp - 3)] = x26; | |
h$stack[(h$sp - 2)] = x27; | |
h$stack[(h$sp - 1)] = x28; | |
h$stack[(h$sp - 0)] = x29; | |
}; | |
function h$p30(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, | |
x24, x25, x26, x27, x28, x29, x30) | |
{ | |
h$sp += 30; | |
h$stack[(h$sp - 29)] = x1; | |
h$stack[(h$sp - 28)] = x2; | |
h$stack[(h$sp - 27)] = x3; | |
h$stack[(h$sp - 26)] = x4; | |
h$stack[(h$sp - 25)] = x5; | |
h$stack[(h$sp - 24)] = x6; | |
h$stack[(h$sp - 23)] = x7; | |
h$stack[(h$sp - 22)] = x8; | |
h$stack[(h$sp - 21)] = x9; | |
h$stack[(h$sp - 20)] = x10; | |
h$stack[(h$sp - 19)] = x11; | |
h$stack[(h$sp - 18)] = x12; | |
h$stack[(h$sp - 17)] = x13; | |
h$stack[(h$sp - 16)] = x14; | |
h$stack[(h$sp - 15)] = x15; | |
h$stack[(h$sp - 14)] = x16; | |
h$stack[(h$sp - 13)] = x17; | |
h$stack[(h$sp - 12)] = x18; | |
h$stack[(h$sp - 11)] = x19; | |
h$stack[(h$sp - 10)] = x20; | |
h$stack[(h$sp - 9)] = x21; | |
h$stack[(h$sp - 8)] = x22; | |
h$stack[(h$sp - 7)] = x23; | |
h$stack[(h$sp - 6)] = x24; | |
h$stack[(h$sp - 5)] = x25; | |
h$stack[(h$sp - 4)] = x26; | |
h$stack[(h$sp - 3)] = x27; | |
h$stack[(h$sp - 2)] = x28; | |
h$stack[(h$sp - 1)] = x29; | |
h$stack[(h$sp - 0)] = x30; | |
}; | |
function h$p31(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, | |
x24, x25, x26, x27, x28, x29, x30, x31) | |
{ | |
h$sp += 31; | |
h$stack[(h$sp - 30)] = x1; | |
h$stack[(h$sp - 29)] = x2; | |
h$stack[(h$sp - 28)] = x3; | |
h$stack[(h$sp - 27)] = x4; | |
h$stack[(h$sp - 26)] = x5; | |
h$stack[(h$sp - 25)] = x6; | |
h$stack[(h$sp - 24)] = x7; | |
h$stack[(h$sp - 23)] = x8; | |
h$stack[(h$sp - 22)] = x9; | |
h$stack[(h$sp - 21)] = x10; | |
h$stack[(h$sp - 20)] = x11; | |
h$stack[(h$sp - 19)] = x12; | |
h$stack[(h$sp - 18)] = x13; | |
h$stack[(h$sp - 17)] = x14; | |
h$stack[(h$sp - 16)] = x15; | |
h$stack[(h$sp - 15)] = x16; | |
h$stack[(h$sp - 14)] = x17; | |
h$stack[(h$sp - 13)] = x18; | |
h$stack[(h$sp - 12)] = x19; | |
h$stack[(h$sp - 11)] = x20; | |
h$stack[(h$sp - 10)] = x21; | |
h$stack[(h$sp - 9)] = x22; | |
h$stack[(h$sp - 8)] = x23; | |
h$stack[(h$sp - 7)] = x24; | |
h$stack[(h$sp - 6)] = x25; | |
h$stack[(h$sp - 5)] = x26; | |
h$stack[(h$sp - 4)] = x27; | |
h$stack[(h$sp - 3)] = x28; | |
h$stack[(h$sp - 2)] = x29; | |
h$stack[(h$sp - 1)] = x30; | |
h$stack[(h$sp - 0)] = x31; | |
}; | |
function h$p32(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, | |
x24, x25, x26, x27, x28, x29, x30, x31, x32) | |
{ | |
h$sp += 32; | |
h$stack[(h$sp - 31)] = x1; | |
h$stack[(h$sp - 30)] = x2; | |
h$stack[(h$sp - 29)] = x3; | |
h$stack[(h$sp - 28)] = x4; | |
h$stack[(h$sp - 27)] = x5; | |
h$stack[(h$sp - 26)] = x6; | |
h$stack[(h$sp - 25)] = x7; | |
h$stack[(h$sp - 24)] = x8; | |
h$stack[(h$sp - 23)] = x9; | |
h$stack[(h$sp - 22)] = x10; | |
h$stack[(h$sp - 21)] = x11; | |
h$stack[(h$sp - 20)] = x12; | |
h$stack[(h$sp - 19)] = x13; | |
h$stack[(h$sp - 18)] = x14; | |
h$stack[(h$sp - 17)] = x15; | |
h$stack[(h$sp - 16)] = x16; | |
h$stack[(h$sp - 15)] = x17; | |
h$stack[(h$sp - 14)] = x18; | |
h$stack[(h$sp - 13)] = x19; | |
h$stack[(h$sp - 12)] = x20; | |
h$stack[(h$sp - 11)] = x21; | |
h$stack[(h$sp - 10)] = x22; | |
h$stack[(h$sp - 9)] = x23; | |
h$stack[(h$sp - 8)] = x24; | |
h$stack[(h$sp - 7)] = x25; | |
h$stack[(h$sp - 6)] = x26; | |
h$stack[(h$sp - 5)] = x27; | |
h$stack[(h$sp - 4)] = x28; | |
h$stack[(h$sp - 3)] = x29; | |
h$stack[(h$sp - 2)] = x30; | |
h$stack[(h$sp - 1)] = x31; | |
h$stack[(h$sp - 0)] = x32; | |
}; | |
function h$pp2(x1) | |
{ | |
h$sp += 2; | |
h$stack[(h$sp - 0)] = x1; | |
}; | |
function h$pp4(x1) | |
{ | |
h$sp += 3; | |
h$stack[(h$sp - 0)] = x1; | |
}; | |
function h$pp5(x1, x2) | |
{ | |
h$sp += 3; | |
h$stack[(h$sp - 2)] = x1; | |
h$stack[(h$sp - 0)] = x2; | |
}; | |
function h$pp6(x1, x2) | |
{ | |
h$sp += 3; | |
h$stack[(h$sp - 1)] = x1; | |
h$stack[(h$sp - 0)] = x2; | |
}; | |
function h$pp8(x1) | |
{ | |
h$sp += 4; | |
h$stack[(h$sp - 0)] = x1; | |
}; | |
function h$pp9(x1, x2) | |
{ | |
h$sp += 4; | |
h$stack[(h$sp - 3)] = x1; | |
h$stack[(h$sp - 0)] = x2; | |
}; | |
function h$pp10(x1, x2) | |
{ | |
h$sp += 4; | |
h$stack[(h$sp - 2)] = x1; | |
h$stack[(h$sp - 0)] = x2; | |
}; | |
function h$pp11(x1, x2, x3) | |
{ | |
h$sp += 4; | |
h$stack[(h$sp - 3)] = x1; | |
h$stack[(h$sp - 2)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp12(x1, x2) | |
{ | |
h$sp += 4; | |
h$stack[(h$sp - 1)] = x1; | |
h$stack[(h$sp - 0)] = x2; | |
}; | |
function h$pp13(x1, x2, x3) | |
{ | |
h$sp += 4; | |
h$stack[(h$sp - 3)] = x1; | |
h$stack[(h$sp - 1)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp14(x1, x2, x3) | |
{ | |
h$sp += 4; | |
h$stack[(h$sp - 2)] = x1; | |
h$stack[(h$sp - 1)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp16(x1) | |
{ | |
h$sp += 5; | |
h$stack[(h$sp - 0)] = x1; | |
}; | |
function h$pp17(x1, x2) | |
{ | |
h$sp += 5; | |
h$stack[(h$sp - 4)] = x1; | |
h$stack[(h$sp - 0)] = x2; | |
}; | |
function h$pp18(x1, x2) | |
{ | |
h$sp += 5; | |
h$stack[(h$sp - 3)] = x1; | |
h$stack[(h$sp - 0)] = x2; | |
}; | |
function h$pp19(x1, x2, x3) | |
{ | |
h$sp += 5; | |
h$stack[(h$sp - 4)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp20(x1, x2) | |
{ | |
h$sp += 5; | |
h$stack[(h$sp - 2)] = x1; | |
h$stack[(h$sp - 0)] = x2; | |
}; | |
function h$pp21(x1, x2, x3) | |
{ | |
h$sp += 5; | |
h$stack[(h$sp - 4)] = x1; | |
h$stack[(h$sp - 2)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp22(x1, x2, x3) | |
{ | |
h$sp += 5; | |
h$stack[(h$sp - 3)] = x1; | |
h$stack[(h$sp - 2)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp23(x1, x2, x3, x4) | |
{ | |
h$sp += 5; | |
h$stack[(h$sp - 4)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp24(x1, x2) | |
{ | |
h$sp += 5; | |
h$stack[(h$sp - 1)] = x1; | |
h$stack[(h$sp - 0)] = x2; | |
}; | |
function h$pp25(x1, x2, x3) | |
{ | |
h$sp += 5; | |
h$stack[(h$sp - 4)] = x1; | |
h$stack[(h$sp - 1)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp26(x1, x2, x3) | |
{ | |
h$sp += 5; | |
h$stack[(h$sp - 3)] = x1; | |
h$stack[(h$sp - 1)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp27(x1, x2, x3, x4) | |
{ | |
h$sp += 5; | |
h$stack[(h$sp - 4)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp28(x1, x2, x3) | |
{ | |
h$sp += 5; | |
h$stack[(h$sp - 2)] = x1; | |
h$stack[(h$sp - 1)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp29(x1, x2, x3, x4) | |
{ | |
h$sp += 5; | |
h$stack[(h$sp - 4)] = x1; | |
h$stack[(h$sp - 2)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp30(x1, x2, x3, x4) | |
{ | |
h$sp += 5; | |
h$stack[(h$sp - 3)] = x1; | |
h$stack[(h$sp - 2)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp32(x1) | |
{ | |
h$sp += 6; | |
h$stack[(h$sp - 0)] = x1; | |
}; | |
function h$pp33(x1, x2) | |
{ | |
h$sp += 6; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 0)] = x2; | |
}; | |
function h$pp34(x1, x2) | |
{ | |
h$sp += 6; | |
h$stack[(h$sp - 4)] = x1; | |
h$stack[(h$sp - 0)] = x2; | |
}; | |
function h$pp35(x1, x2, x3) | |
{ | |
h$sp += 6; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp36(x1, x2) | |
{ | |
h$sp += 6; | |
h$stack[(h$sp - 3)] = x1; | |
h$stack[(h$sp - 0)] = x2; | |
}; | |
function h$pp37(x1, x2, x3) | |
{ | |
h$sp += 6; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp38(x1, x2, x3) | |
{ | |
h$sp += 6; | |
h$stack[(h$sp - 4)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp39(x1, x2, x3, x4) | |
{ | |
h$sp += 6; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp40(x1, x2) | |
{ | |
h$sp += 6; | |
h$stack[(h$sp - 2)] = x1; | |
h$stack[(h$sp - 0)] = x2; | |
}; | |
function h$pp41(x1, x2, x3) | |
{ | |
h$sp += 6; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 2)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp42(x1, x2, x3) | |
{ | |
h$sp += 6; | |
h$stack[(h$sp - 4)] = x1; | |
h$stack[(h$sp - 2)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp43(x1, x2, x3, x4) | |
{ | |
h$sp += 6; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp44(x1, x2, x3) | |
{ | |
h$sp += 6; | |
h$stack[(h$sp - 3)] = x1; | |
h$stack[(h$sp - 2)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp45(x1, x2, x3, x4) | |
{ | |
h$sp += 6; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp46(x1, x2, x3, x4) | |
{ | |
h$sp += 6; | |
h$stack[(h$sp - 4)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp47(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 6; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 2)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp48(x1, x2) | |
{ | |
h$sp += 6; | |
h$stack[(h$sp - 1)] = x1; | |
h$stack[(h$sp - 0)] = x2; | |
}; | |
function h$pp49(x1, x2, x3) | |
{ | |
h$sp += 6; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 1)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp50(x1, x2, x3) | |
{ | |
h$sp += 6; | |
h$stack[(h$sp - 4)] = x1; | |
h$stack[(h$sp - 1)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp51(x1, x2, x3, x4) | |
{ | |
h$sp += 6; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp52(x1, x2, x3) | |
{ | |
h$sp += 6; | |
h$stack[(h$sp - 3)] = x1; | |
h$stack[(h$sp - 1)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp53(x1, x2, x3, x4) | |
{ | |
h$sp += 6; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp54(x1, x2, x3, x4) | |
{ | |
h$sp += 6; | |
h$stack[(h$sp - 4)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp55(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 6; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp56(x1, x2, x3) | |
{ | |
h$sp += 6; | |
h$stack[(h$sp - 2)] = x1; | |
h$stack[(h$sp - 1)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp57(x1, x2, x3, x4) | |
{ | |
h$sp += 6; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 2)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp58(x1, x2, x3, x4) | |
{ | |
h$sp += 6; | |
h$stack[(h$sp - 4)] = x1; | |
h$stack[(h$sp - 2)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp59(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 6; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp60(x1, x2, x3, x4) | |
{ | |
h$sp += 6; | |
h$stack[(h$sp - 3)] = x1; | |
h$stack[(h$sp - 2)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp61(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 6; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp62(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 6; | |
h$stack[(h$sp - 4)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp64(x1) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 0)] = x1; | |
}; | |
function h$pp65(x1, x2) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 0)] = x2; | |
}; | |
function h$pp66(x1, x2) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 0)] = x2; | |
}; | |
function h$pp67(x1, x2, x3) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp68(x1, x2) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 4)] = x1; | |
h$stack[(h$sp - 0)] = x2; | |
}; | |
function h$pp69(x1, x2, x3) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp70(x1, x2, x3) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp71(x1, x2, x3, x4) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 4)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp72(x1, x2) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 3)] = x1; | |
h$stack[(h$sp - 0)] = x2; | |
}; | |
function h$pp73(x1, x2, x3) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp74(x1, x2, x3) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp75(x1, x2, x3, x4) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp76(x1, x2, x3) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 4)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp77(x1, x2, x3, x4) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp78(x1, x2, x3, x4) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp79(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 4)] = x3; | |
h$stack[(h$sp - 3)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp80(x1, x2) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 2)] = x1; | |
h$stack[(h$sp - 0)] = x2; | |
}; | |
function h$pp81(x1, x2, x3) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 2)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp82(x1, x2, x3) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 2)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp83(x1, x2, x3, x4) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp84(x1, x2, x3) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 4)] = x1; | |
h$stack[(h$sp - 2)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp85(x1, x2, x3, x4) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp86(x1, x2, x3, x4) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp87(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 4)] = x3; | |
h$stack[(h$sp - 2)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp88(x1, x2, x3) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 3)] = x1; | |
h$stack[(h$sp - 2)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp89(x1, x2, x3, x4) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp90(x1, x2, x3, x4) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp91(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 2)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp92(x1, x2, x3, x4) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 4)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp93(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 2)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp94(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 2)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp95(x1, x2, x3, x4, x5, x6) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 4)] = x3; | |
h$stack[(h$sp - 3)] = x4; | |
h$stack[(h$sp - 2)] = x5; | |
h$stack[(h$sp - 0)] = x6; | |
}; | |
function h$pp96(x1, x2) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 1)] = x1; | |
h$stack[(h$sp - 0)] = x2; | |
}; | |
function h$pp97(x1, x2, x3) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 1)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp98(x1, x2, x3) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 1)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp99(x1, x2, x3, x4) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp100(x1, x2, x3) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 4)] = x1; | |
h$stack[(h$sp - 1)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp101(x1, x2, x3, x4) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp102(x1, x2, x3, x4) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp103(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 4)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp104(x1, x2, x3) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 3)] = x1; | |
h$stack[(h$sp - 1)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp105(x1, x2, x3, x4) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp106(x1, x2, x3, x4) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp107(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp108(x1, x2, x3, x4) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 4)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp109(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp110(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp111(x1, x2, x3, x4, x5, x6) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 4)] = x3; | |
h$stack[(h$sp - 3)] = x4; | |
h$stack[(h$sp - 1)] = x5; | |
h$stack[(h$sp - 0)] = x6; | |
}; | |
function h$pp112(x1, x2, x3) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 2)] = x1; | |
h$stack[(h$sp - 1)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp113(x1, x2, x3, x4) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 2)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp114(x1, x2, x3, x4) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 2)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp115(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp116(x1, x2, x3, x4) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 4)] = x1; | |
h$stack[(h$sp - 2)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp117(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp118(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp119(x1, x2, x3, x4, x5, x6) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 4)] = x3; | |
h$stack[(h$sp - 2)] = x4; | |
h$stack[(h$sp - 1)] = x5; | |
h$stack[(h$sp - 0)] = x6; | |
}; | |
function h$pp120(x1, x2, x3, x4) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 3)] = x1; | |
h$stack[(h$sp - 2)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp121(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp122(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp123(x1, x2, x3, x4, x5, x6) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 2)] = x4; | |
h$stack[(h$sp - 1)] = x5; | |
h$stack[(h$sp - 0)] = x6; | |
}; | |
function h$pp124(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 4)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp125(x1, x2, x3, x4, x5, x6) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 2)] = x4; | |
h$stack[(h$sp - 1)] = x5; | |
h$stack[(h$sp - 0)] = x6; | |
}; | |
function h$pp126(x1, x2, x3, x4, x5, x6) | |
{ | |
h$sp += 7; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 2)] = x4; | |
h$stack[(h$sp - 1)] = x5; | |
h$stack[(h$sp - 0)] = x6; | |
}; | |
function h$pp128(x1) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 0)] = x1; | |
}; | |
function h$pp129(x1, x2) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 0)] = x2; | |
}; | |
function h$pp130(x1, x2) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 0)] = x2; | |
}; | |
function h$pp131(x1, x2, x3) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 6)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp132(x1, x2) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 0)] = x2; | |
}; | |
function h$pp133(x1, x2, x3) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp134(x1, x2, x3) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp135(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 6)] = x2; | |
h$stack[(h$sp - 5)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp136(x1, x2) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 4)] = x1; | |
h$stack[(h$sp - 0)] = x2; | |
}; | |
function h$pp137(x1, x2, x3) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp138(x1, x2, x3) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp139(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 6)] = x2; | |
h$stack[(h$sp - 4)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp140(x1, x2, x3) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp141(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 4)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp142(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 4)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp143(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 6)] = x2; | |
h$stack[(h$sp - 5)] = x3; | |
h$stack[(h$sp - 4)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp144(x1, x2) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 3)] = x1; | |
h$stack[(h$sp - 0)] = x2; | |
}; | |
function h$pp145(x1, x2, x3) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp146(x1, x2, x3) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp147(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 6)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp148(x1, x2, x3) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp149(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp150(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp151(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 6)] = x2; | |
h$stack[(h$sp - 5)] = x3; | |
h$stack[(h$sp - 3)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp152(x1, x2, x3) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 4)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp153(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp154(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp155(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 6)] = x2; | |
h$stack[(h$sp - 4)] = x3; | |
h$stack[(h$sp - 3)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp156(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp157(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 4)] = x3; | |
h$stack[(h$sp - 3)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp158(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 4)] = x3; | |
h$stack[(h$sp - 3)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp159(x1, x2, x3, x4, x5, x6) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 6)] = x2; | |
h$stack[(h$sp - 5)] = x3; | |
h$stack[(h$sp - 4)] = x4; | |
h$stack[(h$sp - 3)] = x5; | |
h$stack[(h$sp - 0)] = x6; | |
}; | |
function h$pp160(x1, x2) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 2)] = x1; | |
h$stack[(h$sp - 0)] = x2; | |
}; | |
function h$pp161(x1, x2, x3) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 2)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp162(x1, x2, x3) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 2)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp163(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 6)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp164(x1, x2, x3) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 2)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp165(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp166(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp167(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 6)] = x2; | |
h$stack[(h$sp - 5)] = x3; | |
h$stack[(h$sp - 2)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp168(x1, x2, x3) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 4)] = x1; | |
h$stack[(h$sp - 2)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp169(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp170(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp171(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 6)] = x2; | |
h$stack[(h$sp - 4)] = x3; | |
h$stack[(h$sp - 2)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp172(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp173(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 4)] = x3; | |
h$stack[(h$sp - 2)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp174(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 4)] = x3; | |
h$stack[(h$sp - 2)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp175(x1, x2, x3, x4, x5, x6) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 6)] = x2; | |
h$stack[(h$sp - 5)] = x3; | |
h$stack[(h$sp - 4)] = x4; | |
h$stack[(h$sp - 2)] = x5; | |
h$stack[(h$sp - 0)] = x6; | |
}; | |
function h$pp176(x1, x2, x3) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 3)] = x1; | |
h$stack[(h$sp - 2)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp177(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp178(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp179(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 6)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 2)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp180(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp181(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 2)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp182(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 2)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp183(x1, x2, x3, x4, x5, x6) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 6)] = x2; | |
h$stack[(h$sp - 5)] = x3; | |
h$stack[(h$sp - 3)] = x4; | |
h$stack[(h$sp - 2)] = x5; | |
h$stack[(h$sp - 0)] = x6; | |
}; | |
function h$pp184(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 4)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp185(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 2)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp186(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 2)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp187(x1, x2, x3, x4, x5, x6) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 6)] = x2; | |
h$stack[(h$sp - 4)] = x3; | |
h$stack[(h$sp - 3)] = x4; | |
h$stack[(h$sp - 2)] = x5; | |
h$stack[(h$sp - 0)] = x6; | |
}; | |
function h$pp188(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 2)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp189(x1, x2, x3, x4, x5, x6) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 4)] = x3; | |
h$stack[(h$sp - 3)] = x4; | |
h$stack[(h$sp - 2)] = x5; | |
h$stack[(h$sp - 0)] = x6; | |
}; | |
function h$pp190(x1, x2, x3, x4, x5, x6) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 4)] = x3; | |
h$stack[(h$sp - 3)] = x4; | |
h$stack[(h$sp - 2)] = x5; | |
h$stack[(h$sp - 0)] = x6; | |
}; | |
function h$pp191(x1, x2, x3, x4, x5, x6, x7) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 6)] = x2; | |
h$stack[(h$sp - 5)] = x3; | |
h$stack[(h$sp - 4)] = x4; | |
h$stack[(h$sp - 3)] = x5; | |
h$stack[(h$sp - 2)] = x6; | |
h$stack[(h$sp - 0)] = x7; | |
}; | |
function h$pp192(x1, x2) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 1)] = x1; | |
h$stack[(h$sp - 0)] = x2; | |
}; | |
function h$pp193(x1, x2, x3) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 1)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp194(x1, x2, x3) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 1)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp195(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 6)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp196(x1, x2, x3) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 1)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp197(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp198(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp199(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 6)] = x2; | |
h$stack[(h$sp - 5)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp200(x1, x2, x3) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 4)] = x1; | |
h$stack[(h$sp - 1)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp201(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp202(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp203(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 6)] = x2; | |
h$stack[(h$sp - 4)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp204(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp205(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 4)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp206(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 4)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp207(x1, x2, x3, x4, x5, x6) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 6)] = x2; | |
h$stack[(h$sp - 5)] = x3; | |
h$stack[(h$sp - 4)] = x4; | |
h$stack[(h$sp - 1)] = x5; | |
h$stack[(h$sp - 0)] = x6; | |
}; | |
function h$pp208(x1, x2, x3) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 3)] = x1; | |
h$stack[(h$sp - 1)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp209(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp210(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp211(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 6)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp212(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp213(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp214(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp215(x1, x2, x3, x4, x5, x6) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 6)] = x2; | |
h$stack[(h$sp - 5)] = x3; | |
h$stack[(h$sp - 3)] = x4; | |
h$stack[(h$sp - 1)] = x5; | |
h$stack[(h$sp - 0)] = x6; | |
}; | |
function h$pp216(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 4)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp217(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp218(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp219(x1, x2, x3, x4, x5, x6) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 6)] = x2; | |
h$stack[(h$sp - 4)] = x3; | |
h$stack[(h$sp - 3)] = x4; | |
h$stack[(h$sp - 1)] = x5; | |
h$stack[(h$sp - 0)] = x6; | |
}; | |
function h$pp220(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp221(x1, x2, x3, x4, x5, x6) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 4)] = x3; | |
h$stack[(h$sp - 3)] = x4; | |
h$stack[(h$sp - 1)] = x5; | |
h$stack[(h$sp - 0)] = x6; | |
}; | |
function h$pp222(x1, x2, x3, x4, x5, x6) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 4)] = x3; | |
h$stack[(h$sp - 3)] = x4; | |
h$stack[(h$sp - 1)] = x5; | |
h$stack[(h$sp - 0)] = x6; | |
}; | |
function h$pp223(x1, x2, x3, x4, x5, x6, x7) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 6)] = x2; | |
h$stack[(h$sp - 5)] = x3; | |
h$stack[(h$sp - 4)] = x4; | |
h$stack[(h$sp - 3)] = x5; | |
h$stack[(h$sp - 1)] = x6; | |
h$stack[(h$sp - 0)] = x7; | |
}; | |
function h$pp224(x1, x2, x3) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 2)] = x1; | |
h$stack[(h$sp - 1)] = x2; | |
h$stack[(h$sp - 0)] = x3; | |
}; | |
function h$pp225(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 2)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp226(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 2)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp227(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 6)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp228(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 2)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp229(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp230(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp231(x1, x2, x3, x4, x5, x6) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 6)] = x2; | |
h$stack[(h$sp - 5)] = x3; | |
h$stack[(h$sp - 2)] = x4; | |
h$stack[(h$sp - 1)] = x5; | |
h$stack[(h$sp - 0)] = x6; | |
}; | |
function h$pp232(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 4)] = x1; | |
h$stack[(h$sp - 2)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp233(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp234(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp235(x1, x2, x3, x4, x5, x6) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 6)] = x2; | |
h$stack[(h$sp - 4)] = x3; | |
h$stack[(h$sp - 2)] = x4; | |
h$stack[(h$sp - 1)] = x5; | |
h$stack[(h$sp - 0)] = x6; | |
}; | |
function h$pp236(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp237(x1, x2, x3, x4, x5, x6) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 4)] = x3; | |
h$stack[(h$sp - 2)] = x4; | |
h$stack[(h$sp - 1)] = x5; | |
h$stack[(h$sp - 0)] = x6; | |
}; | |
function h$pp238(x1, x2, x3, x4, x5, x6) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 4)] = x3; | |
h$stack[(h$sp - 2)] = x4; | |
h$stack[(h$sp - 1)] = x5; | |
h$stack[(h$sp - 0)] = x6; | |
}; | |
function h$pp239(x1, x2, x3, x4, x5, x6, x7) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 6)] = x2; | |
h$stack[(h$sp - 5)] = x3; | |
h$stack[(h$sp - 4)] = x4; | |
h$stack[(h$sp - 2)] = x5; | |
h$stack[(h$sp - 1)] = x6; | |
h$stack[(h$sp - 0)] = x7; | |
}; | |
function h$pp240(x1, x2, x3, x4) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 3)] = x1; | |
h$stack[(h$sp - 2)] = x2; | |
h$stack[(h$sp - 1)] = x3; | |
h$stack[(h$sp - 0)] = x4; | |
}; | |
function h$pp241(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp242(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp243(x1, x2, x3, x4, x5, x6) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 6)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 2)] = x4; | |
h$stack[(h$sp - 1)] = x5; | |
h$stack[(h$sp - 0)] = x6; | |
}; | |
function h$pp244(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp245(x1, x2, x3, x4, x5, x6) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 2)] = x4; | |
h$stack[(h$sp - 1)] = x5; | |
h$stack[(h$sp - 0)] = x6; | |
}; | |
function h$pp246(x1, x2, x3, x4, x5, x6) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 2)] = x4; | |
h$stack[(h$sp - 1)] = x5; | |
h$stack[(h$sp - 0)] = x6; | |
}; | |
function h$pp247(x1, x2, x3, x4, x5, x6, x7) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 6)] = x2; | |
h$stack[(h$sp - 5)] = x3; | |
h$stack[(h$sp - 3)] = x4; | |
h$stack[(h$sp - 2)] = x5; | |
h$stack[(h$sp - 1)] = x6; | |
h$stack[(h$sp - 0)] = x7; | |
}; | |
function h$pp248(x1, x2, x3, x4, x5) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 4)] = x1; | |
h$stack[(h$sp - 3)] = x2; | |
h$stack[(h$sp - 2)] = x3; | |
h$stack[(h$sp - 1)] = x4; | |
h$stack[(h$sp - 0)] = x5; | |
}; | |
function h$pp249(x1, x2, x3, x4, x5, x6) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 2)] = x4; | |
h$stack[(h$sp - 1)] = x5; | |
h$stack[(h$sp - 0)] = x6; | |
}; | |
function h$pp250(x1, x2, x3, x4, x5, x6) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 2)] = x4; | |
h$stack[(h$sp - 1)] = x5; | |
h$stack[(h$sp - 0)] = x6; | |
}; | |
function h$pp251(x1, x2, x3, x4, x5, x6, x7) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 6)] = x2; | |
h$stack[(h$sp - 4)] = x3; | |
h$stack[(h$sp - 3)] = x4; | |
h$stack[(h$sp - 2)] = x5; | |
h$stack[(h$sp - 1)] = x6; | |
h$stack[(h$sp - 0)] = x7; | |
}; | |
function h$pp252(x1, x2, x3, x4, x5, x6) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 5)] = x1; | |
h$stack[(h$sp - 4)] = x2; | |
h$stack[(h$sp - 3)] = x3; | |
h$stack[(h$sp - 2)] = x4; | |
h$stack[(h$sp - 1)] = x5; | |
h$stack[(h$sp - 0)] = x6; | |
}; | |
function h$pp253(x1, x2, x3, x4, x5, x6, x7) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 7)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 4)] = x3; | |
h$stack[(h$sp - 3)] = x4; | |
h$stack[(h$sp - 2)] = x5; | |
h$stack[(h$sp - 1)] = x6; | |
h$stack[(h$sp - 0)] = x7; | |
}; | |
function h$pp254(x1, x2, x3, x4, x5, x6, x7) | |
{ | |
h$sp += 8; | |
h$stack[(h$sp - 6)] = x1; | |
h$stack[(h$sp - 5)] = x2; | |
h$stack[(h$sp - 4)] = x3; | |
h$stack[(h$sp - 3)] = x4; | |
h$stack[(h$sp - 2)] = x5; | |
h$stack[(h$sp - 1)] = x6; | |
h$stack[(h$sp - 0)] = x7; | |
}; | |
function h$bh() | |
{ | |
h$p2(h$r1, h$upd_frame); | |
h$r1.f = h$blackhole; | |
h$r1.d1 = h$currentThread; | |
h$r1.d2 = null; | |
}; | |
function h$bh_lne(h$RTS_26, h$RTS_27) | |
{ | |
var h$RTS_28 = h$stack[h$RTS_26]; | |
if(h$RTS_28) | |
{ | |
h$sp -= h$RTS_27; | |
if((h$RTS_28 === h$blackhole)) | |
{ | |
return h$throw(h$baseZCControlziExceptionziBasezinonTermination, false); | |
} | |
else | |
{ | |
h$r1 = h$RTS_28; | |
h$sp -= h$RTS_27; | |
return h$rs(); | |
}; | |
} | |
else | |
{ | |
h$stack[h$RTS_26] = h$blackhole; | |
return null; | |
}; | |
}; | |
function h$blackhole() | |
{ | |
throw("oops: entered black hole"); | |
return 0; | |
}; | |
h$o(h$blackhole, 5, 0, 2, 0, null); | |
function h$blackholeTrap() | |
{ | |
throw("oops: entered multiple times"); | |
return 0; | |
}; | |
h$o(h$blackholeTrap, 0, 0, 2, 0, null); | |
function h$done(h$RTS_29) | |
{ | |
h$finishThread(h$currentThread); | |
return h$reschedule; | |
}; | |
h$o(h$done, (-1), 0, 0, 256, null); | |
function h$doneMain_e() | |
{ | |
return h$doneMain(); | |
}; | |
h$o(h$doneMain, (-1), 0, 0, 256, null); | |
function h$false_e() | |
{ | |
return h$stack[h$sp]; | |
}; | |
h$o(h$false_e, 2, 1, 0, 256, null); | |
function h$true_e() | |
{ | |
return h$stack[h$sp]; | |
}; | |
h$o(h$true_e, 2, 2, 0, 256, null); | |
function h$integerzmgmpZCGHCziIntegerziTypeziSzh_con_e() | |
{ | |
return h$stack[h$sp]; | |
}; | |
h$o(h$integerzmgmpZCGHCziIntegerziTypeziSzh_con_e, 2, 1, 1, 256, null); | |
function h$integerzmgmpZCGHCziIntegerziTypeziJpzh_con_e() | |
{ | |
return h$stack[h$sp]; | |
}; | |
h$o(h$integerzmgmpZCGHCziIntegerziTypeziJpzh_con_e, 2, 2, 1, 256, null); | |
function h$integerzmgmpZCGHCziIntegerziTypeziJnzh_con_e() | |
{ | |
return h$stack[h$sp]; | |
}; | |
h$o(h$integerzmgmpZCGHCziIntegerziTypeziJnzh_con_e, 2, 3, 1, 256, null); | |
function h$data1_e() | |
{ | |
return h$stack[h$sp]; | |
}; | |
h$o(h$data1_e, 2, 1, 1, 256, null); | |
function h$data2_e() | |
{ | |
return h$stack[h$sp]; | |
}; | |
h$o(h$data2_e, 2, 1, 2, 256, null); | |
function h$con_e() | |
{ | |
return h$stack[h$sp]; | |
}; | |
function h$catch(h$RTS_30, h$RTS_31) | |
{ | |
h$sp += 3; | |
h$stack[(h$sp - 2)] = h$currentThread.mask; | |
h$stack[(h$sp - 1)] = h$RTS_31; | |
h$stack[h$sp] = h$catch_e; | |
h$r1 = h$RTS_30; | |
return h$ap_1_0_fast(); | |
}; | |
function h$noop_e() | |
{ | |
return h$stack[h$sp]; | |
}; | |
h$o(h$noop_e, 1, 1, 0, 257, null); | |
var h$noop = h$c0(h$noop_e); | |
function h$catch_e() | |
{ | |
h$sp -= 3; | |
return h$stack[h$sp]; | |
}; | |
h$o(h$catch_e, (-1), 0, 2, 256, null); | |
function h$ap1_e() | |
{ | |
var h$RTS_32 = h$r1.d1; | |
var h$RTS_33 = h$r1.d2; | |
h$bh(); | |
h$r1 = h$RTS_32; | |
h$r2 = h$RTS_33; | |
return h$ap_1_1_fast(); | |
}; | |
h$o(h$ap1_e, 0, 0, 2, 256, null); | |
function h$ap2_e() | |
{ | |
var h$RTS_34 = h$r1.d1; | |
var h$RTS_35 = h$r1.d2.d1; | |
var h$RTS_36 = h$r1.d2.d2; | |
h$bh(); | |
h$r1 = h$RTS_34; | |
h$r2 = h$RTS_35; | |
h$r3 = h$RTS_36; | |
return h$ap_2_2_fast(); | |
}; | |
h$o(h$ap2_e, 0, 0, 3, 256, null); | |
function h$ap3_e() | |
{ | |
var h$RTS_37 = h$r1.d1; | |
var h$RTS_38 = h$r1.d2.d1; | |
var h$RTS_39 = h$r1.d2.d2; | |
var h$RTS_40 = h$r1.d2.d3; | |
h$bh(); | |
h$r1 = h$RTS_37; | |
h$r2 = h$RTS_38; | |
h$r3 = h$RTS_39; | |
h$r4 = h$RTS_40; | |
return h$ap_3_3_fast(); | |
}; | |
h$o(h$ap3_e, 0, 0, 4, 256, null); | |
function h$select1_e() | |
{ | |
var h$RTS_41 = h$r1.d1; | |
h$sp += 3; | |
h$stack[(h$sp - 2)] = h$r1; | |
h$stack[(h$sp - 1)] = h$upd_frame; | |
h$stack[h$sp] = h$select1_ret; | |
h$r1.f = h$blackhole; | |
h$r1.d1 = h$currentThread; | |
h$r1.d2 = null; | |
h$r1 = h$RTS_41; | |
return h$ap_0_0_fast(); | |
}; | |
h$o(h$select1_e, 0, 0, 1, 256, null); | |
function h$select1_ret() | |
{ | |
h$r1 = h$r1.d1; | |
--h$sp; | |
return h$ap_0_0_fast(); | |
}; | |
h$o(h$select1_ret, (-1), 0, 0, 256, null); | |
function h$select2_e() | |
{ | |
var h$RTS_42 = h$r1.d1; | |
h$sp += 3; | |
h$stack[(h$sp - 2)] = h$r1; | |
h$stack[(h$sp - 1)] = h$upd_frame; | |
h$stack[h$sp] = h$select2_ret; | |
h$r1.f = h$blackhole; | |
h$r1.d1 = h$currentThread; | |
h$r1.d2 = null; | |
h$r1 = h$RTS_42; | |
return h$ap_0_0_fast(); | |
}; | |
h$o(h$select2_e, 0, 0, 1, 256, null); | |
function h$select2_ret() | |
{ | |
h$r1 = h$r1.d2; | |
--h$sp; | |
return h$ap_0_0_fast(); | |
}; | |
h$o(h$select2_ret, (-1), 0, 0, 256, null); | |
function h$throw(h$RTS_43, h$RTS_44) | |
{ | |
var h$RTS_45 = h$sp; | |
var h$RTS_46 = null; | |
var h$RTS_47; | |
while((h$sp > 0)) | |
{ | |
h$RTS_47 = h$stack[h$sp]; | |
if(((h$RTS_47 === null) || (h$RTS_47 === undefined))) | |
{ | |
throw("h$throw: invalid object while unwinding stack"); | |
}; | |
if((h$RTS_47 === h$catch_e)) | |
{ | |
break; | |
}; | |
if((h$RTS_47 === h$atomically_e)) | |
{ | |
if(h$RTS_44) | |
{ | |
h$currentThread.transaction = null; | |
} | |
else | |
{ | |
if(!h$stmValidateTransaction()) | |
{ | |
++h$sp; | |
h$stack[h$sp] = h$checkInvariants_e; | |
return h$stmStartTransaction(h$stack[(h$sp - 2)]); | |
}; | |
}; | |
}; | |
if(((h$RTS_47 === h$catchStm_e) && !h$RTS_44)) | |
{ | |
break; | |
}; | |
if((h$RTS_47 === h$upd_frame)) | |
{ | |
var h$RTS_48 = h$stack[(h$sp - 1)]; | |
var h$RTS_49 = h$RTS_48.d2; | |
if((h$RTS_49 !== null)) | |
{ | |
for(var h$RTS_50 = 0;(h$RTS_50 < h$RTS_49.length);(h$RTS_50++)) { | |
h$wakeupThread(h$RTS_49[h$RTS_50]); | |
}; | |
}; | |
if(h$RTS_44) | |
{ | |
if((h$RTS_46 === null)) | |
{ | |
h$makeResumable(h$RTS_48, (h$sp + 1), h$RTS_45, []); | |
} | |
else | |
{ | |
h$makeResumable(h$RTS_48, (h$sp + 1), (h$RTS_46 - 2), [h$ap_0_0, h$stack[(h$RTS_46 - 1)], h$return]); | |
}; | |
h$RTS_46 = h$sp; | |
} | |
else | |
{ | |
h$RTS_48.f = h$raise_e; | |
h$RTS_48.d1 = h$RTS_43; | |
h$RTS_48.d2 = null; | |
}; | |
}; | |
var h$RTS_51; | |
if((h$RTS_47 === h$ap_gen)) | |
{ | |
h$RTS_51 = ((h$stack[(h$sp - 1)] >> 8) + 2); | |
} | |
else | |
{ | |
var h$RTS_52 = h$RTS_47.size; | |
if((h$RTS_52 < 0)) | |
{ | |
h$RTS_51 = h$stack[(h$sp - 1)]; | |
} | |
else | |
{ | |
h$RTS_51 = ((h$RTS_52 & 255) + 1); | |
}; | |
}; | |
h$sp -= h$RTS_51; | |
}; | |
if((h$sp > 0)) | |
{ | |
var h$RTS_53 = h$stack[(h$sp - 2)]; | |
var h$RTS_54 = h$stack[(h$sp - 1)]; | |
if((h$RTS_47 === h$catchStm_e)) | |
{ | |
h$currentThread.transaction = h$stack[(h$sp - 3)]; | |
h$sp -= 4; | |
} | |
else | |
{ | |
if((h$sp > 3)) | |
{ | |
h$sp -= 3; | |
}; | |
}; | |
h$r1 = h$RTS_54; | |
h$r2 = h$RTS_43; | |
if((h$RTS_47 !== h$catchStm_e)) | |
{ | |
if((((h$RTS_53 === 0) && (h$stack[h$sp] !== h$maskFrame)) && (h$stack[h$sp] !== h$maskUnintFrame))) | |
{ | |
h$stack[(h$sp + 1)] = h$unmaskFrame; | |
++h$sp; | |
} | |
else | |
{ | |
if((h$RTS_53 === 1)) | |
{ | |
h$stack[(h$sp + 1)] = h$maskUnintFrame; | |
++h$sp; | |
}; | |
}; | |
h$currentThread.mask = 2; | |
}; | |
return h$ap_2_1_fast(); | |
} | |
else | |
{ | |
throw("unhandled exception in haskell thread"); | |
}; | |
}; | |
function h$raise_e() | |
{ | |
return h$throw(h$r1.d1, false); | |
}; | |
h$o(h$raise_e, 0, 0, 0, 256, null); | |
function h$raiseAsync_e() | |
{ | |
return h$throw(h$r1.d1, true); | |
}; | |
h$o(h$raiseAsync_e, 0, 0, 0, 256, null); | |
function h$raiseAsync_frame() | |
{ | |
var h$RTS_55 = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
return h$throw(h$RTS_55, true); | |
}; | |
h$o(h$raiseAsync_frame, (-1), 0, 1, 0, null); | |
function h$reduce() | |
{ | |
if((h$r1.f.t === 0)) | |
{ | |
return h$r1.f; | |
} | |
else | |
{ | |
--h$sp; | |
return h$stack[h$sp]; | |
}; | |
}; | |
h$o(h$reduce, (-1), 0, 0, 256, null); | |
var h$RTS_56 = 0; | |
function h$gc_check(h$RTS_57) | |
{ | |
if((++h$RTS_56 > 1000)) | |
{ | |
for(var h$RTS_58 = (h$sp + 1);(h$RTS_58 < h$stack.length);(h$RTS_58++)) { | |
h$stack[h$RTS_58] = null; | |
}; | |
h$RTS_56 = 0; | |
}; | |
return 0; | |
}; | |
function h$o(h$RTS_59, h$RTS_60, h$RTS_61, h$RTS_62, h$RTS_63, h$RTS_64) | |
{ | |
h$setObjInfo(h$RTS_59, h$RTS_60, "", [], h$RTS_61, h$RTS_62, h$RTS_63, h$RTS_64); | |
}; | |
function h$setObjInfo(h$RTS_65, h$RTS_66, h$RTS_67, h$RTS_68, h$RTS_69, h$RTS_70, h$RTS_71, h$RTS_72) | |
{ | |
h$RTS_65.t = h$RTS_66; | |
h$RTS_65.i = h$RTS_68; | |
h$RTS_65.n = h$RTS_67; | |
h$RTS_65.a = h$RTS_69; | |
h$RTS_65.r = h$RTS_71; | |
h$RTS_65.s = h$RTS_72; | |
h$RTS_65.m = 0; | |
h$RTS_65.size = h$RTS_70; | |
}; | |
function h$static_thunk(h$RTS_73) | |
{ | |
var h$RTS_74 = { d1: null, d2: null, f: h$RTS_73, m: 0 | |
}; | |
h$CAFs.push(h$RTS_74); | |
h$CAFsReset.push(h$RTS_73); | |
return h$RTS_74; | |
}; | |
function h$printcl(h$RTS_75) | |
{ | |
var h$RTS_76 = h$RTS_75.f; | |
var h$RTS_77 = h$RTS_75.d1; | |
var h$RTS_78 = ""; | |
switch (h$RTS_76.t) | |
{ | |
case (0): | |
h$RTS_78 += "thunk"; | |
break; | |
case (2): | |
h$RTS_78 += (("con[" + h$RTS_76.a) + "]"); | |
break; | |
case (3): | |
h$RTS_78 += (("pap[" + h$RTS_76.a) + "]"); | |
break; | |
case (1): | |
h$RTS_78 += (("fun[" + h$RTS_76.a) + "]"); | |
break; | |
default: | |
h$RTS_78 += "unknown closure type"; | |
break; | |
}; | |
h$RTS_78 += ((" :: " + h$RTS_76.n) + " ->"); | |
var h$RTS_79 = 1; | |
for(var h$RTS_80 = 0;(h$RTS_80 < h$RTS_76.i.length);(h$RTS_80++)) { | |
h$RTS_78 += " "; | |
switch (h$RTS_76.i[h$RTS_80]) | |
{ | |
case (0): | |
h$RTS_78 += (("[ Ptr :: " + h$RTS_77[("d" + h$RTS_79)].f.n) + "]"); | |
h$RTS_79++; | |
break; | |
case (1): | |
h$RTS_78 += "void"; | |
break; | |
case (2): | |
h$RTS_78 += (("(" + h$RTS_77[("d" + h$RTS_79)]) + " :: double)"); | |
h$RTS_79++; | |
break; | |
case (3): | |
h$RTS_78 += (("(" + h$RTS_77[("d" + h$RTS_79)]) + " :: int)"); | |
h$RTS_79++; | |
break; | |
case (4): | |
h$RTS_78 += (((("(" + h$RTS_77[("d" + h$RTS_79)]) + ",") + h$RTS_77[("d" + (h$RTS_79 + 1))]) + " :: long)"); | |
h$RTS_79 += 2; | |
break; | |
case (5): | |
h$RTS_78 += (((("(" + h$RTS_77[("d" + h$RTS_79)].length) + ",") + h$RTS_77[("d" + (h$RTS_79 + 1))]) + " :: ptr)"); | |
h$RTS_79 += 2; | |
break; | |
case (6): | |
h$RTS_78 += (("(" + h$RTS_77[("d" + h$RTS_79)].toString()) + " :: RTS object)"); | |
h$RTS_79++; | |
break; | |
default: | |
h$RTS_78 += ("unknown field: " + h$RTS_76.i[h$RTS_80]); | |
}; | |
}; | |
h$log(h$RTS_78); | |
}; | |
function h$init_closure(h$RTS_81, h$RTS_82) | |
{ | |
h$RTS_81.m = 0; | |
switch (h$RTS_82.length) | |
{ | |
case (0): | |
h$RTS_81.d1 = null; | |
h$RTS_81.d2 = null; | |
return h$RTS_81; | |
case (1): | |
h$RTS_81.d1 = h$RTS_82[0]; | |
h$RTS_81.d2 = null; | |
return h$RTS_81; | |
case (2): | |
h$RTS_81.d1 = h$RTS_82[0]; | |
h$RTS_81.d2 = h$RTS_82[1]; | |
return h$RTS_81; | |
case (3): | |
h$RTS_81.d1 = h$RTS_82[0]; | |
h$RTS_81.d2 = { d1: h$RTS_82[1], d2: h$RTS_82[2] | |
}; | |
return h$RTS_81; | |
case (4): | |
h$RTS_81.d1 = h$RTS_82[0]; | |
h$RTS_81.d2 = { d1: h$RTS_82[1], d2: h$RTS_82[2], d3: h$RTS_82[3] | |
}; | |
return h$RTS_81; | |
case (5): | |
h$RTS_81.d1 = h$RTS_82[0]; | |
h$RTS_81.d2 = { d1: h$RTS_82[1], d2: h$RTS_82[2], d3: h$RTS_82[3], d4: h$RTS_82[4] | |
}; | |
return h$RTS_81; | |
case (6): | |
h$RTS_81.d1 = h$RTS_82[0]; | |
h$RTS_81.d2 = { d1: h$RTS_82[1], d2: h$RTS_82[2], d3: h$RTS_82[3], d4: h$RTS_82[4], d5: h$RTS_82[5] | |
}; | |
return h$RTS_81; | |
case (7): | |
h$RTS_81.d1 = h$RTS_82[0]; | |
h$RTS_81.d2 = { d1: h$RTS_82[1], d2: h$RTS_82[2], d3: h$RTS_82[3], d4: h$RTS_82[4], d5: h$RTS_82[5], d6: h$RTS_82[6] | |
}; | |
return h$RTS_81; | |
default: | |
h$RTS_81.d1 = h$RTS_82[0]; | |
h$RTS_81.d2 = { d1: h$RTS_82[1], d2: h$RTS_82[2], d3: h$RTS_82[3], d4: h$RTS_82[4], d5: h$RTS_82[5], d6: h$RTS_82[6] | |
}; | |
for(var h$RTS_83 = 7;(h$RTS_83 < h$RTS_82.length);(h$RTS_83++)) { | |
h$RTS_81.d2[("d" + h$RTS_83)] = h$RTS_82[h$RTS_83]; | |
}; | |
return h$RTS_81; | |
}; | |
}; | |
function h$runInitStatic() | |
{ | |
if((h$initStatic.length == 0)) | |
{ | |
return undefined; | |
}; | |
for(var h$RTS_84 = (h$initStatic.length - 1);(h$RTS_84 >= 0);(h$RTS_84--)) { | |
h$initStatic[h$RTS_84](); | |
}; | |
h$initStatic = []; | |
}; | |
function h$checkStack(h$RTS_85) | |
{ | |
if((h$RTS_85.t === (-1))) | |
{ | |
h$stack[h$sp] = h$RTS_85; | |
}; | |
var h$RTS_86 = h$sp; | |
while((h$RTS_86 >= 0)) | |
{ | |
h$RTS_85 = h$stack[h$RTS_86]; | |
var h$RTS_87; | |
var h$RTS_88; | |
if((typeof h$RTS_85 === "function")) | |
{ | |
if((h$RTS_85 === h$ap_gen)) | |
{ | |
h$RTS_87 = ((h$stack[(h$RTS_86 - 1)] >> 8) + 2); | |
h$RTS_88 = 2; | |
} | |
else | |
{ | |
var h$RTS_89 = h$stack[h$RTS_86].size; | |
if((h$RTS_89 <= 0)) | |
{ | |
h$RTS_87 = h$stack[(h$RTS_86 - 1)]; | |
h$RTS_88 = 2; | |
} | |
else | |
{ | |
h$RTS_87 = ((h$RTS_89 & 255) + 1); | |
h$RTS_88 = 1; | |
}; | |
}; | |
h$RTS_86 -= h$RTS_87; | |
} | |
else | |
{ | |
h$dumpStackTop(h$stack, 0, h$sp); | |
throw(("invalid stack object at: " + h$RTS_86)); | |
}; | |
}; | |
}; | |
function h$printReg(h$RTS_90) | |
{ | |
if((h$RTS_90 === null)) | |
{ | |
return "null"; | |
} | |
else | |
{ | |
if(((((typeof h$RTS_90 === "object") && h$RTS_90.hasOwnProperty("f")) && h$RTS_90.hasOwnProperty("d1")) && h$RTS_90. | |
hasOwnProperty("d2"))) | |
{ | |
if((typeof h$RTS_90.f !== "function")) | |
{ | |
return "dodgy object"; | |
} | |
else | |
{ | |
if(((h$RTS_90.f.t === 5) && h$RTS_90.x)) | |
{ | |
return (("blackhole: -> " + h$printReg({ d: h$RTS_90.d1.x2, f: h$RTS_90.x.x1 | |
})) + ")"); | |
} | |
else | |
{ | |
var h$RTS_91 = ""; | |
if(((h$RTS_90.f.n === "integer-gmp:GHC.Integer.Type.Jp#") || (h$RTS_90.f.n === "integer-gmp:GHC.Integer.Type.Jn#"))) | |
{ | |
h$RTS_91 = ((((" [" + h$RTS_90.d1.join(",")) + "](") + h$ghcjsbn_tmp_toJSBN(h$RTS_90.d1).toString()) + ")"); | |
} | |
else | |
{ | |
if((h$RTS_90.f.n === "integer-gmp:GHC.Integer.Type.S#")) | |
{ | |
h$RTS_91 = ((" (S: " + h$RTS_90.d1) + ")"); | |
}; | |
}; | |
return ((((((((h$RTS_90.alloc ? (h$RTS_90.alloc + ": ") : "") + h$RTS_90.f.n) + " (") + h$closureTypeName(h$RTS_90.f. | |
t)) + ", ") + h$RTS_90.f.a) + ")") + h$RTS_91); | |
}; | |
}; | |
} | |
else | |
{ | |
if((typeof h$RTS_90 === "object")) | |
{ | |
var h$RTS_92 = h$collectProps(h$RTS_90); | |
if((h$RTS_92.length > 40)) | |
{ | |
return (h$RTS_92.substr(0, 40) + "..."); | |
} | |
else | |
{ | |
return h$RTS_92; | |
}; | |
} | |
else | |
{ | |
var h$RTS_93 = (new String(h$RTS_90) + ""); | |
if((h$RTS_93.length > 40)) | |
{ | |
return (h$RTS_93.substr(0, 40) + "..."); | |
} | |
else | |
{ | |
return h$RTS_93; | |
}; | |
}; | |
}; | |
}; | |
}; | |
function h$logStack() | |
{ | |
if((typeof h$stack[h$sp] === "undefined")) | |
{ | |
h$log("warning: invalid stack frame"); | |
return undefined; | |
}; | |
var h$RTS_94 = 0; | |
var h$RTS_95 = h$stack[h$sp].size; | |
if((h$RTS_95 === (-1))) | |
{ | |
h$RTS_94 = (h$stack[(h$sp - 1)] & 255); | |
} | |
else | |
{ | |
h$RTS_94 = (h$RTS_95 & 255); | |
}; | |
h$dumpStackTop(h$stack, ((h$sp - h$RTS_94) - 2), h$sp); | |
for(var h$RTS_96 = Math.max(0, ((h$sp - h$RTS_94) + 1));(h$RTS_96 <= h$sp);(h$RTS_96++)) { | |
if((typeof h$stack[h$RTS_96] === "undefined")) | |
{ | |
throw("undefined on stack"); | |
}; | |
}; | |
}; | |
function h$ap_1_0() | |
{ | |
var h$RTS_97 = h$r1.f; | |
switch (h$RTS_97.t) | |
{ | |
case (0): | |
return h$RTS_97; | |
case (1): | |
var h$RTS_99 = h$RTS_97.a; | |
var h$RTS_100 = (h$RTS_99 & 255); | |
if((1 === h$RTS_100)) | |
{ | |
--h$sp; | |
return h$RTS_97; | |
} | |
else | |
{ | |
if((1 > h$RTS_100)) | |
{ | |
var h$RTS_101 = (h$RTS_99 >> 8); | |
switch (h$RTS_101) | |
{ | |
default: | |
}; | |
h$sp -= h$RTS_101; | |
var h$RTS_102 = h$apply[((1 - h$RTS_100) | ((0 - h$RTS_101) << 8))]; | |
h$stack[h$sp] = h$RTS_102; | |
return h$RTS_97; | |
} | |
else | |
{ | |
var h$RTS_98 = h$c3(h$pap_0, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 0) - 1), null); | |
--h$sp; | |
h$r1 = h$RTS_98; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_104 = h$r1.d2.d1; | |
var h$RTS_105 = (h$RTS_104 & 255); | |
if((1 === h$RTS_105)) | |
{ | |
--h$sp; | |
return h$RTS_97; | |
} | |
else | |
{ | |
if((1 > h$RTS_105)) | |
{ | |
var h$RTS_106 = (h$RTS_104 >> 8); | |
switch (h$RTS_106) | |
{ | |
default: | |
}; | |
h$sp -= h$RTS_106; | |
var h$RTS_107 = h$apply[((1 - h$RTS_105) | ((0 - h$RTS_106) << 8))]; | |
h$stack[h$sp] = h$RTS_107; | |
return h$RTS_97; | |
} | |
else | |
{ | |
var h$RTS_103 = h$c3(h$pap_0, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 0) - 1), null); | |
--h$sp; | |
h$r1 = h$RTS_103; | |
return h$rs(); | |
}; | |
}; | |
case (5): | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("panic: h$ap_1_0, unexpected closure type: " + h$RTS_97.t)); | |
}; | |
}; | |
h$o(h$ap_1_0, (-1), 0, 0, 256, null); | |
function h$ap_1_1() | |
{ | |
var h$RTS_108 = h$r1.f; | |
switch (h$RTS_108.t) | |
{ | |
case (0): | |
return h$RTS_108; | |
case (1): | |
var h$RTS_110 = h$RTS_108.a; | |
var h$RTS_111 = (h$RTS_110 & 255); | |
if((1 === h$RTS_111)) | |
{ | |
h$r2 = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
return h$RTS_108; | |
} | |
else | |
{ | |
if((1 > h$RTS_111)) | |
{ | |
var h$RTS_112 = (h$RTS_110 >> 8); | |
switch (h$RTS_112) | |
{ | |
case (1): | |
h$r2 = h$stack[(h$sp - 1)]; | |
default: | |
}; | |
h$sp -= h$RTS_112; | |
var h$RTS_113 = h$apply[((1 - h$RTS_111) | ((1 - h$RTS_112) << 8))]; | |
h$stack[h$sp] = h$RTS_113; | |
return h$RTS_108; | |
} | |
else | |
{ | |
var h$RTS_109 = h$c3(h$pap_1, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 256) - 1), h$stack[(h$sp - 1)]); | |
h$sp -= 2; | |
h$r1 = h$RTS_109; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_115 = h$r1.d2.d1; | |
var h$RTS_116 = (h$RTS_115 & 255); | |
if((1 === h$RTS_116)) | |
{ | |
h$r2 = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
return h$RTS_108; | |
} | |
else | |
{ | |
if((1 > h$RTS_116)) | |
{ | |
var h$RTS_117 = (h$RTS_115 >> 8); | |
switch (h$RTS_117) | |
{ | |
case (1): | |
h$r2 = h$stack[(h$sp - 1)]; | |
default: | |
}; | |
h$sp -= h$RTS_117; | |
var h$RTS_118 = h$apply[((1 - h$RTS_116) | ((1 - h$RTS_117) << 8))]; | |
h$stack[h$sp] = h$RTS_118; | |
return h$RTS_108; | |
} | |
else | |
{ | |
var h$RTS_114 = h$c3(h$pap_1, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 256) - 1), h$stack[(h$sp - 1)]); | |
h$sp -= 2; | |
h$r1 = h$RTS_114; | |
return h$rs(); | |
}; | |
}; | |
case (5): | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("panic: h$ap_1_1, unexpected closure type: " + h$RTS_108.t)); | |
}; | |
}; | |
h$o(h$ap_1_1, (-1), 0, 1, 256, null); | |
function h$ap_1_2() | |
{ | |
var h$RTS_119 = h$r1.f; | |
switch (h$RTS_119.t) | |
{ | |
case (0): | |
return h$RTS_119; | |
case (1): | |
var h$RTS_121 = h$RTS_119.a; | |
var h$RTS_122 = (h$RTS_121 & 255); | |
if((1 === h$RTS_122)) | |
{ | |
h$r3 = h$stack[(h$sp - 2)]; | |
h$r2 = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
return h$RTS_119; | |
} | |
else | |
{ | |
if((1 > h$RTS_122)) | |
{ | |
var h$RTS_123 = (h$RTS_121 >> 8); | |
switch (h$RTS_123) | |
{ | |
case (2): | |
h$r3 = h$stack[(h$sp - 2)]; | |
case (1): | |
h$r2 = h$stack[(h$sp - 1)]; | |
default: | |
}; | |
h$sp -= h$RTS_123; | |
var h$RTS_124 = h$apply[((1 - h$RTS_122) | ((2 - h$RTS_123) << 8))]; | |
h$stack[h$sp] = h$RTS_124; | |
return h$RTS_119; | |
} | |
else | |
{ | |
var h$RTS_120 = h$c4(h$pap_2, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 512) - 1), h$stack[(h$sp - 1)], | |
h$stack[(h$sp - 2)]); | |
h$sp -= 3; | |
h$r1 = h$RTS_120; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_126 = h$r1.d2.d1; | |
var h$RTS_127 = (h$RTS_126 & 255); | |
if((1 === h$RTS_127)) | |
{ | |
h$r3 = h$stack[(h$sp - 2)]; | |
h$r2 = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
return h$RTS_119; | |
} | |
else | |
{ | |
if((1 > h$RTS_127)) | |
{ | |
var h$RTS_128 = (h$RTS_126 >> 8); | |
switch (h$RTS_128) | |
{ | |
case (2): | |
h$r3 = h$stack[(h$sp - 2)]; | |
case (1): | |
h$r2 = h$stack[(h$sp - 1)]; | |
default: | |
}; | |
h$sp -= h$RTS_128; | |
var h$RTS_129 = h$apply[((1 - h$RTS_127) | ((2 - h$RTS_128) << 8))]; | |
h$stack[h$sp] = h$RTS_129; | |
return h$RTS_119; | |
} | |
else | |
{ | |
var h$RTS_125 = h$c4(h$pap_2, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 512) - 1), h$stack[(h$sp - 1)], | |
h$stack[(h$sp - 2)]); | |
h$sp -= 3; | |
h$r1 = h$RTS_125; | |
return h$rs(); | |
}; | |
}; | |
case (5): | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("panic: h$ap_1_2, unexpected closure type: " + h$RTS_119.t)); | |
}; | |
}; | |
h$o(h$ap_1_2, (-1), 0, 2, 256, null); | |
function h$ap_2_1() | |
{ | |
var h$RTS_130 = h$r1.f; | |
switch (h$RTS_130.t) | |
{ | |
case (0): | |
return h$RTS_130; | |
case (1): | |
var h$RTS_132 = h$RTS_130.a; | |
var h$RTS_133 = (h$RTS_132 & 255); | |
if((2 === h$RTS_133)) | |
{ | |
h$r2 = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
return h$RTS_130; | |
} | |
else | |
{ | |
if((2 > h$RTS_133)) | |
{ | |
var h$RTS_134 = (h$RTS_132 >> 8); | |
switch (h$RTS_134) | |
{ | |
case (1): | |
h$r2 = h$stack[(h$sp - 1)]; | |
default: | |
}; | |
h$sp -= h$RTS_134; | |
var h$RTS_135 = h$apply[((2 - h$RTS_133) | ((1 - h$RTS_134) << 8))]; | |
h$stack[h$sp] = h$RTS_135; | |
return h$RTS_130; | |
} | |
else | |
{ | |
var h$RTS_131 = h$c3(h$pap_1, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 256) - 2), h$stack[(h$sp - 1)]); | |
h$sp -= 2; | |
h$r1 = h$RTS_131; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_137 = h$r1.d2.d1; | |
var h$RTS_138 = (h$RTS_137 & 255); | |
if((2 === h$RTS_138)) | |
{ | |
h$r2 = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
return h$RTS_130; | |
} | |
else | |
{ | |
if((2 > h$RTS_138)) | |
{ | |
var h$RTS_139 = (h$RTS_137 >> 8); | |
switch (h$RTS_139) | |
{ | |
case (1): | |
h$r2 = h$stack[(h$sp - 1)]; | |
default: | |
}; | |
h$sp -= h$RTS_139; | |
var h$RTS_140 = h$apply[((2 - h$RTS_138) | ((1 - h$RTS_139) << 8))]; | |
h$stack[h$sp] = h$RTS_140; | |
return h$RTS_130; | |
} | |
else | |
{ | |
var h$RTS_136 = h$c3(h$pap_1, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 256) - 2), h$stack[(h$sp - 1)]); | |
h$sp -= 2; | |
h$r1 = h$RTS_136; | |
return h$rs(); | |
}; | |
}; | |
case (5): | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("panic: h$ap_2_1, unexpected closure type: " + h$RTS_130.t)); | |
}; | |
}; | |
h$o(h$ap_2_1, (-1), 0, 1, 256, null); | |
function h$ap_2_2() | |
{ | |
var h$RTS_141 = h$r1.f; | |
switch (h$RTS_141.t) | |
{ | |
case (0): | |
return h$RTS_141; | |
case (1): | |
var h$RTS_143 = h$RTS_141.a; | |
var h$RTS_144 = (h$RTS_143 & 255); | |
if((2 === h$RTS_144)) | |
{ | |
h$r3 = h$stack[(h$sp - 2)]; | |
h$r2 = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
return h$RTS_141; | |
} | |
else | |
{ | |
if((2 > h$RTS_144)) | |
{ | |
var h$RTS_145 = (h$RTS_143 >> 8); | |
switch (h$RTS_145) | |
{ | |
case (2): | |
h$r3 = h$stack[(h$sp - 2)]; | |
case (1): | |
h$r2 = h$stack[(h$sp - 1)]; | |
default: | |
}; | |
h$sp -= h$RTS_145; | |
var h$RTS_146 = h$apply[((2 - h$RTS_144) | ((2 - h$RTS_145) << 8))]; | |
h$stack[h$sp] = h$RTS_146; | |
return h$RTS_141; | |
} | |
else | |
{ | |
var h$RTS_142 = h$c4(h$pap_2, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 512) - 2), h$stack[(h$sp - 1)], | |
h$stack[(h$sp - 2)]); | |
h$sp -= 3; | |
h$r1 = h$RTS_142; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_148 = h$r1.d2.d1; | |
var h$RTS_149 = (h$RTS_148 & 255); | |
if((2 === h$RTS_149)) | |
{ | |
h$r3 = h$stack[(h$sp - 2)]; | |
h$r2 = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
return h$RTS_141; | |
} | |
else | |
{ | |
if((2 > h$RTS_149)) | |
{ | |
var h$RTS_150 = (h$RTS_148 >> 8); | |
switch (h$RTS_150) | |
{ | |
case (2): | |
h$r3 = h$stack[(h$sp - 2)]; | |
case (1): | |
h$r2 = h$stack[(h$sp - 1)]; | |
default: | |
}; | |
h$sp -= h$RTS_150; | |
var h$RTS_151 = h$apply[((2 - h$RTS_149) | ((2 - h$RTS_150) << 8))]; | |
h$stack[h$sp] = h$RTS_151; | |
return h$RTS_141; | |
} | |
else | |
{ | |
var h$RTS_147 = h$c4(h$pap_2, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 512) - 2), h$stack[(h$sp - 1)], | |
h$stack[(h$sp - 2)]); | |
h$sp -= 3; | |
h$r1 = h$RTS_147; | |
return h$rs(); | |
}; | |
}; | |
case (5): | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("panic: h$ap_2_2, unexpected closure type: " + h$RTS_141.t)); | |
}; | |
}; | |
h$o(h$ap_2_2, (-1), 0, 2, 256, null); | |
function h$ap_2_3() | |
{ | |
var h$RTS_152 = h$r1.f; | |
switch (h$RTS_152.t) | |
{ | |
case (0): | |
return h$RTS_152; | |
case (1): | |
var h$RTS_154 = h$RTS_152.a; | |
var h$RTS_155 = (h$RTS_154 & 255); | |
if((2 === h$RTS_155)) | |
{ | |
h$r4 = h$stack[(h$sp - 3)]; | |
h$r3 = h$stack[(h$sp - 2)]; | |
h$r2 = h$stack[(h$sp - 1)]; | |
h$sp -= 4; | |
return h$RTS_152; | |
} | |
else | |
{ | |
if((2 > h$RTS_155)) | |
{ | |
var h$RTS_156 = (h$RTS_154 >> 8); | |
switch (h$RTS_156) | |
{ | |
case (3): | |
h$r4 = h$stack[(h$sp - 3)]; | |
case (2): | |
h$r3 = h$stack[(h$sp - 2)]; | |
case (1): | |
h$r2 = h$stack[(h$sp - 1)]; | |
default: | |
}; | |
h$sp -= h$RTS_156; | |
var h$RTS_157 = h$apply[((2 - h$RTS_155) | ((3 - h$RTS_156) << 8))]; | |
h$stack[h$sp] = h$RTS_157; | |
return h$RTS_152; | |
} | |
else | |
{ | |
var h$RTS_153 = h$c5(h$pap_3, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 768) - 2), h$stack[(h$sp - 1)], | |
h$stack[(h$sp - 2)], h$stack[(h$sp - 3)]); | |
h$sp -= 4; | |
h$r1 = h$RTS_153; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_159 = h$r1.d2.d1; | |
var h$RTS_160 = (h$RTS_159 & 255); | |
if((2 === h$RTS_160)) | |
{ | |
h$r4 = h$stack[(h$sp - 3)]; | |
h$r3 = h$stack[(h$sp - 2)]; | |
h$r2 = h$stack[(h$sp - 1)]; | |
h$sp -= 4; | |
return h$RTS_152; | |
} | |
else | |
{ | |
if((2 > h$RTS_160)) | |
{ | |
var h$RTS_161 = (h$RTS_159 >> 8); | |
switch (h$RTS_161) | |
{ | |
case (3): | |
h$r4 = h$stack[(h$sp - 3)]; | |
case (2): | |
h$r3 = h$stack[(h$sp - 2)]; | |
case (1): | |
h$r2 = h$stack[(h$sp - 1)]; | |
default: | |
}; | |
h$sp -= h$RTS_161; | |
var h$RTS_162 = h$apply[((2 - h$RTS_160) | ((3 - h$RTS_161) << 8))]; | |
h$stack[h$sp] = h$RTS_162; | |
return h$RTS_152; | |
} | |
else | |
{ | |
var h$RTS_158 = h$c5(h$pap_3, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 768) - 2), h$stack[(h$sp - 1)], | |
h$stack[(h$sp - 2)], h$stack[(h$sp - 3)]); | |
h$sp -= 4; | |
h$r1 = h$RTS_158; | |
return h$rs(); | |
}; | |
}; | |
case (5): | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("panic: h$ap_2_3, unexpected closure type: " + h$RTS_152.t)); | |
}; | |
}; | |
h$o(h$ap_2_3, (-1), 0, 3, 256, null); | |
function h$ap_2_4() | |
{ | |
var h$RTS_163 = h$r1.f; | |
switch (h$RTS_163.t) | |
{ | |
case (0): | |
return h$RTS_163; | |
case (1): | |
var h$RTS_165 = h$RTS_163.a; | |
var h$RTS_166 = (h$RTS_165 & 255); | |
if((2 === h$RTS_166)) | |
{ | |
h$r5 = h$stack[(h$sp - 4)]; | |
h$r4 = h$stack[(h$sp - 3)]; | |
h$r3 = h$stack[(h$sp - 2)]; | |
h$r2 = h$stack[(h$sp - 1)]; | |
h$sp -= 5; | |
return h$RTS_163; | |
} | |
else | |
{ | |
if((2 > h$RTS_166)) | |
{ | |
var h$RTS_167 = (h$RTS_165 >> 8); | |
switch (h$RTS_167) | |
{ | |
case (4): | |
h$r5 = h$stack[(h$sp - 4)]; | |
case (3): | |
h$r4 = h$stack[(h$sp - 3)]; | |
case (2): | |
h$r3 = h$stack[(h$sp - 2)]; | |
case (1): | |
h$r2 = h$stack[(h$sp - 1)]; | |
default: | |
}; | |
h$sp -= h$RTS_167; | |
var h$RTS_168 = h$apply[((2 - h$RTS_166) | ((4 - h$RTS_167) << 8))]; | |
h$stack[h$sp] = h$RTS_168; | |
return h$RTS_163; | |
} | |
else | |
{ | |
var h$RTS_164 = h$c6(h$pap_4, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 1024) - 2), h$stack[(h$sp - 1)], | |
h$stack[(h$sp - 2)], h$stack[(h$sp - 3)], h$stack[(h$sp - 4)]); | |
h$sp -= 5; | |
h$r1 = h$RTS_164; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_170 = h$r1.d2.d1; | |
var h$RTS_171 = (h$RTS_170 & 255); | |
if((2 === h$RTS_171)) | |
{ | |
h$r5 = h$stack[(h$sp - 4)]; | |
h$r4 = h$stack[(h$sp - 3)]; | |
h$r3 = h$stack[(h$sp - 2)]; | |
h$r2 = h$stack[(h$sp - 1)]; | |
h$sp -= 5; | |
return h$RTS_163; | |
} | |
else | |
{ | |
if((2 > h$RTS_171)) | |
{ | |
var h$RTS_172 = (h$RTS_170 >> 8); | |
switch (h$RTS_172) | |
{ | |
case (4): | |
h$r5 = h$stack[(h$sp - 4)]; | |
case (3): | |
h$r4 = h$stack[(h$sp - 3)]; | |
case (2): | |
h$r3 = h$stack[(h$sp - 2)]; | |
case (1): | |
h$r2 = h$stack[(h$sp - 1)]; | |
default: | |
}; | |
h$sp -= h$RTS_172; | |
var h$RTS_173 = h$apply[((2 - h$RTS_171) | ((4 - h$RTS_172) << 8))]; | |
h$stack[h$sp] = h$RTS_173; | |
return h$RTS_163; | |
} | |
else | |
{ | |
var h$RTS_169 = h$c6(h$pap_4, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 1024) - 2), h$stack[(h$sp - 1)], | |
h$stack[(h$sp - 2)], h$stack[(h$sp - 3)], h$stack[(h$sp - 4)]); | |
h$sp -= 5; | |
h$r1 = h$RTS_169; | |
return h$rs(); | |
}; | |
}; | |
case (5): | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("panic: h$ap_2_4, unexpected closure type: " + h$RTS_163.t)); | |
}; | |
}; | |
h$o(h$ap_2_4, (-1), 0, 4, 256, null); | |
function h$ap_3_2() | |
{ | |
var h$RTS_174 = h$r1.f; | |
switch (h$RTS_174.t) | |
{ | |
case (0): | |
return h$RTS_174; | |
case (1): | |
var h$RTS_176 = h$RTS_174.a; | |
var h$RTS_177 = (h$RTS_176 & 255); | |
if((3 === h$RTS_177)) | |
{ | |
h$r3 = h$stack[(h$sp - 2)]; | |
h$r2 = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
return h$RTS_174; | |
} | |
else | |
{ | |
if((3 > h$RTS_177)) | |
{ | |
var h$RTS_178 = (h$RTS_176 >> 8); | |
switch (h$RTS_178) | |
{ | |
case (2): | |
h$r3 = h$stack[(h$sp - 2)]; | |
case (1): | |
h$r2 = h$stack[(h$sp - 1)]; | |
default: | |
}; | |
h$sp -= h$RTS_178; | |
var h$RTS_179 = h$apply[((3 - h$RTS_177) | ((2 - h$RTS_178) << 8))]; | |
h$stack[h$sp] = h$RTS_179; | |
return h$RTS_174; | |
} | |
else | |
{ | |
var h$RTS_175 = h$c4(h$pap_2, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 512) - 3), h$stack[(h$sp - 1)], | |
h$stack[(h$sp - 2)]); | |
h$sp -= 3; | |
h$r1 = h$RTS_175; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_181 = h$r1.d2.d1; | |
var h$RTS_182 = (h$RTS_181 & 255); | |
if((3 === h$RTS_182)) | |
{ | |
h$r3 = h$stack[(h$sp - 2)]; | |
h$r2 = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
return h$RTS_174; | |
} | |
else | |
{ | |
if((3 > h$RTS_182)) | |
{ | |
var h$RTS_183 = (h$RTS_181 >> 8); | |
switch (h$RTS_183) | |
{ | |
case (2): | |
h$r3 = h$stack[(h$sp - 2)]; | |
case (1): | |
h$r2 = h$stack[(h$sp - 1)]; | |
default: | |
}; | |
h$sp -= h$RTS_183; | |
var h$RTS_184 = h$apply[((3 - h$RTS_182) | ((2 - h$RTS_183) << 8))]; | |
h$stack[h$sp] = h$RTS_184; | |
return h$RTS_174; | |
} | |
else | |
{ | |
var h$RTS_180 = h$c4(h$pap_2, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 512) - 3), h$stack[(h$sp - 1)], | |
h$stack[(h$sp - 2)]); | |
h$sp -= 3; | |
h$r1 = h$RTS_180; | |
return h$rs(); | |
}; | |
}; | |
case (5): | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("panic: h$ap_3_2, unexpected closure type: " + h$RTS_174.t)); | |
}; | |
}; | |
h$o(h$ap_3_2, (-1), 0, 2, 256, null); | |
function h$ap_3_3() | |
{ | |
var h$RTS_185 = h$r1.f; | |
switch (h$RTS_185.t) | |
{ | |
case (0): | |
return h$RTS_185; | |
case (1): | |
var h$RTS_187 = h$RTS_185.a; | |
var h$RTS_188 = (h$RTS_187 & 255); | |
if((3 === h$RTS_188)) | |
{ | |
h$r4 = h$stack[(h$sp - 3)]; | |
h$r3 = h$stack[(h$sp - 2)]; | |
h$r2 = h$stack[(h$sp - 1)]; | |
h$sp -= 4; | |
return h$RTS_185; | |
} | |
else | |
{ | |
if((3 > h$RTS_188)) | |
{ | |
var h$RTS_189 = (h$RTS_187 >> 8); | |
switch (h$RTS_189) | |
{ | |
case (3): | |
h$r4 = h$stack[(h$sp - 3)]; | |
case (2): | |
h$r3 = h$stack[(h$sp - 2)]; | |
case (1): | |
h$r2 = h$stack[(h$sp - 1)]; | |
default: | |
}; | |
h$sp -= h$RTS_189; | |
var h$RTS_190 = h$apply[((3 - h$RTS_188) | ((3 - h$RTS_189) << 8))]; | |
h$stack[h$sp] = h$RTS_190; | |
return h$RTS_185; | |
} | |
else | |
{ | |
var h$RTS_186 = h$c5(h$pap_3, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 768) - 3), h$stack[(h$sp - 1)], | |
h$stack[(h$sp - 2)], h$stack[(h$sp - 3)]); | |
h$sp -= 4; | |
h$r1 = h$RTS_186; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_192 = h$r1.d2.d1; | |
var h$RTS_193 = (h$RTS_192 & 255); | |
if((3 === h$RTS_193)) | |
{ | |
h$r4 = h$stack[(h$sp - 3)]; | |
h$r3 = h$stack[(h$sp - 2)]; | |
h$r2 = h$stack[(h$sp - 1)]; | |
h$sp -= 4; | |
return h$RTS_185; | |
} | |
else | |
{ | |
if((3 > h$RTS_193)) | |
{ | |
var h$RTS_194 = (h$RTS_192 >> 8); | |
switch (h$RTS_194) | |
{ | |
case (3): | |
h$r4 = h$stack[(h$sp - 3)]; | |
case (2): | |
h$r3 = h$stack[(h$sp - 2)]; | |
case (1): | |
h$r2 = h$stack[(h$sp - 1)]; | |
default: | |
}; | |
h$sp -= h$RTS_194; | |
var h$RTS_195 = h$apply[((3 - h$RTS_193) | ((3 - h$RTS_194) << 8))]; | |
h$stack[h$sp] = h$RTS_195; | |
return h$RTS_185; | |
} | |
else | |
{ | |
var h$RTS_191 = h$c5(h$pap_3, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 768) - 3), h$stack[(h$sp - 1)], | |
h$stack[(h$sp - 2)], h$stack[(h$sp - 3)]); | |
h$sp -= 4; | |
h$r1 = h$RTS_191; | |
return h$rs(); | |
}; | |
}; | |
case (5): | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("panic: h$ap_3_3, unexpected closure type: " + h$RTS_185.t)); | |
}; | |
}; | |
h$o(h$ap_3_3, (-1), 0, 3, 256, null); | |
function h$ap_3_4() | |
{ | |
var h$RTS_196 = h$r1.f; | |
switch (h$RTS_196.t) | |
{ | |
case (0): | |
return h$RTS_196; | |
case (1): | |
var h$RTS_198 = h$RTS_196.a; | |
var h$RTS_199 = (h$RTS_198 & 255); | |
if((3 === h$RTS_199)) | |
{ | |
h$r5 = h$stack[(h$sp - 4)]; | |
h$r4 = h$stack[(h$sp - 3)]; | |
h$r3 = h$stack[(h$sp - 2)]; | |
h$r2 = h$stack[(h$sp - 1)]; | |
h$sp -= 5; | |
return h$RTS_196; | |
} | |
else | |
{ | |
if((3 > h$RTS_199)) | |
{ | |
var h$RTS_200 = (h$RTS_198 >> 8); | |
switch (h$RTS_200) | |
{ | |
case (4): | |
h$r5 = h$stack[(h$sp - 4)]; | |
case (3): | |
h$r4 = h$stack[(h$sp - 3)]; | |
case (2): | |
h$r3 = h$stack[(h$sp - 2)]; | |
case (1): | |
h$r2 = h$stack[(h$sp - 1)]; | |
default: | |
}; | |
h$sp -= h$RTS_200; | |
var h$RTS_201 = h$apply[((3 - h$RTS_199) | ((4 - h$RTS_200) << 8))]; | |
h$stack[h$sp] = h$RTS_201; | |
return h$RTS_196; | |
} | |
else | |
{ | |
var h$RTS_197 = h$c6(h$pap_4, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 1024) - 3), h$stack[(h$sp - 1)], | |
h$stack[(h$sp - 2)], h$stack[(h$sp - 3)], h$stack[(h$sp - 4)]); | |
h$sp -= 5; | |
h$r1 = h$RTS_197; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_203 = h$r1.d2.d1; | |
var h$RTS_204 = (h$RTS_203 & 255); | |
if((3 === h$RTS_204)) | |
{ | |
h$r5 = h$stack[(h$sp - 4)]; | |
h$r4 = h$stack[(h$sp - 3)]; | |
h$r3 = h$stack[(h$sp - 2)]; | |
h$r2 = h$stack[(h$sp - 1)]; | |
h$sp -= 5; | |
return h$RTS_196; | |
} | |
else | |
{ | |
if((3 > h$RTS_204)) | |
{ | |
var h$RTS_205 = (h$RTS_203 >> 8); | |
switch (h$RTS_205) | |
{ | |
case (4): | |
h$r5 = h$stack[(h$sp - 4)]; | |
case (3): | |
h$r4 = h$stack[(h$sp - 3)]; | |
case (2): | |
h$r3 = h$stack[(h$sp - 2)]; | |
case (1): | |
h$r2 = h$stack[(h$sp - 1)]; | |
default: | |
}; | |
h$sp -= h$RTS_205; | |
var h$RTS_206 = h$apply[((3 - h$RTS_204) | ((4 - h$RTS_205) << 8))]; | |
h$stack[h$sp] = h$RTS_206; | |
return h$RTS_196; | |
} | |
else | |
{ | |
var h$RTS_202 = h$c6(h$pap_4, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 1024) - 3), h$stack[(h$sp - 1)], | |
h$stack[(h$sp - 2)], h$stack[(h$sp - 3)], h$stack[(h$sp - 4)]); | |
h$sp -= 5; | |
h$r1 = h$RTS_202; | |
return h$rs(); | |
}; | |
}; | |
case (5): | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("panic: h$ap_3_4, unexpected closure type: " + h$RTS_196.t)); | |
}; | |
}; | |
h$o(h$ap_3_4, (-1), 0, 4, 256, null); | |
function h$ap_3_5() | |
{ | |
var h$RTS_207 = h$r1.f; | |
switch (h$RTS_207.t) | |
{ | |
case (0): | |
return h$RTS_207; | |
case (1): | |
var h$RTS_209 = h$RTS_207.a; | |
var h$RTS_210 = (h$RTS_209 & 255); | |
if((3 === h$RTS_210)) | |
{ | |
h$r6 = h$stack[(h$sp - 5)]; | |
h$r5 = h$stack[(h$sp - 4)]; | |
h$r4 = h$stack[(h$sp - 3)]; | |
h$r3 = h$stack[(h$sp - 2)]; | |
h$r2 = h$stack[(h$sp - 1)]; | |
h$sp -= 6; | |
return h$RTS_207; | |
} | |
else | |
{ | |
if((3 > h$RTS_210)) | |
{ | |
var h$RTS_211 = (h$RTS_209 >> 8); | |
switch (h$RTS_211) | |
{ | |
case (5): | |
h$r6 = h$stack[(h$sp - 5)]; | |
case (4): | |
h$r5 = h$stack[(h$sp - 4)]; | |
case (3): | |
h$r4 = h$stack[(h$sp - 3)]; | |
case (2): | |
h$r3 = h$stack[(h$sp - 2)]; | |
case (1): | |
h$r2 = h$stack[(h$sp - 1)]; | |
default: | |
}; | |
h$sp -= h$RTS_211; | |
var h$RTS_212 = h$apply[((3 - h$RTS_210) | ((5 - h$RTS_211) << 8))]; | |
h$stack[h$sp] = h$RTS_212; | |
return h$RTS_207; | |
} | |
else | |
{ | |
var h$RTS_208 = h$c7(h$pap_5, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 1280) - 3), h$stack[(h$sp - 1)], | |
h$stack[(h$sp - 2)], h$stack[(h$sp - 3)], h$stack[(h$sp - 4)], h$stack[(h$sp - 5)]); | |
h$sp -= 6; | |
h$r1 = h$RTS_208; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_214 = h$r1.d2.d1; | |
var h$RTS_215 = (h$RTS_214 & 255); | |
if((3 === h$RTS_215)) | |
{ | |
h$r6 = h$stack[(h$sp - 5)]; | |
h$r5 = h$stack[(h$sp - 4)]; | |
h$r4 = h$stack[(h$sp - 3)]; | |
h$r3 = h$stack[(h$sp - 2)]; | |
h$r2 = h$stack[(h$sp - 1)]; | |
h$sp -= 6; | |
return h$RTS_207; | |
} | |
else | |
{ | |
if((3 > h$RTS_215)) | |
{ | |
var h$RTS_216 = (h$RTS_214 >> 8); | |
switch (h$RTS_216) | |
{ | |
case (5): | |
h$r6 = h$stack[(h$sp - 5)]; | |
case (4): | |
h$r5 = h$stack[(h$sp - 4)]; | |
case (3): | |
h$r4 = h$stack[(h$sp - 3)]; | |
case (2): | |
h$r3 = h$stack[(h$sp - 2)]; | |
case (1): | |
h$r2 = h$stack[(h$sp - 1)]; | |
default: | |
}; | |
h$sp -= h$RTS_216; | |
var h$RTS_217 = h$apply[((3 - h$RTS_215) | ((5 - h$RTS_216) << 8))]; | |
h$stack[h$sp] = h$RTS_217; | |
return h$RTS_207; | |
} | |
else | |
{ | |
var h$RTS_213 = h$c7(h$pap_5, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 1280) - 3), h$stack[(h$sp - 1)], | |
h$stack[(h$sp - 2)], h$stack[(h$sp - 3)], h$stack[(h$sp - 4)], h$stack[(h$sp - 5)]); | |
h$sp -= 6; | |
h$r1 = h$RTS_213; | |
return h$rs(); | |
}; | |
}; | |
case (5): | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("panic: h$ap_3_5, unexpected closure type: " + h$RTS_207.t)); | |
}; | |
}; | |
h$o(h$ap_3_5, (-1), 0, 5, 256, null); | |
function h$ap_3_6() | |
{ | |
var h$RTS_218 = h$r1.f; | |
switch (h$RTS_218.t) | |
{ | |
case (0): | |
return h$RTS_218; | |
case (1): | |
var h$RTS_220 = h$RTS_218.a; | |
var h$RTS_221 = (h$RTS_220 & 255); | |
if((3 === h$RTS_221)) | |
{ | |
h$r7 = h$stack[(h$sp - 6)]; | |
h$r6 = h$stack[(h$sp - 5)]; | |
h$r5 = h$stack[(h$sp - 4)]; | |
h$r4 = h$stack[(h$sp - 3)]; | |
h$r3 = h$stack[(h$sp - 2)]; | |
h$r2 = h$stack[(h$sp - 1)]; | |
h$sp -= 7; | |
return h$RTS_218; | |
} | |
else | |
{ | |
if((3 > h$RTS_221)) | |
{ | |
var h$RTS_222 = (h$RTS_220 >> 8); | |
switch (h$RTS_222) | |
{ | |
case (6): | |
h$r7 = h$stack[(h$sp - 6)]; | |
case (5): | |
h$r6 = h$stack[(h$sp - 5)]; | |
case (4): | |
h$r5 = h$stack[(h$sp - 4)]; | |
case (3): | |
h$r4 = h$stack[(h$sp - 3)]; | |
case (2): | |
h$r3 = h$stack[(h$sp - 2)]; | |
case (1): | |
h$r2 = h$stack[(h$sp - 1)]; | |
default: | |
}; | |
h$sp -= h$RTS_222; | |
var h$RTS_223 = h$apply[((3 - h$RTS_221) | ((6 - h$RTS_222) << 8))]; | |
h$stack[h$sp] = h$RTS_223; | |
return h$RTS_218; | |
} | |
else | |
{ | |
var h$RTS_219 = h$c8(h$pap_6, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 1536) - 3), h$stack[(h$sp - 1)], | |
h$stack[(h$sp - 2)], h$stack[(h$sp - 3)], h$stack[(h$sp - 4)], h$stack[(h$sp - 5)], h$stack[(h$sp - 6)]); | |
h$sp -= 7; | |
h$r1 = h$RTS_219; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_225 = h$r1.d2.d1; | |
var h$RTS_226 = (h$RTS_225 & 255); | |
if((3 === h$RTS_226)) | |
{ | |
h$r7 = h$stack[(h$sp - 6)]; | |
h$r6 = h$stack[(h$sp - 5)]; | |
h$r5 = h$stack[(h$sp - 4)]; | |
h$r4 = h$stack[(h$sp - 3)]; | |
h$r3 = h$stack[(h$sp - 2)]; | |
h$r2 = h$stack[(h$sp - 1)]; | |
h$sp -= 7; | |
return h$RTS_218; | |
} | |
else | |
{ | |
if((3 > h$RTS_226)) | |
{ | |
var h$RTS_227 = (h$RTS_225 >> 8); | |
switch (h$RTS_227) | |
{ | |
case (6): | |
h$r7 = h$stack[(h$sp - 6)]; | |
case (5): | |
h$r6 = h$stack[(h$sp - 5)]; | |
case (4): | |
h$r5 = h$stack[(h$sp - 4)]; | |
case (3): | |
h$r4 = h$stack[(h$sp - 3)]; | |
case (2): | |
h$r3 = h$stack[(h$sp - 2)]; | |
case (1): | |
h$r2 = h$stack[(h$sp - 1)]; | |
default: | |
}; | |
h$sp -= h$RTS_227; | |
var h$RTS_228 = h$apply[((3 - h$RTS_226) | ((6 - h$RTS_227) << 8))]; | |
h$stack[h$sp] = h$RTS_228; | |
return h$RTS_218; | |
} | |
else | |
{ | |
var h$RTS_224 = h$c8(h$pap_6, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 1536) - 3), h$stack[(h$sp - 1)], | |
h$stack[(h$sp - 2)], h$stack[(h$sp - 3)], h$stack[(h$sp - 4)], h$stack[(h$sp - 5)], h$stack[(h$sp - 6)]); | |
h$sp -= 7; | |
h$r1 = h$RTS_224; | |
return h$rs(); | |
}; | |
}; | |
case (5): | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("panic: h$ap_3_6, unexpected closure type: " + h$RTS_218.t)); | |
}; | |
}; | |
h$o(h$ap_3_6, (-1), 0, 6, 256, null); | |
function h$ap_4_3() | |
{ | |
var h$RTS_229 = h$r1.f; | |
switch (h$RTS_229.t) | |
{ | |
case (0): | |
return h$RTS_229; | |
case (1): | |
var h$RTS_231 = h$RTS_229.a; | |
var h$RTS_232 = (h$RTS_231 & 255); | |
if((4 === h$RTS_232)) | |
{ | |
h$r4 = h$stack[(h$sp - 3)]; | |
h$r3 = h$stack[(h$sp - 2)]; | |
h$r2 = h$stack[(h$sp - 1)]; | |
h$sp -= 4; | |
return h$RTS_229; | |
} | |
else | |
{ | |
if((4 > h$RTS_232)) | |
{ | |
var h$RTS_233 = (h$RTS_231 >> 8); | |
switch (h$RTS_233) | |
{ | |
case (3): | |
h$r4 = h$stack[(h$sp - 3)]; | |
case (2): | |
h$r3 = h$stack[(h$sp - 2)]; | |
case (1): | |
h$r2 = h$stack[(h$sp - 1)]; | |
default: | |
}; | |
h$sp -= h$RTS_233; | |
var h$RTS_234 = h$apply[((4 - h$RTS_232) | ((3 - h$RTS_233) << 8))]; | |
h$stack[h$sp] = h$RTS_234; | |
return h$RTS_229; | |
} | |
else | |
{ | |
var h$RTS_230 = h$c5(h$pap_3, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 768) - 4), h$stack[(h$sp - 1)], | |
h$stack[(h$sp - 2)], h$stack[(h$sp - 3)]); | |
h$sp -= 4; | |
h$r1 = h$RTS_230; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_236 = h$r1.d2.d1; | |
var h$RTS_237 = (h$RTS_236 & 255); | |
if((4 === h$RTS_237)) | |
{ | |
h$r4 = h$stack[(h$sp - 3)]; | |
h$r3 = h$stack[(h$sp - 2)]; | |
h$r2 = h$stack[(h$sp - 1)]; | |
h$sp -= 4; | |
return h$RTS_229; | |
} | |
else | |
{ | |
if((4 > h$RTS_237)) | |
{ | |
var h$RTS_238 = (h$RTS_236 >> 8); | |
switch (h$RTS_238) | |
{ | |
case (3): | |
h$r4 = h$stack[(h$sp - 3)]; | |
case (2): | |
h$r3 = h$stack[(h$sp - 2)]; | |
case (1): | |
h$r2 = h$stack[(h$sp - 1)]; | |
default: | |
}; | |
h$sp -= h$RTS_238; | |
var h$RTS_239 = h$apply[((4 - h$RTS_237) | ((3 - h$RTS_238) << 8))]; | |
h$stack[h$sp] = h$RTS_239; | |
return h$RTS_229; | |
} | |
else | |
{ | |
var h$RTS_235 = h$c5(h$pap_3, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 768) - 4), h$stack[(h$sp - 1)], | |
h$stack[(h$sp - 2)], h$stack[(h$sp - 3)]); | |
h$sp -= 4; | |
h$r1 = h$RTS_235; | |
return h$rs(); | |
}; | |
}; | |
case (5): | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("panic: h$ap_4_3, unexpected closure type: " + h$RTS_229.t)); | |
}; | |
}; | |
h$o(h$ap_4_3, (-1), 0, 3, 256, null); | |
function h$ap_4_4() | |
{ | |
var h$RTS_240 = h$r1.f; | |
switch (h$RTS_240.t) | |
{ | |
case (0): | |
return h$RTS_240; | |
case (1): | |
var h$RTS_242 = h$RTS_240.a; | |
var h$RTS_243 = (h$RTS_242 & 255); | |
if((4 === h$RTS_243)) | |
{ | |
h$r5 = h$stack[(h$sp - 4)]; | |
h$r4 = h$stack[(h$sp - 3)]; | |
h$r3 = h$stack[(h$sp - 2)]; | |
h$r2 = h$stack[(h$sp - 1)]; | |
h$sp -= 5; | |
return h$RTS_240; | |
} | |
else | |
{ | |
if((4 > h$RTS_243)) | |
{ | |
var h$RTS_244 = (h$RTS_242 >> 8); | |
switch (h$RTS_244) | |
{ | |
case (4): | |
h$r5 = h$stack[(h$sp - 4)]; | |
case (3): | |
h$r4 = h$stack[(h$sp - 3)]; | |
case (2): | |
h$r3 = h$stack[(h$sp - 2)]; | |
case (1): | |
h$r2 = h$stack[(h$sp - 1)]; | |
default: | |
}; | |
h$sp -= h$RTS_244; | |
var h$RTS_245 = h$apply[((4 - h$RTS_243) | ((4 - h$RTS_244) << 8))]; | |
h$stack[h$sp] = h$RTS_245; | |
return h$RTS_240; | |
} | |
else | |
{ | |
var h$RTS_241 = h$c6(h$pap_4, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 1024) - 4), h$stack[(h$sp - 1)], | |
h$stack[(h$sp - 2)], h$stack[(h$sp - 3)], h$stack[(h$sp - 4)]); | |
h$sp -= 5; | |
h$r1 = h$RTS_241; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_247 = h$r1.d2.d1; | |
var h$RTS_248 = (h$RTS_247 & 255); | |
if((4 === h$RTS_248)) | |
{ | |
h$r5 = h$stack[(h$sp - 4)]; | |
h$r4 = h$stack[(h$sp - 3)]; | |
h$r3 = h$stack[(h$sp - 2)]; | |
h$r2 = h$stack[(h$sp - 1)]; | |
h$sp -= 5; | |
return h$RTS_240; | |
} | |
else | |
{ | |
if((4 > h$RTS_248)) | |
{ | |
var h$RTS_249 = (h$RTS_247 >> 8); | |
switch (h$RTS_249) | |
{ | |
case (4): | |
h$r5 = h$stack[(h$sp - 4)]; | |
case (3): | |
h$r4 = h$stack[(h$sp - 3)]; | |
case (2): | |
h$r3 = h$stack[(h$sp - 2)]; | |
case (1): | |
h$r2 = h$stack[(h$sp - 1)]; | |
default: | |
}; | |
h$sp -= h$RTS_249; | |
var h$RTS_250 = h$apply[((4 - h$RTS_248) | ((4 - h$RTS_249) << 8))]; | |
h$stack[h$sp] = h$RTS_250; | |
return h$RTS_240; | |
} | |
else | |
{ | |
var h$RTS_246 = h$c6(h$pap_4, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 1024) - 4), h$stack[(h$sp - 1)], | |
h$stack[(h$sp - 2)], h$stack[(h$sp - 3)], h$stack[(h$sp - 4)]); | |
h$sp -= 5; | |
h$r1 = h$RTS_246; | |
return h$rs(); | |
}; | |
}; | |
case (5): | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("panic: h$ap_4_4, unexpected closure type: " + h$RTS_240.t)); | |
}; | |
}; | |
h$o(h$ap_4_4, (-1), 0, 4, 256, null); | |
function h$ap_4_5() | |
{ | |
var h$RTS_251 = h$r1.f; | |
switch (h$RTS_251.t) | |
{ | |
case (0): | |
return h$RTS_251; | |
case (1): | |
var h$RTS_253 = h$RTS_251.a; | |
var h$RTS_254 = (h$RTS_253 & 255); | |
if((4 === h$RTS_254)) | |
{ | |
h$r6 = h$stack[(h$sp - 5)]; | |
h$r5 = h$stack[(h$sp - 4)]; | |
h$r4 = h$stack[(h$sp - 3)]; | |
h$r3 = h$stack[(h$sp - 2)]; | |
h$r2 = h$stack[(h$sp - 1)]; | |
h$sp -= 6; | |
return h$RTS_251; | |
} | |
else | |
{ | |
if((4 > h$RTS_254)) | |
{ | |
var h$RTS_255 = (h$RTS_253 >> 8); | |
switch (h$RTS_255) | |
{ | |
case (5): | |
h$r6 = h$stack[(h$sp - 5)]; | |
case (4): | |
h$r5 = h$stack[(h$sp - 4)]; | |
case (3): | |
h$r4 = h$stack[(h$sp - 3)]; | |
case (2): | |
h$r3 = h$stack[(h$sp - 2)]; | |
case (1): | |
h$r2 = h$stack[(h$sp - 1)]; | |
default: | |
}; | |
h$sp -= h$RTS_255; | |
var h$RTS_256 = h$apply[((4 - h$RTS_254) | ((5 - h$RTS_255) << 8))]; | |
h$stack[h$sp] = h$RTS_256; | |
return h$RTS_251; | |
} | |
else | |
{ | |
var h$RTS_252 = h$c7(h$pap_5, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 1280) - 4), h$stack[(h$sp - 1)], | |
h$stack[(h$sp - 2)], h$stack[(h$sp - 3)], h$stack[(h$sp - 4)], h$stack[(h$sp - 5)]); | |
h$sp -= 6; | |
h$r1 = h$RTS_252; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_258 = h$r1.d2.d1; | |
var h$RTS_259 = (h$RTS_258 & 255); | |
if((4 === h$RTS_259)) | |
{ | |
h$r6 = h$stack[(h$sp - 5)]; | |
h$r5 = h$stack[(h$sp - 4)]; | |
h$r4 = h$stack[(h$sp - 3)]; | |
h$r3 = h$stack[(h$sp - 2)]; | |
h$r2 = h$stack[(h$sp - 1)]; | |
h$sp -= 6; | |
return h$RTS_251; | |
} | |
else | |
{ | |
if((4 > h$RTS_259)) | |
{ | |
var h$RTS_260 = (h$RTS_258 >> 8); | |
switch (h$RTS_260) | |
{ | |
case (5): | |
h$r6 = h$stack[(h$sp - 5)]; | |
case (4): | |
h$r5 = h$stack[(h$sp - 4)]; | |
case (3): | |
h$r4 = h$stack[(h$sp - 3)]; | |
case (2): | |
h$r3 = h$stack[(h$sp - 2)]; | |
case (1): | |
h$r2 = h$stack[(h$sp - 1)]; | |
default: | |
}; | |
h$sp -= h$RTS_260; | |
var h$RTS_261 = h$apply[((4 - h$RTS_259) | ((5 - h$RTS_260) << 8))]; | |
h$stack[h$sp] = h$RTS_261; | |
return h$RTS_251; | |
} | |
else | |
{ | |
var h$RTS_257 = h$c7(h$pap_5, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 1280) - 4), h$stack[(h$sp - 1)], | |
h$stack[(h$sp - 2)], h$stack[(h$sp - 3)], h$stack[(h$sp - 4)], h$stack[(h$sp - 5)]); | |
h$sp -= 6; | |
h$r1 = h$RTS_257; | |
return h$rs(); | |
}; | |
}; | |
case (5): | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("panic: h$ap_4_5, unexpected closure type: " + h$RTS_251.t)); | |
}; | |
}; | |
h$o(h$ap_4_5, (-1), 0, 5, 256, null); | |
function h$ap_4_6() | |
{ | |
var h$RTS_262 = h$r1.f; | |
switch (h$RTS_262.t) | |
{ | |
case (0): | |
return h$RTS_262; | |
case (1): | |
var h$RTS_264 = h$RTS_262.a; | |
var h$RTS_265 = (h$RTS_264 & 255); | |
if((4 === h$RTS_265)) | |
{ | |
h$r7 = h$stack[(h$sp - 6)]; | |
h$r6 = h$stack[(h$sp - 5)]; | |
h$r5 = h$stack[(h$sp - 4)]; | |
h$r4 = h$stack[(h$sp - 3)]; | |
h$r3 = h$stack[(h$sp - 2)]; | |
h$r2 = h$stack[(h$sp - 1)]; | |
h$sp -= 7; | |
return h$RTS_262; | |
} | |
else | |
{ | |
if((4 > h$RTS_265)) | |
{ | |
var h$RTS_266 = (h$RTS_264 >> 8); | |
switch (h$RTS_266) | |
{ | |
case (6): | |
h$r7 = h$stack[(h$sp - 6)]; | |
case (5): | |
h$r6 = h$stack[(h$sp - 5)]; | |
case (4): | |
h$r5 = h$stack[(h$sp - 4)]; | |
case (3): | |
h$r4 = h$stack[(h$sp - 3)]; | |
case (2): | |
h$r3 = h$stack[(h$sp - 2)]; | |
case (1): | |
h$r2 = h$stack[(h$sp - 1)]; | |
default: | |
}; | |
h$sp -= h$RTS_266; | |
var h$RTS_267 = h$apply[((4 - h$RTS_265) | ((6 - h$RTS_266) << 8))]; | |
h$stack[h$sp] = h$RTS_267; | |
return h$RTS_262; | |
} | |
else | |
{ | |
var h$RTS_263 = h$c8(h$pap_6, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 1536) - 4), h$stack[(h$sp - 1)], | |
h$stack[(h$sp - 2)], h$stack[(h$sp - 3)], h$stack[(h$sp - 4)], h$stack[(h$sp - 5)], h$stack[(h$sp - 6)]); | |
h$sp -= 7; | |
h$r1 = h$RTS_263; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_269 = h$r1.d2.d1; | |
var h$RTS_270 = (h$RTS_269 & 255); | |
if((4 === h$RTS_270)) | |
{ | |
h$r7 = h$stack[(h$sp - 6)]; | |
h$r6 = h$stack[(h$sp - 5)]; | |
h$r5 = h$stack[(h$sp - 4)]; | |
h$r4 = h$stack[(h$sp - 3)]; | |
h$r3 = h$stack[(h$sp - 2)]; | |
h$r2 = h$stack[(h$sp - 1)]; | |
h$sp -= 7; | |
return h$RTS_262; | |
} | |
else | |
{ | |
if((4 > h$RTS_270)) | |
{ | |
var h$RTS_271 = (h$RTS_269 >> 8); | |
switch (h$RTS_271) | |
{ | |
case (6): | |
h$r7 = h$stack[(h$sp - 6)]; | |
case (5): | |
h$r6 = h$stack[(h$sp - 5)]; | |
case (4): | |
h$r5 = h$stack[(h$sp - 4)]; | |
case (3): | |
h$r4 = h$stack[(h$sp - 3)]; | |
case (2): | |
h$r3 = h$stack[(h$sp - 2)]; | |
case (1): | |
h$r2 = h$stack[(h$sp - 1)]; | |
default: | |
}; | |
h$sp -= h$RTS_271; | |
var h$RTS_272 = h$apply[((4 - h$RTS_270) | ((6 - h$RTS_271) << 8))]; | |
h$stack[h$sp] = h$RTS_272; | |
return h$RTS_262; | |
} | |
else | |
{ | |
var h$RTS_268 = h$c8(h$pap_6, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 1536) - 4), h$stack[(h$sp - 1)], | |
h$stack[(h$sp - 2)], h$stack[(h$sp - 3)], h$stack[(h$sp - 4)], h$stack[(h$sp - 5)], h$stack[(h$sp - 6)]); | |
h$sp -= 7; | |
h$r1 = h$RTS_268; | |
return h$rs(); | |
}; | |
}; | |
case (5): | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("panic: h$ap_4_6, unexpected closure type: " + h$RTS_262.t)); | |
}; | |
}; | |
h$o(h$ap_4_6, (-1), 0, 6, 256, null); | |
function h$ap_4_7() | |
{ | |
var h$RTS_273 = h$r1.f; | |
switch (h$RTS_273.t) | |
{ | |
case (0): | |
return h$RTS_273; | |
case (1): | |
var h$RTS_275 = h$RTS_273.a; | |
var h$RTS_276 = (h$RTS_275 & 255); | |
if((4 === h$RTS_276)) | |
{ | |
h$r8 = h$stack[(h$sp - 7)]; | |
h$r7 = h$stack[(h$sp - 6)]; | |
h$r6 = h$stack[(h$sp - 5)]; | |
h$r5 = h$stack[(h$sp - 4)]; | |
h$r4 = h$stack[(h$sp - 3)]; | |
h$r3 = h$stack[(h$sp - 2)]; | |
h$r2 = h$stack[(h$sp - 1)]; | |
h$sp -= 8; | |
return h$RTS_273; | |
} | |
else | |
{ | |
if((4 > h$RTS_276)) | |
{ | |
var h$RTS_277 = (h$RTS_275 >> 8); | |
switch (h$RTS_277) | |
{ | |
case (7): | |
h$r8 = h$stack[(h$sp - 7)]; | |
case (6): | |
h$r7 = h$stack[(h$sp - 6)]; | |
case (5): | |
h$r6 = h$stack[(h$sp - 5)]; | |
case (4): | |
h$r5 = h$stack[(h$sp - 4)]; | |
case (3): | |
h$r4 = h$stack[(h$sp - 3)]; | |
case (2): | |
h$r3 = h$stack[(h$sp - 2)]; | |
case (1): | |
h$r2 = h$stack[(h$sp - 1)]; | |
default: | |
}; | |
h$sp -= h$RTS_277; | |
var h$RTS_278 = h$apply[((4 - h$RTS_276) | ((7 - h$RTS_277) << 8))]; | |
h$stack[h$sp] = h$RTS_278; | |
return h$RTS_273; | |
} | |
else | |
{ | |
var h$RTS_274 = h$c9(h$pap_gen, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 1792) - 4), h$stack[(h$sp - 1)], | |
h$stack[(h$sp - 2)], h$stack[(h$sp - 3)], h$stack[(h$sp - 4)], h$stack[(h$sp - 5)], h$stack[(h$sp - 6)], | |
h$stack[(h$sp - 7)]); | |
h$sp -= 8; | |
h$r1 = h$RTS_274; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_280 = h$r1.d2.d1; | |
var h$RTS_281 = (h$RTS_280 & 255); | |
if((4 === h$RTS_281)) | |
{ | |
h$r8 = h$stack[(h$sp - 7)]; | |
h$r7 = h$stack[(h$sp - 6)]; | |
h$r6 = h$stack[(h$sp - 5)]; | |
h$r5 = h$stack[(h$sp - 4)]; | |
h$r4 = h$stack[(h$sp - 3)]; | |
h$r3 = h$stack[(h$sp - 2)]; | |
h$r2 = h$stack[(h$sp - 1)]; | |
h$sp -= 8; | |
return h$RTS_273; | |
} | |
else | |
{ | |
if((4 > h$RTS_281)) | |
{ | |
var h$RTS_282 = (h$RTS_280 >> 8); | |
switch (h$RTS_282) | |
{ | |
case (7): | |
h$r8 = h$stack[(h$sp - 7)]; | |
case (6): | |
h$r7 = h$stack[(h$sp - 6)]; | |
case (5): | |
h$r6 = h$stack[(h$sp - 5)]; | |
case (4): | |
h$r5 = h$stack[(h$sp - 4)]; | |
case (3): | |
h$r4 = h$stack[(h$sp - 3)]; | |
case (2): | |
h$r3 = h$stack[(h$sp - 2)]; | |
case (1): | |
h$r2 = h$stack[(h$sp - 1)]; | |
default: | |
}; | |
h$sp -= h$RTS_282; | |
var h$RTS_283 = h$apply[((4 - h$RTS_281) | ((7 - h$RTS_282) << 8))]; | |
h$stack[h$sp] = h$RTS_283; | |
return h$RTS_273; | |
} | |
else | |
{ | |
var h$RTS_279 = h$c9(h$pap_gen, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 1792) - 4), h$stack[(h$sp - 1)], | |
h$stack[(h$sp - 2)], h$stack[(h$sp - 3)], h$stack[(h$sp - 4)], h$stack[(h$sp - 5)], h$stack[(h$sp - 6)], | |
h$stack[(h$sp - 7)]); | |
h$sp -= 8; | |
h$r1 = h$RTS_279; | |
return h$rs(); | |
}; | |
}; | |
case (5): | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("panic: h$ap_4_7, unexpected closure type: " + h$RTS_273.t)); | |
}; | |
}; | |
h$o(h$ap_4_7, (-1), 0, 7, 256, null); | |
function h$ap_4_8() | |
{ | |
var h$RTS_284 = h$r1.f; | |
switch (h$RTS_284.t) | |
{ | |
case (0): | |
return h$RTS_284; | |
case (1): | |
var h$RTS_286 = h$RTS_284.a; | |
var h$RTS_287 = (h$RTS_286 & 255); | |
if((4 === h$RTS_287)) | |
{ | |
h$r9 = h$stack[(h$sp - 8)]; | |
h$r8 = h$stack[(h$sp - 7)]; | |
h$r7 = h$stack[(h$sp - 6)]; | |
h$r6 = h$stack[(h$sp - 5)]; | |
h$r5 = h$stack[(h$sp - 4)]; | |
h$r4 = h$stack[(h$sp - 3)]; | |
h$r3 = h$stack[(h$sp - 2)]; | |
h$r2 = h$stack[(h$sp - 1)]; | |
h$sp -= 9; | |
return h$RTS_284; | |
} | |
else | |
{ | |
if((4 > h$RTS_287)) | |
{ | |
var h$RTS_288 = (h$RTS_286 >> 8); | |
switch (h$RTS_288) | |
{ | |
case (8): | |
h$r9 = h$stack[(h$sp - 8)]; | |
case (7): | |
h$r8 = h$stack[(h$sp - 7)]; | |
case (6): | |
h$r7 = h$stack[(h$sp - 6)]; | |
case (5): | |
h$r6 = h$stack[(h$sp - 5)]; | |
case (4): | |
h$r5 = h$stack[(h$sp - 4)]; | |
case (3): | |
h$r4 = h$stack[(h$sp - 3)]; | |
case (2): | |
h$r3 = h$stack[(h$sp - 2)]; | |
case (1): | |
h$r2 = h$stack[(h$sp - 1)]; | |
default: | |
}; | |
h$sp -= h$RTS_288; | |
var h$RTS_289 = h$apply[((4 - h$RTS_287) | ((8 - h$RTS_288) << 8))]; | |
h$stack[h$sp] = h$RTS_289; | |
return h$RTS_284; | |
} | |
else | |
{ | |
var h$RTS_285 = h$c10(h$pap_gen, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 2048) - 4), h$stack[(h$sp - 1)], | |
h$stack[(h$sp - 2)], h$stack[(h$sp - 3)], h$stack[(h$sp - 4)], h$stack[(h$sp - 5)], h$stack[(h$sp - 6)], | |
h$stack[(h$sp - 7)], h$stack[(h$sp - 8)]); | |
h$sp -= 9; | |
h$r1 = h$RTS_285; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_291 = h$r1.d2.d1; | |
var h$RTS_292 = (h$RTS_291 & 255); | |
if((4 === h$RTS_292)) | |
{ | |
h$r9 = h$stack[(h$sp - 8)]; | |
h$r8 = h$stack[(h$sp - 7)]; | |
h$r7 = h$stack[(h$sp - 6)]; | |
h$r6 = h$stack[(h$sp - 5)]; | |
h$r5 = h$stack[(h$sp - 4)]; | |
h$r4 = h$stack[(h$sp - 3)]; | |
h$r3 = h$stack[(h$sp - 2)]; | |
h$r2 = h$stack[(h$sp - 1)]; | |
h$sp -= 9; | |
return h$RTS_284; | |
} | |
else | |
{ | |
if((4 > h$RTS_292)) | |
{ | |
var h$RTS_293 = (h$RTS_291 >> 8); | |
switch (h$RTS_293) | |
{ | |
case (8): | |
h$r9 = h$stack[(h$sp - 8)]; | |
case (7): | |
h$r8 = h$stack[(h$sp - 7)]; | |
case (6): | |
h$r7 = h$stack[(h$sp - 6)]; | |
case (5): | |
h$r6 = h$stack[(h$sp - 5)]; | |
case (4): | |
h$r5 = h$stack[(h$sp - 4)]; | |
case (3): | |
h$r4 = h$stack[(h$sp - 3)]; | |
case (2): | |
h$r3 = h$stack[(h$sp - 2)]; | |
case (1): | |
h$r2 = h$stack[(h$sp - 1)]; | |
default: | |
}; | |
h$sp -= h$RTS_293; | |
var h$RTS_294 = h$apply[((4 - h$RTS_292) | ((8 - h$RTS_293) << 8))]; | |
h$stack[h$sp] = h$RTS_294; | |
return h$RTS_284; | |
} | |
else | |
{ | |
var h$RTS_290 = h$c10(h$pap_gen, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 2048) - 4), h$stack[(h$sp - 1)], | |
h$stack[(h$sp - 2)], h$stack[(h$sp - 3)], h$stack[(h$sp - 4)], h$stack[(h$sp - 5)], h$stack[(h$sp - 6)], | |
h$stack[(h$sp - 7)], h$stack[(h$sp - 8)]); | |
h$sp -= 9; | |
h$r1 = h$RTS_290; | |
return h$rs(); | |
}; | |
}; | |
case (5): | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("panic: h$ap_4_8, unexpected closure type: " + h$RTS_284.t)); | |
}; | |
}; | |
h$o(h$ap_4_8, (-1), 0, 8, 256, null); | |
function h$ap_1_0_fast() | |
{ | |
var h$RTS_295 = h$r1.f; | |
switch (h$RTS_295.t) | |
{ | |
case (1): | |
var h$RTS_296 = h$RTS_295.a; | |
var h$RTS_298 = (h$RTS_296 & 255); | |
if((1 === h$RTS_298)) | |
{ | |
return h$RTS_295; | |
} | |
else | |
{ | |
if((1 > h$RTS_298)) | |
{ | |
var h$RTS_299 = (h$RTS_296 >> 8); | |
var h$RTS_300 = (0 - h$RTS_299); | |
switch (h$RTS_299) | |
{ | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_300) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_300 << 8) | (1 - (h$RTS_296 & 255)))]; | |
return h$RTS_295; | |
} | |
else | |
{ | |
var h$RTS_297 = h$c3(h$pap_0, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 0) - 1), null); | |
h$r1 = h$RTS_297; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_301 = h$r1.d2.d1; | |
var h$RTS_303 = (h$RTS_301 & 255); | |
if((1 === h$RTS_303)) | |
{ | |
return h$RTS_295; | |
} | |
else | |
{ | |
if((1 > h$RTS_303)) | |
{ | |
var h$RTS_304 = (h$RTS_301 >> 8); | |
var h$RTS_305 = (0 - h$RTS_304); | |
switch (h$RTS_304) | |
{ | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_305) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_305 << 8) | (1 - (h$RTS_301 & 255)))]; | |
return h$RTS_295; | |
} | |
else | |
{ | |
var h$RTS_302 = h$c3(h$pap_0, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 0) - 1), null); | |
h$r1 = h$RTS_302; | |
return h$rs(); | |
}; | |
}; | |
case (0): | |
++h$sp; | |
h$stack[h$sp] = h$ap_1_0; | |
return h$RTS_295; | |
case (5): | |
++h$sp; | |
h$stack[h$sp] = h$ap_1_0; | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("h$ap_1_0_fast: unexpected closure type: " + h$RTS_295.t)); | |
}; | |
}; | |
function h$ap_1_1_fast() | |
{ | |
var h$RTS_306 = h$r1.f; | |
switch (h$RTS_306.t) | |
{ | |
case (1): | |
var h$RTS_307 = h$RTS_306.a; | |
var h$RTS_309 = (h$RTS_307 & 255); | |
if((1 === h$RTS_309)) | |
{ | |
return h$RTS_306; | |
} | |
else | |
{ | |
if((1 > h$RTS_309)) | |
{ | |
var h$RTS_310 = (h$RTS_307 >> 8); | |
var h$RTS_311 = (1 - h$RTS_310); | |
switch (h$RTS_310) | |
{ | |
case (0): | |
h$stack[(h$sp + 1)] = h$r2; | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_311) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_311 << 8) | (1 - (h$RTS_307 & 255)))]; | |
return h$RTS_306; | |
} | |
else | |
{ | |
var h$RTS_308 = h$c3(h$pap_1, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 256) - 1), h$r2); | |
h$r1 = h$RTS_308; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_312 = h$r1.d2.d1; | |
var h$RTS_314 = (h$RTS_312 & 255); | |
if((1 === h$RTS_314)) | |
{ | |
return h$RTS_306; | |
} | |
else | |
{ | |
if((1 > h$RTS_314)) | |
{ | |
var h$RTS_315 = (h$RTS_312 >> 8); | |
var h$RTS_316 = (1 - h$RTS_315); | |
switch (h$RTS_315) | |
{ | |
case (0): | |
h$stack[(h$sp + 1)] = h$r2; | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_316) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_316 << 8) | (1 - (h$RTS_312 & 255)))]; | |
return h$RTS_306; | |
} | |
else | |
{ | |
var h$RTS_313 = h$c3(h$pap_1, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 256) - 1), h$r2); | |
h$r1 = h$RTS_313; | |
return h$rs(); | |
}; | |
}; | |
case (0): | |
h$p2(h$r2, h$ap_1_1); | |
return h$RTS_306; | |
case (5): | |
h$p2(h$r2, h$ap_1_1); | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("h$ap_1_1_fast: unexpected closure type: " + h$RTS_306.t)); | |
}; | |
}; | |
function h$ap_1_2_fast() | |
{ | |
var h$RTS_317 = h$r1.f; | |
switch (h$RTS_317.t) | |
{ | |
case (1): | |
var h$RTS_318 = h$RTS_317.a; | |
var h$RTS_320 = (h$RTS_318 & 255); | |
if((1 === h$RTS_320)) | |
{ | |
return h$RTS_317; | |
} | |
else | |
{ | |
if((1 > h$RTS_320)) | |
{ | |
var h$RTS_321 = (h$RTS_318 >> 8); | |
var h$RTS_322 = (2 - h$RTS_321); | |
switch (h$RTS_321) | |
{ | |
case (0): | |
h$stack[(h$sp + 2)] = h$r2; | |
case (1): | |
h$stack[(h$sp + 1)] = h$r3; | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_322) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_322 << 8) | (1 - (h$RTS_318 & 255)))]; | |
return h$RTS_317; | |
} | |
else | |
{ | |
var h$RTS_319 = h$c4(h$pap_2, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 512) - 1), h$r2, h$r3); | |
h$r1 = h$RTS_319; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_323 = h$r1.d2.d1; | |
var h$RTS_325 = (h$RTS_323 & 255); | |
if((1 === h$RTS_325)) | |
{ | |
return h$RTS_317; | |
} | |
else | |
{ | |
if((1 > h$RTS_325)) | |
{ | |
var h$RTS_326 = (h$RTS_323 >> 8); | |
var h$RTS_327 = (2 - h$RTS_326); | |
switch (h$RTS_326) | |
{ | |
case (0): | |
h$stack[(h$sp + 2)] = h$r2; | |
case (1): | |
h$stack[(h$sp + 1)] = h$r3; | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_327) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_327 << 8) | (1 - (h$RTS_323 & 255)))]; | |
return h$RTS_317; | |
} | |
else | |
{ | |
var h$RTS_324 = h$c4(h$pap_2, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 512) - 1), h$r2, h$r3); | |
h$r1 = h$RTS_324; | |
return h$rs(); | |
}; | |
}; | |
case (0): | |
h$p3(h$r3, h$r2, h$ap_1_2); | |
return h$RTS_317; | |
case (5): | |
h$p3(h$r3, h$r2, h$ap_1_2); | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("h$ap_1_2_fast: unexpected closure type: " + h$RTS_317.t)); | |
}; | |
}; | |
function h$ap_2_1_fast() | |
{ | |
var h$RTS_328 = h$r1.f; | |
switch (h$RTS_328.t) | |
{ | |
case (1): | |
var h$RTS_329 = h$RTS_328.a; | |
var h$RTS_331 = (h$RTS_329 & 255); | |
if((2 === h$RTS_331)) | |
{ | |
return h$RTS_328; | |
} | |
else | |
{ | |
if((2 > h$RTS_331)) | |
{ | |
var h$RTS_332 = (h$RTS_329 >> 8); | |
var h$RTS_333 = (1 - h$RTS_332); | |
switch (h$RTS_332) | |
{ | |
case (0): | |
h$stack[(h$sp + 1)] = h$r2; | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_333) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_333 << 8) | (2 - (h$RTS_329 & 255)))]; | |
return h$RTS_328; | |
} | |
else | |
{ | |
var h$RTS_330 = h$c3(h$pap_1, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 256) - 2), h$r2); | |
h$r1 = h$RTS_330; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_334 = h$r1.d2.d1; | |
var h$RTS_336 = (h$RTS_334 & 255); | |
if((2 === h$RTS_336)) | |
{ | |
return h$RTS_328; | |
} | |
else | |
{ | |
if((2 > h$RTS_336)) | |
{ | |
var h$RTS_337 = (h$RTS_334 >> 8); | |
var h$RTS_338 = (1 - h$RTS_337); | |
switch (h$RTS_337) | |
{ | |
case (0): | |
h$stack[(h$sp + 1)] = h$r2; | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_338) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_338 << 8) | (2 - (h$RTS_334 & 255)))]; | |
return h$RTS_328; | |
} | |
else | |
{ | |
var h$RTS_335 = h$c3(h$pap_1, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 256) - 2), h$r2); | |
h$r1 = h$RTS_335; | |
return h$rs(); | |
}; | |
}; | |
case (0): | |
h$p2(h$r2, h$ap_2_1); | |
return h$RTS_328; | |
case (5): | |
h$p2(h$r2, h$ap_2_1); | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("h$ap_2_1_fast: unexpected closure type: " + h$RTS_328.t)); | |
}; | |
}; | |
function h$ap_2_2_fast() | |
{ | |
var h$RTS_339 = h$r1.f; | |
switch (h$RTS_339.t) | |
{ | |
case (1): | |
var h$RTS_340 = h$RTS_339.a; | |
var h$RTS_342 = (h$RTS_340 & 255); | |
if((2 === h$RTS_342)) | |
{ | |
return h$RTS_339; | |
} | |
else | |
{ | |
if((2 > h$RTS_342)) | |
{ | |
var h$RTS_343 = (h$RTS_340 >> 8); | |
var h$RTS_344 = (2 - h$RTS_343); | |
switch (h$RTS_343) | |
{ | |
case (0): | |
h$stack[(h$sp + 2)] = h$r2; | |
case (1): | |
h$stack[(h$sp + 1)] = h$r3; | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_344) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_344 << 8) | (2 - (h$RTS_340 & 255)))]; | |
return h$RTS_339; | |
} | |
else | |
{ | |
var h$RTS_341 = h$c4(h$pap_2, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 512) - 2), h$r2, h$r3); | |
h$r1 = h$RTS_341; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_345 = h$r1.d2.d1; | |
var h$RTS_347 = (h$RTS_345 & 255); | |
if((2 === h$RTS_347)) | |
{ | |
return h$RTS_339; | |
} | |
else | |
{ | |
if((2 > h$RTS_347)) | |
{ | |
var h$RTS_348 = (h$RTS_345 >> 8); | |
var h$RTS_349 = (2 - h$RTS_348); | |
switch (h$RTS_348) | |
{ | |
case (0): | |
h$stack[(h$sp + 2)] = h$r2; | |
case (1): | |
h$stack[(h$sp + 1)] = h$r3; | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_349) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_349 << 8) | (2 - (h$RTS_345 & 255)))]; | |
return h$RTS_339; | |
} | |
else | |
{ | |
var h$RTS_346 = h$c4(h$pap_2, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 512) - 2), h$r2, h$r3); | |
h$r1 = h$RTS_346; | |
return h$rs(); | |
}; | |
}; | |
case (0): | |
h$p3(h$r3, h$r2, h$ap_2_2); | |
return h$RTS_339; | |
case (5): | |
h$p3(h$r3, h$r2, h$ap_2_2); | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("h$ap_2_2_fast: unexpected closure type: " + h$RTS_339.t)); | |
}; | |
}; | |
function h$ap_2_3_fast() | |
{ | |
var h$RTS_350 = h$r1.f; | |
switch (h$RTS_350.t) | |
{ | |
case (1): | |
var h$RTS_351 = h$RTS_350.a; | |
var h$RTS_353 = (h$RTS_351 & 255); | |
if((2 === h$RTS_353)) | |
{ | |
return h$RTS_350; | |
} | |
else | |
{ | |
if((2 > h$RTS_353)) | |
{ | |
var h$RTS_354 = (h$RTS_351 >> 8); | |
var h$RTS_355 = (3 - h$RTS_354); | |
switch (h$RTS_354) | |
{ | |
case (0): | |
h$stack[(h$sp + 3)] = h$r2; | |
case (1): | |
h$stack[(h$sp + 2)] = h$r3; | |
case (2): | |
h$stack[(h$sp + 1)] = h$r4; | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_355) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_355 << 8) | (2 - (h$RTS_351 & 255)))]; | |
return h$RTS_350; | |
} | |
else | |
{ | |
var h$RTS_352 = h$c5(h$pap_3, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 768) - 2), h$r2, h$r3, h$r4); | |
h$r1 = h$RTS_352; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_356 = h$r1.d2.d1; | |
var h$RTS_358 = (h$RTS_356 & 255); | |
if((2 === h$RTS_358)) | |
{ | |
return h$RTS_350; | |
} | |
else | |
{ | |
if((2 > h$RTS_358)) | |
{ | |
var h$RTS_359 = (h$RTS_356 >> 8); | |
var h$RTS_360 = (3 - h$RTS_359); | |
switch (h$RTS_359) | |
{ | |
case (0): | |
h$stack[(h$sp + 3)] = h$r2; | |
case (1): | |
h$stack[(h$sp + 2)] = h$r3; | |
case (2): | |
h$stack[(h$sp + 1)] = h$r4; | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_360) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_360 << 8) | (2 - (h$RTS_356 & 255)))]; | |
return h$RTS_350; | |
} | |
else | |
{ | |
var h$RTS_357 = h$c5(h$pap_3, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 768) - 2), h$r2, h$r3, h$r4); | |
h$r1 = h$RTS_357; | |
return h$rs(); | |
}; | |
}; | |
case (0): | |
h$p4(h$r4, h$r3, h$r2, h$ap_2_3); | |
return h$RTS_350; | |
case (5): | |
h$p4(h$r4, h$r3, h$r2, h$ap_2_3); | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("h$ap_2_3_fast: unexpected closure type: " + h$RTS_350.t)); | |
}; | |
}; | |
function h$ap_2_4_fast() | |
{ | |
var h$RTS_361 = h$r1.f; | |
switch (h$RTS_361.t) | |
{ | |
case (1): | |
var h$RTS_362 = h$RTS_361.a; | |
var h$RTS_364 = (h$RTS_362 & 255); | |
if((2 === h$RTS_364)) | |
{ | |
return h$RTS_361; | |
} | |
else | |
{ | |
if((2 > h$RTS_364)) | |
{ | |
var h$RTS_365 = (h$RTS_362 >> 8); | |
var h$RTS_366 = (4 - h$RTS_365); | |
switch (h$RTS_365) | |
{ | |
case (0): | |
h$stack[(h$sp + 4)] = h$r2; | |
case (1): | |
h$stack[(h$sp + 3)] = h$r3; | |
case (2): | |
h$stack[(h$sp + 2)] = h$r4; | |
case (3): | |
h$stack[(h$sp + 1)] = h$r5; | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_366) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_366 << 8) | (2 - (h$RTS_362 & 255)))]; | |
return h$RTS_361; | |
} | |
else | |
{ | |
var h$RTS_363 = h$c6(h$pap_4, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 1024) - 2), h$r2, h$r3, h$r4, h$r5); | |
h$r1 = h$RTS_363; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_367 = h$r1.d2.d1; | |
var h$RTS_369 = (h$RTS_367 & 255); | |
if((2 === h$RTS_369)) | |
{ | |
return h$RTS_361; | |
} | |
else | |
{ | |
if((2 > h$RTS_369)) | |
{ | |
var h$RTS_370 = (h$RTS_367 >> 8); | |
var h$RTS_371 = (4 - h$RTS_370); | |
switch (h$RTS_370) | |
{ | |
case (0): | |
h$stack[(h$sp + 4)] = h$r2; | |
case (1): | |
h$stack[(h$sp + 3)] = h$r3; | |
case (2): | |
h$stack[(h$sp + 2)] = h$r4; | |
case (3): | |
h$stack[(h$sp + 1)] = h$r5; | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_371) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_371 << 8) | (2 - (h$RTS_367 & 255)))]; | |
return h$RTS_361; | |
} | |
else | |
{ | |
var h$RTS_368 = h$c6(h$pap_4, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 1024) - 2), h$r2, h$r3, h$r4, h$r5); | |
h$r1 = h$RTS_368; | |
return h$rs(); | |
}; | |
}; | |
case (0): | |
h$p5(h$r5, h$r4, h$r3, h$r2, h$ap_2_4); | |
return h$RTS_361; | |
case (5): | |
h$p5(h$r5, h$r4, h$r3, h$r2, h$ap_2_4); | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("h$ap_2_4_fast: unexpected closure type: " + h$RTS_361.t)); | |
}; | |
}; | |
function h$ap_3_2_fast() | |
{ | |
var h$RTS_372 = h$r1.f; | |
switch (h$RTS_372.t) | |
{ | |
case (1): | |
var h$RTS_373 = h$RTS_372.a; | |
var h$RTS_375 = (h$RTS_373 & 255); | |
if((3 === h$RTS_375)) | |
{ | |
return h$RTS_372; | |
} | |
else | |
{ | |
if((3 > h$RTS_375)) | |
{ | |
var h$RTS_376 = (h$RTS_373 >> 8); | |
var h$RTS_377 = (2 - h$RTS_376); | |
switch (h$RTS_376) | |
{ | |
case (0): | |
h$stack[(h$sp + 2)] = h$r2; | |
case (1): | |
h$stack[(h$sp + 1)] = h$r3; | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_377) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_377 << 8) | (3 - (h$RTS_373 & 255)))]; | |
return h$RTS_372; | |
} | |
else | |
{ | |
var h$RTS_374 = h$c4(h$pap_2, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 512) - 3), h$r2, h$r3); | |
h$r1 = h$RTS_374; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_378 = h$r1.d2.d1; | |
var h$RTS_380 = (h$RTS_378 & 255); | |
if((3 === h$RTS_380)) | |
{ | |
return h$RTS_372; | |
} | |
else | |
{ | |
if((3 > h$RTS_380)) | |
{ | |
var h$RTS_381 = (h$RTS_378 >> 8); | |
var h$RTS_382 = (2 - h$RTS_381); | |
switch (h$RTS_381) | |
{ | |
case (0): | |
h$stack[(h$sp + 2)] = h$r2; | |
case (1): | |
h$stack[(h$sp + 1)] = h$r3; | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_382) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_382 << 8) | (3 - (h$RTS_378 & 255)))]; | |
return h$RTS_372; | |
} | |
else | |
{ | |
var h$RTS_379 = h$c4(h$pap_2, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 512) - 3), h$r2, h$r3); | |
h$r1 = h$RTS_379; | |
return h$rs(); | |
}; | |
}; | |
case (0): | |
h$p3(h$r3, h$r2, h$ap_3_2); | |
return h$RTS_372; | |
case (5): | |
h$p3(h$r3, h$r2, h$ap_3_2); | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("h$ap_3_2_fast: unexpected closure type: " + h$RTS_372.t)); | |
}; | |
}; | |
function h$ap_3_3_fast() | |
{ | |
var h$RTS_383 = h$r1.f; | |
switch (h$RTS_383.t) | |
{ | |
case (1): | |
var h$RTS_384 = h$RTS_383.a; | |
var h$RTS_386 = (h$RTS_384 & 255); | |
if((3 === h$RTS_386)) | |
{ | |
return h$RTS_383; | |
} | |
else | |
{ | |
if((3 > h$RTS_386)) | |
{ | |
var h$RTS_387 = (h$RTS_384 >> 8); | |
var h$RTS_388 = (3 - h$RTS_387); | |
switch (h$RTS_387) | |
{ | |
case (0): | |
h$stack[(h$sp + 3)] = h$r2; | |
case (1): | |
h$stack[(h$sp + 2)] = h$r3; | |
case (2): | |
h$stack[(h$sp + 1)] = h$r4; | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_388) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_388 << 8) | (3 - (h$RTS_384 & 255)))]; | |
return h$RTS_383; | |
} | |
else | |
{ | |
var h$RTS_385 = h$c5(h$pap_3, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 768) - 3), h$r2, h$r3, h$r4); | |
h$r1 = h$RTS_385; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_389 = h$r1.d2.d1; | |
var h$RTS_391 = (h$RTS_389 & 255); | |
if((3 === h$RTS_391)) | |
{ | |
return h$RTS_383; | |
} | |
else | |
{ | |
if((3 > h$RTS_391)) | |
{ | |
var h$RTS_392 = (h$RTS_389 >> 8); | |
var h$RTS_393 = (3 - h$RTS_392); | |
switch (h$RTS_392) | |
{ | |
case (0): | |
h$stack[(h$sp + 3)] = h$r2; | |
case (1): | |
h$stack[(h$sp + 2)] = h$r3; | |
case (2): | |
h$stack[(h$sp + 1)] = h$r4; | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_393) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_393 << 8) | (3 - (h$RTS_389 & 255)))]; | |
return h$RTS_383; | |
} | |
else | |
{ | |
var h$RTS_390 = h$c5(h$pap_3, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 768) - 3), h$r2, h$r3, h$r4); | |
h$r1 = h$RTS_390; | |
return h$rs(); | |
}; | |
}; | |
case (0): | |
h$p4(h$r4, h$r3, h$r2, h$ap_3_3); | |
return h$RTS_383; | |
case (5): | |
h$p4(h$r4, h$r3, h$r2, h$ap_3_3); | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("h$ap_3_3_fast: unexpected closure type: " + h$RTS_383.t)); | |
}; | |
}; | |
function h$ap_3_4_fast() | |
{ | |
var h$RTS_394 = h$r1.f; | |
switch (h$RTS_394.t) | |
{ | |
case (1): | |
var h$RTS_395 = h$RTS_394.a; | |
var h$RTS_397 = (h$RTS_395 & 255); | |
if((3 === h$RTS_397)) | |
{ | |
return h$RTS_394; | |
} | |
else | |
{ | |
if((3 > h$RTS_397)) | |
{ | |
var h$RTS_398 = (h$RTS_395 >> 8); | |
var h$RTS_399 = (4 - h$RTS_398); | |
switch (h$RTS_398) | |
{ | |
case (0): | |
h$stack[(h$sp + 4)] = h$r2; | |
case (1): | |
h$stack[(h$sp + 3)] = h$r3; | |
case (2): | |
h$stack[(h$sp + 2)] = h$r4; | |
case (3): | |
h$stack[(h$sp + 1)] = h$r5; | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_399) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_399 << 8) | (3 - (h$RTS_395 & 255)))]; | |
return h$RTS_394; | |
} | |
else | |
{ | |
var h$RTS_396 = h$c6(h$pap_4, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 1024) - 3), h$r2, h$r3, h$r4, h$r5); | |
h$r1 = h$RTS_396; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_400 = h$r1.d2.d1; | |
var h$RTS_402 = (h$RTS_400 & 255); | |
if((3 === h$RTS_402)) | |
{ | |
return h$RTS_394; | |
} | |
else | |
{ | |
if((3 > h$RTS_402)) | |
{ | |
var h$RTS_403 = (h$RTS_400 >> 8); | |
var h$RTS_404 = (4 - h$RTS_403); | |
switch (h$RTS_403) | |
{ | |
case (0): | |
h$stack[(h$sp + 4)] = h$r2; | |
case (1): | |
h$stack[(h$sp + 3)] = h$r3; | |
case (2): | |
h$stack[(h$sp + 2)] = h$r4; | |
case (3): | |
h$stack[(h$sp + 1)] = h$r5; | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_404) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_404 << 8) | (3 - (h$RTS_400 & 255)))]; | |
return h$RTS_394; | |
} | |
else | |
{ | |
var h$RTS_401 = h$c6(h$pap_4, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 1024) - 3), h$r2, h$r3, h$r4, h$r5); | |
h$r1 = h$RTS_401; | |
return h$rs(); | |
}; | |
}; | |
case (0): | |
h$p5(h$r5, h$r4, h$r3, h$r2, h$ap_3_4); | |
return h$RTS_394; | |
case (5): | |
h$p5(h$r5, h$r4, h$r3, h$r2, h$ap_3_4); | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("h$ap_3_4_fast: unexpected closure type: " + h$RTS_394.t)); | |
}; | |
}; | |
function h$ap_3_5_fast() | |
{ | |
var h$RTS_405 = h$r1.f; | |
switch (h$RTS_405.t) | |
{ | |
case (1): | |
var h$RTS_406 = h$RTS_405.a; | |
var h$RTS_408 = (h$RTS_406 & 255); | |
if((3 === h$RTS_408)) | |
{ | |
return h$RTS_405; | |
} | |
else | |
{ | |
if((3 > h$RTS_408)) | |
{ | |
var h$RTS_409 = (h$RTS_406 >> 8); | |
var h$RTS_410 = (5 - h$RTS_409); | |
switch (h$RTS_409) | |
{ | |
case (0): | |
h$stack[(h$sp + 5)] = h$r2; | |
case (1): | |
h$stack[(h$sp + 4)] = h$r3; | |
case (2): | |
h$stack[(h$sp + 3)] = h$r4; | |
case (3): | |
h$stack[(h$sp + 2)] = h$r5; | |
case (4): | |
h$stack[(h$sp + 1)] = h$r6; | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_410) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_410 << 8) | (3 - (h$RTS_406 & 255)))]; | |
return h$RTS_405; | |
} | |
else | |
{ | |
var h$RTS_407 = h$c7(h$pap_5, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 1280) - 3), h$r2, h$r3, h$r4, h$r5, | |
h$r6); | |
h$r1 = h$RTS_407; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_411 = h$r1.d2.d1; | |
var h$RTS_413 = (h$RTS_411 & 255); | |
if((3 === h$RTS_413)) | |
{ | |
return h$RTS_405; | |
} | |
else | |
{ | |
if((3 > h$RTS_413)) | |
{ | |
var h$RTS_414 = (h$RTS_411 >> 8); | |
var h$RTS_415 = (5 - h$RTS_414); | |
switch (h$RTS_414) | |
{ | |
case (0): | |
h$stack[(h$sp + 5)] = h$r2; | |
case (1): | |
h$stack[(h$sp + 4)] = h$r3; | |
case (2): | |
h$stack[(h$sp + 3)] = h$r4; | |
case (3): | |
h$stack[(h$sp + 2)] = h$r5; | |
case (4): | |
h$stack[(h$sp + 1)] = h$r6; | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_415) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_415 << 8) | (3 - (h$RTS_411 & 255)))]; | |
return h$RTS_405; | |
} | |
else | |
{ | |
var h$RTS_412 = h$c7(h$pap_5, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 1280) - 3), h$r2, h$r3, h$r4, h$r5, | |
h$r6); | |
h$r1 = h$RTS_412; | |
return h$rs(); | |
}; | |
}; | |
case (0): | |
h$p6(h$r6, h$r5, h$r4, h$r3, h$r2, h$ap_3_5); | |
return h$RTS_405; | |
case (5): | |
h$p6(h$r6, h$r5, h$r4, h$r3, h$r2, h$ap_3_5); | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("h$ap_3_5_fast: unexpected closure type: " + h$RTS_405.t)); | |
}; | |
}; | |
function h$ap_3_6_fast() | |
{ | |
var h$RTS_416 = h$r1.f; | |
switch (h$RTS_416.t) | |
{ | |
case (1): | |
var h$RTS_417 = h$RTS_416.a; | |
var h$RTS_419 = (h$RTS_417 & 255); | |
if((3 === h$RTS_419)) | |
{ | |
return h$RTS_416; | |
} | |
else | |
{ | |
if((3 > h$RTS_419)) | |
{ | |
var h$RTS_420 = (h$RTS_417 >> 8); | |
var h$RTS_421 = (6 - h$RTS_420); | |
switch (h$RTS_420) | |
{ | |
case (0): | |
h$stack[(h$sp + 6)] = h$r2; | |
case (1): | |
h$stack[(h$sp + 5)] = h$r3; | |
case (2): | |
h$stack[(h$sp + 4)] = h$r4; | |
case (3): | |
h$stack[(h$sp + 3)] = h$r5; | |
case (4): | |
h$stack[(h$sp + 2)] = h$r6; | |
case (5): | |
h$stack[(h$sp + 1)] = h$r7; | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_421) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_421 << 8) | (3 - (h$RTS_417 & 255)))]; | |
return h$RTS_416; | |
} | |
else | |
{ | |
var h$RTS_418 = h$c8(h$pap_6, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 1536) - 3), h$r2, h$r3, h$r4, h$r5, | |
h$r6, h$r7); | |
h$r1 = h$RTS_418; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_422 = h$r1.d2.d1; | |
var h$RTS_424 = (h$RTS_422 & 255); | |
if((3 === h$RTS_424)) | |
{ | |
return h$RTS_416; | |
} | |
else | |
{ | |
if((3 > h$RTS_424)) | |
{ | |
var h$RTS_425 = (h$RTS_422 >> 8); | |
var h$RTS_426 = (6 - h$RTS_425); | |
switch (h$RTS_425) | |
{ | |
case (0): | |
h$stack[(h$sp + 6)] = h$r2; | |
case (1): | |
h$stack[(h$sp + 5)] = h$r3; | |
case (2): | |
h$stack[(h$sp + 4)] = h$r4; | |
case (3): | |
h$stack[(h$sp + 3)] = h$r5; | |
case (4): | |
h$stack[(h$sp + 2)] = h$r6; | |
case (5): | |
h$stack[(h$sp + 1)] = h$r7; | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_426) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_426 << 8) | (3 - (h$RTS_422 & 255)))]; | |
return h$RTS_416; | |
} | |
else | |
{ | |
var h$RTS_423 = h$c8(h$pap_6, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 1536) - 3), h$r2, h$r3, h$r4, h$r5, | |
h$r6, h$r7); | |
h$r1 = h$RTS_423; | |
return h$rs(); | |
}; | |
}; | |
case (0): | |
h$p7(h$r7, h$r6, h$r5, h$r4, h$r3, h$r2, h$ap_3_6); | |
return h$RTS_416; | |
case (5): | |
h$p7(h$r7, h$r6, h$r5, h$r4, h$r3, h$r2, h$ap_3_6); | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("h$ap_3_6_fast: unexpected closure type: " + h$RTS_416.t)); | |
}; | |
}; | |
function h$ap_4_3_fast() | |
{ | |
var h$RTS_427 = h$r1.f; | |
switch (h$RTS_427.t) | |
{ | |
case (1): | |
var h$RTS_428 = h$RTS_427.a; | |
var h$RTS_430 = (h$RTS_428 & 255); | |
if((4 === h$RTS_430)) | |
{ | |
return h$RTS_427; | |
} | |
else | |
{ | |
if((4 > h$RTS_430)) | |
{ | |
var h$RTS_431 = (h$RTS_428 >> 8); | |
var h$RTS_432 = (3 - h$RTS_431); | |
switch (h$RTS_431) | |
{ | |
case (0): | |
h$stack[(h$sp + 3)] = h$r2; | |
case (1): | |
h$stack[(h$sp + 2)] = h$r3; | |
case (2): | |
h$stack[(h$sp + 1)] = h$r4; | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_432) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_432 << 8) | (4 - (h$RTS_428 & 255)))]; | |
return h$RTS_427; | |
} | |
else | |
{ | |
var h$RTS_429 = h$c5(h$pap_3, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 768) - 4), h$r2, h$r3, h$r4); | |
h$r1 = h$RTS_429; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_433 = h$r1.d2.d1; | |
var h$RTS_435 = (h$RTS_433 & 255); | |
if((4 === h$RTS_435)) | |
{ | |
return h$RTS_427; | |
} | |
else | |
{ | |
if((4 > h$RTS_435)) | |
{ | |
var h$RTS_436 = (h$RTS_433 >> 8); | |
var h$RTS_437 = (3 - h$RTS_436); | |
switch (h$RTS_436) | |
{ | |
case (0): | |
h$stack[(h$sp + 3)] = h$r2; | |
case (1): | |
h$stack[(h$sp + 2)] = h$r3; | |
case (2): | |
h$stack[(h$sp + 1)] = h$r4; | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_437) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_437 << 8) | (4 - (h$RTS_433 & 255)))]; | |
return h$RTS_427; | |
} | |
else | |
{ | |
var h$RTS_434 = h$c5(h$pap_3, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 768) - 4), h$r2, h$r3, h$r4); | |
h$r1 = h$RTS_434; | |
return h$rs(); | |
}; | |
}; | |
case (0): | |
h$p4(h$r4, h$r3, h$r2, h$ap_4_3); | |
return h$RTS_427; | |
case (5): | |
h$p4(h$r4, h$r3, h$r2, h$ap_4_3); | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("h$ap_4_3_fast: unexpected closure type: " + h$RTS_427.t)); | |
}; | |
}; | |
function h$ap_4_4_fast() | |
{ | |
var h$RTS_438 = h$r1.f; | |
switch (h$RTS_438.t) | |
{ | |
case (1): | |
var h$RTS_439 = h$RTS_438.a; | |
var h$RTS_441 = (h$RTS_439 & 255); | |
if((4 === h$RTS_441)) | |
{ | |
return h$RTS_438; | |
} | |
else | |
{ | |
if((4 > h$RTS_441)) | |
{ | |
var h$RTS_442 = (h$RTS_439 >> 8); | |
var h$RTS_443 = (4 - h$RTS_442); | |
switch (h$RTS_442) | |
{ | |
case (0): | |
h$stack[(h$sp + 4)] = h$r2; | |
case (1): | |
h$stack[(h$sp + 3)] = h$r3; | |
case (2): | |
h$stack[(h$sp + 2)] = h$r4; | |
case (3): | |
h$stack[(h$sp + 1)] = h$r5; | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_443) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_443 << 8) | (4 - (h$RTS_439 & 255)))]; | |
return h$RTS_438; | |
} | |
else | |
{ | |
var h$RTS_440 = h$c6(h$pap_4, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 1024) - 4), h$r2, h$r3, h$r4, h$r5); | |
h$r1 = h$RTS_440; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_444 = h$r1.d2.d1; | |
var h$RTS_446 = (h$RTS_444 & 255); | |
if((4 === h$RTS_446)) | |
{ | |
return h$RTS_438; | |
} | |
else | |
{ | |
if((4 > h$RTS_446)) | |
{ | |
var h$RTS_447 = (h$RTS_444 >> 8); | |
var h$RTS_448 = (4 - h$RTS_447); | |
switch (h$RTS_447) | |
{ | |
case (0): | |
h$stack[(h$sp + 4)] = h$r2; | |
case (1): | |
h$stack[(h$sp + 3)] = h$r3; | |
case (2): | |
h$stack[(h$sp + 2)] = h$r4; | |
case (3): | |
h$stack[(h$sp + 1)] = h$r5; | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_448) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_448 << 8) | (4 - (h$RTS_444 & 255)))]; | |
return h$RTS_438; | |
} | |
else | |
{ | |
var h$RTS_445 = h$c6(h$pap_4, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 1024) - 4), h$r2, h$r3, h$r4, h$r5); | |
h$r1 = h$RTS_445; | |
return h$rs(); | |
}; | |
}; | |
case (0): | |
h$p5(h$r5, h$r4, h$r3, h$r2, h$ap_4_4); | |
return h$RTS_438; | |
case (5): | |
h$p5(h$r5, h$r4, h$r3, h$r2, h$ap_4_4); | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("h$ap_4_4_fast: unexpected closure type: " + h$RTS_438.t)); | |
}; | |
}; | |
function h$ap_4_5_fast() | |
{ | |
var h$RTS_449 = h$r1.f; | |
switch (h$RTS_449.t) | |
{ | |
case (1): | |
var h$RTS_450 = h$RTS_449.a; | |
var h$RTS_452 = (h$RTS_450 & 255); | |
if((4 === h$RTS_452)) | |
{ | |
return h$RTS_449; | |
} | |
else | |
{ | |
if((4 > h$RTS_452)) | |
{ | |
var h$RTS_453 = (h$RTS_450 >> 8); | |
var h$RTS_454 = (5 - h$RTS_453); | |
switch (h$RTS_453) | |
{ | |
case (0): | |
h$stack[(h$sp + 5)] = h$r2; | |
case (1): | |
h$stack[(h$sp + 4)] = h$r3; | |
case (2): | |
h$stack[(h$sp + 3)] = h$r4; | |
case (3): | |
h$stack[(h$sp + 2)] = h$r5; | |
case (4): | |
h$stack[(h$sp + 1)] = h$r6; | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_454) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_454 << 8) | (4 - (h$RTS_450 & 255)))]; | |
return h$RTS_449; | |
} | |
else | |
{ | |
var h$RTS_451 = h$c7(h$pap_5, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 1280) - 4), h$r2, h$r3, h$r4, h$r5, | |
h$r6); | |
h$r1 = h$RTS_451; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_455 = h$r1.d2.d1; | |
var h$RTS_457 = (h$RTS_455 & 255); | |
if((4 === h$RTS_457)) | |
{ | |
return h$RTS_449; | |
} | |
else | |
{ | |
if((4 > h$RTS_457)) | |
{ | |
var h$RTS_458 = (h$RTS_455 >> 8); | |
var h$RTS_459 = (5 - h$RTS_458); | |
switch (h$RTS_458) | |
{ | |
case (0): | |
h$stack[(h$sp + 5)] = h$r2; | |
case (1): | |
h$stack[(h$sp + 4)] = h$r3; | |
case (2): | |
h$stack[(h$sp + 3)] = h$r4; | |
case (3): | |
h$stack[(h$sp + 2)] = h$r5; | |
case (4): | |
h$stack[(h$sp + 1)] = h$r6; | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_459) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_459 << 8) | (4 - (h$RTS_455 & 255)))]; | |
return h$RTS_449; | |
} | |
else | |
{ | |
var h$RTS_456 = h$c7(h$pap_5, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 1280) - 4), h$r2, h$r3, h$r4, h$r5, | |
h$r6); | |
h$r1 = h$RTS_456; | |
return h$rs(); | |
}; | |
}; | |
case (0): | |
h$p6(h$r6, h$r5, h$r4, h$r3, h$r2, h$ap_4_5); | |
return h$RTS_449; | |
case (5): | |
h$p6(h$r6, h$r5, h$r4, h$r3, h$r2, h$ap_4_5); | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("h$ap_4_5_fast: unexpected closure type: " + h$RTS_449.t)); | |
}; | |
}; | |
function h$ap_4_6_fast() | |
{ | |
var h$RTS_460 = h$r1.f; | |
switch (h$RTS_460.t) | |
{ | |
case (1): | |
var h$RTS_461 = h$RTS_460.a; | |
var h$RTS_463 = (h$RTS_461 & 255); | |
if((4 === h$RTS_463)) | |
{ | |
return h$RTS_460; | |
} | |
else | |
{ | |
if((4 > h$RTS_463)) | |
{ | |
var h$RTS_464 = (h$RTS_461 >> 8); | |
var h$RTS_465 = (6 - h$RTS_464); | |
switch (h$RTS_464) | |
{ | |
case (0): | |
h$stack[(h$sp + 6)] = h$r2; | |
case (1): | |
h$stack[(h$sp + 5)] = h$r3; | |
case (2): | |
h$stack[(h$sp + 4)] = h$r4; | |
case (3): | |
h$stack[(h$sp + 3)] = h$r5; | |
case (4): | |
h$stack[(h$sp + 2)] = h$r6; | |
case (5): | |
h$stack[(h$sp + 1)] = h$r7; | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_465) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_465 << 8) | (4 - (h$RTS_461 & 255)))]; | |
return h$RTS_460; | |
} | |
else | |
{ | |
var h$RTS_462 = h$c8(h$pap_6, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 1536) - 4), h$r2, h$r3, h$r4, h$r5, | |
h$r6, h$r7); | |
h$r1 = h$RTS_462; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_466 = h$r1.d2.d1; | |
var h$RTS_468 = (h$RTS_466 & 255); | |
if((4 === h$RTS_468)) | |
{ | |
return h$RTS_460; | |
} | |
else | |
{ | |
if((4 > h$RTS_468)) | |
{ | |
var h$RTS_469 = (h$RTS_466 >> 8); | |
var h$RTS_470 = (6 - h$RTS_469); | |
switch (h$RTS_469) | |
{ | |
case (0): | |
h$stack[(h$sp + 6)] = h$r2; | |
case (1): | |
h$stack[(h$sp + 5)] = h$r3; | |
case (2): | |
h$stack[(h$sp + 4)] = h$r4; | |
case (3): | |
h$stack[(h$sp + 3)] = h$r5; | |
case (4): | |
h$stack[(h$sp + 2)] = h$r6; | |
case (5): | |
h$stack[(h$sp + 1)] = h$r7; | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_470) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_470 << 8) | (4 - (h$RTS_466 & 255)))]; | |
return h$RTS_460; | |
} | |
else | |
{ | |
var h$RTS_467 = h$c8(h$pap_6, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 1536) - 4), h$r2, h$r3, h$r4, h$r5, | |
h$r6, h$r7); | |
h$r1 = h$RTS_467; | |
return h$rs(); | |
}; | |
}; | |
case (0): | |
h$p7(h$r7, h$r6, h$r5, h$r4, h$r3, h$r2, h$ap_4_6); | |
return h$RTS_460; | |
case (5): | |
h$p7(h$r7, h$r6, h$r5, h$r4, h$r3, h$r2, h$ap_4_6); | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("h$ap_4_6_fast: unexpected closure type: " + h$RTS_460.t)); | |
}; | |
}; | |
function h$ap_4_7_fast() | |
{ | |
var h$RTS_471 = h$r1.f; | |
switch (h$RTS_471.t) | |
{ | |
case (1): | |
var h$RTS_472 = h$RTS_471.a; | |
var h$RTS_474 = (h$RTS_472 & 255); | |
if((4 === h$RTS_474)) | |
{ | |
return h$RTS_471; | |
} | |
else | |
{ | |
if((4 > h$RTS_474)) | |
{ | |
var h$RTS_475 = (h$RTS_472 >> 8); | |
var h$RTS_476 = (7 - h$RTS_475); | |
switch (h$RTS_475) | |
{ | |
case (0): | |
h$stack[(h$sp + 7)] = h$r2; | |
case (1): | |
h$stack[(h$sp + 6)] = h$r3; | |
case (2): | |
h$stack[(h$sp + 5)] = h$r4; | |
case (3): | |
h$stack[(h$sp + 4)] = h$r5; | |
case (4): | |
h$stack[(h$sp + 3)] = h$r6; | |
case (5): | |
h$stack[(h$sp + 2)] = h$r7; | |
case (6): | |
h$stack[(h$sp + 1)] = h$r8; | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_476) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_476 << 8) | (4 - (h$RTS_472 & 255)))]; | |
return h$RTS_471; | |
} | |
else | |
{ | |
var h$RTS_473 = h$c9(h$pap_gen, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 1792) - 4), h$r2, h$r3, h$r4, h$r5, | |
h$r6, h$r7, h$r8); | |
h$r1 = h$RTS_473; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_477 = h$r1.d2.d1; | |
var h$RTS_479 = (h$RTS_477 & 255); | |
if((4 === h$RTS_479)) | |
{ | |
return h$RTS_471; | |
} | |
else | |
{ | |
if((4 > h$RTS_479)) | |
{ | |
var h$RTS_480 = (h$RTS_477 >> 8); | |
var h$RTS_481 = (7 - h$RTS_480); | |
switch (h$RTS_480) | |
{ | |
case (0): | |
h$stack[(h$sp + 7)] = h$r2; | |
case (1): | |
h$stack[(h$sp + 6)] = h$r3; | |
case (2): | |
h$stack[(h$sp + 5)] = h$r4; | |
case (3): | |
h$stack[(h$sp + 4)] = h$r5; | |
case (4): | |
h$stack[(h$sp + 3)] = h$r6; | |
case (5): | |
h$stack[(h$sp + 2)] = h$r7; | |
case (6): | |
h$stack[(h$sp + 1)] = h$r8; | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_481) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_481 << 8) | (4 - (h$RTS_477 & 255)))]; | |
return h$RTS_471; | |
} | |
else | |
{ | |
var h$RTS_478 = h$c9(h$pap_gen, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 1792) - 4), h$r2, h$r3, h$r4, h$r5, | |
h$r6, h$r7, h$r8); | |
h$r1 = h$RTS_478; | |
return h$rs(); | |
}; | |
}; | |
case (0): | |
h$p8(h$r8, h$r7, h$r6, h$r5, h$r4, h$r3, h$r2, h$ap_4_7); | |
return h$RTS_471; | |
case (5): | |
h$p8(h$r8, h$r7, h$r6, h$r5, h$r4, h$r3, h$r2, h$ap_4_7); | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("h$ap_4_7_fast: unexpected closure type: " + h$RTS_471.t)); | |
}; | |
}; | |
function h$ap_4_8_fast() | |
{ | |
var h$RTS_482 = h$r1.f; | |
switch (h$RTS_482.t) | |
{ | |
case (1): | |
var h$RTS_483 = h$RTS_482.a; | |
var h$RTS_485 = (h$RTS_483 & 255); | |
if((4 === h$RTS_485)) | |
{ | |
return h$RTS_482; | |
} | |
else | |
{ | |
if((4 > h$RTS_485)) | |
{ | |
var h$RTS_486 = (h$RTS_483 >> 8); | |
var h$RTS_487 = (8 - h$RTS_486); | |
switch (h$RTS_486) | |
{ | |
case (0): | |
h$stack[(h$sp + 8)] = h$r2; | |
case (1): | |
h$stack[(h$sp + 7)] = h$r3; | |
case (2): | |
h$stack[(h$sp + 6)] = h$r4; | |
case (3): | |
h$stack[(h$sp + 5)] = h$r5; | |
case (4): | |
h$stack[(h$sp + 4)] = h$r6; | |
case (5): | |
h$stack[(h$sp + 3)] = h$r7; | |
case (6): | |
h$stack[(h$sp + 2)] = h$r8; | |
case (7): | |
h$stack[(h$sp + 1)] = h$r9; | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_487) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_487 << 8) | (4 - (h$RTS_483 & 255)))]; | |
return h$RTS_482; | |
} | |
else | |
{ | |
var h$RTS_484 = h$c10(h$pap_gen, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 2048) - 4), h$r2, h$r3, h$r4, | |
h$r5, h$r6, h$r7, h$r8, h$r9); | |
h$r1 = h$RTS_484; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_488 = h$r1.d2.d1; | |
var h$RTS_490 = (h$RTS_488 & 255); | |
if((4 === h$RTS_490)) | |
{ | |
return h$RTS_482; | |
} | |
else | |
{ | |
if((4 > h$RTS_490)) | |
{ | |
var h$RTS_491 = (h$RTS_488 >> 8); | |
var h$RTS_492 = (8 - h$RTS_491); | |
switch (h$RTS_491) | |
{ | |
case (0): | |
h$stack[(h$sp + 8)] = h$r2; | |
case (1): | |
h$stack[(h$sp + 7)] = h$r3; | |
case (2): | |
h$stack[(h$sp + 6)] = h$r4; | |
case (3): | |
h$stack[(h$sp + 5)] = h$r5; | |
case (4): | |
h$stack[(h$sp + 4)] = h$r6; | |
case (5): | |
h$stack[(h$sp + 3)] = h$r7; | |
case (6): | |
h$stack[(h$sp + 2)] = h$r8; | |
case (7): | |
h$stack[(h$sp + 1)] = h$r9; | |
default: | |
}; | |
h$sp = ((h$sp + h$RTS_492) + 1); | |
h$stack[h$sp] = h$apply[((h$RTS_492 << 8) | (4 - (h$RTS_488 & 255)))]; | |
return h$RTS_482; | |
} | |
else | |
{ | |
var h$RTS_489 = h$c10(h$pap_gen, h$r1, ((((h$r1.f.t === 1) ? h$r1.f.a : h$r1.d2.d1) - 2048) - 4), h$r2, h$r3, h$r4, | |
h$r5, h$r6, h$r7, h$r8, h$r9); | |
h$r1 = h$RTS_489; | |
return h$rs(); | |
}; | |
}; | |
case (0): | |
h$p9(h$r9, h$r8, h$r7, h$r6, h$r5, h$r4, h$r3, h$r2, h$ap_4_8); | |
return h$RTS_482; | |
case (5): | |
h$p9(h$r9, h$r8, h$r7, h$r6, h$r5, h$r4, h$r3, h$r2, h$ap_4_8); | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("h$ap_4_8_fast: unexpected closure type: " + h$RTS_482.t)); | |
}; | |
}; | |
function h$pap_0() | |
{ | |
var h$RTS_493 = h$r1.d1; | |
var h$RTS_494 = h$r1.d2; | |
var h$RTS_495 = h$RTS_493.f; | |
var h$RTS_496 = ((((h$RTS_495.t === 1) ? h$RTS_495.a : h$RTS_493.d2.d1) >> 8) - 0); | |
switch (h$RTS_496) | |
{ | |
case (127): | |
h$regs[95] = h$regs[95]; | |
case (126): | |
h$regs[94] = h$regs[94]; | |
case (125): | |
h$regs[93] = h$regs[93]; | |
case (124): | |
h$regs[92] = h$regs[92]; | |
case (123): | |
h$regs[91] = h$regs[91]; | |
case (122): | |
h$regs[90] = h$regs[90]; | |
case (121): | |
h$regs[89] = h$regs[89]; | |
case (120): | |
h$regs[88] = h$regs[88]; | |
case (119): | |
h$regs[87] = h$regs[87]; | |
case (118): | |
h$regs[86] = h$regs[86]; | |
case (117): | |
h$regs[85] = h$regs[85]; | |
case (116): | |
h$regs[84] = h$regs[84]; | |
case (115): | |
h$regs[83] = h$regs[83]; | |
case (114): | |
h$regs[82] = h$regs[82]; | |
case (113): | |
h$regs[81] = h$regs[81]; | |
case (112): | |
h$regs[80] = h$regs[80]; | |
case (111): | |
h$regs[79] = h$regs[79]; | |
case (110): | |
h$regs[78] = h$regs[78]; | |
case (109): | |
h$regs[77] = h$regs[77]; | |
case (108): | |
h$regs[76] = h$regs[76]; | |
case (107): | |
h$regs[75] = h$regs[75]; | |
case (106): | |
h$regs[74] = h$regs[74]; | |
case (105): | |
h$regs[73] = h$regs[73]; | |
case (104): | |
h$regs[72] = h$regs[72]; | |
case (103): | |
h$regs[71] = h$regs[71]; | |
case (102): | |
h$regs[70] = h$regs[70]; | |
case (101): | |
h$regs[69] = h$regs[69]; | |
case (100): | |
h$regs[68] = h$regs[68]; | |
case (99): | |
h$regs[67] = h$regs[67]; | |
case (98): | |
h$regs[66] = h$regs[66]; | |
case (97): | |
h$regs[65] = h$regs[65]; | |
case (96): | |
h$regs[64] = h$regs[64]; | |
case (95): | |
h$regs[63] = h$regs[63]; | |
case (94): | |
h$regs[62] = h$regs[62]; | |
case (93): | |
h$regs[61] = h$regs[61]; | |
case (92): | |
h$regs[60] = h$regs[60]; | |
case (91): | |
h$regs[59] = h$regs[59]; | |
case (90): | |
h$regs[58] = h$regs[58]; | |
case (89): | |
h$regs[57] = h$regs[57]; | |
case (88): | |
h$regs[56] = h$regs[56]; | |
case (87): | |
h$regs[55] = h$regs[55]; | |
case (86): | |
h$regs[54] = h$regs[54]; | |
case (85): | |
h$regs[53] = h$regs[53]; | |
case (84): | |
h$regs[52] = h$regs[52]; | |
case (83): | |
h$regs[51] = h$regs[51]; | |
case (82): | |
h$regs[50] = h$regs[50]; | |
case (81): | |
h$regs[49] = h$regs[49]; | |
case (80): | |
h$regs[48] = h$regs[48]; | |
case (79): | |
h$regs[47] = h$regs[47]; | |
case (78): | |
h$regs[46] = h$regs[46]; | |
case (77): | |
h$regs[45] = h$regs[45]; | |
case (76): | |
h$regs[44] = h$regs[44]; | |
case (75): | |
h$regs[43] = h$regs[43]; | |
case (74): | |
h$regs[42] = h$regs[42]; | |
case (73): | |
h$regs[41] = h$regs[41]; | |
case (72): | |
h$regs[40] = h$regs[40]; | |
case (71): | |
h$regs[39] = h$regs[39]; | |
case (70): | |
h$regs[38] = h$regs[38]; | |
case (69): | |
h$regs[37] = h$regs[37]; | |
case (68): | |
h$regs[36] = h$regs[36]; | |
case (67): | |
h$regs[35] = h$regs[35]; | |
case (66): | |
h$regs[34] = h$regs[34]; | |
case (65): | |
h$regs[33] = h$regs[33]; | |
case (64): | |
h$regs[32] = h$regs[32]; | |
case (63): | |
h$regs[31] = h$regs[31]; | |
case (62): | |
h$regs[30] = h$regs[30]; | |
case (61): | |
h$regs[29] = h$regs[29]; | |
case (60): | |
h$regs[28] = h$regs[28]; | |
case (59): | |
h$regs[27] = h$regs[27]; | |
case (58): | |
h$regs[26] = h$regs[26]; | |
case (57): | |
h$regs[25] = h$regs[25]; | |
case (56): | |
h$regs[24] = h$regs[24]; | |
case (55): | |
h$regs[23] = h$regs[23]; | |
case (54): | |
h$regs[22] = h$regs[22]; | |
case (53): | |
h$regs[21] = h$regs[21]; | |
case (52): | |
h$regs[20] = h$regs[20]; | |
case (51): | |
h$regs[19] = h$regs[19]; | |
case (50): | |
h$regs[18] = h$regs[18]; | |
case (49): | |
h$regs[17] = h$regs[17]; | |
case (48): | |
h$regs[16] = h$regs[16]; | |
case (47): | |
h$regs[15] = h$regs[15]; | |
case (46): | |
h$regs[14] = h$regs[14]; | |
case (45): | |
h$regs[13] = h$regs[13]; | |
case (44): | |
h$regs[12] = h$regs[12]; | |
case (43): | |
h$regs[11] = h$regs[11]; | |
case (42): | |
h$regs[10] = h$regs[10]; | |
case (41): | |
h$regs[9] = h$regs[9]; | |
case (40): | |
h$regs[8] = h$regs[8]; | |
case (39): | |
h$regs[7] = h$regs[7]; | |
case (38): | |
h$regs[6] = h$regs[6]; | |
case (37): | |
h$regs[5] = h$regs[5]; | |
case (36): | |
h$regs[4] = h$regs[4]; | |
case (35): | |
h$regs[3] = h$regs[3]; | |
case (34): | |
h$regs[2] = h$regs[2]; | |
case (33): | |
h$regs[1] = h$regs[1]; | |
case (32): | |
h$regs[0] = h$regs[0]; | |
case (31): | |
h$r32 = h$r32; | |
case (30): | |
h$r31 = h$r31; | |
case (29): | |
h$r30 = h$r30; | |
case (28): | |
h$r29 = h$r29; | |
case (27): | |
h$r28 = h$r28; | |
case (26): | |
h$r27 = h$r27; | |
case (25): | |
h$r26 = h$r26; | |
case (24): | |
h$r25 = h$r25; | |
case (23): | |
h$r24 = h$r24; | |
case (22): | |
h$r23 = h$r23; | |
case (21): | |
h$r22 = h$r22; | |
case (20): | |
h$r21 = h$r21; | |
case (19): | |
h$r20 = h$r20; | |
case (18): | |
h$r19 = h$r19; | |
case (17): | |
h$r18 = h$r18; | |
case (16): | |
h$r17 = h$r17; | |
case (15): | |
h$r16 = h$r16; | |
case (14): | |
h$r15 = h$r15; | |
case (13): | |
h$r14 = h$r14; | |
case (12): | |
h$r13 = h$r13; | |
case (11): | |
h$r12 = h$r12; | |
case (10): | |
h$r11 = h$r11; | |
case (9): | |
h$r10 = h$r10; | |
case (8): | |
h$r9 = h$r9; | |
case (7): | |
h$r8 = h$r8; | |
case (6): | |
h$r7 = h$r7; | |
case (5): | |
h$r6 = h$r6; | |
case (4): | |
h$r5 = h$r5; | |
case (3): | |
h$r4 = h$r4; | |
case (2): | |
h$r3 = h$r3; | |
case (1): | |
h$r2 = h$r2; | |
default: | |
}; | |
h$r1 = h$RTS_493; | |
return h$RTS_495; | |
}; | |
h$o(h$pap_0, 3, 0, 2, (-1), null); | |
function h$pap_1() | |
{ | |
var h$RTS_497 = h$r1.d1; | |
var h$RTS_498 = h$r1.d2; | |
var h$RTS_499 = h$RTS_497.f; | |
var h$RTS_500 = ((((h$RTS_499.t === 1) ? h$RTS_499.a : h$RTS_497.d2.d1) >> 8) - 1); | |
switch (h$RTS_500) | |
{ | |
case (126): | |
h$regs[95] = h$regs[94]; | |
case (125): | |
h$regs[94] = h$regs[93]; | |
case (124): | |
h$regs[93] = h$regs[92]; | |
case (123): | |
h$regs[92] = h$regs[91]; | |
case (122): | |
h$regs[91] = h$regs[90]; | |
case (121): | |
h$regs[90] = h$regs[89]; | |
case (120): | |
h$regs[89] = h$regs[88]; | |
case (119): | |
h$regs[88] = h$regs[87]; | |
case (118): | |
h$regs[87] = h$regs[86]; | |
case (117): | |
h$regs[86] = h$regs[85]; | |
case (116): | |
h$regs[85] = h$regs[84]; | |
case (115): | |
h$regs[84] = h$regs[83]; | |
case (114): | |
h$regs[83] = h$regs[82]; | |
case (113): | |
h$regs[82] = h$regs[81]; | |
case (112): | |
h$regs[81] = h$regs[80]; | |
case (111): | |
h$regs[80] = h$regs[79]; | |
case (110): | |
h$regs[79] = h$regs[78]; | |
case (109): | |
h$regs[78] = h$regs[77]; | |
case (108): | |
h$regs[77] = h$regs[76]; | |
case (107): | |
h$regs[76] = h$regs[75]; | |
case (106): | |
h$regs[75] = h$regs[74]; | |
case (105): | |
h$regs[74] = h$regs[73]; | |
case (104): | |
h$regs[73] = h$regs[72]; | |
case (103): | |
h$regs[72] = h$regs[71]; | |
case (102): | |
h$regs[71] = h$regs[70]; | |
case (101): | |
h$regs[70] = h$regs[69]; | |
case (100): | |
h$regs[69] = h$regs[68]; | |
case (99): | |
h$regs[68] = h$regs[67]; | |
case (98): | |
h$regs[67] = h$regs[66]; | |
case (97): | |
h$regs[66] = h$regs[65]; | |
case (96): | |
h$regs[65] = h$regs[64]; | |
case (95): | |
h$regs[64] = h$regs[63]; | |
case (94): | |
h$regs[63] = h$regs[62]; | |
case (93): | |
h$regs[62] = h$regs[61]; | |
case (92): | |
h$regs[61] = h$regs[60]; | |
case (91): | |
h$regs[60] = h$regs[59]; | |
case (90): | |
h$regs[59] = h$regs[58]; | |
case (89): | |
h$regs[58] = h$regs[57]; | |
case (88): | |
h$regs[57] = h$regs[56]; | |
case (87): | |
h$regs[56] = h$regs[55]; | |
case (86): | |
h$regs[55] = h$regs[54]; | |
case (85): | |
h$regs[54] = h$regs[53]; | |
case (84): | |
h$regs[53] = h$regs[52]; | |
case (83): | |
h$regs[52] = h$regs[51]; | |
case (82): | |
h$regs[51] = h$regs[50]; | |
case (81): | |
h$regs[50] = h$regs[49]; | |
case (80): | |
h$regs[49] = h$regs[48]; | |
case (79): | |
h$regs[48] = h$regs[47]; | |
case (78): | |
h$regs[47] = h$regs[46]; | |
case (77): | |
h$regs[46] = h$regs[45]; | |
case (76): | |
h$regs[45] = h$regs[44]; | |
case (75): | |
h$regs[44] = h$regs[43]; | |
case (74): | |
h$regs[43] = h$regs[42]; | |
case (73): | |
h$regs[42] = h$regs[41]; | |
case (72): | |
h$regs[41] = h$regs[40]; | |
case (71): | |
h$regs[40] = h$regs[39]; | |
case (70): | |
h$regs[39] = h$regs[38]; | |
case (69): | |
h$regs[38] = h$regs[37]; | |
case (68): | |
h$regs[37] = h$regs[36]; | |
case (67): | |
h$regs[36] = h$regs[35]; | |
case (66): | |
h$regs[35] = h$regs[34]; | |
case (65): | |
h$regs[34] = h$regs[33]; | |
case (64): | |
h$regs[33] = h$regs[32]; | |
case (63): | |
h$regs[32] = h$regs[31]; | |
case (62): | |
h$regs[31] = h$regs[30]; | |
case (61): | |
h$regs[30] = h$regs[29]; | |
case (60): | |
h$regs[29] = h$regs[28]; | |
case (59): | |
h$regs[28] = h$regs[27]; | |
case (58): | |
h$regs[27] = h$regs[26]; | |
case (57): | |
h$regs[26] = h$regs[25]; | |
case (56): | |
h$regs[25] = h$regs[24]; | |
case (55): | |
h$regs[24] = h$regs[23]; | |
case (54): | |
h$regs[23] = h$regs[22]; | |
case (53): | |
h$regs[22] = h$regs[21]; | |
case (52): | |
h$regs[21] = h$regs[20]; | |
case (51): | |
h$regs[20] = h$regs[19]; | |
case (50): | |
h$regs[19] = h$regs[18]; | |
case (49): | |
h$regs[18] = h$regs[17]; | |
case (48): | |
h$regs[17] = h$regs[16]; | |
case (47): | |
h$regs[16] = h$regs[15]; | |
case (46): | |
h$regs[15] = h$regs[14]; | |
case (45): | |
h$regs[14] = h$regs[13]; | |
case (44): | |
h$regs[13] = h$regs[12]; | |
case (43): | |
h$regs[12] = h$regs[11]; | |
case (42): | |
h$regs[11] = h$regs[10]; | |
case (41): | |
h$regs[10] = h$regs[9]; | |
case (40): | |
h$regs[9] = h$regs[8]; | |
case (39): | |
h$regs[8] = h$regs[7]; | |
case (38): | |
h$regs[7] = h$regs[6]; | |
case (37): | |
h$regs[6] = h$regs[5]; | |
case (36): | |
h$regs[5] = h$regs[4]; | |
case (35): | |
h$regs[4] = h$regs[3]; | |
case (34): | |
h$regs[3] = h$regs[2]; | |
case (33): | |
h$regs[2] = h$regs[1]; | |
case (32): | |
h$regs[1] = h$regs[0]; | |
case (31): | |
h$regs[0] = h$r32; | |
case (30): | |
h$r32 = h$r31; | |
case (29): | |
h$r31 = h$r30; | |
case (28): | |
h$r30 = h$r29; | |
case (27): | |
h$r29 = h$r28; | |
case (26): | |
h$r28 = h$r27; | |
case (25): | |
h$r27 = h$r26; | |
case (24): | |
h$r26 = h$r25; | |
case (23): | |
h$r25 = h$r24; | |
case (22): | |
h$r24 = h$r23; | |
case (21): | |
h$r23 = h$r22; | |
case (20): | |
h$r22 = h$r21; | |
case (19): | |
h$r21 = h$r20; | |
case (18): | |
h$r20 = h$r19; | |
case (17): | |
h$r19 = h$r18; | |
case (16): | |
h$r18 = h$r17; | |
case (15): | |
h$r17 = h$r16; | |
case (14): | |
h$r16 = h$r15; | |
case (13): | |
h$r15 = h$r14; | |
case (12): | |
h$r14 = h$r13; | |
case (11): | |
h$r13 = h$r12; | |
case (10): | |
h$r12 = h$r11; | |
case (9): | |
h$r11 = h$r10; | |
case (8): | |
h$r10 = h$r9; | |
case (7): | |
h$r9 = h$r8; | |
case (6): | |
h$r8 = h$r7; | |
case (5): | |
h$r7 = h$r6; | |
case (4): | |
h$r6 = h$r5; | |
case (3): | |
h$r5 = h$r4; | |
case (2): | |
h$r4 = h$r3; | |
case (1): | |
h$r3 = h$r2; | |
default: | |
}; | |
h$r2 = h$RTS_498.d2; | |
h$r1 = h$RTS_497; | |
return h$RTS_499; | |
}; | |
h$o(h$pap_1, 3, 0, 3, (-1), null); | |
function h$pap_2() | |
{ | |
var h$RTS_501 = h$r1.d1; | |
var h$RTS_502 = h$r1.d2; | |
var h$RTS_503 = h$RTS_501.f; | |
var h$RTS_504 = ((((h$RTS_503.t === 1) ? h$RTS_503.a : h$RTS_501.d2.d1) >> 8) - 2); | |
switch (h$RTS_504) | |
{ | |
case (125): | |
h$regs[95] = h$regs[93]; | |
case (124): | |
h$regs[94] = h$regs[92]; | |
case (123): | |
h$regs[93] = h$regs[91]; | |
case (122): | |
h$regs[92] = h$regs[90]; | |
case (121): | |
h$regs[91] = h$regs[89]; | |
case (120): | |
h$regs[90] = h$regs[88]; | |
case (119): | |
h$regs[89] = h$regs[87]; | |
case (118): | |
h$regs[88] = h$regs[86]; | |
case (117): | |
h$regs[87] = h$regs[85]; | |
case (116): | |
h$regs[86] = h$regs[84]; | |
case (115): | |
h$regs[85] = h$regs[83]; | |
case (114): | |
h$regs[84] = h$regs[82]; | |
case (113): | |
h$regs[83] = h$regs[81]; | |
case (112): | |
h$regs[82] = h$regs[80]; | |
case (111): | |
h$regs[81] = h$regs[79]; | |
case (110): | |
h$regs[80] = h$regs[78]; | |
case (109): | |
h$regs[79] = h$regs[77]; | |
case (108): | |
h$regs[78] = h$regs[76]; | |
case (107): | |
h$regs[77] = h$regs[75]; | |
case (106): | |
h$regs[76] = h$regs[74]; | |
case (105): | |
h$regs[75] = h$regs[73]; | |
case (104): | |
h$regs[74] = h$regs[72]; | |
case (103): | |
h$regs[73] = h$regs[71]; | |
case (102): | |
h$regs[72] = h$regs[70]; | |
case (101): | |
h$regs[71] = h$regs[69]; | |
case (100): | |
h$regs[70] = h$regs[68]; | |
case (99): | |
h$regs[69] = h$regs[67]; | |
case (98): | |
h$regs[68] = h$regs[66]; | |
case (97): | |
h$regs[67] = h$regs[65]; | |
case (96): | |
h$regs[66] = h$regs[64]; | |
case (95): | |
h$regs[65] = h$regs[63]; | |
case (94): | |
h$regs[64] = h$regs[62]; | |
case (93): | |
h$regs[63] = h$regs[61]; | |
case (92): | |
h$regs[62] = h$regs[60]; | |
case (91): | |
h$regs[61] = h$regs[59]; | |
case (90): | |
h$regs[60] = h$regs[58]; | |
case (89): | |
h$regs[59] = h$regs[57]; | |
case (88): | |
h$regs[58] = h$regs[56]; | |
case (87): | |
h$regs[57] = h$regs[55]; | |
case (86): | |
h$regs[56] = h$regs[54]; | |
case (85): | |
h$regs[55] = h$regs[53]; | |
case (84): | |
h$regs[54] = h$regs[52]; | |
case (83): | |
h$regs[53] = h$regs[51]; | |
case (82): | |
h$regs[52] = h$regs[50]; | |
case (81): | |
h$regs[51] = h$regs[49]; | |
case (80): | |
h$regs[50] = h$regs[48]; | |
case (79): | |
h$regs[49] = h$regs[47]; | |
case (78): | |
h$regs[48] = h$regs[46]; | |
case (77): | |
h$regs[47] = h$regs[45]; | |
case (76): | |
h$regs[46] = h$regs[44]; | |
case (75): | |
h$regs[45] = h$regs[43]; | |
case (74): | |
h$regs[44] = h$regs[42]; | |
case (73): | |
h$regs[43] = h$regs[41]; | |
case (72): | |
h$regs[42] = h$regs[40]; | |
case (71): | |
h$regs[41] = h$regs[39]; | |
case (70): | |
h$regs[40] = h$regs[38]; | |
case (69): | |
h$regs[39] = h$regs[37]; | |
case (68): | |
h$regs[38] = h$regs[36]; | |
case (67): | |
h$regs[37] = h$regs[35]; | |
case (66): | |
h$regs[36] = h$regs[34]; | |
case (65): | |
h$regs[35] = h$regs[33]; | |
case (64): | |
h$regs[34] = h$regs[32]; | |
case (63): | |
h$regs[33] = h$regs[31]; | |
case (62): | |
h$regs[32] = h$regs[30]; | |
case (61): | |
h$regs[31] = h$regs[29]; | |
case (60): | |
h$regs[30] = h$regs[28]; | |
case (59): | |
h$regs[29] = h$regs[27]; | |
case (58): | |
h$regs[28] = h$regs[26]; | |
case (57): | |
h$regs[27] = h$regs[25]; | |
case (56): | |
h$regs[26] = h$regs[24]; | |
case (55): | |
h$regs[25] = h$regs[23]; | |
case (54): | |
h$regs[24] = h$regs[22]; | |
case (53): | |
h$regs[23] = h$regs[21]; | |
case (52): | |
h$regs[22] = h$regs[20]; | |
case (51): | |
h$regs[21] = h$regs[19]; | |
case (50): | |
h$regs[20] = h$regs[18]; | |
case (49): | |
h$regs[19] = h$regs[17]; | |
case (48): | |
h$regs[18] = h$regs[16]; | |
case (47): | |
h$regs[17] = h$regs[15]; | |
case (46): | |
h$regs[16] = h$regs[14]; | |
case (45): | |
h$regs[15] = h$regs[13]; | |
case (44): | |
h$regs[14] = h$regs[12]; | |
case (43): | |
h$regs[13] = h$regs[11]; | |
case (42): | |
h$regs[12] = h$regs[10]; | |
case (41): | |
h$regs[11] = h$regs[9]; | |
case (40): | |
h$regs[10] = h$regs[8]; | |
case (39): | |
h$regs[9] = h$regs[7]; | |
case (38): | |
h$regs[8] = h$regs[6]; | |
case (37): | |
h$regs[7] = h$regs[5]; | |
case (36): | |
h$regs[6] = h$regs[4]; | |
case (35): | |
h$regs[5] = h$regs[3]; | |
case (34): | |
h$regs[4] = h$regs[2]; | |
case (33): | |
h$regs[3] = h$regs[1]; | |
case (32): | |
h$regs[2] = h$regs[0]; | |
case (31): | |
h$regs[1] = h$r32; | |
case (30): | |
h$regs[0] = h$r31; | |
case (29): | |
h$r32 = h$r30; | |
case (28): | |
h$r31 = h$r29; | |
case (27): | |
h$r30 = h$r28; | |
case (26): | |
h$r29 = h$r27; | |
case (25): | |
h$r28 = h$r26; | |
case (24): | |
h$r27 = h$r25; | |
case (23): | |
h$r26 = h$r24; | |
case (22): | |
h$r25 = h$r23; | |
case (21): | |
h$r24 = h$r22; | |
case (20): | |
h$r23 = h$r21; | |
case (19): | |
h$r22 = h$r20; | |
case (18): | |
h$r21 = h$r19; | |
case (17): | |
h$r20 = h$r18; | |
case (16): | |
h$r19 = h$r17; | |
case (15): | |
h$r18 = h$r16; | |
case (14): | |
h$r17 = h$r15; | |
case (13): | |
h$r16 = h$r14; | |
case (12): | |
h$r15 = h$r13; | |
case (11): | |
h$r14 = h$r12; | |
case (10): | |
h$r13 = h$r11; | |
case (9): | |
h$r12 = h$r10; | |
case (8): | |
h$r11 = h$r9; | |
case (7): | |
h$r10 = h$r8; | |
case (6): | |
h$r9 = h$r7; | |
case (5): | |
h$r8 = h$r6; | |
case (4): | |
h$r7 = h$r5; | |
case (3): | |
h$r6 = h$r4; | |
case (2): | |
h$r5 = h$r3; | |
case (1): | |
h$r4 = h$r2; | |
default: | |
}; | |
h$r2 = h$RTS_502.d2; | |
h$r3 = h$RTS_502.d3; | |
h$r1 = h$RTS_501; | |
return h$RTS_503; | |
}; | |
h$o(h$pap_2, 3, 0, 4, (-1), null); | |
function h$pap_3() | |
{ | |
var h$RTS_505 = h$r1.d1; | |
var h$RTS_506 = h$r1.d2; | |
var h$RTS_507 = h$RTS_505.f; | |
var h$RTS_508 = ((((h$RTS_507.t === 1) ? h$RTS_507.a : h$RTS_505.d2.d1) >> 8) - 3); | |
switch (h$RTS_508) | |
{ | |
case (124): | |
h$regs[95] = h$regs[92]; | |
case (123): | |
h$regs[94] = h$regs[91]; | |
case (122): | |
h$regs[93] = h$regs[90]; | |
case (121): | |
h$regs[92] = h$regs[89]; | |
case (120): | |
h$regs[91] = h$regs[88]; | |
case (119): | |
h$regs[90] = h$regs[87]; | |
case (118): | |
h$regs[89] = h$regs[86]; | |
case (117): | |
h$regs[88] = h$regs[85]; | |
case (116): | |
h$regs[87] = h$regs[84]; | |
case (115): | |
h$regs[86] = h$regs[83]; | |
case (114): | |
h$regs[85] = h$regs[82]; | |
case (113): | |
h$regs[84] = h$regs[81]; | |
case (112): | |
h$regs[83] = h$regs[80]; | |
case (111): | |
h$regs[82] = h$regs[79]; | |
case (110): | |
h$regs[81] = h$regs[78]; | |
case (109): | |
h$regs[80] = h$regs[77]; | |
case (108): | |
h$regs[79] = h$regs[76]; | |
case (107): | |
h$regs[78] = h$regs[75]; | |
case (106): | |
h$regs[77] = h$regs[74]; | |
case (105): | |
h$regs[76] = h$regs[73]; | |
case (104): | |
h$regs[75] = h$regs[72]; | |
case (103): | |
h$regs[74] = h$regs[71]; | |
case (102): | |
h$regs[73] = h$regs[70]; | |
case (101): | |
h$regs[72] = h$regs[69]; | |
case (100): | |
h$regs[71] = h$regs[68]; | |
case (99): | |
h$regs[70] = h$regs[67]; | |
case (98): | |
h$regs[69] = h$regs[66]; | |
case (97): | |
h$regs[68] = h$regs[65]; | |
case (96): | |
h$regs[67] = h$regs[64]; | |
case (95): | |
h$regs[66] = h$regs[63]; | |
case (94): | |
h$regs[65] = h$regs[62]; | |
case (93): | |
h$regs[64] = h$regs[61]; | |
case (92): | |
h$regs[63] = h$regs[60]; | |
case (91): | |
h$regs[62] = h$regs[59]; | |
case (90): | |
h$regs[61] = h$regs[58]; | |
case (89): | |
h$regs[60] = h$regs[57]; | |
case (88): | |
h$regs[59] = h$regs[56]; | |
case (87): | |
h$regs[58] = h$regs[55]; | |
case (86): | |
h$regs[57] = h$regs[54]; | |
case (85): | |
h$regs[56] = h$regs[53]; | |
case (84): | |
h$regs[55] = h$regs[52]; | |
case (83): | |
h$regs[54] = h$regs[51]; | |
case (82): | |
h$regs[53] = h$regs[50]; | |
case (81): | |
h$regs[52] = h$regs[49]; | |
case (80): | |
h$regs[51] = h$regs[48]; | |
case (79): | |
h$regs[50] = h$regs[47]; | |
case (78): | |
h$regs[49] = h$regs[46]; | |
case (77): | |
h$regs[48] = h$regs[45]; | |
case (76): | |
h$regs[47] = h$regs[44]; | |
case (75): | |
h$regs[46] = h$regs[43]; | |
case (74): | |
h$regs[45] = h$regs[42]; | |
case (73): | |
h$regs[44] = h$regs[41]; | |
case (72): | |
h$regs[43] = h$regs[40]; | |
case (71): | |
h$regs[42] = h$regs[39]; | |
case (70): | |
h$regs[41] = h$regs[38]; | |
case (69): | |
h$regs[40] = h$regs[37]; | |
case (68): | |
h$regs[39] = h$regs[36]; | |
case (67): | |
h$regs[38] = h$regs[35]; | |
case (66): | |
h$regs[37] = h$regs[34]; | |
case (65): | |
h$regs[36] = h$regs[33]; | |
case (64): | |
h$regs[35] = h$regs[32]; | |
case (63): | |
h$regs[34] = h$regs[31]; | |
case (62): | |
h$regs[33] = h$regs[30]; | |
case (61): | |
h$regs[32] = h$regs[29]; | |
case (60): | |
h$regs[31] = h$regs[28]; | |
case (59): | |
h$regs[30] = h$regs[27]; | |
case (58): | |
h$regs[29] = h$regs[26]; | |
case (57): | |
h$regs[28] = h$regs[25]; | |
case (56): | |
h$regs[27] = h$regs[24]; | |
case (55): | |
h$regs[26] = h$regs[23]; | |
case (54): | |
h$regs[25] = h$regs[22]; | |
case (53): | |
h$regs[24] = h$regs[21]; | |
case (52): | |
h$regs[23] = h$regs[20]; | |
case (51): | |
h$regs[22] = h$regs[19]; | |
case (50): | |
h$regs[21] = h$regs[18]; | |
case (49): | |
h$regs[20] = h$regs[17]; | |
case (48): | |
h$regs[19] = h$regs[16]; | |
case (47): | |
h$regs[18] = h$regs[15]; | |
case (46): | |
h$regs[17] = h$regs[14]; | |
case (45): | |
h$regs[16] = h$regs[13]; | |
case (44): | |
h$regs[15] = h$regs[12]; | |
case (43): | |
h$regs[14] = h$regs[11]; | |
case (42): | |
h$regs[13] = h$regs[10]; | |
case (41): | |
h$regs[12] = h$regs[9]; | |
case (40): | |
h$regs[11] = h$regs[8]; | |
case (39): | |
h$regs[10] = h$regs[7]; | |
case (38): | |
h$regs[9] = h$regs[6]; | |
case (37): | |
h$regs[8] = h$regs[5]; | |
case (36): | |
h$regs[7] = h$regs[4]; | |
case (35): | |
h$regs[6] = h$regs[3]; | |
case (34): | |
h$regs[5] = h$regs[2]; | |
case (33): | |
h$regs[4] = h$regs[1]; | |
case (32): | |
h$regs[3] = h$regs[0]; | |
case (31): | |
h$regs[2] = h$r32; | |
case (30): | |
h$regs[1] = h$r31; | |
case (29): | |
h$regs[0] = h$r30; | |
case (28): | |
h$r32 = h$r29; | |
case (27): | |
h$r31 = h$r28; | |
case (26): | |
h$r30 = h$r27; | |
case (25): | |
h$r29 = h$r26; | |
case (24): | |
h$r28 = h$r25; | |
case (23): | |
h$r27 = h$r24; | |
case (22): | |
h$r26 = h$r23; | |
case (21): | |
h$r25 = h$r22; | |
case (20): | |
h$r24 = h$r21; | |
case (19): | |
h$r23 = h$r20; | |
case (18): | |
h$r22 = h$r19; | |
case (17): | |
h$r21 = h$r18; | |
case (16): | |
h$r20 = h$r17; | |
case (15): | |
h$r19 = h$r16; | |
case (14): | |
h$r18 = h$r15; | |
case (13): | |
h$r17 = h$r14; | |
case (12): | |
h$r16 = h$r13; | |
case (11): | |
h$r15 = h$r12; | |
case (10): | |
h$r14 = h$r11; | |
case (9): | |
h$r13 = h$r10; | |
case (8): | |
h$r12 = h$r9; | |
case (7): | |
h$r11 = h$r8; | |
case (6): | |
h$r10 = h$r7; | |
case (5): | |
h$r9 = h$r6; | |
case (4): | |
h$r8 = h$r5; | |
case (3): | |
h$r7 = h$r4; | |
case (2): | |
h$r6 = h$r3; | |
case (1): | |
h$r5 = h$r2; | |
default: | |
}; | |
h$r2 = h$RTS_506.d2; | |
h$r3 = h$RTS_506.d3; | |
h$r4 = h$RTS_506.d4; | |
h$r1 = h$RTS_505; | |
return h$RTS_507; | |
}; | |
h$o(h$pap_3, 3, 0, 5, (-1), null); | |
function h$pap_4() | |
{ | |
var h$RTS_509 = h$r1.d1; | |
var h$RTS_510 = h$r1.d2; | |
var h$RTS_511 = h$RTS_509.f; | |
var h$RTS_512 = ((((h$RTS_511.t === 1) ? h$RTS_511.a : h$RTS_509.d2.d1) >> 8) - 4); | |
switch (h$RTS_512) | |
{ | |
case (123): | |
h$regs[95] = h$regs[91]; | |
case (122): | |
h$regs[94] = h$regs[90]; | |
case (121): | |
h$regs[93] = h$regs[89]; | |
case (120): | |
h$regs[92] = h$regs[88]; | |
case (119): | |
h$regs[91] = h$regs[87]; | |
case (118): | |
h$regs[90] = h$regs[86]; | |
case (117): | |
h$regs[89] = h$regs[85]; | |
case (116): | |
h$regs[88] = h$regs[84]; | |
case (115): | |
h$regs[87] = h$regs[83]; | |
case (114): | |
h$regs[86] = h$regs[82]; | |
case (113): | |
h$regs[85] = h$regs[81]; | |
case (112): | |
h$regs[84] = h$regs[80]; | |
case (111): | |
h$regs[83] = h$regs[79]; | |
case (110): | |
h$regs[82] = h$regs[78]; | |
case (109): | |
h$regs[81] = h$regs[77]; | |
case (108): | |
h$regs[80] = h$regs[76]; | |
case (107): | |
h$regs[79] = h$regs[75]; | |
case (106): | |
h$regs[78] = h$regs[74]; | |
case (105): | |
h$regs[77] = h$regs[73]; | |
case (104): | |
h$regs[76] = h$regs[72]; | |
case (103): | |
h$regs[75] = h$regs[71]; | |
case (102): | |
h$regs[74] = h$regs[70]; | |
case (101): | |
h$regs[73] = h$regs[69]; | |
case (100): | |
h$regs[72] = h$regs[68]; | |
case (99): | |
h$regs[71] = h$regs[67]; | |
case (98): | |
h$regs[70] = h$regs[66]; | |
case (97): | |
h$regs[69] = h$regs[65]; | |
case (96): | |
h$regs[68] = h$regs[64]; | |
case (95): | |
h$regs[67] = h$regs[63]; | |
case (94): | |
h$regs[66] = h$regs[62]; | |
case (93): | |
h$regs[65] = h$regs[61]; | |
case (92): | |
h$regs[64] = h$regs[60]; | |
case (91): | |
h$regs[63] = h$regs[59]; | |
case (90): | |
h$regs[62] = h$regs[58]; | |
case (89): | |
h$regs[61] = h$regs[57]; | |
case (88): | |
h$regs[60] = h$regs[56]; | |
case (87): | |
h$regs[59] = h$regs[55]; | |
case (86): | |
h$regs[58] = h$regs[54]; | |
case (85): | |
h$regs[57] = h$regs[53]; | |
case (84): | |
h$regs[56] = h$regs[52]; | |
case (83): | |
h$regs[55] = h$regs[51]; | |
case (82): | |
h$regs[54] = h$regs[50]; | |
case (81): | |
h$regs[53] = h$regs[49]; | |
case (80): | |
h$regs[52] = h$regs[48]; | |
case (79): | |
h$regs[51] = h$regs[47]; | |
case (78): | |
h$regs[50] = h$regs[46]; | |
case (77): | |
h$regs[49] = h$regs[45]; | |
case (76): | |
h$regs[48] = h$regs[44]; | |
case (75): | |
h$regs[47] = h$regs[43]; | |
case (74): | |
h$regs[46] = h$regs[42]; | |
case (73): | |
h$regs[45] = h$regs[41]; | |
case (72): | |
h$regs[44] = h$regs[40]; | |
case (71): | |
h$regs[43] = h$regs[39]; | |
case (70): | |
h$regs[42] = h$regs[38]; | |
case (69): | |
h$regs[41] = h$regs[37]; | |
case (68): | |
h$regs[40] = h$regs[36]; | |
case (67): | |
h$regs[39] = h$regs[35]; | |
case (66): | |
h$regs[38] = h$regs[34]; | |
case (65): | |
h$regs[37] = h$regs[33]; | |
case (64): | |
h$regs[36] = h$regs[32]; | |
case (63): | |
h$regs[35] = h$regs[31]; | |
case (62): | |
h$regs[34] = h$regs[30]; | |
case (61): | |
h$regs[33] = h$regs[29]; | |
case (60): | |
h$regs[32] = h$regs[28]; | |
case (59): | |
h$regs[31] = h$regs[27]; | |
case (58): | |
h$regs[30] = h$regs[26]; | |
case (57): | |
h$regs[29] = h$regs[25]; | |
case (56): | |
h$regs[28] = h$regs[24]; | |
case (55): | |
h$regs[27] = h$regs[23]; | |
case (54): | |
h$regs[26] = h$regs[22]; | |
case (53): | |
h$regs[25] = h$regs[21]; | |
case (52): | |
h$regs[24] = h$regs[20]; | |
case (51): | |
h$regs[23] = h$regs[19]; | |
case (50): | |
h$regs[22] = h$regs[18]; | |
case (49): | |
h$regs[21] = h$regs[17]; | |
case (48): | |
h$regs[20] = h$regs[16]; | |
case (47): | |
h$regs[19] = h$regs[15]; | |
case (46): | |
h$regs[18] = h$regs[14]; | |
case (45): | |
h$regs[17] = h$regs[13]; | |
case (44): | |
h$regs[16] = h$regs[12]; | |
case (43): | |
h$regs[15] = h$regs[11]; | |
case (42): | |
h$regs[14] = h$regs[10]; | |
case (41): | |
h$regs[13] = h$regs[9]; | |
case (40): | |
h$regs[12] = h$regs[8]; | |
case (39): | |
h$regs[11] = h$regs[7]; | |
case (38): | |
h$regs[10] = h$regs[6]; | |
case (37): | |
h$regs[9] = h$regs[5]; | |
case (36): | |
h$regs[8] = h$regs[4]; | |
case (35): | |
h$regs[7] = h$regs[3]; | |
case (34): | |
h$regs[6] = h$regs[2]; | |
case (33): | |
h$regs[5] = h$regs[1]; | |
case (32): | |
h$regs[4] = h$regs[0]; | |
case (31): | |
h$regs[3] = h$r32; | |
case (30): | |
h$regs[2] = h$r31; | |
case (29): | |
h$regs[1] = h$r30; | |
case (28): | |
h$regs[0] = h$r29; | |
case (27): | |
h$r32 = h$r28; | |
case (26): | |
h$r31 = h$r27; | |
case (25): | |
h$r30 = h$r26; | |
case (24): | |
h$r29 = h$r25; | |
case (23): | |
h$r28 = h$r24; | |
case (22): | |
h$r27 = h$r23; | |
case (21): | |
h$r26 = h$r22; | |
case (20): | |
h$r25 = h$r21; | |
case (19): | |
h$r24 = h$r20; | |
case (18): | |
h$r23 = h$r19; | |
case (17): | |
h$r22 = h$r18; | |
case (16): | |
h$r21 = h$r17; | |
case (15): | |
h$r20 = h$r16; | |
case (14): | |
h$r19 = h$r15; | |
case (13): | |
h$r18 = h$r14; | |
case (12): | |
h$r17 = h$r13; | |
case (11): | |
h$r16 = h$r12; | |
case (10): | |
h$r15 = h$r11; | |
case (9): | |
h$r14 = h$r10; | |
case (8): | |
h$r13 = h$r9; | |
case (7): | |
h$r12 = h$r8; | |
case (6): | |
h$r11 = h$r7; | |
case (5): | |
h$r10 = h$r6; | |
case (4): | |
h$r9 = h$r5; | |
case (3): | |
h$r8 = h$r4; | |
case (2): | |
h$r7 = h$r3; | |
case (1): | |
h$r6 = h$r2; | |
default: | |
}; | |
h$r2 = h$RTS_510.d2; | |
h$r3 = h$RTS_510.d3; | |
h$r4 = h$RTS_510.d4; | |
h$r5 = h$RTS_510.d5; | |
h$r1 = h$RTS_509; | |
return h$RTS_511; | |
}; | |
h$o(h$pap_4, 3, 0, 6, (-1), null); | |
function h$pap_5() | |
{ | |
var h$RTS_513 = h$r1.d1; | |
var h$RTS_514 = h$r1.d2; | |
var h$RTS_515 = h$RTS_513.f; | |
var h$RTS_516 = ((((h$RTS_515.t === 1) ? h$RTS_515.a : h$RTS_513.d2.d1) >> 8) - 5); | |
switch (h$RTS_516) | |
{ | |
case (122): | |
h$regs[95] = h$regs[90]; | |
case (121): | |
h$regs[94] = h$regs[89]; | |
case (120): | |
h$regs[93] = h$regs[88]; | |
case (119): | |
h$regs[92] = h$regs[87]; | |
case (118): | |
h$regs[91] = h$regs[86]; | |
case (117): | |
h$regs[90] = h$regs[85]; | |
case (116): | |
h$regs[89] = h$regs[84]; | |
case (115): | |
h$regs[88] = h$regs[83]; | |
case (114): | |
h$regs[87] = h$regs[82]; | |
case (113): | |
h$regs[86] = h$regs[81]; | |
case (112): | |
h$regs[85] = h$regs[80]; | |
case (111): | |
h$regs[84] = h$regs[79]; | |
case (110): | |
h$regs[83] = h$regs[78]; | |
case (109): | |
h$regs[82] = h$regs[77]; | |
case (108): | |
h$regs[81] = h$regs[76]; | |
case (107): | |
h$regs[80] = h$regs[75]; | |
case (106): | |
h$regs[79] = h$regs[74]; | |
case (105): | |
h$regs[78] = h$regs[73]; | |
case (104): | |
h$regs[77] = h$regs[72]; | |
case (103): | |
h$regs[76] = h$regs[71]; | |
case (102): | |
h$regs[75] = h$regs[70]; | |
case (101): | |
h$regs[74] = h$regs[69]; | |
case (100): | |
h$regs[73] = h$regs[68]; | |
case (99): | |
h$regs[72] = h$regs[67]; | |
case (98): | |
h$regs[71] = h$regs[66]; | |
case (97): | |
h$regs[70] = h$regs[65]; | |
case (96): | |
h$regs[69] = h$regs[64]; | |
case (95): | |
h$regs[68] = h$regs[63]; | |
case (94): | |
h$regs[67] = h$regs[62]; | |
case (93): | |
h$regs[66] = h$regs[61]; | |
case (92): | |
h$regs[65] = h$regs[60]; | |
case (91): | |
h$regs[64] = h$regs[59]; | |
case (90): | |
h$regs[63] = h$regs[58]; | |
case (89): | |
h$regs[62] = h$regs[57]; | |
case (88): | |
h$regs[61] = h$regs[56]; | |
case (87): | |
h$regs[60] = h$regs[55]; | |
case (86): | |
h$regs[59] = h$regs[54]; | |
case (85): | |
h$regs[58] = h$regs[53]; | |
case (84): | |
h$regs[57] = h$regs[52]; | |
case (83): | |
h$regs[56] = h$regs[51]; | |
case (82): | |
h$regs[55] = h$regs[50]; | |
case (81): | |
h$regs[54] = h$regs[49]; | |
case (80): | |
h$regs[53] = h$regs[48]; | |
case (79): | |
h$regs[52] = h$regs[47]; | |
case (78): | |
h$regs[51] = h$regs[46]; | |
case (77): | |
h$regs[50] = h$regs[45]; | |
case (76): | |
h$regs[49] = h$regs[44]; | |
case (75): | |
h$regs[48] = h$regs[43]; | |
case (74): | |
h$regs[47] = h$regs[42]; | |
case (73): | |
h$regs[46] = h$regs[41]; | |
case (72): | |
h$regs[45] = h$regs[40]; | |
case (71): | |
h$regs[44] = h$regs[39]; | |
case (70): | |
h$regs[43] = h$regs[38]; | |
case (69): | |
h$regs[42] = h$regs[37]; | |
case (68): | |
h$regs[41] = h$regs[36]; | |
case (67): | |
h$regs[40] = h$regs[35]; | |
case (66): | |
h$regs[39] = h$regs[34]; | |
case (65): | |
h$regs[38] = h$regs[33]; | |
case (64): | |
h$regs[37] = h$regs[32]; | |
case (63): | |
h$regs[36] = h$regs[31]; | |
case (62): | |
h$regs[35] = h$regs[30]; | |
case (61): | |
h$regs[34] = h$regs[29]; | |
case (60): | |
h$regs[33] = h$regs[28]; | |
case (59): | |
h$regs[32] = h$regs[27]; | |
case (58): | |
h$regs[31] = h$regs[26]; | |
case (57): | |
h$regs[30] = h$regs[25]; | |
case (56): | |
h$regs[29] = h$regs[24]; | |
case (55): | |
h$regs[28] = h$regs[23]; | |
case (54): | |
h$regs[27] = h$regs[22]; | |
case (53): | |
h$regs[26] = h$regs[21]; | |
case (52): | |
h$regs[25] = h$regs[20]; | |
case (51): | |
h$regs[24] = h$regs[19]; | |
case (50): | |
h$regs[23] = h$regs[18]; | |
case (49): | |
h$regs[22] = h$regs[17]; | |
case (48): | |
h$regs[21] = h$regs[16]; | |
case (47): | |
h$regs[20] = h$regs[15]; | |
case (46): | |
h$regs[19] = h$regs[14]; | |
case (45): | |
h$regs[18] = h$regs[13]; | |
case (44): | |
h$regs[17] = h$regs[12]; | |
case (43): | |
h$regs[16] = h$regs[11]; | |
case (42): | |
h$regs[15] = h$regs[10]; | |
case (41): | |
h$regs[14] = h$regs[9]; | |
case (40): | |
h$regs[13] = h$regs[8]; | |
case (39): | |
h$regs[12] = h$regs[7]; | |
case (38): | |
h$regs[11] = h$regs[6]; | |
case (37): | |
h$regs[10] = h$regs[5]; | |
case (36): | |
h$regs[9] = h$regs[4]; | |
case (35): | |
h$regs[8] = h$regs[3]; | |
case (34): | |
h$regs[7] = h$regs[2]; | |
case (33): | |
h$regs[6] = h$regs[1]; | |
case (32): | |
h$regs[5] = h$regs[0]; | |
case (31): | |
h$regs[4] = h$r32; | |
case (30): | |
h$regs[3] = h$r31; | |
case (29): | |
h$regs[2] = h$r30; | |
case (28): | |
h$regs[1] = h$r29; | |
case (27): | |
h$regs[0] = h$r28; | |
case (26): | |
h$r32 = h$r27; | |
case (25): | |
h$r31 = h$r26; | |
case (24): | |
h$r30 = h$r25; | |
case (23): | |
h$r29 = h$r24; | |
case (22): | |
h$r28 = h$r23; | |
case (21): | |
h$r27 = h$r22; | |
case (20): | |
h$r26 = h$r21; | |
case (19): | |
h$r25 = h$r20; | |
case (18): | |
h$r24 = h$r19; | |
case (17): | |
h$r23 = h$r18; | |
case (16): | |
h$r22 = h$r17; | |
case (15): | |
h$r21 = h$r16; | |
case (14): | |
h$r20 = h$r15; | |
case (13): | |
h$r19 = h$r14; | |
case (12): | |
h$r18 = h$r13; | |
case (11): | |
h$r17 = h$r12; | |
case (10): | |
h$r16 = h$r11; | |
case (9): | |
h$r15 = h$r10; | |
case (8): | |
h$r14 = h$r9; | |
case (7): | |
h$r13 = h$r8; | |
case (6): | |
h$r12 = h$r7; | |
case (5): | |
h$r11 = h$r6; | |
case (4): | |
h$r10 = h$r5; | |
case (3): | |
h$r9 = h$r4; | |
case (2): | |
h$r8 = h$r3; | |
case (1): | |
h$r7 = h$r2; | |
default: | |
}; | |
h$r2 = h$RTS_514.d2; | |
h$r3 = h$RTS_514.d3; | |
h$r4 = h$RTS_514.d4; | |
h$r5 = h$RTS_514.d5; | |
h$r6 = h$RTS_514.d6; | |
h$r1 = h$RTS_513; | |
return h$RTS_515; | |
}; | |
h$o(h$pap_5, 3, 0, 7, (-1), null); | |
function h$pap_6() | |
{ | |
var h$RTS_517 = h$r1.d1; | |
var h$RTS_518 = h$r1.d2; | |
var h$RTS_519 = h$RTS_517.f; | |
var h$RTS_520 = ((((h$RTS_519.t === 1) ? h$RTS_519.a : h$RTS_517.d2.d1) >> 8) - 6); | |
switch (h$RTS_520) | |
{ | |
case (121): | |
h$regs[95] = h$regs[89]; | |
case (120): | |
h$regs[94] = h$regs[88]; | |
case (119): | |
h$regs[93] = h$regs[87]; | |
case (118): | |
h$regs[92] = h$regs[86]; | |
case (117): | |
h$regs[91] = h$regs[85]; | |
case (116): | |
h$regs[90] = h$regs[84]; | |
case (115): | |
h$regs[89] = h$regs[83]; | |
case (114): | |
h$regs[88] = h$regs[82]; | |
case (113): | |
h$regs[87] = h$regs[81]; | |
case (112): | |
h$regs[86] = h$regs[80]; | |
case (111): | |
h$regs[85] = h$regs[79]; | |
case (110): | |
h$regs[84] = h$regs[78]; | |
case (109): | |
h$regs[83] = h$regs[77]; | |
case (108): | |
h$regs[82] = h$regs[76]; | |
case (107): | |
h$regs[81] = h$regs[75]; | |
case (106): | |
h$regs[80] = h$regs[74]; | |
case (105): | |
h$regs[79] = h$regs[73]; | |
case (104): | |
h$regs[78] = h$regs[72]; | |
case (103): | |
h$regs[77] = h$regs[71]; | |
case (102): | |
h$regs[76] = h$regs[70]; | |
case (101): | |
h$regs[75] = h$regs[69]; | |
case (100): | |
h$regs[74] = h$regs[68]; | |
case (99): | |
h$regs[73] = h$regs[67]; | |
case (98): | |
h$regs[72] = h$regs[66]; | |
case (97): | |
h$regs[71] = h$regs[65]; | |
case (96): | |
h$regs[70] = h$regs[64]; | |
case (95): | |
h$regs[69] = h$regs[63]; | |
case (94): | |
h$regs[68] = h$regs[62]; | |
case (93): | |
h$regs[67] = h$regs[61]; | |
case (92): | |
h$regs[66] = h$regs[60]; | |
case (91): | |
h$regs[65] = h$regs[59]; | |
case (90): | |
h$regs[64] = h$regs[58]; | |
case (89): | |
h$regs[63] = h$regs[57]; | |
case (88): | |
h$regs[62] = h$regs[56]; | |
case (87): | |
h$regs[61] = h$regs[55]; | |
case (86): | |
h$regs[60] = h$regs[54]; | |
case (85): | |
h$regs[59] = h$regs[53]; | |
case (84): | |
h$regs[58] = h$regs[52]; | |
case (83): | |
h$regs[57] = h$regs[51]; | |
case (82): | |
h$regs[56] = h$regs[50]; | |
case (81): | |
h$regs[55] = h$regs[49]; | |
case (80): | |
h$regs[54] = h$regs[48]; | |
case (79): | |
h$regs[53] = h$regs[47]; | |
case (78): | |
h$regs[52] = h$regs[46]; | |
case (77): | |
h$regs[51] = h$regs[45]; | |
case (76): | |
h$regs[50] = h$regs[44]; | |
case (75): | |
h$regs[49] = h$regs[43]; | |
case (74): | |
h$regs[48] = h$regs[42]; | |
case (73): | |
h$regs[47] = h$regs[41]; | |
case (72): | |
h$regs[46] = h$regs[40]; | |
case (71): | |
h$regs[45] = h$regs[39]; | |
case (70): | |
h$regs[44] = h$regs[38]; | |
case (69): | |
h$regs[43] = h$regs[37]; | |
case (68): | |
h$regs[42] = h$regs[36]; | |
case (67): | |
h$regs[41] = h$regs[35]; | |
case (66): | |
h$regs[40] = h$regs[34]; | |
case (65): | |
h$regs[39] = h$regs[33]; | |
case (64): | |
h$regs[38] = h$regs[32]; | |
case (63): | |
h$regs[37] = h$regs[31]; | |
case (62): | |
h$regs[36] = h$regs[30]; | |
case (61): | |
h$regs[35] = h$regs[29]; | |
case (60): | |
h$regs[34] = h$regs[28]; | |
case (59): | |
h$regs[33] = h$regs[27]; | |
case (58): | |
h$regs[32] = h$regs[26]; | |
case (57): | |
h$regs[31] = h$regs[25]; | |
case (56): | |
h$regs[30] = h$regs[24]; | |
case (55): | |
h$regs[29] = h$regs[23]; | |
case (54): | |
h$regs[28] = h$regs[22]; | |
case (53): | |
h$regs[27] = h$regs[21]; | |
case (52): | |
h$regs[26] = h$regs[20]; | |
case (51): | |
h$regs[25] = h$regs[19]; | |
case (50): | |
h$regs[24] = h$regs[18]; | |
case (49): | |
h$regs[23] = h$regs[17]; | |
case (48): | |
h$regs[22] = h$regs[16]; | |
case (47): | |
h$regs[21] = h$regs[15]; | |
case (46): | |
h$regs[20] = h$regs[14]; | |
case (45): | |
h$regs[19] = h$regs[13]; | |
case (44): | |
h$regs[18] = h$regs[12]; | |
case (43): | |
h$regs[17] = h$regs[11]; | |
case (42): | |
h$regs[16] = h$regs[10]; | |
case (41): | |
h$regs[15] = h$regs[9]; | |
case (40): | |
h$regs[14] = h$regs[8]; | |
case (39): | |
h$regs[13] = h$regs[7]; | |
case (38): | |
h$regs[12] = h$regs[6]; | |
case (37): | |
h$regs[11] = h$regs[5]; | |
case (36): | |
h$regs[10] = h$regs[4]; | |
case (35): | |
h$regs[9] = h$regs[3]; | |
case (34): | |
h$regs[8] = h$regs[2]; | |
case (33): | |
h$regs[7] = h$regs[1]; | |
case (32): | |
h$regs[6] = h$regs[0]; | |
case (31): | |
h$regs[5] = h$r32; | |
case (30): | |
h$regs[4] = h$r31; | |
case (29): | |
h$regs[3] = h$r30; | |
case (28): | |
h$regs[2] = h$r29; | |
case (27): | |
h$regs[1] = h$r28; | |
case (26): | |
h$regs[0] = h$r27; | |
case (25): | |
h$r32 = h$r26; | |
case (24): | |
h$r31 = h$r25; | |
case (23): | |
h$r30 = h$r24; | |
case (22): | |
h$r29 = h$r23; | |
case (21): | |
h$r28 = h$r22; | |
case (20): | |
h$r27 = h$r21; | |
case (19): | |
h$r26 = h$r20; | |
case (18): | |
h$r25 = h$r19; | |
case (17): | |
h$r24 = h$r18; | |
case (16): | |
h$r23 = h$r17; | |
case (15): | |
h$r22 = h$r16; | |
case (14): | |
h$r21 = h$r15; | |
case (13): | |
h$r20 = h$r14; | |
case (12): | |
h$r19 = h$r13; | |
case (11): | |
h$r18 = h$r12; | |
case (10): | |
h$r17 = h$r11; | |
case (9): | |
h$r16 = h$r10; | |
case (8): | |
h$r15 = h$r9; | |
case (7): | |
h$r14 = h$r8; | |
case (6): | |
h$r13 = h$r7; | |
case (5): | |
h$r12 = h$r6; | |
case (4): | |
h$r11 = h$r5; | |
case (3): | |
h$r10 = h$r4; | |
case (2): | |
h$r9 = h$r3; | |
case (1): | |
h$r8 = h$r2; | |
default: | |
}; | |
h$r2 = h$RTS_518.d2; | |
h$r3 = h$RTS_518.d3; | |
h$r4 = h$RTS_518.d4; | |
h$r5 = h$RTS_518.d5; | |
h$r6 = h$RTS_518.d6; | |
h$r7 = h$RTS_518.d7; | |
h$r1 = h$RTS_517; | |
return h$RTS_519; | |
}; | |
h$o(h$pap_6, 3, 0, 8, (-1), null); | |
var h$apply = []; | |
var h$paps = []; | |
h$initStatic.push((function() | |
{ | |
for(var h$RTS_521 = 0;(h$RTS_521 < 65536);(h$RTS_521++)) { | |
h$apply[h$RTS_521] = h$ap_gen; | |
}; | |
for(h$RTS_521 = 0;(h$RTS_521 < 128);(h$RTS_521++)) { | |
h$paps[h$RTS_521] = h$pap_gen; | |
}; | |
h$apply[0] = h$ap_0_0; | |
h$apply[1] = h$ap_1_0; | |
h$apply[1] = h$ap_1_0; | |
h$apply[257] = h$ap_1_1; | |
h$apply[513] = h$ap_1_2; | |
h$apply[258] = h$ap_2_1; | |
h$apply[514] = h$ap_2_2; | |
h$apply[770] = h$ap_2_3; | |
h$apply[1026] = h$ap_2_4; | |
h$apply[515] = h$ap_3_2; | |
h$apply[771] = h$ap_3_3; | |
h$apply[1027] = h$ap_3_4; | |
h$apply[1283] = h$ap_3_5; | |
h$apply[1539] = h$ap_3_6; | |
h$apply[772] = h$ap_4_3; | |
h$apply[1028] = h$ap_4_4; | |
h$apply[1284] = h$ap_4_5; | |
h$apply[1540] = h$ap_4_6; | |
h$apply[1796] = h$ap_4_7; | |
h$apply[2052] = h$ap_4_8; | |
h$paps[0] = h$pap_0; | |
h$paps[1] = h$pap_1; | |
h$paps[2] = h$pap_2; | |
h$paps[3] = h$pap_3; | |
h$paps[4] = h$pap_4; | |
h$paps[5] = h$pap_5; | |
h$paps[6] = h$pap_6; | |
})); | |
function h$ap_gen() | |
{ | |
var h$RTS_522 = h$r1.f; | |
switch (h$RTS_522.t) | |
{ | |
case (0): | |
return h$RTS_522; | |
case (1): | |
var h$RTS_523 = h$stack[(h$sp - 1)]; | |
var h$RTS_524 = (h$RTS_522.a & 255); | |
var h$RTS_525 = (h$RTS_523 & 255); | |
var h$RTS_526 = (h$RTS_523 >> 8); | |
if((h$RTS_525 === h$RTS_524)) | |
{ | |
for(var h$RTS_527 = 0;(h$RTS_527 < h$RTS_526);(h$RTS_527++)) { | |
h$setReg((h$RTS_527 + 2), h$stack[((h$sp - 2) - h$RTS_527)]); | |
}; | |
h$sp = ((h$sp - h$RTS_526) - 2); | |
return h$RTS_522; | |
} | |
else | |
{ | |
if((h$RTS_525 > h$RTS_524)) | |
{ | |
var h$RTS_528 = (h$RTS_522.a >> 8); | |
for(var h$RTS_529 = 0;(h$RTS_529 < h$RTS_528);(h$RTS_529++)) { | |
h$setReg((h$RTS_529 + 2), h$stack[((h$sp - 2) - h$RTS_529)]); | |
}; | |
var h$RTS_530 = (((h$RTS_526 - h$RTS_528) << 8) | (h$RTS_525 - h$RTS_524)); | |
var h$RTS_531 = h$apply[h$RTS_530]; | |
if((h$RTS_531 === h$ap_gen)) | |
{ | |
h$sp -= h$RTS_528; | |
h$stack[(h$sp - 1)] = h$RTS_530; | |
} | |
else | |
{ | |
h$sp = ((h$sp - h$RTS_528) - 1); | |
}; | |
h$stack[h$sp] = h$RTS_531; | |
return h$RTS_522; | |
} | |
else | |
{ | |
var h$RTS_532 = h$paps[h$RTS_526]; | |
var h$RTS_533 = [h$r1, (((((h$RTS_522.a >> 8) - h$RTS_526) * 256) + h$RTS_524) - h$RTS_525)]; | |
for(var h$RTS_534 = 0;(h$RTS_534 < h$RTS_526);(h$RTS_534++)) { | |
h$RTS_533.push(h$stack[((h$sp - h$RTS_534) - 2)]); | |
}; | |
h$sp = ((h$sp - h$RTS_526) - 2); | |
h$r1 = h$init_closure({ d1: null, d2: null, f: h$RTS_532, m: 0 | |
}, h$RTS_533); | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_535 = h$stack[(h$sp - 1)]; | |
var h$RTS_536 = (h$r1.d2.d1 & 255); | |
var h$RTS_537 = (h$RTS_535 & 255); | |
var h$RTS_538 = (h$RTS_535 >> 8); | |
if((h$RTS_537 === h$RTS_536)) | |
{ | |
for(var h$RTS_539 = 0;(h$RTS_539 < h$RTS_538);(h$RTS_539++)) { | |
h$setReg((h$RTS_539 + 2), h$stack[((h$sp - 2) - h$RTS_539)]); | |
}; | |
h$sp = ((h$sp - h$RTS_538) - 2); | |
return h$RTS_522; | |
} | |
else | |
{ | |
if((h$RTS_537 > h$RTS_536)) | |
{ | |
var h$RTS_540 = (h$r1.d2.d1 >> 8); | |
for(var h$RTS_541 = 0;(h$RTS_541 < h$RTS_540);(h$RTS_541++)) { | |
h$setReg((h$RTS_541 + 2), h$stack[((h$sp - 2) - h$RTS_541)]); | |
}; | |
var h$RTS_542 = (((h$RTS_538 - h$RTS_540) << 8) | (h$RTS_537 - h$RTS_536)); | |
var h$RTS_543 = h$apply[h$RTS_542]; | |
if((h$RTS_543 === h$ap_gen)) | |
{ | |
h$sp -= h$RTS_540; | |
h$stack[(h$sp - 1)] = h$RTS_542; | |
} | |
else | |
{ | |
h$sp = ((h$sp - h$RTS_540) - 1); | |
}; | |
h$stack[h$sp] = h$RTS_543; | |
return h$RTS_522; | |
} | |
else | |
{ | |
var h$RTS_544 = h$paps[h$RTS_538]; | |
var h$RTS_545 = [h$r1, (((((h$r1.d2.d1 >> 8) - h$RTS_538) * 256) + h$RTS_536) - h$RTS_537)]; | |
for(var h$RTS_546 = 0;(h$RTS_546 < h$RTS_538);(h$RTS_546++)) { | |
h$RTS_545.push(h$stack[((h$sp - h$RTS_546) - 2)]); | |
}; | |
h$sp = ((h$sp - h$RTS_538) - 2); | |
h$r1 = h$init_closure({ d1: null, d2: null, f: h$RTS_544, m: 0 | |
}, h$RTS_545); | |
return h$rs(); | |
}; | |
}; | |
case (5): | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("h$ap_gen: unexpected closure type " + h$RTS_522.t)); | |
}; | |
}; | |
h$o(h$ap_gen, (-1), 0, (-1), 256, null); | |
function h$ap_gen_fast(h$RTS_547) | |
{ | |
var h$RTS_548 = h$r1.f; | |
switch (h$RTS_548.t) | |
{ | |
case (0): | |
var h$RTS_549 = (h$RTS_547 >> 8); | |
h$sp += h$RTS_549; | |
switch (h$RTS_549) | |
{ | |
case (64): | |
h$stack[(h$sp - 63)] = h$regs[32]; | |
case (63): | |
h$stack[(h$sp - 62)] = h$regs[31]; | |
case (62): | |
h$stack[(h$sp - 61)] = h$regs[30]; | |
case (61): | |
h$stack[(h$sp - 60)] = h$regs[29]; | |
case (60): | |
h$stack[(h$sp - 59)] = h$regs[28]; | |
case (59): | |
h$stack[(h$sp - 58)] = h$regs[27]; | |
case (58): | |
h$stack[(h$sp - 57)] = h$regs[26]; | |
case (57): | |
h$stack[(h$sp - 56)] = h$regs[25]; | |
case (56): | |
h$stack[(h$sp - 55)] = h$regs[24]; | |
case (55): | |
h$stack[(h$sp - 54)] = h$regs[23]; | |
case (54): | |
h$stack[(h$sp - 53)] = h$regs[22]; | |
case (53): | |
h$stack[(h$sp - 52)] = h$regs[21]; | |
case (52): | |
h$stack[(h$sp - 51)] = h$regs[20]; | |
case (51): | |
h$stack[(h$sp - 50)] = h$regs[19]; | |
case (50): | |
h$stack[(h$sp - 49)] = h$regs[18]; | |
case (49): | |
h$stack[(h$sp - 48)] = h$regs[17]; | |
case (48): | |
h$stack[(h$sp - 47)] = h$regs[16]; | |
case (47): | |
h$stack[(h$sp - 46)] = h$regs[15]; | |
case (46): | |
h$stack[(h$sp - 45)] = h$regs[14]; | |
case (45): | |
h$stack[(h$sp - 44)] = h$regs[13]; | |
case (44): | |
h$stack[(h$sp - 43)] = h$regs[12]; | |
case (43): | |
h$stack[(h$sp - 42)] = h$regs[11]; | |
case (42): | |
h$stack[(h$sp - 41)] = h$regs[10]; | |
case (41): | |
h$stack[(h$sp - 40)] = h$regs[9]; | |
case (40): | |
h$stack[(h$sp - 39)] = h$regs[8]; | |
case (39): | |
h$stack[(h$sp - 38)] = h$regs[7]; | |
case (38): | |
h$stack[(h$sp - 37)] = h$regs[6]; | |
case (37): | |
h$stack[(h$sp - 36)] = h$regs[5]; | |
case (36): | |
h$stack[(h$sp - 35)] = h$regs[4]; | |
case (35): | |
h$stack[(h$sp - 34)] = h$regs[3]; | |
case (34): | |
h$stack[(h$sp - 33)] = h$regs[2]; | |
case (33): | |
h$stack[(h$sp - 32)] = h$regs[1]; | |
case (32): | |
h$stack[(h$sp - 31)] = h$regs[0]; | |
case (31): | |
h$stack[(h$sp - 30)] = h$r32; | |
case (30): | |
h$stack[(h$sp - 29)] = h$r31; | |
case (29): | |
h$stack[(h$sp - 28)] = h$r30; | |
case (28): | |
h$stack[(h$sp - 27)] = h$r29; | |
case (27): | |
h$stack[(h$sp - 26)] = h$r28; | |
case (26): | |
h$stack[(h$sp - 25)] = h$r27; | |
case (25): | |
h$stack[(h$sp - 24)] = h$r26; | |
case (24): | |
h$stack[(h$sp - 23)] = h$r25; | |
case (23): | |
h$stack[(h$sp - 22)] = h$r24; | |
case (22): | |
h$stack[(h$sp - 21)] = h$r23; | |
case (21): | |
h$stack[(h$sp - 20)] = h$r22; | |
case (20): | |
h$stack[(h$sp - 19)] = h$r21; | |
case (19): | |
h$stack[(h$sp - 18)] = h$r20; | |
case (18): | |
h$stack[(h$sp - 17)] = h$r19; | |
case (17): | |
h$stack[(h$sp - 16)] = h$r18; | |
case (16): | |
h$stack[(h$sp - 15)] = h$r17; | |
case (15): | |
h$stack[(h$sp - 14)] = h$r16; | |
case (14): | |
h$stack[(h$sp - 13)] = h$r15; | |
case (13): | |
h$stack[(h$sp - 12)] = h$r14; | |
case (12): | |
h$stack[(h$sp - 11)] = h$r13; | |
case (11): | |
h$stack[(h$sp - 10)] = h$r12; | |
case (10): | |
h$stack[(h$sp - 9)] = h$r11; | |
case (9): | |
h$stack[(h$sp - 8)] = h$r10; | |
case (8): | |
h$stack[(h$sp - 7)] = h$r9; | |
case (7): | |
h$stack[(h$sp - 6)] = h$r8; | |
case (6): | |
h$stack[(h$sp - 5)] = h$r7; | |
case (5): | |
h$stack[(h$sp - 4)] = h$r6; | |
case (4): | |
h$stack[(h$sp - 3)] = h$r5; | |
case (3): | |
h$stack[(h$sp - 2)] = h$r4; | |
case (2): | |
h$stack[(h$sp - 1)] = h$r3; | |
case (1): | |
h$stack[(h$sp - 0)] = h$r2; | |
default: | |
}; | |
var h$RTS_550 = h$apply[h$RTS_547]; | |
if((h$RTS_550 === h$ap_gen)) | |
{ | |
h$sp += 2; | |
h$stack[(h$sp - 1)] = h$RTS_547; | |
} | |
else | |
{ | |
++h$sp; | |
}; | |
h$stack[h$sp] = h$RTS_550; | |
return h$RTS_548; | |
case (1): | |
var h$RTS_551 = h$RTS_548.a; | |
var h$RTS_552 = (h$RTS_551 & 255); | |
var h$RTS_553 = (h$RTS_547 & 255); | |
var h$RTS_554 = (h$RTS_547 >> 8); | |
if((h$RTS_553 === h$RTS_552)) | |
{ | |
return h$RTS_548; | |
} | |
else | |
{ | |
if((h$RTS_553 > h$RTS_552)) | |
{ | |
var h$RTS_555 = ((h$RTS_551 >> 8) + 1); | |
h$sp = (((h$sp + h$RTS_554) - h$RTS_555) + 1); | |
for(var h$RTS_556 = h$RTS_554;(h$RTS_556 >= h$RTS_555);(h$RTS_556--)) { | |
h$stack[((h$sp + h$RTS_555) - h$RTS_556)] = h$getReg((h$RTS_556 + 1)); | |
}; | |
var h$RTS_557 = (((h$RTS_554 - (h$RTS_551 >> 8)) << 8) | (h$RTS_553 - h$RTS_552)); | |
var h$RTS_558 = h$apply[h$RTS_557]; | |
if((h$RTS_558 === h$ap_gen)) | |
{ | |
h$sp += 2; | |
h$stack[(h$sp - 1)] = h$RTS_557; | |
} | |
else | |
{ | |
++h$sp; | |
}; | |
h$stack[h$sp] = h$RTS_558; | |
return h$RTS_548; | |
} | |
else | |
{ | |
if((h$RTS_547 != 0)) | |
{ | |
var h$RTS_559 = h$paps[h$RTS_554]; | |
var h$RTS_560 = [h$r1, (((((h$RTS_551 >> 8) - h$RTS_554) * 256) + h$RTS_552) - h$RTS_553)]; | |
for(var h$RTS_561 = 0;(h$RTS_561 < h$RTS_554);(h$RTS_561++)) { | |
h$RTS_560.push(h$getReg((h$RTS_561 + 2))); | |
}; | |
h$r1 = h$init_closure({ d1: null, d2: null, f: h$RTS_559, m: 0 | |
}, h$RTS_560); | |
}; | |
return h$rs(); | |
}; | |
}; | |
case (3): | |
var h$RTS_562 = h$r1.d2.d1; | |
var h$RTS_563 = (h$RTS_562 & 255); | |
var h$RTS_564 = (h$RTS_547 & 255); | |
var h$RTS_565 = (h$RTS_547 >> 8); | |
if((h$RTS_564 === h$RTS_563)) | |
{ | |
return h$RTS_548; | |
} | |
else | |
{ | |
if((h$RTS_564 > h$RTS_563)) | |
{ | |
var h$RTS_566 = ((h$RTS_562 >> 8) + 1); | |
h$sp = (((h$sp + h$RTS_565) - h$RTS_566) + 1); | |
for(var h$RTS_567 = h$RTS_565;(h$RTS_567 >= h$RTS_566);(h$RTS_567--)) { | |
h$stack[((h$sp + h$RTS_566) - h$RTS_567)] = h$getReg((h$RTS_567 + 1)); | |
}; | |
var h$RTS_568 = (((h$RTS_565 - (h$RTS_562 >> 8)) << 8) | (h$RTS_564 - h$RTS_563)); | |
var h$RTS_569 = h$apply[h$RTS_568]; | |
if((h$RTS_569 === h$ap_gen)) | |
{ | |
h$sp += 2; | |
h$stack[(h$sp - 1)] = h$RTS_568; | |
} | |
else | |
{ | |
++h$sp; | |
}; | |
h$stack[h$sp] = h$RTS_569; | |
return h$RTS_548; | |
} | |
else | |
{ | |
if((h$RTS_547 != 0)) | |
{ | |
var h$RTS_570 = h$paps[h$RTS_565]; | |
var h$RTS_571 = [h$r1, (((((h$RTS_562 >> 8) - h$RTS_565) * 256) + h$RTS_563) - h$RTS_564)]; | |
for(var h$RTS_572 = 0;(h$RTS_572 < h$RTS_565);(h$RTS_572++)) { | |
h$RTS_571.push(h$getReg((h$RTS_572 + 2))); | |
}; | |
h$r1 = h$init_closure({ d1: null, d2: null, f: h$RTS_570, m: 0 | |
}, h$RTS_571); | |
}; | |
return h$rs(); | |
}; | |
}; | |
case (2): | |
if((h$RTS_547 != 0)) | |
{ | |
throw("h$ap_gen_fast: invalid apply"); | |
}; | |
return h$RTS_548; | |
case (5): | |
var h$RTS_573 = (h$RTS_547 >> 8); | |
h$sp += h$RTS_573; | |
switch (h$RTS_573) | |
{ | |
case (64): | |
h$stack[(h$sp - 63)] = h$regs[32]; | |
case (63): | |
h$stack[(h$sp - 62)] = h$regs[31]; | |
case (62): | |
h$stack[(h$sp - 61)] = h$regs[30]; | |
case (61): | |
h$stack[(h$sp - 60)] = h$regs[29]; | |
case (60): | |
h$stack[(h$sp - 59)] = h$regs[28]; | |
case (59): | |
h$stack[(h$sp - 58)] = h$regs[27]; | |
case (58): | |
h$stack[(h$sp - 57)] = h$regs[26]; | |
case (57): | |
h$stack[(h$sp - 56)] = h$regs[25]; | |
case (56): | |
h$stack[(h$sp - 55)] = h$regs[24]; | |
case (55): | |
h$stack[(h$sp - 54)] = h$regs[23]; | |
case (54): | |
h$stack[(h$sp - 53)] = h$regs[22]; | |
case (53): | |
h$stack[(h$sp - 52)] = h$regs[21]; | |
case (52): | |
h$stack[(h$sp - 51)] = h$regs[20]; | |
case (51): | |
h$stack[(h$sp - 50)] = h$regs[19]; | |
case (50): | |
h$stack[(h$sp - 49)] = h$regs[18]; | |
case (49): | |
h$stack[(h$sp - 48)] = h$regs[17]; | |
case (48): | |
h$stack[(h$sp - 47)] = h$regs[16]; | |
case (47): | |
h$stack[(h$sp - 46)] = h$regs[15]; | |
case (46): | |
h$stack[(h$sp - 45)] = h$regs[14]; | |
case (45): | |
h$stack[(h$sp - 44)] = h$regs[13]; | |
case (44): | |
h$stack[(h$sp - 43)] = h$regs[12]; | |
case (43): | |
h$stack[(h$sp - 42)] = h$regs[11]; | |
case (42): | |
h$stack[(h$sp - 41)] = h$regs[10]; | |
case (41): | |
h$stack[(h$sp - 40)] = h$regs[9]; | |
case (40): | |
h$stack[(h$sp - 39)] = h$regs[8]; | |
case (39): | |
h$stack[(h$sp - 38)] = h$regs[7]; | |
case (38): | |
h$stack[(h$sp - 37)] = h$regs[6]; | |
case (37): | |
h$stack[(h$sp - 36)] = h$regs[5]; | |
case (36): | |
h$stack[(h$sp - 35)] = h$regs[4]; | |
case (35): | |
h$stack[(h$sp - 34)] = h$regs[3]; | |
case (34): | |
h$stack[(h$sp - 33)] = h$regs[2]; | |
case (33): | |
h$stack[(h$sp - 32)] = h$regs[1]; | |
case (32): | |
h$stack[(h$sp - 31)] = h$regs[0]; | |
case (31): | |
h$stack[(h$sp - 30)] = h$r32; | |
case (30): | |
h$stack[(h$sp - 29)] = h$r31; | |
case (29): | |
h$stack[(h$sp - 28)] = h$r30; | |
case (28): | |
h$stack[(h$sp - 27)] = h$r29; | |
case (27): | |
h$stack[(h$sp - 26)] = h$r28; | |
case (26): | |
h$stack[(h$sp - 25)] = h$r27; | |
case (25): | |
h$stack[(h$sp - 24)] = h$r26; | |
case (24): | |
h$stack[(h$sp - 23)] = h$r25; | |
case (23): | |
h$stack[(h$sp - 22)] = h$r24; | |
case (22): | |
h$stack[(h$sp - 21)] = h$r23; | |
case (21): | |
h$stack[(h$sp - 20)] = h$r22; | |
case (20): | |
h$stack[(h$sp - 19)] = h$r21; | |
case (19): | |
h$stack[(h$sp - 18)] = h$r20; | |
case (18): | |
h$stack[(h$sp - 17)] = h$r19; | |
case (17): | |
h$stack[(h$sp - 16)] = h$r18; | |
case (16): | |
h$stack[(h$sp - 15)] = h$r17; | |
case (15): | |
h$stack[(h$sp - 14)] = h$r16; | |
case (14): | |
h$stack[(h$sp - 13)] = h$r15; | |
case (13): | |
h$stack[(h$sp - 12)] = h$r14; | |
case (12): | |
h$stack[(h$sp - 11)] = h$r13; | |
case (11): | |
h$stack[(h$sp - 10)] = h$r12; | |
case (10): | |
h$stack[(h$sp - 9)] = h$r11; | |
case (9): | |
h$stack[(h$sp - 8)] = h$r10; | |
case (8): | |
h$stack[(h$sp - 7)] = h$r9; | |
case (7): | |
h$stack[(h$sp - 6)] = h$r8; | |
case (6): | |
h$stack[(h$sp - 5)] = h$r7; | |
case (5): | |
h$stack[(h$sp - 4)] = h$r6; | |
case (4): | |
h$stack[(h$sp - 3)] = h$r5; | |
case (3): | |
h$stack[(h$sp - 2)] = h$r4; | |
case (2): | |
h$stack[(h$sp - 1)] = h$r3; | |
case (1): | |
h$stack[(h$sp - 0)] = h$r2; | |
default: | |
}; | |
var h$RTS_574 = h$apply[h$RTS_547]; | |
if((h$RTS_574 === h$ap_gen)) | |
{ | |
h$sp += 2; | |
h$stack[(h$sp - 1)] = h$RTS_547; | |
} | |
else | |
{ | |
++h$sp; | |
}; | |
h$stack[h$sp] = h$RTS_574; | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
throw(("h$ap_gen_fast: unexpected closure type: " + h$RTS_548.t)); | |
}; | |
}; | |
function h$ap_0_0_fast() | |
{ | |
if((typeof h$r1 !== "object")) | |
{ | |
return h$rs(); | |
}; | |
var h$RTS_575 = h$r1.f; | |
if((h$RTS_575 === h$unbox_e)) | |
{ | |
h$r1 = h$r1.d1; | |
return h$rs(); | |
}; | |
switch (h$RTS_575.t) | |
{ | |
case (2): | |
case (1): | |
case (3): | |
return h$rs(); | |
case (5): | |
h$p3(h$ap_0_0, h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
return h$RTS_575; | |
}; | |
}; | |
function h$ap_0_0() | |
{ | |
--h$sp; | |
if((typeof h$r1 !== "object")) | |
{ | |
return h$rs(); | |
}; | |
var h$RTS_576 = h$r1.f; | |
if((h$RTS_576 === h$unbox_e)) | |
{ | |
h$r1 = h$r1.d1; | |
return h$rs(); | |
}; | |
switch (h$RTS_576.t) | |
{ | |
case (2): | |
case (1): | |
case (3): | |
return h$rs(); | |
case (5): | |
h$p3(h$ap_0_0, h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
default: | |
return h$RTS_576; | |
}; | |
}; | |
h$o(h$ap_0_0, (-1), 0, 0, 256, null); | |
function h$ap_1_0(h$RTS_577) | |
{ | |
var h$RTS_578 = h$r1.f; | |
if((h$RTS_578.t === 0)) | |
{ | |
return h$RTS_578; | |
} | |
else | |
{ | |
if((h$RTS_578.t === 5)) | |
{ | |
h$p2(h$r1, h$return); | |
return h$blockOnBlackhole(h$r1); | |
} | |
else | |
{ | |
--h$sp; | |
return h$RTS_578; | |
}; | |
}; | |
}; | |
h$o(h$ap_1_0, (-1), 0, 0, 256, null); | |
function h$e(h$RTS_579) | |
{ | |
h$r1 = h$RTS_579; | |
if((typeof h$RTS_579 !== "object")) | |
{ | |
return h$rs(); | |
}; | |
var h$RTS_580 = h$RTS_579.f; | |
if((h$RTS_580 === h$unbox_e)) | |
{ | |
h$r1 = h$RTS_579.d1; | |
return h$rs(); | |
}; | |
switch (h$RTS_580.t) | |
{ | |
case (2): | |
case (1): | |
case (3): | |
return h$rs(); | |
case (5): | |
h$p3(h$ap_0_0, h$RTS_579, h$return); | |
return h$blockOnBlackhole(h$RTS_579); | |
default: | |
return h$RTS_580; | |
}; | |
}; | |
function h$upd_frame() | |
{ | |
var h$RTS_581 = h$stack[(h$sp - 1)]; | |
var h$RTS_582 = h$RTS_581.d2; | |
if((h$RTS_582 !== null)) | |
{ | |
for(var h$RTS_583 = 0;(h$RTS_583 < h$RTS_582.length);(h$RTS_583++)) { | |
h$wakeupThread(h$RTS_582[h$RTS_583]); | |
}; | |
}; | |
if((typeof h$r1 === "object")) | |
{ | |
h$RTS_581.f = h$r1.f; | |
h$RTS_581.d1 = h$r1.d1; | |
h$RTS_581.d2 = h$r1.d2; | |
h$RTS_581.m = h$r1.m; | |
} | |
else | |
{ | |
h$RTS_581.f = h$unbox_e; | |
h$RTS_581.d1 = h$r1; | |
h$RTS_581.d2 = null; | |
h$RTS_581.m = 0; | |
}; | |
h$sp -= 2; | |
return h$rs(); | |
}; | |
h$o(h$upd_frame, (-1), 0, 1, 256, null); | |
function h$upd_frame_lne() | |
{ | |
var h$RTS_584 = h$stack[(h$sp - 1)]; | |
h$stack[h$RTS_584] = h$r1; | |
h$sp -= 2; | |
return h$rs(); | |
}; | |
h$o(h$upd_frame_lne, (-1), 0, 1, 256, null); | |
function h$pap_gen() | |
{ | |
var h$RTS_585 = h$r1.d1; | |
var h$RTS_586 = h$RTS_585.f; | |
var h$RTS_587 = h$r1.d2; | |
var h$RTS_588 = (((h$RTS_586.t === 1) ? h$RTS_586.a : h$RTS_585.d2.d1) >> 8); | |
var h$RTS_589 = (h$r1.d2.d1 >> 8); | |
var h$RTS_590 = (h$RTS_588 - h$RTS_589); | |
h$moveRegs2(h$RTS_589, h$RTS_590); | |
switch (h$RTS_590) | |
{ | |
case (127): | |
h$regs[95] = h$RTS_587.d128; | |
case (126): | |
h$regs[94] = h$RTS_587.d127; | |
case (125): | |
h$regs[93] = h$RTS_587.d126; | |
case (124): | |
h$regs[92] = h$RTS_587.d125; | |
case (123): | |
h$regs[91] = h$RTS_587.d124; | |
case (122): | |
h$regs[90] = h$RTS_587.d123; | |
case (121): | |
h$regs[89] = h$RTS_587.d122; | |
case (120): | |
h$regs[88] = h$RTS_587.d121; | |
case (119): | |
h$regs[87] = h$RTS_587.d120; | |
case (118): | |
h$regs[86] = h$RTS_587.d119; | |
case (117): | |
h$regs[85] = h$RTS_587.d118; | |
case (116): | |
h$regs[84] = h$RTS_587.d117; | |
case (115): | |
h$regs[83] = h$RTS_587.d116; | |
case (114): | |
h$regs[82] = h$RTS_587.d115; | |
case (113): | |
h$regs[81] = h$RTS_587.d114; | |
case (112): | |
h$regs[80] = h$RTS_587.d113; | |
case (111): | |
h$regs[79] = h$RTS_587.d112; | |
case (110): | |
h$regs[78] = h$RTS_587.d111; | |
case (109): | |
h$regs[77] = h$RTS_587.d110; | |
case (108): | |
h$regs[76] = h$RTS_587.d109; | |
case (107): | |
h$regs[75] = h$RTS_587.d108; | |
case (106): | |
h$regs[74] = h$RTS_587.d107; | |
case (105): | |
h$regs[73] = h$RTS_587.d106; | |
case (104): | |
h$regs[72] = h$RTS_587.d105; | |
case (103): | |
h$regs[71] = h$RTS_587.d104; | |
case (102): | |
h$regs[70] = h$RTS_587.d103; | |
case (101): | |
h$regs[69] = h$RTS_587.d102; | |
case (100): | |
h$regs[68] = h$RTS_587.d101; | |
case (99): | |
h$regs[67] = h$RTS_587.d100; | |
case (98): | |
h$regs[66] = h$RTS_587.d99; | |
case (97): | |
h$regs[65] = h$RTS_587.d98; | |
case (96): | |
h$regs[64] = h$RTS_587.d97; | |
case (95): | |
h$regs[63] = h$RTS_587.d96; | |
case (94): | |
h$regs[62] = h$RTS_587.d95; | |
case (93): | |
h$regs[61] = h$RTS_587.d94; | |
case (92): | |
h$regs[60] = h$RTS_587.d93; | |
case (91): | |
h$regs[59] = h$RTS_587.d92; | |
case (90): | |
h$regs[58] = h$RTS_587.d91; | |
case (89): | |
h$regs[57] = h$RTS_587.d90; | |
case (88): | |
h$regs[56] = h$RTS_587.d89; | |
case (87): | |
h$regs[55] = h$RTS_587.d88; | |
case (86): | |
h$regs[54] = h$RTS_587.d87; | |
case (85): | |
h$regs[53] = h$RTS_587.d86; | |
case (84): | |
h$regs[52] = h$RTS_587.d85; | |
case (83): | |
h$regs[51] = h$RTS_587.d84; | |
case (82): | |
h$regs[50] = h$RTS_587.d83; | |
case (81): | |
h$regs[49] = h$RTS_587.d82; | |
case (80): | |
h$regs[48] = h$RTS_587.d81; | |
case (79): | |
h$regs[47] = h$RTS_587.d80; | |
case (78): | |
h$regs[46] = h$RTS_587.d79; | |
case (77): | |
h$regs[45] = h$RTS_587.d78; | |
case (76): | |
h$regs[44] = h$RTS_587.d77; | |
case (75): | |
h$regs[43] = h$RTS_587.d76; | |
case (74): | |
h$regs[42] = h$RTS_587.d75; | |
case (73): | |
h$regs[41] = h$RTS_587.d74; | |
case (72): | |
h$regs[40] = h$RTS_587.d73; | |
case (71): | |
h$regs[39] = h$RTS_587.d72; | |
case (70): | |
h$regs[38] = h$RTS_587.d71; | |
case (69): | |
h$regs[37] = h$RTS_587.d70; | |
case (68): | |
h$regs[36] = h$RTS_587.d69; | |
case (67): | |
h$regs[35] = h$RTS_587.d68; | |
case (66): | |
h$regs[34] = h$RTS_587.d67; | |
case (65): | |
h$regs[33] = h$RTS_587.d66; | |
case (64): | |
h$regs[32] = h$RTS_587.d65; | |
case (63): | |
h$regs[31] = h$RTS_587.d64; | |
case (62): | |
h$regs[30] = h$RTS_587.d63; | |
case (61): | |
h$regs[29] = h$RTS_587.d62; | |
case (60): | |
h$regs[28] = h$RTS_587.d61; | |
case (59): | |
h$regs[27] = h$RTS_587.d60; | |
case (58): | |
h$regs[26] = h$RTS_587.d59; | |
case (57): | |
h$regs[25] = h$RTS_587.d58; | |
case (56): | |
h$regs[24] = h$RTS_587.d57; | |
case (55): | |
h$regs[23] = h$RTS_587.d56; | |
case (54): | |
h$regs[22] = h$RTS_587.d55; | |
case (53): | |
h$regs[21] = h$RTS_587.d54; | |
case (52): | |
h$regs[20] = h$RTS_587.d53; | |
case (51): | |
h$regs[19] = h$RTS_587.d52; | |
case (50): | |
h$regs[18] = h$RTS_587.d51; | |
case (49): | |
h$regs[17] = h$RTS_587.d50; | |
case (48): | |
h$regs[16] = h$RTS_587.d49; | |
case (47): | |
h$regs[15] = h$RTS_587.d48; | |
case (46): | |
h$regs[14] = h$RTS_587.d47; | |
case (45): | |
h$regs[13] = h$RTS_587.d46; | |
case (44): | |
h$regs[12] = h$RTS_587.d45; | |
case (43): | |
h$regs[11] = h$RTS_587.d44; | |
case (42): | |
h$regs[10] = h$RTS_587.d43; | |
case (41): | |
h$regs[9] = h$RTS_587.d42; | |
case (40): | |
h$regs[8] = h$RTS_587.d41; | |
case (39): | |
h$regs[7] = h$RTS_587.d40; | |
case (38): | |
h$regs[6] = h$RTS_587.d39; | |
case (37): | |
h$regs[5] = h$RTS_587.d38; | |
case (36): | |
h$regs[4] = h$RTS_587.d37; | |
case (35): | |
h$regs[3] = h$RTS_587.d36; | |
case (34): | |
h$regs[2] = h$RTS_587.d35; | |
case (33): | |
h$regs[1] = h$RTS_587.d34; | |
case (32): | |
h$regs[0] = h$RTS_587.d33; | |
case (31): | |
h$r32 = h$RTS_587.d32; | |
case (30): | |
h$r31 = h$RTS_587.d31; | |
case (29): | |
h$r30 = h$RTS_587.d30; | |
case (28): | |
h$r29 = h$RTS_587.d29; | |
case (27): | |
h$r28 = h$RTS_587.d28; | |
case (26): | |
h$r27 = h$RTS_587.d27; | |
case (25): | |
h$r26 = h$RTS_587.d26; | |
case (24): | |
h$r25 = h$RTS_587.d25; | |
case (23): | |
h$r24 = h$RTS_587.d24; | |
case (22): | |
h$r23 = h$RTS_587.d23; | |
case (21): | |
h$r22 = h$RTS_587.d22; | |
case (20): | |
h$r21 = h$RTS_587.d21; | |
case (19): | |
h$r20 = h$RTS_587.d20; | |
case (18): | |
h$r19 = h$RTS_587.d19; | |
case (17): | |
h$r18 = h$RTS_587.d18; | |
case (16): | |
h$r17 = h$RTS_587.d17; | |
case (15): | |
h$r16 = h$RTS_587.d16; | |
case (14): | |
h$r15 = h$RTS_587.d15; | |
case (13): | |
h$r14 = h$RTS_587.d14; | |
case (12): | |
h$r13 = h$RTS_587.d13; | |
case (11): | |
h$r12 = h$RTS_587.d12; | |
case (10): | |
h$r11 = h$RTS_587.d11; | |
case (9): | |
h$r10 = h$RTS_587.d10; | |
case (8): | |
h$r9 = h$RTS_587.d9; | |
case (7): | |
h$r8 = h$RTS_587.d8; | |
case (6): | |
h$r7 = h$RTS_587.d7; | |
case (5): | |
h$r6 = h$RTS_587.d6; | |
case (4): | |
h$r5 = h$RTS_587.d5; | |
case (3): | |
h$r4 = h$RTS_587.d4; | |
case (2): | |
h$r3 = h$RTS_587.d3; | |
case (1): | |
h$r2 = h$RTS_587.d2; | |
default: | |
}; | |
h$r1 = h$RTS_585; | |
return h$RTS_586; | |
}; | |
h$o(h$pap_gen, 3, 0, (-1), (-1), null); | |
function h$moveRegs2(h$RTS_591, h$RTS_592) | |
{ | |
switch (((h$RTS_591 << 8) | h$RTS_592)) | |
{ | |
case (257): | |
h$r3 = h$r2; | |
break; | |
case (258): | |
h$r4 = h$r2; | |
break; | |
case (259): | |
h$r5 = h$r2; | |
break; | |
case (260): | |
h$r6 = h$r2; | |
break; | |
case (513): | |
h$r4 = h$r3; | |
h$r3 = h$r2; | |
break; | |
case (514): | |
h$r5 = h$r3; | |
h$r4 = h$r2; | |
break; | |
case (515): | |
h$r6 = h$r3; | |
h$r5 = h$r2; | |
break; | |
case (516): | |
h$r7 = h$r3; | |
h$r6 = h$r2; | |
break; | |
case (769): | |
h$r5 = h$r4; | |
h$r4 = h$r3; | |
h$r3 = h$r2; | |
break; | |
case (770): | |
h$r6 = h$r4; | |
h$r5 = h$r3; | |
h$r4 = h$r2; | |
break; | |
case (771): | |
h$r7 = h$r4; | |
h$r6 = h$r3; | |
h$r5 = h$r2; | |
break; | |
case (772): | |
h$r8 = h$r4; | |
h$r7 = h$r3; | |
h$r6 = h$r2; | |
break; | |
case (1025): | |
h$r6 = h$r5; | |
h$r5 = h$r4; | |
h$r4 = h$r3; | |
h$r3 = h$r2; | |
break; | |
case (1026): | |
h$r7 = h$r5; | |
h$r6 = h$r4; | |
h$r5 = h$r3; | |
h$r4 = h$r2; | |
break; | |
case (1027): | |
h$r8 = h$r5; | |
h$r7 = h$r4; | |
h$r6 = h$r3; | |
h$r5 = h$r2; | |
break; | |
case (1028): | |
h$r9 = h$r5; | |
h$r8 = h$r4; | |
h$r7 = h$r3; | |
h$r6 = h$r2; | |
break; | |
case (1281): | |
h$r7 = h$r6; | |
h$r6 = h$r5; | |
h$r5 = h$r4; | |
h$r4 = h$r3; | |
h$r3 = h$r2; | |
break; | |
case (1282): | |
h$r8 = h$r6; | |
h$r7 = h$r5; | |
h$r6 = h$r4; | |
h$r5 = h$r3; | |
h$r4 = h$r2; | |
break; | |
case (1283): | |
h$r9 = h$r6; | |
h$r8 = h$r5; | |
h$r7 = h$r4; | |
h$r6 = h$r3; | |
h$r5 = h$r2; | |
break; | |
case (1284): | |
h$r10 = h$r6; | |
h$r9 = h$r5; | |
h$r8 = h$r4; | |
h$r7 = h$r3; | |
h$r6 = h$r2; | |
break; | |
default: | |
for(var h$RTS_593 = h$RTS_591;(h$RTS_593 > 0);(h$RTS_593--)) { | |
h$setReg(((h$RTS_593 + 1) + h$RTS_592), h$getReg((h$RTS_593 + 1))); | |
}; | |
}; | |
}; | |
var h$THUNK_CLOSURE = 0; | |
var h$FUN_CLOSURE = 1; | |
var h$PAP_CLOSURE = 3; | |
var h$CON_CLOSURE = 2; | |
var h$BLACKHOLE_CLOSURE = 5; | |
var h$STACKFRAME_CLOSURE = (-1); | |
function h$closureTypeName(h$RTS_594) | |
{ | |
if((h$RTS_594 === 0)) | |
{ | |
return "Thunk"; | |
}; | |
if((h$RTS_594 === 1)) | |
{ | |
return "Fun"; | |
}; | |
if((h$RTS_594 === 3)) | |
{ | |
return "Pap"; | |
}; | |
if((h$RTS_594 === 2)) | |
{ | |
return "Con"; | |
}; | |
if((h$RTS_594 === 5)) | |
{ | |
return "Blackhole"; | |
}; | |
if((h$RTS_594 === (-1))) | |
{ | |
return "StackFrame"; | |
}; | |
return "InvalidClosureType"; | |
}; | |
function h$runio_e() | |
{ | |
h$r1 = h$r1.d1; | |
h$stack[++h$sp] = h$ap_1_0; | |
return h$ap_1_0; | |
}; | |
h$o(h$runio_e, 0, 0, 1, 256, null); | |
function h$runio(h$RTS_595) | |
{ | |
return h$c1(h$runio_e, h$RTS_595); | |
}; | |
function h$flushStdout_e() | |
{ | |
h$r1 = h$baseZCGHCziIOziHandlezihFlush; | |
h$r2 = h$baseZCGHCziIOziHandleziFDzistdout; | |
return h$ap_1_1_fast(); | |
}; | |
h$o(h$flushStdout_e, 0, 0, 0, 0, null); | |
var h$flushStdout = h$static_thunk(h$flushStdout_e); | |
var h$RTS_596 = new Date(); | |
function h$dumpRes(h$RTS_597) | |
{ | |
h$printcl(h$RTS_597); | |
var h$RTS_598 = new Date(); | |
h$log((("elapsed time: " + (h$RTS_598.getTime() - h$RTS_596.getTime())) + "ms")); | |
}; | |
function h$ascii(h$RTS_599) | |
{ | |
var h$RTS_600 = []; | |
for(var h$RTS_601 = 0;(h$RTS_601 < h$RTS_599.length);(h$RTS_601++)) { | |
h$RTS_600.push(h$RTS_599.charCodeAt(h$RTS_601)); | |
}; | |
h$RTS_600.push(0); | |
return h$RTS_600; | |
}; | |
function h$dumpStackTop(h$RTS_602, h$RTS_603, h$RTS_604) | |
{ | |
h$RTS_603 = Math.max(h$RTS_603, 0); | |
for(var h$RTS_605 = h$RTS_603;(h$RTS_605 <= h$RTS_604);(h$RTS_605++)) { | |
var h$RTS_606 = h$RTS_602[h$RTS_605]; | |
if((h$RTS_606 && h$RTS_606.n)) | |
{ | |
h$log(((("stack[" + h$RTS_605) + "] = ") + h$RTS_606.n)); | |
} | |
else | |
{ | |
if((h$RTS_606 === null)) | |
{ | |
h$log((("stack[" + h$RTS_605) + "] = null WARNING DANGER")); | |
} | |
else | |
{ | |
if((((((typeof h$RTS_606 === "object") && (h$RTS_606 !== null)) && h$RTS_606.hasOwnProperty("f")) && h$RTS_606. | |
hasOwnProperty("d1")) && h$RTS_606.hasOwnProperty("d2"))) | |
{ | |
if((typeof h$RTS_606.f !== "function")) | |
{ | |
h$log((("stack[" + h$RTS_605) + "] = WARNING: dodgy object")); | |
} | |
else | |
{ | |
if((h$RTS_606.d1 === undefined)) | |
{ | |
h$log((("WARNING: stack[" + h$RTS_605) + "] d1 undefined")); | |
}; | |
if((h$RTS_606.d2 === undefined)) | |
{ | |
h$log((("WARNING: stack[" + h$RTS_605) + "] d2 undefined")); | |
}; | |
if(((((h$RTS_606.f.t === 5) && h$RTS_606.d1) && h$RTS_606.d1.x1) && h$RTS_606.d1.x1.n)) | |
{ | |
h$log(((("stack[" + h$RTS_605) + "] = blackhole -> ") + h$RTS_606.d1.x1.n)); | |
} | |
else | |
{ | |
var h$RTS_607 = ""; | |
if(((h$RTS_606.f.n === "integer-gmp:GHC.Integer.Type.Jp#") || (h$RTS_606.f.n === "integer-gmp:GHC.Integer.Type.Jn#"))) | |
{ | |
h$RTS_607 = ((((" [" + h$RTS_606.d1.join(",")) + "](") + h$ghcjsbn_tmp_toJSBN(h$RTS_606.d1).toString()) + ")"); | |
} | |
else | |
{ | |
if((h$RTS_606.f.n === "integer-gmp:GHC.Integer.Type.S#")) | |
{ | |
h$RTS_607 = ((" (S: " + h$RTS_606.d1) + ")"); | |
}; | |
}; | |
h$log((((((((((("stack[" + h$RTS_605) + "] = -> ") + (h$RTS_606.alloc ? (h$RTS_606.alloc + ": ") : "")) + h$RTS_606.f. | |
n) + " (") + h$closureTypeName(h$RTS_606.f.t)) + ", a: ") + h$RTS_606.f.a) + ")") + h$RTS_607)); | |
}; | |
}; | |
} | |
else | |
{ | |
if(h$isInstanceOf(h$RTS_606, h$MVar)) | |
{ | |
var h$RTS_608 = ((h$RTS_606.val === null) ? " empty" : (" value -> " + ((typeof h$RTS_606. | |
val === "object") ? (((((h$RTS_606.val.f.n + " (") + h$closureTypeName(h$RTS_606.val.f.t)) + ", a: ") + h$RTS_606.val.f. | |
a) + ")") : h$RTS_606.val))); | |
h$log(((("stack[" + h$RTS_605) + "] = MVar ") + h$RTS_608)); | |
} | |
else | |
{ | |
if(h$isInstanceOf(h$RTS_606, h$MutVar)) | |
{ | |
h$log(((("stack[" + h$RTS_605) + "] = IORef -> ") + ((typeof h$RTS_606.val === "object") ? (((((h$RTS_606.val.f. | |
n + " (") + h$closureTypeName(h$RTS_606.val.f.t)) + ", a: ") + h$RTS_606.val.f.a) + ")") : h$RTS_606.val))); | |
} | |
else | |
{ | |
if(Array.isArray(h$RTS_606)) | |
{ | |
h$log(((("stack[" + h$RTS_605) + "] = ") + (("[" + h$RTS_606.join(",")) + "]").substring(0, 50))); | |
} | |
else | |
{ | |
if((typeof h$RTS_606 === "object")) | |
{ | |
h$log(((("stack[" + h$RTS_605) + "] = ") + h$collectProps(h$RTS_606).substring(0, 50))); | |
} | |
else | |
{ | |
if((typeof h$RTS_606 === "function")) | |
{ | |
var h$RTS_609 = new RegExp("([^\\n]+)\\n(.|\\n)*"); | |
h$log(((("stack[" + h$RTS_605) + "] = ") + ("" + h$RTS_606).substring(0, 50).replace(h$RTS_609, "$1"))); | |
} | |
else | |
{ | |
h$log(((("stack[" + h$RTS_605) + "] = ") + ("" + h$RTS_606).substring(0, 50))); | |
}; | |
}; | |
}; | |
}; | |
}; | |
}; | |
}; | |
}; | |
}; | |
}; | |
function h$checkObj(h$RTS_610) | |
{ | |
if(((typeof h$RTS_610 === "boolean") || (typeof h$RTS_610 === "number"))) | |
{ | |
return undefined; | |
}; | |
if(((((!h$RTS_610.hasOwnProperty("f") || (h$RTS_610.f === null)) || (h$RTS_610.f === undefined)) || (h$RTS_610.f. | |
a === undefined)) || (typeof h$RTS_610.f !== "function"))) | |
{ | |
h$log("h$checkObj: WARNING, something wrong with f:"); | |
h$log(("" + h$RTS_610).substring(0, 200)); | |
h$log(h$collectProps(h$RTS_610)); | |
h$log(typeof h$RTS_610.f); | |
}; | |
if((!h$RTS_610.hasOwnProperty("d1") || (h$RTS_610.d1 === undefined))) | |
{ | |
h$log("h$checkObj: WARNING, something wrong with d1:"); | |
h$log(("" + h$RTS_610).substring(0, 200)); | |
} | |
else | |
{ | |
if((!h$RTS_610.hasOwnProperty("d2") || (h$RTS_610.d2 === undefined))) | |
{ | |
h$log("h$checkObj: WARNING, something wrong with d2:"); | |
h$log(("" + h$RTS_610).substring(0, 200)); | |
} | |
else | |
{ | |
if((((h$RTS_610.d2 !== null) && (typeof h$RTS_610.d2 === "object")) && (h$RTS_610.f.size !== 2))) | |
{ | |
var h$RTS_611 = h$RTS_610.d2; | |
var h$RTS_612; | |
for(h$RTS_612 in h$RTS_611) | |
{ | |
if(h$RTS_611.hasOwnProperty(h$RTS_612)) | |
{ | |
if((h$RTS_612.substring(0, 1) != "d")) | |
{ | |
h$log(("h$checkObj: WARNING, unexpected field name: " + h$RTS_612)); | |
h$log(("" + h$RTS_610).substring(0, 200)); | |
}; | |
if((h$RTS_611[h$RTS_612] === undefined)) | |
{ | |
h$log(("h$checkObj: WARNING, undefined field detected: " + h$RTS_612)); | |
h$log(("" + h$RTS_610).substring(0, 200)); | |
}; | |
}; | |
}; | |
switch (h$RTS_610.f.size) | |
{ | |
case (6): | |
if((h$RTS_611.d5 === undefined)) | |
{ | |
h$log("h$checkObj: WARNING, undefined field detected: d5"); | |
}; | |
case (5): | |
if((h$RTS_611.d4 === undefined)) | |
{ | |
h$log("h$checkObj: WARNING, undefined field detected: d4"); | |
}; | |
case (4): | |
if((h$RTS_611.d3 === undefined)) | |
{ | |
h$log("h$checkObj: WARNING, undefined field detected: d3"); | |
}; | |
case (3): | |
if((h$RTS_611.d2 === undefined)) | |
{ | |
h$log("h$checkObj: WARNING, undefined field detected: d2"); | |
}; | |
if((h$RTS_611.d1 === undefined)) | |
{ | |
h$log("h$checkObj: WARNING, undefined field detected: d1"); | |
}; | |
default: | |
h$RTS_611 = h$RTS_610.d2; | |
}; | |
}; | |
}; | |
}; | |
}; | |
function h$traceForeign(h$RTS_613, h$RTS_614) | |
{ | |
if(true) | |
{ | |
return undefined; | |
}; | |
var h$RTS_615 = []; | |
for(var h$RTS_616 = 0;(h$RTS_616 < h$RTS_614.length);(h$RTS_616++)) { | |
var h$RTS_617 = h$RTS_614[h$RTS_616]; | |
if((h$RTS_617 === null)) | |
{ | |
h$RTS_615.push("null"); | |
} | |
else | |
{ | |
if((typeof h$RTS_617 === "object")) | |
{ | |
var h$RTS_618 = h$RTS_617.toString(); | |
if((h$RTS_618.length > 40)) | |
{ | |
h$RTS_615.push((h$RTS_618.substring(0, 40) + "...")); | |
} | |
else | |
{ | |
h$RTS_615.push(h$RTS_618); | |
}; | |
} | |
else | |
{ | |
h$RTS_615.push(("" + h$RTS_617)); | |
}; | |
}; | |
}; | |
h$log((((("ffi: " + h$RTS_613) + "(") + h$RTS_615.join(",")) + ")")); | |
}; | |
function h$restoreThread() | |
{ | |
var h$RTS_619 = h$stack[(h$sp - 2)]; | |
var h$RTS_620 = h$stack[(h$sp - 1)]; | |
var h$RTS_621 = (h$RTS_620 - 3); | |
for(var h$RTS_622 = 1;(h$RTS_622 <= h$RTS_621);(h$RTS_622++)) { | |
h$setReg(h$RTS_622, h$stack[((h$sp - 2) - h$RTS_622)]); | |
}; | |
h$sp -= h$RTS_620; | |
return h$RTS_619; | |
}; | |
h$o(h$restoreThread, (-1), 0, (-1), 0, null); | |
function h$return() | |
{ | |
h$r1 = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
return h$stack[h$sp]; | |
}; | |
h$o(h$return, (-1), 0, 1, 0, null); | |
function h$returnf() | |
{ | |
var h$RTS_623 = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
return h$RTS_623; | |
}; | |
h$o(h$returnf, (-1), 0, 1, 256, null); | |
function h$reschedule() | |
{ | |
return h$reschedule; | |
}; | |
h$o(h$reschedule, 0, 0, 0, 0, null); | |
function h$suspendCurrentThread(h$RTS_624) | |
{ | |
if((h$RTS_624 === h$reschedule)) | |
{ | |
throw("suspend called with h$reschedule"); | |
}; | |
if((h$RTS_624.t === (-1))) | |
{ | |
h$stack[h$sp] = h$RTS_624; | |
}; | |
if(((h$stack[h$sp] === h$restoreThread) || (h$RTS_624 === h$return))) | |
{ | |
h$currentThread.sp = h$sp; | |
return undefined; | |
}; | |
var h$RTS_625; | |
var h$RTS_626 = 0; | |
var h$RTS_627 = h$RTS_624.t; | |
if((h$RTS_627 === 3)) | |
{ | |
h$RTS_625 = ((h$r1.d2.d1 >> 8) + 1); | |
} | |
else | |
{ | |
if(((h$RTS_627 === 1) || (h$RTS_627 === (-1)))) | |
{ | |
h$RTS_625 = (h$RTS_624.r >> 8); | |
h$RTS_626 = (h$RTS_624.r & 255); | |
} | |
else | |
{ | |
h$RTS_625 = 1; | |
}; | |
}; | |
h$sp = (((h$sp + h$RTS_625) + h$RTS_626) + 3); | |
for(var h$RTS_628 = 1;(h$RTS_628 <= h$RTS_626);(h$RTS_628++)) { | |
h$stack[((h$sp - 2) - h$RTS_628)] = null; | |
}; | |
for(h$RTS_628 = (h$RTS_626 + 1);(h$RTS_628 <= (h$RTS_625 + h$RTS_626));(h$RTS_628++)) { | |
h$stack[((h$sp - 2) - h$RTS_628)] = h$getReg(h$RTS_628); | |
}; | |
h$stack[(h$sp - 2)] = h$RTS_624; | |
h$stack[(h$sp - 1)] = ((h$RTS_625 + h$RTS_626) + 3); | |
h$stack[h$sp] = h$restoreThread; | |
h$currentThread.sp = h$sp; | |
}; | |
function h$dumpRes() | |
{ | |
h$log(("h$dumpRes result: " + h$stack[(h$sp - 1)])); | |
h$log(h$r1); | |
h$log(h$collectProps(h$r1)); | |
if((h$r1.f && h$r1.f.n)) | |
{ | |
h$log(("name: " + h$r1.f.n)); | |
}; | |
if(h$r1.hasOwnProperty("d1")) | |
{ | |
h$log(("d1: " + h$r1.d1)); | |
}; | |
if(h$r1.hasOwnProperty("d2")) | |
{ | |
h$log(("d2: " + h$r1.d2)); | |
}; | |
if(h$r1.f) | |
{ | |
var h$RTS_629 = new RegExp("([^\\n]+)\\n(.|\\n)*"); | |
h$log(("function: " + ("" + h$r1.f).substring(0, 50).replace(h$RTS_629, "$1"))); | |
}; | |
h$sp -= 2; | |
return h$stack[h$sp]; | |
}; | |
h$o(h$dumpRes, 0, 0, 1, 256, null); | |
function h$resume_e() | |
{ | |
var h$RTS_630 = h$r1.d1; | |
h$bh(); | |
for(var h$RTS_631 = 0;(h$RTS_631 < h$RTS_630.length);(h$RTS_631++)) { | |
h$stack[((h$sp + 1) + h$RTS_631)] = h$RTS_630[h$RTS_631]; | |
}; | |
h$sp += h$RTS_630.length; | |
h$r1 = null; | |
return h$stack[h$sp]; | |
}; | |
h$o(h$resume_e, 0, 0, 0, 256, null); | |
function h$unmaskFrame() | |
{ | |
h$currentThread.mask = 0; | |
--h$sp; | |
if((h$currentThread.excep.length > 0)) | |
{ | |
h$p2(h$r1, h$return); | |
return h$reschedule; | |
} | |
else | |
{ | |
return h$stack[h$sp]; | |
}; | |
}; | |
h$o(h$unmaskFrame, (-1), 0, 0, 256, null); | |
function h$maskFrame() | |
{ | |
h$currentThread.mask = 2; | |
--h$sp; | |
return h$stack[h$sp]; | |
}; | |
h$o(h$maskFrame, (-1), 0, 0, 256, null); | |
function h$maskUnintFrame() | |
{ | |
h$currentThread.mask = 1; | |
--h$sp; | |
return h$stack[h$sp]; | |
}; | |
h$o(h$maskUnintFrame, (-1), 0, 0, 256, null); | |
function h$unboxFFIResult() | |
{ | |
var h$RTS_632 = h$r1.d1; | |
for(var h$RTS_633 = 0;(h$RTS_633 < h$RTS_632.length);(h$RTS_633++)) { | |
h$setReg((h$RTS_633 + 1), h$RTS_632[h$RTS_633]); | |
}; | |
--h$sp; | |
return h$stack[h$sp]; | |
}; | |
h$o(h$unboxFFIResult, (-1), 0, 0, 256, null); | |
function h$unbox_e() | |
{ | |
h$r1 = h$r1.d1; | |
return h$stack[h$sp]; | |
}; | |
h$o(h$unbox_e, 0, 0, 1, 256, null); | |
function h$retryInterrupted() | |
{ | |
var h$RTS_634 = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
return h$RTS_634[0].apply(this, h$RTS_634.slice(1)); | |
}; | |
h$o(h$retryInterrupted, (-1), 0, 1, 256, null); | |
function h$atomically_e() | |
{ | |
if(h$stmValidateTransaction()) | |
{ | |
h$stmCommitTransaction(); | |
h$sp -= 2; | |
return h$stack[h$sp]; | |
} | |
else | |
{ | |
++h$sp; | |
h$stack[h$sp] = h$checkInvariants_e; | |
return h$stmStartTransaction(h$stack[(h$sp - 2)]); | |
}; | |
}; | |
h$o(h$atomically_e, (-1), 0, 1, 256, null); | |
function h$checkInvariants_e() | |
{ | |
--h$sp; | |
return h$stmCheckInvariants(); | |
}; | |
h$o(h$checkInvariants_e, (-1), 0, 0, 256, null); | |
function h$stmCheckInvariantStart_e() | |
{ | |
var h$RTS_635 = h$stack[(h$sp - 2)]; | |
var h$RTS_636 = h$stack[(h$sp - 1)]; | |
var h$RTS_637 = h$currentThread.mask; | |
h$sp -= 3; | |
var h$RTS_638 = new h$Transaction(h$RTS_636.action, h$RTS_635); | |
h$RTS_638.checkRead = new h$Set(); | |
h$currentThread.transaction = h$RTS_638; | |
h$p4(h$RTS_638, h$RTS_637, h$stmInvariantViolatedHandler, h$catchStm_e); | |
h$r1 = h$RTS_636.action; | |
return h$ap_1_0_fast(); | |
}; | |
h$o(h$stmCheckInvariantStart_e, (-1), 0, 2, 0, null); | |
function h$stmCheckInvariantResult_e() | |
{ | |
var h$RTS_639 = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$stmUpdateInvariantDependencies(h$RTS_639); | |
h$stmAbortTransaction(); | |
return h$stack[h$sp]; | |
}; | |
h$o(h$stmCheckInvariantResult_e, (-1), 0, 1, 256, null); | |
function h$stmInvariantViolatedHandler_e() | |
{ | |
if((h$stack[h$sp] !== h$stmCheckInvariantResult_e)) | |
{ | |
throw("h$stmInvariantViolatedHandler_e: unexpected value on stack"); | |
}; | |
var h$RTS_640 = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$stmUpdateInvariantDependencies(h$RTS_640); | |
h$stmAbortTransaction(); | |
return h$throw(h$r2, false); | |
}; | |
h$o(h$stmInvariantViolatedHandler_e, 1, 258, 0, 256, null); | |
var h$stmInvariantViolatedHandler = h$c(h$stmInvariantViolatedHandler_e); | |
function h$stmCatchRetry_e() | |
{ | |
h$sp -= 2; | |
h$stmCommitTransaction(); | |
return h$stack[h$sp]; | |
}; | |
h$o(h$stmCatchRetry_e, (-1), 0, 1, 256, null); | |
function h$catchStm_e() | |
{ | |
h$sp -= 4; | |
return h$stack[h$sp]; | |
}; | |
h$o(h$catchStm_e, (-1), 0, 3, 256, null); | |
function h$stmResumeRetry_e() | |
{ | |
if((h$stack[(h$sp - 2)] !== h$atomically_e)) | |
{ | |
throw("h$stmResumeRetry_e: unexpected value on stack"); | |
}; | |
var h$RTS_641 = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
++h$sp; | |
h$stack[h$sp] = h$checkInvariants_e; | |
h$stmRemoveBlockedThread(h$RTS_641, h$currentThread); | |
return h$stmStartTransaction(h$stack[(h$sp - 2)]); | |
}; | |
h$o(h$stmResumeRetry_e, (-1), 0, 0, 256, null); | |
function h$lazy_e() | |
{ | |
var h$RTS_642 = h$r1.d1(); | |
h$bh(); | |
h$r1 = h$RTS_642; | |
return h$stack[h$sp]; | |
}; | |
h$o(h$lazy_e, 0, 0, 0, 256, null); | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
/* | |
GHCJS bignum library for integer-gmp package | |
uses JavaScript arrays for big numbers | |
some algorithms and code based on JSBN by Tom Wu | |
Copyright Luite Stegeman 2016 | |
*/ | |
// values defined in Gen2.ClosureInfo | |
// thread status | |
/* | |
* low-level heap object manipulation macros | |
*/ | |
// GHCJS.Prim.JSVal | |
// GHCJS.Prim.JSException | |
// Exception dictionary for JSException | |
// SomeException | |
// GHC.Ptr.Ptr | |
// GHC.Integer.GMP.Internals | |
// Data.Maybe.Maybe | |
// #define HS_NOTHING h$nothing | |
// Data.List | |
// Data.Text | |
// Data.Text.Lazy | |
// black holes | |
// can we skip the indirection for black holes? | |
// resumable thunks | |
// general deconstruction | |
// retrieve a numeric value that's possibly stored as an indirection | |
// generic lazy values | |
// generic data constructors and selectors | |
// unboxed tuple returns | |
// #define RETURN_UBX_TUP1(x) return x; | |
// #define GHCJSBN_TRACE_INTEGER 1 | |
// bits per limb | |
// BI_FP = 52 | |
// BI_FP - GHCJSBN_BITS | |
// 2*GHCJSBN_BITS - BI_FP | |
// 2 ^ BI_FP | |
// values for the Haskell Ordering enum | |
var h$ghcjsbn_zero_i = (h$c1(h$integerzmgmpZCGHCziIntegerziTypeziSzh_con_e, (0)));; | |
var h$ghcjsbn_one_i = (h$c1(h$integerzmgmpZCGHCziIntegerziTypeziSzh_con_e, (1)));; | |
var h$ghcjsbn_negOne_i = (h$c1(h$integerzmgmpZCGHCziIntegerziTypeziSzh_con_e, (-1)));; | |
var h$ghcjsbn_null_b = [-1]; | |
var h$ghcjsbn_zero_b = [0]; | |
var h$ghcjsbn_one_b = [1, 1]; | |
var h$ghcjsbn_two31_b = [2, 0, 8]; | |
var h$ghcjsbn_czero_b = [2, 268435455, 15]; | |
var h$ghcjsbn_two31_i = (h$c1(h$integerzmgmpZCGHCziIntegerziTypeziJpzh_con_e, (h$ghcjsbn_two31_b)));; | |
var h$ghcjsbn_negTwo31_i = (h$c1(h$integerzmgmpZCGHCziIntegerziTypeziSzh_con_e, (-2147483648)));; | |
/****************************************************************************** | |
Types used here: | |
- b BigNat: array of limbs (each a number of GHCJSBN_BITS bits) | |
- s Int: small integer in range -2^31 .. 2^31-1 | |
- w Word: small integer in range 0 .. 2^32-1, | |
values greater than 2^31-1 are stored as negative numbers | |
- i Integer: Haskell Integer heap object, see invariants | |
Integer invariants: | |
- BigNat arrays do not have leading zeroes | |
- Jp > S > Jn | |
- S range: -2^31 .. 2^31-1 (-2147483648 .. 2147483647) | |
******************************************************************************/ | |
// checks that the S,Jn,Jp constructor invariants hold | |
function h$ghcjsbn_assertValid_i(b, msg) { | |
var sd, d, neg, i, n; | |
// check global constants for unwanted mutations | |
if(h$ghcjsbn_zero_b.length !== 1 || h$ghcjsbn_zero_b[0] !== 0) { | |
throw new Error("zero_b mutated"); | |
} | |
if(h$ghcjsbn_one_b.length !== 2 || h$ghcjsbn_one_b[0] !== 1 || h$ghcjsbn_one_b[1] !== 1) { | |
throw new Error("one_b mutated"); | |
} | |
if(((b).f === h$integerzmgmpZCGHCziIntegerziTypeziSzh_con_e)) { | |
sd = ((b).d1); | |
if(typeof sd !== 'number') | |
throw new Error("invalid small integer: not a number"); | |
if((sd|0) !== sd) | |
throw new Error("invalid small integer: not a small int"); | |
} else { | |
if(((b).f === h$integerzmgmpZCGHCziIntegerziTypeziJpzh_con_e)) { | |
neg = false; | |
} else if(((b).f === h$integerzmgmpZCGHCziIntegerziTypeziJnzh_con_e)) { | |
neg = true; | |
} else { | |
throw new Error("invalid integer: unexpected constructor"); | |
} | |
d = ((b).d1); | |
h$ghcjsbn_assertValid_b(d, "assertValid_i"); | |
if(d[0] < 2) | |
throw new Error("invalid big integer: array too short"); | |
if(d[0] === 2) { | |
if((d[2] >> (31-28)) === 0 || | |
(neg && d[2] === 0x20 && d[1] === 0)) | |
throw new Error("invalid big integer: in smallint range"); | |
} | |
// everything ok | |
} | |
} | |
// checks invariant for big number | |
function h$ghcjsbn_assertValid_b(d, msg) { | |
var i, n; | |
if(!Array.isArray(d)) | |
throw new Error("invalid big integer: not an array"); | |
if(typeof d[0] !== 'number' || d[0] > (d.length-1)) | |
throw new Error("invalid big integer: incorrect number of limbs"); | |
if(d[0] > 0 && d[d[0]] === 0) | |
throw new Error("invalid big integer: leading zero"); | |
for(i = 1; i <= d[0]; i++) { | |
n = d[i]; | |
if(typeof n !== 'number') | |
throw new Error("invalid big integer: limb is not a number"); | |
if((n & 0xfffffff) !== n) | |
throw new Error("invalid big integer: limb out of range"); | |
} | |
} | |
function h$ghcjsbn_assertValid_s(s, msg) { | |
if(typeof s !== 'number') | |
throw new Error("invalid int: not a number"); | |
if((s|0) !== s) | |
throw new Error("invalid int: not in smallint range"); | |
} | |
function h$ghcjsbn_assertValid_w(w, msg) { | |
if(typeof w !== 'number') | |
throw new Error("invalid word: not a number"); | |
if((w|0) !== w) | |
throw new Error("invalid word: not in smallint range"); | |
} | |
function h$ghcjsbn_assertValid_d(d, msg) { | |
if(typeof d !== 'number') | |
throw new Error("invalid double: not a number"); | |
} | |
/******************************************************************************/ | |
/////////////////////////////////////////////////////////////////////////////// | |
// the ghcjsbn_r functions operate on the raw array data directly | |
/////////////////////////////////////////////////////////////////////////////// | |
var h$ghcjsbn_smallPrimes = | |
[ 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47 | |
, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113 | |
, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197 | |
, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281 | |
, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379 | |
, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463 | |
, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571 | |
, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659 | |
, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761 | |
, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863 | |
, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977 | |
, 983, 991, 997 | |
]; | |
var h$ghcjsbn_smallPrimesM = null; | |
function h$ghcjsbn_getSmallPrimesM() { | |
var a, i; | |
if(h$ghcjsbn_smallPrimesM === null) { | |
a = []; | |
for(i = 0; i < 1008; i++) { | |
a[i] = false; | |
} | |
for(i = h$ghcjsbn_smallPrimes.length - 1; i >= 0; i--) { | |
a[h$ghcjsbn_smallPrimes[i]] = true; | |
} | |
h$ghcjsbn_smallPrimesM = a; | |
} | |
return h$ghcjsbn_smallPrimesM; | |
} | |
// Int -> Int -> Bool | |
// fixme: seed | |
function h$ghcjsbn_isPrime_s(s, rounds) { | |
if(s < 2 || (s > 2 && ((s&1) === 1))) return false; | |
if(s <= 1008) { | |
return h$ghcjsbn_getSmallPrimesM()[s]; | |
} | |
throw new Error("isPrime_s"); | |
} | |
// BigNat -> Int -> Bool | |
// fixme: seed | |
function h$ghcjsbn_isPrime_b(b, rounds) { | |
h$ghcjsbn_assertValid_b(b, "isPrime"); | |
throw new Error("isPrime_b"); | |
} | |
// BigNat -> BigNat -> Bool | |
/* | |
function h$ghcjsbn_eq_bb(b1, b2) { | |
ASSERTVALID_B(b1, "eq_bb b1"); | |
ASSERTVALID_B(b2, "eq_bb b2"); | |
var l1 = b1.length, l2 = b2.length; | |
if(l1 !== l2) return false; | |
while(--l1 >= 0) { | |
if(b1[l1] !== b2[l1]) return false; | |
} | |
return true; | |
} | |
*/ | |
// BigNat -> BigNat -> Int (Ordering: LT,EQ,GT) | |
function h$ghcjsbn_cmp_bb(b1, b2) { | |
h$ghcjsbn_assertValid_b(b1, "cmp_bb b1"); | |
h$ghcjsbn_assertValid_b(b2, "cmp_bb b2"); | |
var l1 = b1[0], l2 = b2[0], d1, d2; | |
if(l1 === l2) { | |
while(--l1 >= 0) { | |
d1 = b1[l1+1]; | |
d2 = b2[l1+1]; | |
if(d1 !== d2) return d1 < d2 ? 0 : 2; | |
} | |
return 1; | |
} else { | |
return l1 > l2 ? 2 : 0; | |
} | |
} | |
// fixed size tmp, these should not grow | |
var h$ghcjsbn_tmp_2a = [0, 0, 0]; | |
var h$ghcjsbn_tmp_2b = [0, 0, 0]; | |
// this is variable size scratch space | |
var h$ghcjsbn_tmp_a = [0, 0, 0, 0, 0, 0, 0, 0]; | |
var h$ghcjsbn_tmp_b = [0, 0, 0, 0, 0, 0, 0, 0]; | |
// b - w :: BigNat -> Word -> BigNat | |
function h$ghcjsbn_sub_bw(b, w) { | |
var a = h$ghcjsbn_tmp_2a; | |
h$ghcjsbn_toBigNat_w(a, w); | |
return h$ghcjsbn_sub_bb(b, a); | |
} | |
// b - s :: BigNat -> Int -> BigNat | |
// returns new BigNat, nullBigNat in case of underflow | |
// returns size of t | |
function h$ghcjsbn_sub_bs(b, s) { | |
h$ghcjsbn_assertValid_b(b, "sub_bs"); | |
h$ghcjsbn_assertValid_s(s, "sub_bs"); | |
var a, ms, r; | |
if(s < 0) { | |
if(s === -2147483648) { | |
r = h$ghcjsbn_add_bb(b, h$ghcjsbn_two31_b); | |
} else { | |
a = h$ghcjsn_tmp_2a; | |
h$ghcjsbn_toBigNat_s(a, -s); | |
r = h$ghcjsbn_add_bb(b, a); | |
} | |
} else { | |
a = h$ghcjsn_tmp_2a; | |
h$ghcjsbn_toBigNat_s(a, s); | |
r = h$ghcjsbn_sub_bb(b, a); | |
} | |
h$ghcjsbn_assertValid_b(r, "sub_bs result"); | |
return r; | |
} | |
// t = b + w :: BigNat -> BigNat -> Word -> Int | |
// returns size of t | |
function h$ghcjsbn_add_bw(b, w) { | |
h$ghcjsbn_assertValid_b(b, "add_bw"); | |
h$ghcjsbn_assertValid_w(w, "add_bw"); | |
var a = h$ghcjsbn_tmp_2a; | |
h$ghcjsbn_toBigNat_w(a, w); | |
return h$ghcjsbn_add_bb(b, a); | |
} | |
// t = b + s :: BigNat -> BigNat -> Int -> Int | |
// returns size of t, nullBigNat in case of underflow | |
function h$ghcjsbn_add_bs(b, s) { | |
h$ghcjsbn_assertValid_b(b, "add_bs"); | |
h$ghcjsbn_assertValid_s(s, "add_bs"); | |
var a, ms, r; | |
if(s < 0) { | |
if(s === -2147483648) { | |
r = h$ghcjsbn_sub_bb(b, h$ghcjsbn_two31_r); | |
} else { | |
ms = -s; | |
a = h$ghcjsbn_tmp_2a; | |
h$ghcjsbn_toBigNat_s(a, ms); | |
r = h$ghcjsbn_sub(b, a); | |
} | |
} else { | |
a = h$ghcjsbn_tmp_2a; | |
h$ghcjsbn_toBigNat_s(a, s); | |
r = h$ghcjsbn_add_bb(b, a); | |
} | |
h$ghcjsbn_assertValid_b(r, "add_bs result"); | |
return r; | |
} | |
// t = b1 + b2 :: BigNat -> BigNat -> BigNat -> Int | |
// returns size of t | |
function h$ghcjsbn_add_bb(b1, b2) { | |
h$ghcjsbn_assertValid_b(b1, "add_bb b1"); | |
h$ghcjsbn_assertValid_b(b2, "add_bb b2"); | |
var i, c = 0, l1 = b1[0], l2 = b2[0], t = [0]; | |
var bl, lmin, lmax; | |
if(l1 <= l2) { | |
lmin = l1; | |
lmax = l2; | |
bl = b2; | |
} else { | |
lmin = l2; | |
lmax = l1; | |
bl = b1; | |
} | |
for(i=1;i<=lmin;i++) { | |
c += b1[i] + b2[i]; | |
t[i] = c & 0xfffffff; | |
c >>= 28; | |
} | |
for(i=lmin+1;i<=lmax;i++) { | |
c += bl[i]; | |
t[i] = c & 0xfffffff; | |
c >>= 28; | |
} | |
if(c !== 0) t[++lmax] = c; | |
t[0] = lmax; | |
h$ghcjsbn_assertValid_b(t, "add_bb result"); | |
return t; | |
} | |
// b1 += b2 :: BigNat -> BigNat -> Int | |
// returns new size of b1 | |
function h$ghcjsbn_addTo_bb(b1, b2) { | |
h$ghcjsbn_assertValid_b(b1, "addTo_bb b1"); | |
h$ghcjsbn_assertValid_b(b2, "addTo_bb b2"); | |
var i, c = 0, l1 = b1[0], l2 = b2[0]; | |
if(l2 > l1) { | |
for(i = l1 + 1; i <= l2; i++) { | |
b1[i] = 0; | |
} | |
l1 = l2; | |
} | |
for(i = 1; i <= l2; i++) { | |
c += b1[i] + b2[i]; | |
b1[i] = c & 0xfffffff; | |
c >>= 28; | |
} | |
// propagate carry as long as needed | |
for(i = l2 + 1; c !== 0 && i <= l1; i++) { | |
c += b1[i]; | |
b1[i] = c & 0xfffffff; | |
c >>= 28; | |
} | |
if(c !== 0) { | |
b1[l1] = c; | |
b1[0] = l1+1; | |
} else { | |
b1[0] = l1; | |
} | |
h$ghcjsbn_assertValid_b(b1, "addTo_bb result"); | |
} | |
// b1 - b2 :: BigNat -> BigNat -> BigNat | |
// returns a new BigNat, nullBigNat in case of underflow | |
function h$ghcjsbn_sub_bb(b1, b2) { | |
h$ghcjsbn_assertValid_b(b1, "sub_bb b1"); | |
h$ghcjsbn_assertValid_b(b2, "sub_bb b2"); | |
if(h$ghcjsbn_cmp_bb(b1,b2) === 0) { | |
return []; | |
} else { | |
var i, c = 0, l1 = b1[0], l2 = b2[0], t = [0]; | |
for(i = 1; i <= l2; i++) { | |
c += b1[i] - b2[i]; | |
t[i] = c & 0xfffffff; | |
c >>= 28; | |
} | |
for(i = l2 + 1; i <= l1; i++) { | |
c += b1[i]; | |
t[i] = c & 0xfffffff; | |
c >>= 28; | |
} | |
while(l1 > 0 && t[l1] === 0) l1--; | |
t[0] = l1; | |
h$ghcjsbn_assertValid_b(t, "sub_bb result"); | |
return t; | |
} | |
} | |
// b1 -= b2 :: BigNat -> BigNat -> Int | |
// returns size of t, b1 must be >= b2 | |
function h$ghcjsbn_subTo_bb(b1, b2) { | |
h$ghcjsbn_assertValid_b(b1, "subTo_bb b1"); | |
h$ghcjsbn_assertValid_b(b2, "subTo_bb b2"); | |
if(h$ghcjsbn_cmp_bb(b1, b2) === 0) { | |
throw new Error("h$ghcjsbn_subTo_bb assertion failed: b1 >= b2"); | |
} | |
var i, c = 0, l1 = b1[0], l2 = b2[0]; | |
for(i = 1; i <= l2; i++) { | |
c += b1[i] - b2[i]; | |
b1[i] = c & 0xfffffff; | |
c >>= 28; | |
} | |
for(i = l2 + 1; c !== 0 && i <= l1; i++) { | |
c += b1[i]; | |
b1[i] = c & 0xfffffff; | |
c >>= 28; | |
} | |
while(l1 > 0 && b1[l1] === 0) l1--; | |
b1[0] = l1; | |
h$ghcjsbn_assertValid_b(b1, "subTo_bb result"); | |
} | |
// t = b1 / b2, BigNat -> BigNat -> BigNat -> Int (returns size of t) | |
/* function h$ghcjsbn_div_bb(t, b1, b2) { | |
} | |
// t = b1 % b2, BigNat -> BigNat -> BigNat -> Int (returns size of t) | |
function h$ghcjsbn_mod_bb(t, b1, b2) { | |
} | |
// b % s, BigNat -> Int -> Int | |
function h$ghcjsbn_mod_bs(b, s) { | |
} | |
*/ | |
// BigNat -> Integer (nonnegative, known length) | |
/* | |
function h$ghcjsbn_wrap_pl(b, l) { | |
var lb; | |
if(l === 0) { | |
return MK_INTEGER_S(0); | |
} else if(l === 1) { | |
return MK_INTEGER_S(b[0]); | |
} else if(l === 2 && (b[1] >> (31 - GHCJSBN_BITS)) === 0) { | |
return MK_INTEGER_S((b[1] << GHCJSBN_BITS)|b[0]); | |
} else { | |
lb = b.length - l; | |
while(lb-- > 0) b.pop(); | |
return MK_INTEGER_Jp(b); | |
} | |
} | |
*/ | |
// BigNat -> Integer (nonnegative) | |
function h$ghcjsbn_wrap_p(b) { | |
var l = b[0]; | |
if(l === 0) { | |
return (h$c1(h$integerzmgmpZCGHCziIntegerziTypeziSzh_con_e, (0)));; | |
} else if(l === 1) { | |
return (h$c1(h$integerzmgmpZCGHCziIntegerziTypeziSzh_con_e, (b[1])));; | |
} else if(l === 2 && (b[2] >> (31 - 28)) === 0) { | |
return (h$c1(h$integerzmgmpZCGHCziIntegerziTypeziSzh_con_e, ((b[2] << 28)|b[1])));; | |
} else { | |
return (h$c1(h$integerzmgmpZCGHCziIntegerziTypeziJpzh_con_e, (b)));; | |
} | |
} | |
/* | |
function h$ghcjsbn_wrap_nl(b, l) { | |
var lb; | |
if(l === 0) { | |
return MK_INTEGER_S(0); | |
} else if(l === 1) { | |
return MK_INTEGER_S(-b[0]); | |
} else if(l === 2 && | |
((b[1] >> (31 - GHCJSN_BITS)) === 0 || | |
(b[1] === (1 << (31 - GHCJSBN_BITS)) && b[0] === 0))) { | |
return MK_INTEGER_S((-b[1]-b[0])|0); | |
} else { | |
lb = b.length - l; | |
while(lb-- > 0) b.pop(); | |
return MK_INTEGER_Jn(b); | |
} | |
} | |
*/ | |
// BigNat -> Integer (nonnegative) | |
function h$ghcjsbn_wrap_n(b) { | |
var l = b[0]; | |
if(l === 0) { | |
return (h$c1(h$integerzmgmpZCGHCziIntegerziTypeziSzh_con_e, (0)));; | |
} else if(l === 1) { | |
return (h$c1(h$integerzmgmpZCGHCziIntegerziTypeziSzh_con_e, (-b[1])));; | |
} else if(l === 2 && | |
((b[2] >> (31 - GHCJSN_BITS)) === 0 || | |
(b[2] === (1 << (31 - 28)) && b[1] === 0))) { | |
return (h$c1(h$integerzmgmpZCGHCziIntegerziTypeziSzh_con_e, ((-b[2]-b[1])|0)));; | |
} else { | |
return (h$c1(h$integerzmgmpZCGHCziIntegerziTypeziJnzh_con_e, (b)));; | |
} | |
} | |
// b1 *= b2 :: BigNat -> BigNat -> IO () | |
function h$ghcjsbn_mulTo_bb(b1, b2) { | |
h$ghcjsbn_assertValid_b(b1, "mulTo_bb b1"); | |
h$ghcjsbn_assertValid_b(b2, "mulTo_bb b2"); | |
var t = h$ghcjsbn_mul_bb(b1, b2); | |
h$ghcjsbn_copy(b1, t); | |
h$ghcjsbn_assertValid_b(b1, "mulTo_bb result"); | |
} | |
// b1 * b2 :: BigNat -> BigNat -> BigNat | |
function h$ghcjsbn_mul_bb(b1, b2) { | |
h$ghcjsbn_assertValid_b(b1, "mul_bb b1"); | |
h$ghcjsbn_assertValid_b(b2, "mul_bb b2"); | |
var l1 = b1[0], l2 = b2[0]; | |
/* if(l1 > 50 && l2 > 50) { | |
return h$ghcjsbn_mul_karatsuba_bb(b1, b2); | |
} fixme update this */ | |
var n = l1 + l2, i, t = [0]; | |
for(i = 1; i <= n; i++) t[i] = 0; | |
if(l1 > l2) { | |
for(i = 0; i < l2; i++) { | |
t[i + l1 + 1] = h$ghcjsbn_mul_limb(0, b1, b2[i+1], t, i, 0, l1); | |
} | |
} else { | |
for(i = 0; i < l1; i++) { | |
t[i + l2 + 1] = h$ghcjsbn_mul_limb(0, b2, b1[i+1], t, i, 0, l2); | |
} | |
} | |
for(i = l1 + l2; i > 0 && t[i] === 0; i--); | |
t[0] = i; | |
h$ghcjsbn_assertValid_b(t, "mul_bb result"); | |
return t; | |
} | |
function h$ghcjsbn_mul_bw(b, w) { | |
h$ghcjsbn_assertValid_b(b, "mul_bw"); | |
h$ghcjsbn_assertValid_w(w, "mul_bw"); | |
var a = h$ghcjsbn_tmp_2a; | |
h$ghcjsbn_toBigNat_w(a, w); | |
var t = h$ghcjsbn_mul_bb(b, a); | |
h$ghcjsbn_assertValid_b(t, "mul_bw result"); | |
return t; | |
} | |
// karatzuba multiplication for long numbers | |
function h$ghcjsbn_mul_karatsuba_bb(t, b1, b2) { | |
throw new Error("not yet updated"); | |
var l1 = b1.length, l2 = b2.length; | |
var i, b = (l1 < l2 ? l1 : l2) >> 1; | |
var x0 = [b], x1 = [l1-b], y0 = [b], y1 = [l2-b]; | |
for(i = 1; i <= b; i++) { | |
x0[i] = b1[i]; | |
y0[i] = b2[i]; | |
} | |
for(i = b + 1; i <= l1; i++) x1[i - b] = b1[i]; | |
for(i = b + 1; i <= l2; i++) y1[i - b] = b2[i]; | |
var z0 = h$ghcjsbn_mul_bb(x0, y0), z1, z2 = h$ghcjsbn_mul_bb(x1, y1); | |
// compute z1 = (x1 + x0)(y1 + y0) - z2 - z0 | |
// (reusing x0 and y0 for (x1 + x0) and (y1 + y0)) | |
h$ghcjsbn_addTo_bb(x0, x1); | |
h$ghcjsbn_addTo_bb(y0, x1); | |
z1 = h$ghcjsbn_mul_bb(x0, y0); | |
h$ghcjsbn_subTo_bb(z1, z2); | |
h$ghcjsbn_subTo_bb(z1, z0); | |
// store shifted z2 in t | |
// fixme this looks wrong | |
for(i = 0; i < 2*b; i++) t[i] = 0; | |
l2 = z2.length; | |
for(i = 0; i < l2; i++) t[i+2*b] = z2[i]; | |
// compute shifted z1s = z1 * B | |
var z1s = []; | |
l1 = z1.length; | |
for(i = 0; i < b; i++) z1s[i] = 0; | |
for(i = 0; i < l1; i++) z1s[i+b] = z1[i]; | |
// add the results so that t = z2 * (2*B) + z1 * B + z0 | |
h$ghcjsbn_addTo_bb(t, z1s); | |
h$ghcjsbn_addTo_bb(t, z0); | |
return t; | |
} | |
// from JSBN am3 | |
// w_j += (x*b_i) ? | |
/* c = carry? | |
n = iterations? | |
*/ | |
function h$ghcjsbn_mul_limb(i,b,x,w,j,c,n) { | |
// ASSERTVALID_B(b, "mul_limb b"); | |
// ASSERTVALID_B(w, "mul_limb w"); | |
var xl = x & 0x3fff, xh = x >> 14; | |
while(--n >= 0) { | |
var l = b[++i] & 0x3fff; | |
var h = b[i] >> 14; | |
var m = xh * l + h * xl; | |
l = xl *l + ((m & 0x3fff) << 14) + w[++j] + c; | |
c = (l >> 28) + (m >> 14) + xh * h; | |
// h$log("mul_limb: c: " + c + " l: " + l + " xh: " + xh + " h: " + h); | |
w[j] = l & 0xfffffff; | |
} | |
return c; | |
} | |
// q = b1 / b2, r = b1 % b2 :: BigNat -> BigNat -> BigNat -> BigNat -> Int | |
// b2 must be > 0 | |
// returns length of r | |
// d is normalized before return | |
/* | |
algorithm: | |
y = 0? | |
nsh = number of leading zeroes in most significant word | |
pm = positive modulus | |
pt = positive divident | |
y = tmp, shifted modulus | |
r = shifted divident | |
ys = length of y | |
y0 = biggest limb of y | |
yt = new estimated length of y? | |
*/ | |
function h$ghcjsbn_quotRem_bb(q, r, b1, b2) { | |
h$ghcjsbn_assertValid_b(b1, "quotRem_bb b1"); | |
h$ghcjsbn_assertValid_b(b2, "quotRem_bb b2"); | |
if(h$ghcjsbn_cmp_bw(b2, 0) !== 2) { | |
throw new Error("h$ghcjsbn_quotRem_bb: operand not positive"); | |
} | |
if(q === null) q = h$ghcjsbn_tmp_a; | |
if(r === null) r = h$ghcjsbn_tmp_b; | |
var l1 = b1[0], l2 = b2[0], nsh, y = []; | |
if(l1 === 0) { | |
q[0] = 0; | |
r[0] = 0; | |
return; | |
} | |
if(h$ghcjsbn_cmp_bb(b1,b2) === 0) { | |
q[0] = 0; | |
h$ghcjsbn_copy(r, b1); | |
return; | |
} | |
nsh = 28 -h$ghcjsbn_nbits_s(b2[l2]); | |
h$ghcjsbn_assertValid_s(nsh, "quotRem_bb nsh"); | |
if(nsh !== 0) { | |
h$ghcjsbn_shlTo_b(y, b2, nsh); | |
h$ghcjsbn_shlTo_b(r, b1, nsh); | |
} else { | |
h$ghcjsbn_copy(y, b2); | |
h$ghcjsbn_copy(r, b1); | |
} | |
h$ghcjsbn_assertValid_b(y, "quotRem_bb y_0"); | |
h$ghcjsbn_assertValid_b(r, "quotRem_bb r_0"); | |
var ys = y[0], y0 = y[ys]; | |
var yt = y0*(1<<24)+((ys>1)?y[ys-1]>>4:0); | |
var d1 = 4503599627370496/yt, d2 = (1<<24)/yt, e = 1 << 4; | |
var i = r[0], j = i-ys, t = q; | |
h$ghcjsbn_shlTo_limbs_b(t,y,j); | |
// h$log("rt1: " + i); | |
// h$log("[" + r.join(",") + "] [" + t.join(",") + "]"); | |
if(h$ghcjsbn_cmp_bb(r, t) !== 0) { | |
r[r[0]+1] = 1; | |
r[0] += 1; | |
// h$log("rt1a: " + r[0]); | |
h$ghcjsbn_subTo_bb(r, t); | |
} | |
// h$log("rt2: " + r[0]); | |
// h$log("y0: " + y0 + " yt: " + yt + " d1: " + d1 + " d2: " + d2 + " e: " + e); | |
h$ghcjsbn_shlTo_limbs_b(t, h$ghcjsbn_one_b, ys); | |
y = h$ghcjsbn_sub_bb(t, y); | |
while(y.length <= ys) y[y.length] = 0; // fixme? no looks ok | |
while(--j >= 0) { | |
// Estimate quotient digit | |
var qd = (r[(--i)+1]===y0)?0xfffffff:Math.floor(r[i+1]*d1+(r[i]+e)*d2); | |
// h$log("i: " + i + " j: " + j + " qd: " + qd + " rdi: " + r[i+1] + " ys: " + ys); | |
// h$log("yd: [" + y.join(',') + "] rd: [" + r.join(',') + "]"); | |
var am = h$ghcjsbn_mul_limb(0, y, qd, r, j, 0, ys); | |
// h$log("am: " + am); | |
if((r[i+1] += am) < qd) { | |
// if((r[i+1] += h$ghcjsbn_mul_limb(0, y, qd, r, j, 0, ys)) < qd) { | |
h$ghcjsbn_shlTo_limbs_b(t, y, j); | |
h$ghcjsbn_subTo_bb(r, t); | |
// h$log("0. rdi: " + r[i+1] + " qd: " + qd); | |
while(r[i+1] < --qd) { | |
// h$log("1. rdi: " + r[i+1] + " qd: " + qd); | |
h$ghcjsbn_subTo_bb(r, t); | |
} | |
} | |
} | |
h$ghcjsbn_assertValid_b(r, "intermediate r"); | |
h$ghcjsbn_shrTo_limbs_b(q, r, ys); | |
r[0] = ys; | |
while(r[r[0]] === 0 && r[0] > 0 && r[0]--); | |
if(nsh !== 0) { | |
var r0 = []; | |
h$ghcjsbn_copy(r0, r); | |
h$ghcjsbn_shrTo_b(r, r0, nsh); | |
} | |
h$ghcjsbn_assertValid_b(q, "quotRem_bb result q"); | |
h$ghcjsbn_assertValid_b(r, "quotRem_bb result r"); | |
} | |
// b % w , q = b / w :: BigNat -> BigNat -> Word -> Word | |
function h$ghcjsbn_quotRem_bw(q, b, w) { | |
h$ghcjsbn_assertValid_b(b, "quotRem_bw"); | |
h$ghcjsbn_assertValid_w(w, "quotRem_bw"); | |
var a = h$ghcjsbn_tmp_2a; | |
h$ghcjsbn_toBigNat_w(a, w); | |
/* if(w === 0) { | |
a[0] = 0; | |
} else if(w > 0 && w <= GHCJSBN_MASK) { | |
a[0] = 1; | |
a[1] = w; | |
} else { | |
a[0] = 2; | |
a[1] = w & GHCJSBN_MASK; | |
a[2] = w >>> GHCJSBN_BITS; | |
} */ | |
var r = []; | |
h$ghcjsbn_quotRem_bb(q, r, b, a); | |
return h$ghcjsbn_toWord_b(r); | |
} | |
// BigNat -> JSBN | |
// assumes same number of bits | |
function h$ghcjsbn_tmp_toJSBN(b) { | |
var j = new BigInteger(), bl = b[0], i; | |
for(i = 0; i < bl; i++) j.data[i] = b[i+1]; | |
j.s = 0; | |
j.t = bl; | |
return j; | |
/* ASSERTVALID_B(b, "toJSBN"); | |
var j0 = new BigInteger(); | |
var j1 = new BigInteger(); | |
var j2 = new BigInteger(); | |
for(var i = b[0]; i > 0; i--) { | |
h$log("i: " + b[i]); | |
j2.fromString('' + b[i]); | |
j0.lShiftTo(28, j1); | |
j1.addTo(j2, j0); | |
} | |
return j0; */ | |
} | |
// b = fromJSBN(j) :: BigNat -> JSBN -> Int | |
// returns length | |
function h$ghcjsbn_tmp_fromJSBN(b, j) { | |
var bl = j.t, i; | |
for(i = 0; i < bl; i++) { | |
b[i] = j.data[i]; | |
} | |
return bl; | |
} | |
// function h$ghcjsbn_divMod_bs(d | |
// t = b1 % b2 :: BigNat -> BigNat -> BigNat | |
function h$ghcjsbn_rem_bb(b1, b2) { | |
h$ghcjsbn_assertValid_b(b1, "rem_bb b1"); | |
h$ghcjsbn_assertValid_b(b2, "rem_bb b2"); | |
var t1 = [], t2 = []; | |
h$ghcjsbn_quotRem_bb(t1, t2, b1, b2); | |
h$ghcjsbn_assertValid_b(t2, "rem_bb result"); | |
return t2; | |
} | |
// b1 % s :: BigNat -> Word -> Word | |
function h$ghcjsbn_rem_bw(b, w) { | |
h$ghcjsbn_assertValid_b(b, "rem_bw"); | |
h$ghcjsbn_assertValid_w(w, "rem_bw"); | |
// var t1 = []; | |
var r = h$ghcjsbn_quotRem_bw([] /* t1 */, b, w); | |
h$ghcjsbn_assertValid_w(r, "rem_bw result"); | |
return r; | |
// var a = h$ghcjsbn_tmp_2a; | |
// h$ghcjsbn_toBigNat_w(a, w); | |
// a[1] = w & GHCJSBN_MASK; | |
// a[2] = w >>> GHCJSBN_BITS; | |
// var t1 = []; // , t2 = h$ghcjsbn_tmp_2b; | |
// return h$ghcjsbn_quotRem_bw(t1, /* t2 , */ b, a); | |
// return t[1] | (t[2] << GHCJSBN_BITS); | |
} | |
// b1 / b2 :: BigNat -> BigNat -> BigNat | |
function h$ghcjsbn_quot_bb(b1, b2) { | |
h$ghcjsbn_assertValid_b(b1, "quot_bb b1"); | |
h$ghcjsbn_assertValid_b(b2, "quot_bb b2"); | |
var t1 = [], t2 = []; | |
h$ghcjsbn_quotRem_bb(t1, t2, b1, b2); | |
h$ghcjsbn_assertValid_b(t1, "quot_bb result"); | |
return t1; | |
} | |
/* | |
// b / s :: BigNat -> Int -> BigNat | |
function h$ghcjsbn_div_bs(b, w) { | |
ASSERTVALID_B(b, "div_bs"); | |
ASSERTVALID_S(s, "div_bs"); | |
#ifdef GHCJS_ASSERT_INTEGER | |
if(s <= 0) { | |
throw new Error("h$ghcjsbn_div_bs: divisor must be positive"); | |
} | |
#endif | |
var a = h$ghcjsbn_tmp_2a; | |
a[0] = s & GHCJSBN_MASK; | |
a[1] = s >> GHCJSBN_BITS; | |
return h$ghcjsbn_div_bb(t, b, a); | |
} | |
*/ | |
// t = b % w :: BigNat -> BigNat -> Word -> Int | |
// returns length of t | |
/* | |
function h$ghcjsbn_div_bw(t, b, w) { | |
ASSERTVALID_B(b, "div_bw"); | |
ASSWRTVALID_W(w, "div_bw"); | |
var a = h$ghcjsbn_tmp_2a; | |
a[0] = w & GHCJSBN_MASK; | |
a[1] = w >>> GHCJSBN_BITS; | |
return h$ghcjsbn_div_bb(t, b, a); | |
} | |
*/ | |
// b ^ 2 :: BigNat -> BigNat | |
function h$ghcjsbn_sqr_b(b) { | |
h$ghcjsbn_assertValid_b(b, "sqr_b"); | |
var l = b[0], n = 2 * l, i, c, t = [0]; | |
for(i = 1; i <= n; i++) t[i] = 0; | |
for(i = 0; i < l - 1; i++) { | |
c = h$ghcjsbn_mul_limb(i, b, b[i+1],t,2*i,0,1); | |
if((t[i + l + 1] += h$ghcjsbn_mul_limb(i+1, b, 2*b[i+1], t, 2*i+1, c, l - i - 1)) >= 0x10000000) { | |
t[i + l + 1] -= 0x10000000; | |
t[i + l + 2] = 1; | |
} | |
} | |
if(n > 0) t[n] += h$ghcjsbn_mul_limb(i, b, b[i+1], t, 2*i, 0, 1); | |
if(t[n] === 0) n--; | |
t[0] = n; | |
h$ghcjsbn_assertValid_b(t, "sqr_b result"); | |
return t; | |
} | |
// b1 ^ b2 :: BigNat -> BigNat -> BigNat | |
// returns size of t | |
function h$ghcjsbn_pow_bb(b1, b2) { | |
h$ghcjsbn_assertValid_b(b1, "pow_bb b1"); | |
h$ghcjsbn_assertValid_b(b2, "pow_bb b2"); | |
var i, sq = b1, t = [1,1]; | |
var bits = h$ghcjsbn_nbits_b(b2); | |
for(i = 0; i < bits; i++) { | |
if(h$ghcjsbn_testBit_b(b2, i)) { | |
h$ghcjsbn_mulTo_bb(t, sq); | |
} | |
sq = h$ghcjsbn_sqr_b(sq); | |
} | |
return t; | |
} | |
// t = b ^ s :: BigNat -> Word -> BigNat | |
function h$ghcjsbn_pow_bw(b, w) { | |
h$ghcjsbn_assertValid_b(b, "pow_bw"); | |
h$ghcjsbn_assertValid_w(w, "pow_bw"); | |
var i, sq = b, t = [1,1]; | |
while(w) { | |
if(w&1) h$ghcjsbn_mulTo_bb(t, sq); | |
w >>>= 1; | |
if(w) { | |
sq = h$ghcjsbn_sqr_b(sq); | |
} | |
} | |
h$ghcjsbn_assertValid_b(t, "pow_bw result"); | |
return t; | |
} | |
// w1 ^ w2 :: Word -> Word -> BigNat | |
function h$ghcjsbn_pow_ww(w1, w2) { | |
h$ghcjsbn_assertValid_s(w1, "pow_ww w1"); | |
h$ghcjsbn_assertValid_s(w2, "pow_ww w2"); | |
var b = h$ghcjsbn_tmp_2a; | |
h$ghcjsbn_toBigNat_w(b, w1); | |
var t = h$ghcjsbn_pow_bw(b, w2); | |
h$ghcjsbn_assertValid_b(t, "pow_ww result"); | |
return t; | |
} | |
// (b ^ s1) % s2 :: BigNat -> BigNat -> BigNat -> BigNat | |
function h$ghcjsbn_modPow_bbb(b, s1, s2) { | |
throw new Error("modPow_bbb"); | |
} | |
// (b ^ s1) % s2 :: BigNat -> Int -> Int -> Int | |
function h$ghcjsbn_modPow_bss(b, s1, s2) { | |
throw new Error("modPow_bss"); | |
} | |
// (s1 ^ s2) % s3 :: Int -> Int -> Int -> Int | |
function h$ghcjsbn_modPow_sss(s1, s2, s3) { | |
throw new Error("modPow_sss"); | |
} | |
// r = gcd(b1,b2) BigNat -> BigNat -> BigNat | |
function h$ghcjsbn_gcd_bb(b1, b2) { | |
h$ghcjsbn_assertValid_b(b1, "gcd_bb b1"); | |
h$ghcjsbn_assertValid_b(b2, "gcd_bb b2"); | |
var r; | |
if(h$ghcjsbn_cmp_bb(b1, b2) === 2) { | |
r = b1; | |
b1 = b2; | |
b2 = r; | |
} | |
while(b1[0] > 0) { | |
r = h$ghcjsbn_rem_bb(b2, b1); | |
b2 = b1; | |
b1 = r; | |
} | |
h$ghcjsbn_assertValid_b(b2, "gcd_bb result"); | |
return b2; | |
} | |
// gcd(b,s) :: BigNat -> Int -> Int | |
function h$ghcjsbn_gcd_bs(b, s) { | |
throw new Error("h$ghcjsbn_gcd_bs not implemented"); | |
} | |
// gcd(s1,s2) :: Int -> Int -> Int | |
function h$ghcjsbn_gcd_ss(s1, s2) { | |
h$ghcjsbn_assertValid_s(s1, "gcd_ss s1"); | |
h$ghcjsbn_assertValid_s(s2, "gcd_ss s2"); | |
var a, b, r; | |
a = s1 < 0 ? -s1 : s1; | |
b = s2 < 0 ? -s2 : s2; | |
if(b < a) { | |
r = a; | |
a = b; | |
b = r; | |
} | |
while(a !== 0) { | |
r = b % a; | |
b = a; | |
a = r; | |
} | |
h$ghcjsbn_assertValid_s(b, "gcd_ss result"); | |
return b; | |
} | |
// gcd(w1,w2) :: Word -> Word -> Word | |
// fixme negatives are probably wrong here | |
function h$ghcjsbn_gcd_ww(w1, w2) { | |
h$ghcjsbn_assertValid_w(w1, "gcd_ww w1"); | |
h$ghcjsbn_assertValid_w(w2, "gcd_ww w2"); | |
var a, b, r; | |
a = w1 < 0 ? (w1 + 4294967296) : w1; | |
b = w2 < 0 ? (w2 + 4294967296) : w2; | |
if(b < a) { | |
r = a; | |
a = b; | |
b = r; | |
} | |
while(a !== 0) { | |
r = b % a; | |
b = a; | |
a = r; | |
} | |
b = b|0; | |
h$ghcjsbn_assertValid_w(b, "gcd_ww result"); | |
return b; | |
} | |
function h$ghcjsbn_gcd_bw(b, w) { | |
h$ghcjsbn_assertValid_b(b, "gcd_bw"); | |
h$ghcjsbn_assertValid_w(w, "gcd_bw"); | |
var q = [], r = h$ghcjsbn_quotRem_bw(q, b, w); | |
h$ghcjsbn_assertValid_w(r, "gcd_bw r"); | |
if(r === 0) { | |
return b[0] === 0 ? 0 : w; | |
} else { | |
return h$ghcjsbn_gcd_ww(r, w); | |
} | |
} | |
// b >> s :: BigNat -> Int -> BigNat | |
function h$ghcjsbn_shr_b(b, s) { | |
h$ghcjsbn_assertValid_b(b, "shr_b"); | |
h$ghcjsbn_assertValid_s(s, "shr_b"); | |
if(s < 0) throw new Error("h$ghcjsbn_shr_b: negative operand"); | |
var i, v1, v2, l = b[0], sl = (s / 28)|0, t = [0]; | |
l -= sl; | |
if(l <= 0) { | |
t[0] = 0; | |
} else { | |
var sb1 = s % 28, sb2 = 28 - sb1, m = (1<<sb1)-1; | |
var c = b[sl + 1] >> sb1, v; | |
for(i = 1; i < l; i++) { | |
v = b[i + sl + 1]; | |
t[i] = ((v&m) << sb2)|c; | |
c = v >> sb1; | |
} | |
if(c !== 0) { | |
t[l] = c; | |
t[0] = l; | |
} else { | |
t[0] = l - 1; | |
} | |
} | |
h$ghcjsbn_assertValid_b(t, "shr_b result"); | |
return t; | |
} | |
// t = b >> s :: BigNat -> BigNat -> Int -> IO () | |
function h$ghcjsbn_shrTo_b(t, b, s) { | |
h$ghcjsbn_assertValid_b(b, "shrTo_b"); | |
h$ghcjsbn_assertValid_s(s, "shrTo_b"); | |
if(s < 0) throw new Error("h$ghcjsbn_shrTo_b: negative operand"); | |
var i, v1, v2, l = b[0], sl = (s / 28)|0; | |
t[0] = 0; | |
l -= sl; | |
if(l <= 0) { | |
t[0] = 0; | |
} else { | |
var sb1 = s % 28, sb2 = 28 - sb1, m = (1<<sb1)-1; | |
var c = b[sl + 1] >> sb1, v; | |
for(i = 1; i < l; i++) { | |
v = b[i + sl + 1]; | |
t[i] = ((v&m) << sb2)|c; | |
c = v >> sb1; | |
} | |
if(c !== 0) { | |
t[l] = c; | |
t[0] = l; | |
} else { | |
t[0] = l - 1; | |
} | |
} | |
h$ghcjsbn_assertValid_b(t, "shrTo_b result"); | |
} | |
function h$ghcjsbn_shr_neg_b(b, s) { | |
throw new Error ("shr_neg_b not implemented"); | |
} | |
// b << s :: BigNat -> Int -> BigNat | |
function h$ghcjsbn_shl_b(b, s) { | |
h$ghcjsbn_assertValid_b(b, "shl_b"); | |
h$ghcjsbn_assertValid_s(s, "shl_b"); | |
if(s < 0) throw new Error("h$ghcjsbn_shl_b: negative operand"); | |
var sl = (s / 28)|0; | |
var sb1 = s % 28, sb2 = 28 - sb1; | |
// mask wrong | |
var l = b[0]; | |
if(l === 0) return h$ghcjsbn_zero_b; | |
var c = 0, i, v, m = (1 <<sb1) - 1, t = [0]; | |
for(i = 1; i <= sl; i++) { | |
t[i] = 0; | |
} | |
for(i = 1; i <= l; i++) { | |
v = b[i]; | |
t[i + sl] = ((v << sb1) & 0xfffffff) | c; | |
c = v >> sb2; | |
} | |
if(c !== 0) { | |
t[l+sl+1] = c; | |
t[0] = l + sl + 1; | |
} else { | |
t[0] = l + sl; | |
} | |
h$ghcjsbn_assertValid_b(t, "shl_b result"); | |
return t; | |
} | |
// t = b << s :: BigNat -> BigNat -> Int -> IO () | |
function h$ghcjsbn_shlTo_b(t, b, s) { | |
h$ghcjsbn_assertValid_b(b, "shlTo_b"); | |
h$ghcjsbn_assertValid_s(s, "shlTo_b"); | |
if(s < 0) throw new Error("h$ghcjsbn_shlTo_b: negative operand"); | |
var sl = (s / 28)|0; | |
var sb1 = s % 28, sb2 = 28 - sb1; | |
// mask wrong | |
var l = b[0], c = 0, i, v, m = (1 <<sb1) - 1; | |
t[0] = 0; | |
for(i = 1; i <= sl; i++) { | |
t[i] = 0; | |
} | |
for(i = 1; i <= l; i++) { | |
v = b[i]; | |
t[i + sl] = ((v << sb1) & 0xfffffff) | c; | |
c = v >> sb2; | |
} | |
if(c !== 0) { | |
t[l+sl+1] = c; | |
t[0] = l + sl + 1; | |
} else { | |
t[0] = l + sl; | |
} | |
h$ghcjsbn_assertValid_b(t, "shlTo_b result"); | |
} | |
// t = b >> (GHCJSBN_BITS * s) :: BigNat -> BigNat -> Int | |
function h$ghcjsbn_shrTo_limbs_b(t, b, s) { | |
h$ghcjsbn_assertValid_b(b, "shrTo_limbs_b"); | |
h$ghcjsbn_assertValid_s(s, "shrTo_limbs_b"); | |
if(s < 0) throw new Error("h$ghcjsbn_shrTo_limbs_b: negative operand"); | |
var l = b[0], l1 = l - s, i; | |
if(l1 < 1) { | |
t[0] = 0; | |
} else { | |
t[0] = l1; | |
for(i = 1; i <= l1; i++) t[i] = b[i+s]; | |
} | |
h$ghcjsbn_assertValid_b(t, "shrTo_limbs_b result"); | |
} | |
// t = b << (GHCJSBN_BITS * s) :: BigNat -> BigNat -> Int | |
function h$ghcjsbn_shlTo_limbs_b(t, b, s) { | |
h$ghcjsbn_assertValid_b(b, "shlTo_limbs_b"); | |
h$ghcjsbn_assertValid_s(s, "shlTo_limbs_b"); | |
if(s < 0) throw new Error("h$ghcjsbn_shlTo_limbs_b: negative operand"); | |
var l = b[0], l1 = l + s, i; | |
if(l === 0) { | |
t[0] = 0; | |
} else { | |
t[0] = l1; | |
for(i = 1; i <= s; i++) t[i] = 0; | |
for(i = s+1; i <= l1; i++) t[i] = b[i-s]; | |
} | |
h$ghcjsbn_assertValid_b(t, "shlTo_limbs_b result"); | |
} | |
function h$ghcjsbn_nbits_b(b) { | |
h$ghcjsbn_assertValid_b(b, "nbits_b"); | |
var l = b[0], c = 0, s, t; | |
if(l === 0) { | |
return 0; | |
} else { | |
var r = ((l-1)*28) + h$ghcjsbn_nbits_s(b[l]); | |
h$ghcjsbn_assertValid_s(r, "nbits_b result"); | |
return r; | |
} | |
} | |
function h$ghcjsbn_nbits_s(s) { | |
h$ghcjsbn_assertValid_s(s, "nbits_s"); | |
var c = 1, t; | |
if((t = s >>> 16) != 0) { s = t; c += 16; } | |
if((t = s >> 8) != 0) { s = t; c += 8; } | |
if((t = s >> 4) != 0) { s = t; c += 4; } | |
if((t = s >> 2) != 0) { s = t; c += 2; } | |
if((t = s >> 1) != 0) { s = t; c += 1; } | |
h$ghcjsbn_assertValid_s(c, "nbits_s result"); | |
return c; | |
} | |
// BigNat -> Word -> String | |
function h$ghcjsbn_showBase(b, base) { | |
h$ghcjsbn_assertValid_b(b, "showBase"); | |
h$ghcjsbn_assertValid_s(base, "showBase"); | |
if(h$ghcjsbn_cmp_bb(b, h$ghcjsbn_zero_b) === 1) { | |
return "0"; | |
} else { | |
return h$ghcjsbn_showBase_rec(b, base, Math.log(base), 0); | |
} | |
} | |
function h$ghcjsbn_showBase_rec(b, base, logBase, pad) { | |
var bits = h$ghcjsbn_nbits_b(b), r; | |
// h$log("[" + b.join(",") + "] bits: " + bits); | |
if(h$ghcjsbn_cmp_bb(b, h$ghcjsbn_two31_b) === 0) { | |
// convert short numbers to int and show in base | |
var ti = h$ghcjsbn_toInt_b(b); | |
// h$log("############# got base limb: " + ti); | |
r = ti === 0 ? "" : ti.toString(base); | |
} else { | |
// divide and conquer for long numbers | |
var digits = Math.floor(bits * 0.6931471805599453 / logBase); | |
var d2 = Math.round(digits/2), p, q = [], r = []; | |
p = h$ghcjsbn_pow_ww(base, d2); | |
h$ghcjsbn_quotRem_bb(q, r, b, p); | |
r = h$ghcjsbn_showBase_rec(q, base, logBase, 0) + | |
h$ghcjsbn_showBase_rec(r, base, logBase, d2); | |
} | |
var rl = r.length; | |
if(rl < pad) { | |
while(rl <= pad-8) { r = "00000000" + r; rl += 8; } | |
switch(pad-rl) { | |
case 1: r = "0" + r; break; | |
case 2: r = "00" + r; break; | |
case 3: r = "000" + r; break; | |
case 4: r = "0000" + r; break; | |
case 5: r = "00000" + r; break; | |
case 6: r = "000000" + r; break; | |
case 7: r = "0000000" + r; break; | |
} | |
} | |
return r; | |
} | |
// BigNat -> String (decimal) | |
function h$ghcjsbn_show(b) { | |
throw new Error("show not implemented"); | |
// digits = | |
} | |
// BigNat -> String | |
function h$ghcjsbn_showHex(b) { | |
throw new Error("showHex not implemented"); | |
} | |
// s = b[l - 1]; | |
// normalize a number to length l by stripping unused leading digits | |
/* | |
function h$ghcjsbn_normalize(b, l) { | |
var d = b.length - l; | |
while(d--) b.pop(); | |
} | |
// normalize a number by stripping leading zeroes | |
function h$ghcjsbn_normalize0(b) { | |
var l = b.length; | |
while(b[--l] === 0) b.pop(); | |
} | |
*/ | |
// t = b :: BigNat -> BigNat -> Int, returns length of t | |
function h$ghcjsbn_copy(t, b) { | |
h$ghcjsbn_assertValid_b(b, "copy"); | |
var l = b[0]; | |
for(var i = 0; i <= l; i++) { | |
t[i] = b[i]; | |
} | |
return l; | |
} | |
// BigNat -> Int -> Bool | |
// test if bit n is set in b (least significant bit is 0) | |
function h$ghcjsbn_testBit_b(b, n) { | |
h$ghcjsbn_assertValid_b(b, "testBit_b"); | |
h$ghcjsbn_assertValid_s(n, "testBit_b"); | |
var limb = (n / 28)|0; | |
if(limb >= b[0]) { | |
return false; | |
} else { | |
var d = b[limb]; | |
var bit = n - (28 * limb); | |
return (b[limb] & (1 << bit)) !== 0; | |
} | |
} | |
function h$ghcjsbn_popCount_b(b) { | |
h$ghcjsbn_assertValid_b(b, "popCount_b"); | |
var c = 0, l = b[0]; | |
while(l > 0) { | |
c += h$popCnt32(b[l--]); | |
} | |
return c; | |
} | |
// t = b1 ^ b2 :: BigNat -> BigNat -> BigNat -> Int | |
// returns length of t | |
function h$ghcjsbn_xor_bb(b1, b2) { | |
h$ghcjsbn_assertValid_b(b1, "xor_bb b1"); | |
h$ghcjsbn_assertValid_b(b2, "xor_bb b2"); | |
var i, lmin, lmax, blmax, l1 = b1[0], l2 = b2[0], t = [0]; | |
if(l1 <= l2) { | |
lmin = l1; | |
lmax = l2; | |
blmax = b2; | |
} else { | |
lmin = l2; | |
lmax = l1; | |
blmax = b1; | |
} | |
for(i = 1; i <= lmin; i++) { | |
t[i] = b1[i] ^ b2[i]; | |
} | |
for(i = lmin + 1; i <= lmax; i++) { | |
t[i] = blmax[i]; | |
} | |
while(lmax > 0 && t[lmax] === 0) lmax--; | |
t[0] = lmax; | |
h$ghcjsbn_assertValid_b(t, "xor_bb result"); | |
return t; | |
} | |
// b1 | b2 :: BigNat -> BigNat -> BigNat | |
function h$ghcjsbn_or_bb(b1, b2) { | |
h$ghcjsbn_assertValid_b(b1, "or_bb b1"); | |
h$ghcjsbn_assertValid_b(b2, "or_bb b2"); | |
var i, lmin, lmax, blmax, l1 = b1[0], l2 = b2[0], t = [0]; | |
if(l1 <= l2) { | |
lmin = l1; | |
lmax = l2; | |
blmax = b2; | |
} else { | |
lmin = l2; | |
lmax = l1; | |
blmax = b1; | |
} | |
for(i = 1; i <= lmin; i++) { | |
t[i] = b1[i] | b2[i]; | |
} | |
for(i = lmin + 1; i <= lmax; i++) { | |
t[i] = blmax[i]; | |
} | |
t[0] = lmax; | |
h$ghcjsbn_assertValid_b(t, "or_bb result"); | |
return t; | |
} | |
// b1 & b2 :: BigNat -> BigNat -> BigNat | |
function h$ghcjsbn_and_bb(b1, b2) { | |
h$ghcjsbn_assertValid_b(b1, "and_bb b1"); | |
h$ghcjsbn_assertValid_b(b2, "and_bb b2"); | |
var i, lmin, l1 = b1[0], l2 = b2[0], t = [0]; | |
lmin = l1 <= l2 ? l1 : l2; | |
for(i = 1; i <= lmin; i++) { | |
t[i] = b1[i] & b2[i]; | |
} | |
while(lmin > 0 && t[lmin] === 0) lmin--; | |
t[0] = lmin; | |
h$ghcjsbn_assertValid_b(t, "and_bb result"); | |
return t; | |
} | |
// b1 & (~b2) :: BigNat -> BigNat -> BigNat | |
// fixme is this one correct? | |
function h$ghcjsbn_andn_bb(b1, b2) { | |
h$ghcjsbn_assertValid_b(b1, "andn_bb b1"); | |
h$ghcjsbn_assertValid_b(b2, "andn_bb b2"); | |
var i, lmin, l1 = b1[0], l2 = b2[0], t = [0]; | |
if(l1 <= l2) { | |
for(i = 0; i <= l1; i++) t[i] = b1[i] & (~b2[i]); | |
} else { | |
for(i = 0; i <= l2; i++) t[i] = b1[i] & (~b2[i]); | |
for(i = l2+1; i <= l1; i++) t[i] = b1[i]; | |
} | |
while(l1 > 0 && t[l1] === 0) l1--; | |
t[0] = l1; | |
h$ghcjsbn_assertValid_b(t, "andn_bb result"); | |
return t; | |
} | |
function h$ghcjsbn_toInt_b(b) { | |
h$ghcjsbn_assertValid_b(b, "toInt_b"); | |
var bl = b[0], r; | |
if(bl >= 2) { | |
r = (b[2] << 28) | b[1]; | |
} else if(bl === 1) { | |
r = b[1]; | |
} else { | |
r = 0; | |
} | |
h$ghcjsbn_assertValid_s(r, "toInt_b result"); | |
return r; | |
} | |
function h$ghcjsbn_toWord_b(b) { | |
h$ghcjsbn_assertValid_b(b, "toWord_b"); | |
var bl = b[0], w; | |
if(bl >= 2) { | |
w = (b[2] << 28) | b[1]; | |
} else if(bl === 1) { | |
w = b[1]; | |
} else { | |
w = 0; | |
} | |
h$ghcjsbn_assertValid_w(w, "toWord_b result"); | |
return w; | |
} | |
var h$integer_bigNatToWord64 = h$ghcjsbn_toWord64_b; | |
var h$integer_word64ToBigNat = h$ghcjsbn_mkBigNat_ww; // fixme? | |
function h$ghcjsbn_toWord64_b(b) { | |
h$ghcjsbn_assertValid_b(b, "toWord64_b"); | |
var len = b[0], w1, w2; | |
if(len < 2) { | |
w2 = 0; | |
w1 = (len === 1) ? b[1] : 0; | |
} else { | |
w1 = b[1] | (b[2] << 28); | |
if(len === 2) { | |
w2 = b[2] >>> 4; | |
} else { | |
w2 = (b[2] >>> 4) | (b[3] << 24); | |
} | |
} | |
h$ghcjsbn_assertValid_w(w2, "toWord64_b result w2"); | |
h$ghcjsbn_assertValid_w(w1, "toWord64_b result w1"); | |
{ h$ret1 = (w1); return (w2); }; | |
} | |
// BigNat -> Int -> IO () | |
function h$ghcjsbn_toBigNat_s(b, s) { | |
h$ghcjsbn_assertValid_s(s, "toBigNat_s"); | |
if(s < 0) { | |
throw new Error("h$ghcjsbn_toBigNat_s: negative operand"); | |
} | |
if(s === 0) { | |
b[0] = 0; | |
} else if(s <= 0xfffffff) { | |
b[0] = 1; | |
b[1] = s; | |
} else { | |
b[0] = 2; | |
b[1] = s & 0xfffffff; | |
b[2] = s >> 0xfffffff; | |
} | |
h$ghcjsbn_assertValid_b(b, "toBigNat_s result"); | |
} | |
// BigNat -> Word -> IO () | |
function h$ghcjsbn_toBigNat_w(b, w) { | |
h$ghcjsbn_assertValid_w(w, "toBigNat_w"); | |
if(w === 0) { | |
b[0] = 0; | |
} else if(w > 0 && w <= 0xfffffff) { | |
b[0] = 1; | |
b[1] = w; | |
} else { | |
b[0] = 2; | |
b[1] = w & 0xfffffff; | |
b[2] = w >>> 28; | |
} | |
h$ghcjsbn_assertValid_b(b, "toBigNat_w result"); | |
} | |
function h$ghcjsbn_mkBigNat_w(w) { | |
h$ghcjsbn_assertValid_w(w, "mkBigNat_w"); | |
var r; | |
if(w === 0) r = h$ghcjsbn_zero_b; | |
else if(w === 1) r = h$ghcjsbn_one_b; | |
else if(w > 0 && w <= 0xfffffff) r = [1,w]; | |
else r = [2, w & 0xfffffff, w >>> 28]; | |
h$ghcjsbn_assertValid_b(r, "mkBigNat_w result"); | |
// ASSERTVALID_B(h$ghcjsbn_zero_b, "mkBigNat_w zero"); | |
return r; | |
} | |
function h$ghcjsbn_mkBigNat_ww(hw, lw) { | |
h$ghcjsbn_assertValid_w(hw, "mkBigNat_ww hw"); | |
h$ghcjsbn_assertValid_w(lw, "mkBigNat_ww lw"); | |
var r; | |
if(hw === 0) r = h$ghcjsbn_mkBigNat_w(lw); | |
else { | |
var w1 = lw & 0xfffffff; | |
var w2 = (lw >>> 28) | ((hw << 4) & 0xfffffff); | |
var w3 = hw >>> 24; | |
if(w3 === 0) { | |
r = [2, w1, w2]; | |
} else { | |
r = [3, w1, w2, w3]; | |
} | |
} | |
h$ghcjsbn_assertValid_b(r, "mkBigNat_ww result"); | |
return r; | |
} | |
// fixme remove after reboot | |
var h$ghcjsbn_toBigNat_ww = h$ghcjsbn_mkBigNat_ww; | |
/* fixme re-enable after reboot | |
function h$ghcjsbn_toBigNat_ww(b, hw, lw) { | |
ASSERTVALID_W(hw, "toBigNat_ww hw"); | |
ASSERTVALID_W(lw, "toBigNat_ww lw"); | |
if(hw === 0) h$ghcjsbn_toBigNat_w(b, lw); | |
else { | |
var w1 = lw & GHCJSBN_MASK; | |
var w2 = (lw >>> GHCJSBN_BITS) | ((hw << 4) & GHCJSBN_MASK); | |
var w3 = hw >>> 24; | |
if(w3 === 0) { | |
r[0] = 2; | |
r[1] = w1; | |
r[2] = w2; | |
} else { | |
r[0] = 3; | |
r[1] = w1; | |
r[2] = w2; | |
r[3] = w3; | |
} | |
} | |
} | |
*/ | |
// fixme remove later | |
var h$integer_mkInteger = h$ghcjsbn_mkInteger; | |
function h$ghcjsbn_mkInteger(nonNeg, xs) { | |
// fixme write proper optimized version | |
var r = [0], s = 0, t; | |
while(((xs).f === h$ghczmprimZCGHCziTypesziZC_con_e)) { | |
t = h$ghcjsbn_shl_b(h$ghcjsbn_mkBigNat_w(((typeof(((xs).d1)) === 'number')?(((xs).d1)):(((xs).d1)).d1)), s); | |
h$ghcjsbn_addTo_bb(r, t); | |
s += 31; | |
xs = ((xs).d2); | |
} | |
if(nonNeg) { | |
if(h$ghcjsbn_cmp_bb(r, h$ghcjsbn_two31_b) === 0) { | |
return (h$c1(h$integerzmgmpZCGHCziIntegerziTypeziSzh_con_e, (h$ghcjsbn_toInt_b(r))));; | |
} else { | |
return (h$c1(h$integerzmgmpZCGHCziIntegerziTypeziJpzh_con_e, (r)));; | |
} | |
} else { | |
var c = h$ghcjsbn_cmp_bb(r, h$ghcjsbn_two31_b); | |
if(c === 2) { | |
return (h$c1(h$integerzmgmpZCGHCziIntegerziTypeziJnzh_con_e, (r)));; | |
} else if(c === 1) { | |
return h$ghcjsbn_negTwo31_i; | |
} else { | |
return (h$c1(h$integerzmgmpZCGHCziIntegerziTypeziSzh_con_e, (-h$ghcjsbn_toInt_b(r))));; | |
} | |
} | |
/* var r = h$ghcjsbn_mkBigNat_w(0), l = 0, s = 0, y, t; | |
while(IS_CONS(xs)) { | |
l++; | |
y = UNWRAP_NUMBER(CONS_HEAD(xs)); | |
r[++l] = (y << s | c) & GHCJSBN_MASK; | |
c = y >>> s; | |
xs = CONS_TAIL(xs); | |
s += 3; | |
l++; | |
if(s > GHCJSBN_BITS) { | |
s -= GHCJSBN_BITS; | |
r[++l] = c & GHCJSBN_MASK; | |
c >>= GHCJSBN_BITS; | |
} | |
} | |
if(c !== 0) r[++l] = | |
while( | |
if(l === 0) { | |
return MK_INTEGER_S(0); | |
} else if(l === 1) { | |
} else if(l === 2) { | |
} */ | |
} | |
// BigNat -> Int -> Int | |
function h$ghcjsbn_indexBigNat(b, i) { | |
h$ghcjsbn_assertValid_b(b, "indexBigNat"); | |
h$ghcjsbn_assertValid_s(i, "indexBigNat"); | |
var bl = b[0]; | |
return i >= bl ? 0 : b[i+1]; | |
} | |
// BigNat -> Word -> Int (Ordering) | |
function h$ghcjsbn_cmp_bw(b, w) { | |
h$ghcjsbn_assertValid_b(b, "cmp_bw"); | |
h$ghcjsbn_assertValid_w(w, "cmp_bw"); | |
var w1 = w & 0xfffffff, w2 = w >>> 28, bl = b[0]; | |
if(w2 === 0) { | |
if(bl === 0) { | |
return w1 > 0 ? 0 : 1; | |
} else if(bl === 1) { | |
var bw = b[1]; | |
return bw > w1 ? 2 : (bw === w1 ? 1 : 0); | |
} else { | |
return 2; | |
} | |
} else { | |
if(bl < 2) { | |
return 0; | |
} else if(bl > 2) { | |
return 2; | |
} else { | |
var bw1 = b[1], bw2 = b[2]; | |
return (bw2 > w2) ? 2 | |
: (bw2 < w2 ? 0 | |
: (bw1 > w1 ? 2 | |
: (bw1 < w1 ? 0 | |
: 1))); | |
} | |
} | |
} | |
/* | |
function h$ghcjsbn_gt_bw(b, w) { | |
var r = h$ghcjsbn_gt_bw0(b,w); | |
h$log("gt_bw result: " + r); | |
return r; | |
} | |
*/ | |
function h$ghcjsbn_gt_bw(b, w) { | |
h$ghcjsbn_assertValid_b(b, "gt_bw"); | |
h$ghcjsbn_assertValid_w(w, "gt_bw"); | |
var bl = b[0]; | |
if(bl > 2) return true; | |
else if(bl === 0) return false; | |
else if(bl === 1) return w >= 0 && b[1] > w; | |
else { // bl === 2 | |
var wh = w >>> 28, wl = w & 0xfffffff, b2 = b[2]; | |
// var r = (wh > b2 || ((wh === b2) && wl > b[1])); | |
// h$log("r: " + r + " " + wh + " " + wl + " " ); | |
return (b2 > wh || ((wh === b2) && b[1] > wl)); | |
} | |
} | |
// BigNat -> BigNat -> Bool | |
function h$ghcjsbn_eq_bb(b1, b2) { | |
h$ghcjsbn_assertValid_b(b1, "eq_bb"); | |
h$ghcjsbn_assertValid_b(b2, "eq_bb"); | |
var bl1 = b1[0], bl2 = b2[0]; | |
if(bl1 !== bl2) { | |
return false; | |
} else { | |
for(var i = bl1; i >= 1; i--) { | |
var bw1 = b1[i], bw2 = b2[i]; | |
if(bw1 !== bw2) return false; | |
} | |
} | |
return true; // GHCJSBN_EQ; | |
} | |
// BigNat -> BigNat -> Bool | |
function h$ghcjsbn_neq_bb(b1, b2) { | |
h$ghcjsbn_assertValid_b(b1, "neq_bb"); | |
h$ghcjsbn_assertValid_b(b2, "neq_bb"); | |
var bl1 = b1[0], bl2 = b2[0]; | |
if(bl1 !== bl2) { | |
return true; | |
} else { | |
for(var i = bl1; i >= 1; i--) { | |
var bw1 = b1[i], bw2 = b2[i]; | |
if(bw1 !== bw2) return true; | |
} | |
} | |
return false; | |
} | |
// BigNat -> BigNat -> Bool | |
/* | |
function h$ghcjsbn_eq_bw(b, w) { | |
var r = h$ghcjsbn_eq_bw0(b, w); | |
return r; | |
} | |
*/ | |
function h$ghcjsbn_eq_bw(b, w) { | |
h$ghcjsbn_assertValid_b(b, "eq_bw"); | |
h$ghcjsbn_assertValid_w(w, "eq_bw"); | |
var w1 = w & 0xfffffff, w2 = w >>> 28, bl = b[0]; | |
if(w2 === 0) { | |
if(w1 === 0) { | |
return bl === 0; | |
} else { | |
return bl === 1 && b[1] === w; | |
} | |
} else { | |
return bl === 2 && b[1] === w1 && b[2] === w2; | |
} | |
} | |
// BigNat -> Bool | |
function h$ghcjsbn_isZero_b(b) { | |
h$ghcjsbn_assertValid_b(b, "isZero_b"); | |
return b[0] === 0; | |
} | |
// BigNat -> Int | |
function h$ghcjsbn_isNull_b(b) { | |
return b[0] === -1; | |
} | |
// 1 << n | |
function h$ghcjsbn_bitBigNat(n) { | |
if(n < 0) { | |
throw new Error("bitBigNat: argument must be positive"); | |
} | |
if(n === 0) { | |
r = h$ghcjsbn_one_b; | |
} else if(n < 28) { | |
r = [1, 1 << n]; | |
} else { | |
var l = (n / 28)|0; | |
var r = [l+1]; | |
for(var i = 1; i<= l; i++) r[i] = 0; | |
r[l+1] = 1 << (n - (28 * l)); | |
} | |
h$ghcjsbn_assertValid_b(r, "bitBigNat result"); | |
return r; | |
} | |
// Integer -> Int | |
// assumes argument is strictly positive | |
function h$ghcjsbn_integerLog2(i) { | |
h$ghcjsbn_assertValid_i(i, "integerLog2"); | |
/* if(h$ghcjsbn_cmp_ii(i, h$ghcjsbn_zero_i) !== GHCJSBN_GT) { | |
throw new Error("integerLog2: argument must be positive"); | |
} */ | |
if(((i).f === h$integerzmgmpZCGHCziIntegerziTypeziSzh_con_e)) { | |
return h$ghcjsbn_nbits_s(((i).d1)); | |
} else { | |
return h$ghcjsbn_nbits_b(((i).d1)); | |
} | |
} | |
// Integer -> Int | |
// returns negation of result if integer is exactly a power of two | |
function h$ghcjsbn_integerLog2IsPowerOf2(i) { | |
h$ghcjsbn_assertValid_i(i, "integerLog2IsPowerOf2"); | |
/* if(h$ghcjbn_cmp_ii(i, h$ghcjsbn_zero_i) !== GHCJSBN_GT) { | |
throw new Error("integerLog2IsPowerOf2: argument must be positive"); | |
} */ | |
var nb; | |
if(((i).f === h$integerzmgmpZCGHCziIntegerziTypeziSzh_con_e)) { | |
var sd = ((i).d1); | |
h$ghcjsbn_assertValid_s(sd, "integerLog2IsPowerOf2 sd"); | |
nb = h$ghcjsbn_nbits_s(sd); | |
return ((sd === 1 << nb) ? -nb : nb); | |
} else { | |
var bd = ((i).d1); | |
h$ghcjsbn_assertValid_b(bd, "integerLog2IsPowerOf2 bd"); | |
nb = h$ghcjsbn_nbits_b(bd); | |
var i, bl = (nb / 28) | 0, lb = nb - 28 * bl, l = bd[bl+1]; | |
if(l !== (1 << lb)) return nb; | |
for(i = bl; i >= 1; i--) { | |
if(bd[i] !== 0) return nb; | |
} | |
return -nb; | |
} | |
} | |
// BigNat? -> Int | |
function h$ghcjsbn_isValid_b(b) { | |
if(!Array.isArray(b)) return 0; | |
if(b.length < 1) return 0; | |
var bl = b[0], w; | |
if(b.length < (bl+1)) return 0; | |
for(var i = 0; i <= bl; i++) { | |
w = b[i]; | |
if(typeof w !== 'number' || (w & 0xfffffff) !== w) return 0; | |
} | |
return 1; | |
} | |
// BigNat -> Integer | |
function h$ghcjsbn_toInteger_b(b) { | |
h$ghcjsbn_assertValid_b(b, "toInteger_b"); | |
if(h$ghcjsbn_cmp_bb(b, h$ghcjsbn_two31_b) === 0) { | |
return (h$c1(h$integerzmgmpZCGHCziIntegerziTypeziSzh_con_e, (h$ghcjsbn_toInt_b(b))));; | |
} else { | |
return (h$c1(h$integerzmgmpZCGHCziIntegerziTypeziJpzh_con_e, (b)));; | |
} | |
} | |
// BigNat -> Integer | |
function h$ghcjsbn_toNegInteger_b(b) { | |
h$ghcjsbn_assertValid_b(b, "toNegInteger_b"); | |
var c = h$ghcjsbn_cmp_bb(b, h$ghcjsbn_two31_b); | |
if(c === 0) { | |
return (h$c1(h$integerzmgmpZCGHCziIntegerziTypeziSzh_con_e, (-h$ghcjsbn_toInt_b(b))));; | |
} else if(c === 1) { | |
return h$ghcjsbn_negTwo31_i; | |
} else { | |
return (h$c1(h$integerzmgmpZCGHCziIntegerziTypeziJnzh_con_e, (b)));; | |
} | |
} | |
// BigNat? -> Int | |
// (can be called with invalid bignat) | |
function h$ghcjsbn_sizeof_b(b) { | |
if(b.length < 1) return 0; | |
var bl = b[0]; | |
return Math.ceil((bl * 28) / 32); | |
} | |
// extract a word from a BigNat | |
function h$ghcjsbn_index_b(b, w) { | |
throw new Error("index_b"); | |
h$ghcjsbn_assertValid_b(b, "index_b"); | |
h$ghcjsbn_assertValid_w(w, "index_b"); | |
var wbit = 32*w, len = b[0], limb = (wbit / 28) | 0, lb = wbit - (limb * 28); | |
var r = b[limb+1] >>> lb; | |
/* if() { | |
} */ | |
h$ghcjsbn_assertValid_w(r, "index_b result"); | |
} | |
// Bool -> BigNat -> Double | |
function h$ghcjsbn_toDouble_b(nonNeg, b) { | |
throw new Error("toDouble_b"); | |
} | |
function h$ghcjsbn_byteArrayToBigNat(ba, len) { | |
throw new Error("h$ghcjsbn_byteArrayToBigNat not yet implemented"); | |
} | |
function h$ghcjsbn_importBigNatFromAddr(a_d, a_o, len, msbf) { | |
throw new Error("h$ghcjsbn_importBigNatFromAddr not yet implemented"); | |
} | |
function h$ghcjsbn_importBigNatFromByteArray(ba, ofs, len, msbf) { | |
throw new Error("h$ghcjsbn_importBigNatFromByteArray not yet implemented"); | |
} | |
////////////////////////////////////////////////////////////////////////////// | |
// fixme move to primop places later | |
var h$integer_int64ToInteger = h$ghcjsbn_toInteger_s64; | |
function h$ghcjsbn_toInteger_s64(s_a, s_b) { | |
h$ghcjsbn_assertValid_s(s_a, "toInteger_s64 s_a"); | |
h$ghcjsbn_assertValid_s(s_b, "toInteger_s64 s_b"); | |
if(s_a === 0) { | |
if(s_b >= 0) { | |
return (h$c1(h$integerzmgmpZCGHCziIntegerziTypeziSzh_con_e, (s_b)));; | |
} else { | |
return (h$c1(h$integerzmgmpZCGHCziIntegerziTypeziJpzh_con_e, (h$ghcjsbn_mkBigNat_w(s_b))));; | |
} | |
} else if(s_a === -1) { | |
if(s_b < 0) { | |
return (h$c1(h$integerzmgmpZCGHCziIntegerziTypeziSzh_con_e, (s_b)));; | |
} else if(s_b === 0) { | |
return (h$c1(h$integerzmgmpZCGHCziIntegerziTypeziJnzh_con_e, (h$ghcjsbn_mkBigNat_ww(1,0))));; | |
} else { | |
return (h$c1(h$integerzmgmpZCGHCziIntegerziTypeziJnzh_con_e, (h$ghcjsbn_mkBigNat_w(((~s_b)+1)|0))));; | |
} | |
} else if(s_a > 0) { | |
return (h$c1(h$integerzmgmpZCGHCziIntegerziTypeziJpzh_con_e, (h$ghcjsbn_mkBigNat_ww(s_a, s_b))));; | |
} else { | |
if(s_b === 0) { // zero should be correct! | |
return (h$c1(h$integerzmgmpZCGHCziIntegerziTypeziJnzh_con_e, (h$ghcjsbn_mkBigNat_ww(((~s_a)+1)|0, 0))));; | |
} else { | |
return (h$c1(h$integerzmgmpZCGHCziIntegerziTypeziJnzh_con_e, (h$ghcjsbn_mkBigNat_ww((~s_a)|0, ((~s_b)+1)|0))));; | |
} | |
/* | |
if(s_b === 0) { // zero should be correct! | |
return MK_INTEGER_Jn(h$ghcjsbn_mkBigNat_ww(((~s_a)+1)|0, 0)); | |
} else { | |
return MK_INTEGER_Jn(h$ghcjsbn_mkBigNat_ww(~s_a, ((~s_b)+1)|0)); | |
} */ | |
} | |
} | |
function h$decodeDoubleInt64(d) { | |
h$ghcjsbn_assertValid_d(d, "DoubleDecode_Int64"); | |
if(isNaN(d)) { | |
// RETURN_UBX_TUP4(null, -1572864, 0, 972); | |
{ h$ret1 = (-1572864); h$ret2 = (0); return (972); }; | |
} | |
h$convertDouble[0] = d; | |
var i0 = h$convertInt[0], i1 = h$convertInt[1]; | |
var exp = (i1&2146435072)>>>20; | |
var ret1, ret2 = i0, ret3; | |
if(exp === 0) { // denormal or zero | |
if((i1&2147483647) === 0 && ret2 === 0) { | |
ret1 = 0; | |
ret3 = 0; | |
} else { | |
h$convertDouble[0] = d*9007199254740992; | |
i1 = h$convertInt[1]; | |
ret1 = (i1&1048575)|1048576; | |
ret2 = h$convertInt[0]; | |
ret3 = ((i1&2146435072)>>>20)-1128; | |
} | |
} else { | |
ret3 = exp-1075; | |
ret1 = (i1&1048575)|1048576; | |
} | |
// negate mantissa for negative input | |
if(d < 0) { | |
if(ret2 === 0) { | |
ret1 = ((~ret1) + 1) | 0; | |
// ret2 = 0; | |
} else { | |
ret1 = ~ret1; | |
ret2 = ((~ret2) + 1) | 0; | |
} | |
} | |
// prim ubx tup returns don't return the first value! | |
{ h$ret1 = (ret1); h$ret2 = (ret2); return (ret3); }; | |
} | |
// fixme remove this once rebooted | |
function h$primop_DoubleDecode_Int64Op(d) { | |
h$ghcjsbn_assertValid_d(d, "DoubleDecode_Int64"); | |
if(isNaN(d)) { | |
// RETURN_UBX_TUP4(null, -1572864, 0, 972); | |
{ h$ret1 = (-1572864); h$ret2 = (0); h$ret3 = (972); return (null); }; | |
} | |
h$convertDouble[0] = d; | |
var i0 = h$convertInt[0], i1 = h$convertInt[1]; | |
var exp = (i1&2146435072)>>>20; | |
var ret1, ret2 = i0, ret3; | |
if(exp === 0) { // denormal or zero | |
if((i1&2147483647) === 0 && ret2 === 0) { | |
ret1 = 0; | |
ret3 = 0; | |
} else { | |
h$convertDouble[0] = d*9007199254740992; | |
i1 = h$convertInt[1]; | |
ret1 = (i1&1048575)|1048576; | |
ret2 = h$convertInt[0]; | |
ret3 = ((i1&2146435072)>>>20)-1128; | |
} | |
} else { | |
ret3 = exp-1075; | |
ret1 = (i1&1048575)|1048576; | |
} | |
// negate mantissa for negative input | |
if(d < 0) { | |
if(ret2 === 0) { | |
ret1 = ((~ret1) + 1) | 0; | |
// ret2 = 0; | |
} else { | |
ret1 = ~ret1; | |
ret2 = ((~ret2) + 1) | 0; | |
} | |
} | |
// prim ubx tup returns don't return the first value! | |
{ h$ret1 = (ret1); h$ret2 = (ret2); h$ret3 = (ret3); return (null); }; | |
} | |
function h$ghcjsbn_encodeDouble_b(pos, b, e) { | |
h$ghcjsbn_assertValid_b(b, "encodeDouble_b"); | |
h$ghcjsbn_assertValid_s(e, "encodeDouble_b"); | |
if(e >= 972) { | |
return pos ? Infinity : -Infinity; | |
} | |
var ls = 1, bl = b[0], i, r = b[bl], mul = 1 << 28, rmul = 1/mul, s = 1; | |
for(i = bl-1; i >= 1; i--) { | |
/* if(e > GHCJSBN_BITS) { | |
e -= GHCJSBN_BITS; | |
s *= rmul; | |
r = r + s * b[i]; | |
} else { */ | |
r = r * mul + s * b[i]; | |
// } | |
} | |
// h$log("remaning exp: " + e); | |
if(e > 600) { | |
r = r * Math.pow(2, e-600) * Math.pow(2,600); | |
} else if(e < -600) { | |
r = r * Math.pow(2, e+600) * Math.pow(2,-600); | |
} else { | |
r = r * Math.pow(2, e); | |
} | |
h$ghcjsbn_assertValid_d(r, "encodeDouble_b result"); | |
return pos ? r : -r; | |
} | |
function h$ghcjsbn_toDouble_b(nonNeg, b) { | |
return h$ghcjsbn_encodeDouble_b(nonNeg, b, 0); | |
} | |
// fixme | |
var h$ghcjsbn_encodeDouble_i = h$ghcjsbn_encodeDouble_s; | |
function h$ghcjsbn_encodeDouble_s(m, e) { | |
h$ghcjsbn_assertValid_s(m, "encodeDouble_s m"); | |
h$ghcjsbn_assertValid_s(e, "encodeDouble_s e"); | |
var r = m * Math.pow(2, e); | |
h$ghcjsbn_assertValid_d(r, "encodeDouble_s result"); | |
return r; | |
} | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
// values defined in Gen2.ClosureInfo | |
// thread status | |
/* | |
* low-level heap object manipulation macros | |
*/ | |
// GHCJS.Prim.JSVal | |
// GHCJS.Prim.JSException | |
// Exception dictionary for JSException | |
// SomeException | |
// GHC.Ptr.Ptr | |
// GHC.Integer.GMP.Internals | |
// Data.Maybe.Maybe | |
// #define HS_NOTHING h$nothing | |
// Data.List | |
// Data.Text | |
// Data.Text.Lazy | |
// black holes | |
// can we skip the indirection for black holes? | |
// resumable thunks | |
// general deconstruction | |
// retrieve a numeric value that's possibly stored as an indirection | |
// generic lazy values | |
// generic data constructors and selectors | |
// unboxed tuple returns | |
// #define RETURN_UBX_TUP1(x) return x; | |
function h$createWebSocket(url, protocols) { | |
return new WebSocket(url, protocols); | |
} | |
/* | |
this must be called before the websocket has connected, | |
typically synchronously after creating the socket | |
*/ | |
function h$openWebSocket(ws, mcb, ccb, c) { | |
if(ws.readyState !== 0) { | |
throw new Error("h$openWebSocket: unexpected readyState, socket must be CONNECTING"); | |
} | |
ws.lastError = null; | |
ws.onopen = function() { | |
if(mcb) { | |
ws.onmessage = mcb; | |
} | |
if(ccb || mcb) { | |
ws.onclose = function(ce) { | |
if(ws.onmessage) { | |
h$release(ws.onmessage); | |
ws.onmessage = null; | |
} | |
if(ccb) { | |
h$release(ccb); | |
ccb(ce); | |
} | |
}; | |
}; | |
ws.onerror = function(err) { | |
ws.lastError = err; | |
if(ws.onmessage) { | |
h$release(ws.onmessage); | |
ws.onmessage = null; | |
} | |
ws.close(); | |
}; | |
c(null); | |
}; | |
ws.onerror = function(err) { | |
if(ccb) h$release(ccb); | |
if(mcb) h$release(mcb); | |
ws.onmessage = null; | |
ws.close(); | |
c(err); | |
}; | |
} | |
function h$closeWebSocket(status, reason, ws) { | |
ws.onerror = null; | |
if(ws.onmessage) { | |
h$release(ws.onmessage); | |
ws.onmessage = null; | |
} | |
ws.close(status, reason); | |
} | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
// values defined in Gen2.ClosureInfo | |
// thread status | |
/* | |
* low-level heap object manipulation macros | |
*/ | |
// GHCJS.Prim.JSVal | |
// GHCJS.Prim.JSException | |
// Exception dictionary for JSException | |
// SomeException | |
// GHC.Ptr.Ptr | |
// GHC.Integer.GMP.Internals | |
// Data.Maybe.Maybe | |
// #define HS_NOTHING h$nothing | |
// Data.List | |
// Data.Text | |
// Data.Text.Lazy | |
// black holes | |
// can we skip the indirection for black holes? | |
// resumable thunks | |
// general deconstruction | |
// retrieve a numeric value that's possibly stored as an indirection | |
// generic lazy values | |
// generic data constructors and selectors | |
// unboxed tuple returns | |
// #define RETURN_UBX_TUP1(x) return x; | |
/* | |
convert an array to a Haskell list, wrapping each element in a | |
JSVal constructor | |
*/ | |
function h$fromArray(a) { | |
var r = h$ghczmprimZCGHCziTypesziZMZN; | |
for(var i=a.length-1;i>=0;i--) r = (h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, ((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (a[i])))), (r))); | |
return a; | |
} | |
/* | |
convert an array to a Haskell list. No additional wrapping of the | |
elements is performed. Only use this when the elements are directly | |
usable as Haskell heap objects (numbers, boolean) or when the | |
array elements have already been appropriately wrapped | |
*/ | |
function h$fromArrayNoWrap(a) { | |
var r = h$ghczmprimZCGHCziTypesziZMZN; | |
for(var i=a.length-1;i>=0;i--) r = (h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, (a[i]), (r))); | |
return a; | |
} | |
/* | |
convert a list of JSVal to an array. the list must have been fully forced, | |
not just the spine. | |
*/ | |
function h$listToArray(xs) { | |
var a = [], i = 0; | |
while(((xs).f === h$ghczmprimZCGHCziTypesziZC_con_e)) { | |
a[i++] = ((((xs).d1)).d1); | |
xs = ((xs).d2); | |
} | |
return a; | |
} | |
function h$listToArrayWrap(xs) { | |
return (h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (h$listToArray(xs)))); | |
} | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
function h$animationFrameCancel(h) { | |
if(h.handle) window.cancelAnimationFrame(h.handle); | |
if(h.callback) { | |
h$release(h.callback) | |
h.callback = null; | |
} | |
} | |
function h$animationFrameRequest(h) { | |
h.handle = window.requestAnimationFrame(function(ts) { | |
var cb = h.callback; | |
if(cb) { | |
h$release(cb); | |
h.callback = null; | |
cb(ts); | |
} | |
}); | |
} | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
function h$exportValue(fp1a,fp1b,fp2a,fp2b,o) { | |
var e = { fp1a: fp1a | |
, fp1b: fp1b | |
, fp2a: fp2a | |
, fp2b: fp2b | |
, released: false | |
, root: o | |
, _key: -1 | |
}; | |
h$retain(e); | |
return e; | |
} | |
function h$derefExport(fp1a,fp1b,fp2a,fp2b,e) { | |
if(!e || typeof e !== 'object') return null; | |
if(e.released) return null; | |
if(fp1a !== e.fp1a || fp1b !== e.fp1b || | |
fp2a !== e.fp2a || fp2b !== e.fp2b) return null; | |
return e.root; | |
} | |
function h$releaseExport(e) { | |
h$release(e); | |
e.released = true; | |
e.root = null; | |
} | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
// values defined in Gen2.ClosureInfo | |
// thread status | |
/* | |
* low-level heap object manipulation macros | |
*/ | |
// GHCJS.Prim.JSVal | |
// GHCJS.Prim.JSException | |
// Exception dictionary for JSException | |
// SomeException | |
// GHC.Ptr.Ptr | |
// GHC.Integer.GMP.Internals | |
// Data.Maybe.Maybe | |
// #define HS_NOTHING h$nothing | |
// Data.List | |
// Data.Text | |
// Data.Text.Lazy | |
// black holes | |
// can we skip the indirection for black holes? | |
// resumable thunks | |
// general deconstruction | |
// retrieve a numeric value that's possibly stored as an indirection | |
// generic lazy values | |
// generic data constructors and selectors | |
// unboxed tuple returns | |
// #define RETURN_UBX_TUP1(x) return x; | |
/* | |
* Support code for the Data.JSString module. This code presents a JSString | |
* as a sequence of code points and hides the underlying encoding ugliness of | |
* the JavaScript strings. | |
* | |
* Use Data.JSString.Raw for direct access to the JSThis makes the operations more expen | |
*/ | |
/* | |
* Some workarounds here for JS engines that do not support proper | |
* code point access | |
*/ | |
var h$jsstringEmpty = (h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (''))); | |
var h$jsstringHead, h$jsstringTail, h$jsstringCons, | |
h$jsstringSingleton, h$jsstringSnoc, h$jsstringUncons, | |
h$jsstringIndex, h$jsstringUncheckedIndex, | |
h$jsstringTake, h$jsstringDrop, h$jsstringTakeEnd, h$jsstringDropEnd; | |
if(String.prototype.codePointAt) { | |
h$jsstringSingleton = function(ch) { | |
; | |
return String.fromCodePoint(ch); | |
} | |
h$jsstringHead = function(str) { | |
; | |
var cp = ch.codePointAt(0); | |
return (cp === undefined) ? -1 : (cp|0); | |
} | |
h$jsstringTail = function(str) { | |
; | |
var l = str.length; | |
if(l===0) return null; | |
var ch = str.codePointAt(0); | |
if(ch === undefined) return null; | |
// string length is at least two if ch comes from a surrogate pair | |
return str.substr(((ch)>=0x10000)?2:1); | |
} | |
h$jsstringCons = function(ch, str) { | |
; | |
return String.fromCodePoint(ch)+str; | |
} | |
h$jsstringSnoc = function(str, ch) { | |
; | |
return str+String.fromCodePoint(ch); | |
} | |
h$jsstringUncons = function(str) { | |
; | |
var l = str.length; | |
if(l===0) return null; | |
var ch = str.codePointAt(0); | |
if(ch === undefined) { | |
{ h$ret1 = (null); return (null); }; | |
} | |
{ h$ret1 = (str.substr(((ch)>=0x10000)?2:1)); return (ch); }; | |
} | |
// index is the first part of the character | |
h$jsstringIndex = function(i, str) { | |
; | |
var ch = str.codePointAt(i); | |
if(ch === undefined) return -1; | |
return ch; | |
} | |
h$jsstringUncheckedIndex = function(i, str) { | |
; | |
return str.codePointAt(i); | |
} | |
} else { | |
h$jsstringSingleton = function(ch) { | |
; | |
return (((ch)>=0x10000)) ? String.fromCharCode(((((ch)-0x10000)>>>10)+0xDC00), (((ch)&0x3FF)+0xD800)) | |
: String.fromCharCode(ch); | |
} | |
h$jsstringHead = function(str) { | |
; | |
var l = str.length; | |
if(l===0) return -1; | |
var ch = str.charCodeAt(0); | |
if(((ch|1023)===0xDBFF)) { | |
return (l>1) ? ((((ch)-0xD800)<<10)+(str.charCodeAt(1))-9216) : -1; | |
} else { | |
return ch; | |
} | |
} | |
h$jsstringTail = function(str) { | |
; | |
var l = str.length; | |
if(l===0) return null; | |
var ch = str.charCodeAt(0); | |
if(((ch|1023)===0xDBFF)) { | |
return (l>1)?str.substr(2):null; | |
} else return str.substr(1); | |
} | |
h$jsstringCons = function(ch, str) { | |
; | |
return ((((ch)>=0x10000)) ? String.fromCharCode(((((ch)-0x10000)>>>10)+0xDC00), (((ch)&0x3FF)+0xD800)) | |
: String.fromCharCode(ch)) | |
+ str; | |
} | |
h$jsstringSnoc = function(str, ch) { | |
; | |
return str + ((((ch)>=0x10000)) ? String.fromCharCode(((((ch)-0x10000)>>>10)+0xDC00), (((ch)&0x3FF)+0xD800)) | |
: String.fromCharCode(ch)); | |
} | |
h$jsstringUncons = function(str) { | |
; | |
var l = str.length; | |
if(l===0) return -1; | |
var ch = str.charCodeAt(0); | |
if(((ch|1023)===0xDBFF)) { | |
if(l > 1) { | |
{ h$ret1 = (str.substr(2)); return (((((ch)-0xD800)<<10)+(str.charCodeAt(1))-9216)); }; | |
} else { | |
{ h$ret1 = (null); return (-1); }; | |
} | |
} else { | |
{ h$ret1 = (str.substr(1)); return (ch); }; | |
} | |
} | |
// index is the first part of the character | |
h$jsstringIndex = function(i, str) { | |
// TRACE_JSSTRING("(no codePointAt) index: " + i + " '" + str + "'"); | |
var ch = str.charCodeAt(i); | |
if(ch != ch) return -1; // NaN test | |
return (((ch|1023)===0xDBFF)) ? ((((ch)-0xD800)<<10)+(str.charCodeAt(i+1))-9216) : ch; | |
} | |
h$jsstringUncheckedIndex = function(i, str) { | |
; | |
var ch = str.charCodeAt(i); | |
return (((ch|1023)===0xDBFF)) ? ((((ch)-0xD800)<<10)+(str.charCodeAt(i+1))-9216) : ch; | |
} | |
} | |
function h$jsstringPack(xs) { | |
var r = '', i = 0, a = [], c; | |
while(((xs).f === h$ghczmprimZCGHCziTypesziZC_con_e)) { | |
c = ((xs).d1); | |
a[i++] = ((typeof(c) === 'number')?(c):(c).d1); | |
if(i >= 60000) { | |
r += String.fromCharCode.apply(null, a); | |
a = []; | |
i = 0; | |
} | |
xs = ((xs).d2); | |
} | |
if(i > 0) r += String.fromCharCode.apply(null, a); | |
; | |
return r; | |
} | |
function h$jsstringPackReverse(xs) { | |
var a = [], i = 0, c; | |
while(((xs).f === h$ghczmprimZCGHCziTypesziZC_con_e)) { | |
c = ((xs).d1); | |
a[i++] = ((typeof(c) === 'number')?(c):(c).d1); | |
xs = ((xs).d2); | |
} | |
if(i===0) return ''; | |
var r = h$jsstringConvertArray(a.reverse()); | |
; | |
return r; | |
} | |
function h$jsstringPackArray(arr) { | |
; | |
return h$jsstringConvertArray(arr); | |
} | |
function h$jsstringPackArrayReverse(arr) { | |
; | |
return h$jsstringConvertArray(arr.reverse()); | |
} | |
function h$jsstringConvertArray(arr) { | |
if(arr.length < 60000) { | |
return String.fromCharCode.apply(null, arr); | |
} else { | |
var r = ''; | |
for(var i=0; i<arr.length; i+=60000) { | |
r += String.fromCharCode.apply(null, arr.slice(i, i+60000)); | |
} | |
return r; | |
} | |
} | |
function h$jsstringInit(str) { | |
; | |
var l = str.length; | |
if(l===0) return null; | |
var ch = str.charCodeAt(l-1); | |
var o = ((ch|1023)===0xDFFF)?2:1; | |
var r = str.substr(0, l-o); | |
return r; | |
} | |
function h$jsstringLast(str) { | |
; | |
var l = str.length; | |
if(l===0) return -1; | |
var ch = str.charCodeAt(l-1); | |
if(((ch|1023)===0xDFFF)) { | |
return (l>1) ? ((((str.charCodeAt(l-2))-0xD800)<<10)+(ch)-9216) : -1; | |
} else return ch; | |
} | |
// index is the last part of the character | |
function h$jsstringIndexR(i, str) { | |
; | |
if(i < 0 || i > str.length) return -1; | |
var ch = str.charCodeAt(i); | |
return (((ch|1023)===0xDFFF)) ? ((((str.charCodeAt(i-1))-0xD800)<<10)+(ch)-9216) : ch; | |
} | |
function h$jsstringNextIndex(i, str) { | |
; | |
return i + (((str.charCodeAt(i)|1023)===0xDBFF)?2:1); | |
} | |
function h$jsstringTake(n, str) { | |
; | |
if(n <= 0) return ''; | |
var i = 0, l = str.length, ch; | |
if(n >= l) return str; | |
while(n--) { | |
ch = str.charCodeAt(i++); | |
if(((ch|1023)===0xDBFF)) i++; | |
if(i >= l) return str; | |
} | |
return str.substr(0,i); | |
} | |
function h$jsstringDrop(n, str) { | |
; | |
if(n <= 0) return str; | |
var i = 0, l = str.length, ch; | |
if(n >= l) return ''; | |
while(n--) { | |
ch = str.charCodeAt(i++); | |
if(((ch|1023)===0xDBFF)) i++; | |
if(i >= l) return str; | |
} | |
return str.substr(i); | |
} | |
function h$jsstringSplitAt(n, str) { | |
; | |
if(n <= 0) { | |
{ h$ret1 = (str); return (""); }; | |
} else if(n >= str.length) { | |
{ h$ret1 = (""); return (str); }; | |
} | |
var i = 0, l = str.length, ch; | |
while(n--) { | |
ch = str.charCodeAt(i++); | |
if(((ch|1023)===0xDBFF)) i++; | |
if(i >= l) { | |
{ h$ret1 = (""); return (str); }; | |
} | |
} | |
{ h$ret1 = (str.substr(i)); return (str.substr(0,i)); }; | |
} | |
function h$jsstringTakeEnd(n, str) { | |
; | |
if(n <= 0) return ''; | |
var l = str.length, i = l-1, ch; | |
if(n >= l) return str; | |
while(n-- && i > 0) { | |
ch = str.charCodeAt(i--); | |
if(((ch|1023)===0xDFFF)) i--; | |
} | |
return (i<0) ? str : str.substr(i+1); | |
} | |
function h$jsstringDropEnd(n, str) { | |
; | |
if(n <= 0) return str; | |
var l = str.length, i = l-1, ch; | |
if(n >= l) return ''; | |
while(n-- && i > 0) { | |
ch = str.charCodeAt(i--); | |
if(((ch|1023)===0xDFFF)) i--; | |
} | |
return (i<0) ? '' : str.substr(0,i+1); | |
} | |
function h$jsstringIntercalate(x, ys) { | |
; | |
var a = [], i = 0; | |
while(((ys).f === h$ghczmprimZCGHCziTypesziZC_con_e)) { | |
if(i) a[i++] = x; | |
a[i++] = ((((ys).d1)).d1); | |
ys = ((ys).d2); | |
} | |
return a.join(''); | |
} | |
function h$jsstringIntersperse(ch, ys) { | |
; | |
var i = 0, l = ys.length, j = 0, a = [], ych; | |
if(((ch)>=0x10000)) { | |
var ch1 = ((((ch)-0x10000)>>>10)+0xDC00), ch2 = (((ch)&0x3FF)+0xD800); | |
while(j < l) { | |
if(i) { | |
a[i++] = ch1; | |
a[i++] = ch2; | |
} | |
ych = ys.charCodeAt(j++); | |
a[i++] = ych; | |
if(((ych|1023)===0xDBFF)) a[i++] = ys.charCodeAt(j++); | |
} | |
} else { | |
while(j < l) { | |
if(i) a[i++] = ch; | |
ych = ys.charCodeAt(j++); | |
a[i++] = ych; | |
if(((ych|1023)===0xDBFF)) a[i++] = ys.charCodeAt(j++); | |
} | |
} | |
return h$jsstringConvertArray(a); | |
} | |
function h$jsstringConcat(xs) { | |
; | |
var a = [], i = 0; | |
while(((xs).f === h$ghczmprimZCGHCziTypesziZC_con_e)) { | |
a[i++] = ((((xs).d1)).d1); | |
xs = ((xs).d2); | |
} | |
return a.join(''); | |
} | |
var h$jsstringStripPrefix, h$jsstringStripSuffix, | |
h$jsstringIsPrefixOf, h$jsstringIsSuffixOf, | |
h$jsstringIsInfixOf; | |
if(String.prototype.startsWith) { | |
h$jsstringStripPrefix = function(p, x) { | |
; | |
if(x.startsWith(p)) { | |
return (h$c1(h$baseZCGHCziBaseziJust_con_e, ((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (x.substr(p.length))))))); | |
} else { | |
return h$baseZCGHCziBaseziNothing; | |
} | |
} | |
h$jsstringIsPrefixOf = function(p, x) { | |
; | |
return x.startsWith(p); | |
} | |
} else { | |
h$jsstringStripPrefix = function(p, x) { | |
; | |
if(x.indexOf(p) === 0) { // this has worse complexity than it should | |
return (h$c1(h$baseZCGHCziBaseziJust_con_e, ((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (x.substr(p.length))))))); | |
} else { | |
return h$baseZCGHCziBaseziNothing; | |
} | |
} | |
h$jsstringIsPrefixOf = function(p, x) { | |
; | |
return x.indexOf(p) === 0; // this has worse complexity than it should | |
} | |
} | |
if(String.prototype.endsWith) { | |
h$jsstringStripSuffix = function(s, x) { | |
; | |
if(x.endsWith(s)) { | |
return (h$c1(h$baseZCGHCziBaseziJust_con_e, ((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (x.substr(0,x.length-s.length))))))); | |
} else { | |
return h$baseZCGHCziBaseziNothing; | |
} | |
} | |
h$jsstringIsSuffixOf = function(s, x) { | |
; | |
return x.endsWith(s); | |
} | |
} else { | |
h$jsstringStripSuffix = function(s, x) { | |
; | |
var i = x.lastIndexOf(s); // this has worse complexity than it should | |
var l = x.length - s.length; | |
if(i !== -1 && i === l) { | |
return (h$c1(h$baseZCGHCziBaseziJust_con_e, ((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (x.substr(0,l))))))); | |
} else { | |
return h$baseZCGHCziBaseziNothing; | |
} | |
} | |
h$jsstringIsSuffixOf = function(s, x) { | |
; | |
var i = x.lastIndexOf(s); // this has worse complexity than it should | |
return i !== -1 && i === x.length - s.length; | |
} | |
} | |
if(String.prototype.includes) { | |
h$jsstringIsInfixOf = function(i, x) { | |
; | |
return x.includes(i); | |
} | |
} else { | |
h$jsstringIsInfixOf = function(i, x) { | |
; | |
return x.indexOf(i) !== -1; // this has worse complexity than it should | |
} | |
} | |
function h$jsstringCommonPrefixes(x, y) { | |
; | |
var lx = x.length, ly = y.length, i = 0, cx; | |
var l = lx <= ly ? lx : ly; | |
if(lx === 0 || ly === 0 || x.charCodeAt(0) !== y.charCodeAt(0)) { | |
return h$baseZCGHCziBaseziNothing; | |
} | |
while(++i<l) { | |
cx = x.charCodeAt(i); | |
if(cx !== y.charCodeAt(i)) { | |
if(((cx|1023)===0xDFFF)) i--; | |
break; | |
} | |
} | |
if(i===0) return h$baseZCGHCziBaseziNothing; | |
return (h$c1(h$baseZCGHCziBaseziJust_con_e, ((h$c3(h$ghczmprimZCGHCziTupleziZLz2cUz2cUZR_con_e,((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, ((i===lx)?x:((i===ly)?y:x.substr(0,i)))))),((i===lx) ? h$jsstringEmpty : (h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (x.substr(i))))),((i===ly) ? h$jsstringEmpty : (h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (y.substr(i)))))))))); | |
} | |
function h$jsstringBreakOn(b, x) { | |
; | |
var i = x.indexOf(b); | |
if(i===-1) { | |
{ h$ret1 = (""); return (x); }; | |
} | |
if(i===0) { | |
{ h$ret1 = (x); return (""); }; | |
} | |
{ h$ret1 = (x.substr(i)); return (x.substr(0,i)); }; | |
} | |
function h$jsstringBreakOnEnd(b, x) { | |
; | |
var i = x.lastIndexOf(b); | |
if(i===-1) { | |
{ h$ret1 = (x); return (""); }; | |
} | |
i += b.length; | |
{ h$ret1 = (x.substr(i)); return (x.substr(0,i)); }; | |
} | |
function h$jsstringBreakOnAll1(n, b, x) { | |
; | |
var i = x.indexOf(b, n); | |
if(i===0) { | |
{ h$ret1 = (""); h$ret2 = (x); return (b.length); }; | |
} | |
if(i===-1) { | |
{ h$ret1 = (null); h$ret2 = (null); return (-1); }; | |
} | |
{ h$ret1 = (x.substr(0,i)); h$ret2 = (x.substr(i)); return (i+b.length); }; | |
} | |
function h$jsstringBreakOnAll(pat, src) { | |
; | |
var a = [], i = 0, n = 0, r = h$ghczmprimZCGHCziTypesziZMZN, pl = pat.length; | |
while(true) { | |
var x = src.indexOf(pat, n); | |
if(x === -1) break; | |
a[i++] = (h$c2(h$ghczmprimZCGHCziTupleziZLz2cUZR_con_e,((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (src.substr(0,x))))),((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (src.substr(x))))))); | |
n = x + pl; | |
} | |
while(--i >= 0) r = (h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, (a[i]), (r))); | |
return r; | |
} | |
function h$jsstringSplitOn1(n, p, x) { | |
; | |
var i = x.indexOf(p, n); | |
if(i === -1) { | |
{ h$ret1 = (null); return (-1); }; | |
} | |
var r1 = (i==n) ? "" : x.substr(n, i-n); | |
{ h$ret1 = (r1); return (i + p.length); }; | |
} | |
function h$jsstringSplitOn(p, x) { | |
; | |
var a = x.split(p); | |
var r = h$ghczmprimZCGHCziTypesziZMZN, i = a.length; | |
while(--i>=0) r = (h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, ((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (a[i])))), (r))); | |
return r; | |
} | |
// returns -1 for end of input, start of next token otherwise | |
// word in h$ret1 | |
// this function assumes that there are no whitespace characters >= 0x10000 | |
function h$jsstringWords1(n, x) { | |
; | |
var m = n, s = n, l = x.length; | |
if(m >= l) return -1; | |
// skip leading spaces | |
do { | |
if(m >= l) return -1; | |
} while(h$isSpace(x.charCodeAt(m++))); | |
// found start of word | |
s = m - 1; | |
while(m < l) { | |
if(h$isSpace(x.charCodeAt(m++))) { | |
// found end of word | |
var r1 = (m-s<=1) ? "" : x.substr(s,m-s-1); | |
{ h$ret1 = (r1); return (m); }; | |
} | |
} | |
// end of string | |
if(s < l) { | |
var r1 = s === 0 ? x : x.substr(s); | |
{ h$ret1 = (r1); return (m); }; | |
} | |
{ h$ret1 = (null); return (-1); }; | |
} | |
function h$jsstringWords(x) { | |
; | |
var a = null, i = 0, n, s = -1, m = 0, w, l = x.length, r = h$ghczmprimZCGHCziTypesziZMZN; | |
outer: | |
while(m < l) { | |
// skip leading spaces | |
do { | |
if(m >= l) { s = m; break outer; } | |
} while(h$isSpace(x.charCodeAt(m++))); | |
// found start of word | |
s = m - 1; | |
while(m < l) { | |
if(h$isSpace(x.charCodeAt(m++))) { | |
// found end of word | |
w = (m-s<=1) ? h$jsstringEmpty | |
: (h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (x.substr(s,m-s-1)))); | |
if(i) a[i++] = w; else { a = [w]; i = 1; } | |
s = m; | |
break; | |
} | |
} | |
} | |
// end of string | |
if(s !== -1 && s < l) { | |
w = (h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (s === 0 ? x : x.substr(s)))); | |
if(i) a[i++] = w; else { a = [w]; i = 1; } | |
} | |
// build resulting list | |
while(--i>=0) r = (h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, (a[i]), (r))); | |
return r; | |
} | |
// returns -1 for end of input, start of next token otherwise | |
// line in h$ret1 | |
function h$jsstringLines1(n, x) { | |
; | |
var m = n, l = x.length; | |
if(n >= l) return -1; | |
while(m < l) { | |
if(x.charCodeAt(m++) === 10) { | |
// found newline | |
if(n > 0 && n === l-1) return -1; // it was the last character | |
var r1 = (m-n<=1) ? "" : x.substr(n,m-n-1); | |
{ h$ret1 = (r1); return (m); }; | |
} | |
} | |
// end of string | |
{ h$ret1 = (x.substr(n)); return (m); }; | |
} | |
function h$jsstringLines(x) { | |
; | |
var a = null, m = 0, i = 0, l = x.length, s = 0, r = h$ghczmprimZCGHCziTypesziZMZN, w; | |
if(l === 0) return h$ghczmprimZCGHCziTypesziZMZN; | |
outer: | |
while(true) { | |
s = m; | |
do { | |
if(m >= l) break outer; | |
} while(x.charCodeAt(m++) !== 10); | |
w = (m-s<=1) ? h$jsstringEmpty : (h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (x.substr(s,m-s-1)))); | |
if(i) a[i++] = w; else { a = [w]; i = 1; } | |
} | |
if(s < l) { | |
w = (h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (x.substr(s)))); | |
if(i) a[i++] = w; else { a = [w]; i = 1; } | |
} | |
while(--i>=0) r = (h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, (a[i]), (r))); | |
return r; | |
} | |
function h$jsstringGroup(x) { | |
; | |
var xl = x.length; | |
if(xl === 0) return h$ghczmprimZCGHCziTypesziZMZN; | |
var i = xl-1, si, ch, s=xl, r=h$ghczmprimZCGHCziTypesziZMZN; | |
var tch = x.charCodeAt(i--); | |
if(((tch|1023)===0xDFFF)) tch = ((((x.charCodeAt(i--))-0xD800)<<10)+(tch)-9216); | |
while(i >= 0) { | |
si = i; | |
ch = x.charCodeAt(i--); | |
if(((ch|1023)===0xDFFF)) { | |
ch = ((((x.charCodeAt(i--))-0xD800)<<10)+(ch)-9216); | |
} | |
if(ch != tch) { | |
tch = ch; | |
r = (h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, ((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (x.substr(si+1,s-si))))), (r))); | |
s = si; | |
} | |
} | |
return (h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, ((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (x.substr(0,s+1))))), (r))); | |
} | |
function h$jsstringChunksOf1(n, s, x) { | |
; | |
var m = s, c = 0, l = x.length, ch; | |
if(n <= 0 || l === 0 || s >= l) return -1 | |
while(++m < l && ++c < n) { | |
ch = x.charCodeAt(m); | |
if(((ch|1023)===0xDBFF)) ++m; | |
} | |
var r1 = (m >= l && s === c) ? x : x.substr(s,m-s); | |
{ h$ret1 = (r1); return (m); }; | |
} | |
function h$jsstringChunksOf(n, x) { | |
; | |
var l = x.length; | |
if(l===0 || n <= 0) return h$ghczmprimZCGHCziTypesziZMZN; | |
if(l <= n) return (h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, ((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (x)))), (h$ghczmprimZCGHCziTypesziZMZN))); | |
var a = [], i = 0, s = 0, ch, m = 0, c, r = h$ghczmprimZCGHCziTypesziZMZN; | |
while(m < l) { | |
s = m; | |
c = 0; | |
while(m < l && ++c <= n) { | |
ch = x.charCodeAt(m++); | |
if(((ch|1023)===0xDBFF)) ++m; | |
} | |
if(c) a[i++] = x.substr(s, m-s); | |
} | |
while(--i>=0) r = (h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, ((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (a[i])))), (r))); | |
return r; | |
} | |
function h$jsstringCount(pat, src) { | |
; | |
var i = 0, n = 0, pl = pat.length, sl = src.length; | |
while(i<sl) { | |
i = src.indexOf(pat, i); | |
if(i===-1) break; | |
n++; | |
i += pl; | |
} | |
return n; | |
} | |
function h$jsstringReplicate(n, str) { | |
; | |
if(n === 0 || str == '') return ''; | |
if(n === 1) return str; | |
var r = ''; | |
do { | |
if(n&1) r+=str; | |
str+=str; | |
n >>= 1; | |
} while(n > 1); | |
return r+str; | |
} | |
// this does not deal with combining diacritics, Data.Text does not either | |
var h$jsstringReverse; | |
if(Array.from) { | |
h$jsstringReverse = function(str) { | |
; | |
return Array.from(str).reverse().join(''); | |
} | |
} else { | |
h$jsstringReverse = function(str) { | |
; | |
var l = str.length, a = [], o = 0, i = 0, c, c1, s = ''; | |
while(i < l) { | |
c = str.charCodeAt(i); | |
if(((c|1023)===0xDBFF)) { | |
a[i] = str.charCodeAt(i+1); | |
a[i+1] = c; | |
i += 2; | |
} else a[i++] = c; | |
if(i-o > 60000) { | |
s = String.fromCharCode.apply(null, a.reverse()) + s; | |
o = -i; | |
a = []; | |
} | |
} | |
return (i===0) ? s : String.fromCharCode.apply(null,a.reverse()) + s; | |
} | |
} | |
function h$jsstringUnpack(str) { | |
; | |
var r = h$ghczmprimZCGHCziTypesziZMZN, i = str.length-1, c; | |
while(i >= 0) { | |
c = str.charCodeAt(i--); | |
if(((c|1023)===0xDFFF)) c = ((((str.charCodeAt(i--))-0xD800)<<10)+(c)-9216) | |
r = (h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, (c), (r))); | |
} | |
return r; | |
} | |
function h$jsstringDecI64(hi,lo) { | |
; | |
var lo0 = (lo < 0) ? lo+4294967296:lo; | |
if(hi < 0) { | |
if(hi === -1) return ''+(lo0-4294967296); | |
lo0 = 4294967296 - lo0; | |
var hi0 = -1 - hi; | |
var x0 = hi0 * 967296; | |
var x1 = (lo0 + x0) % 1000000; | |
var x2 = hi0*4294+Math.floor((x0+lo0-x1)/1000000); | |
return '-' + x2 + h$jsstringDecIPadded6(x1); | |
} else { | |
if(hi === 0) return ''+lo0; | |
var x0 = hi * 967296; | |
var x1 = (lo0 + x0) % 1000000; | |
var x2 = hi*4294+Math.floor((x0+lo0-x1)/1000000); | |
return '' + x2 + h$jsstringDecIPadded6(x1); | |
} | |
} | |
function h$jsstringDecW64(hi,lo) { | |
; | |
var lo0 = (lo < 0) ? lo+4294967296 : lo; | |
if(hi === 0) return ''+lo0; | |
var hi0 = (hi < 0) ? hi+4294967296 : hi; | |
var x0 = hi0 * 967296; | |
var x1 = (lo0 + x0) % 1000000; | |
var x2 = hi0*4294+Math.floor((x0+lo0-x1)/1000000); | |
return '' + x2 + h$jsstringDecIPadded6(x1); | |
} | |
function h$jsstringHexI64(hi,lo) { | |
var lo0 = lo<0 ? lo+4294967296 : lo; | |
if(hi === 0) return lo0.toString(16); | |
return ((hi<0)?hi+4294967296:hi).toString(16) + h$jsstringHexIPadded8(lo0); | |
} | |
function h$jsstringHexW64(hi,lo) { | |
var lo0 = lo<0 ? lo+4294967296 : lo; | |
if(hi === 0) return lo0.toString(16); | |
return ((hi<0)?hi+4294967296:hi).toString(16) + h$jsstringHexIPadded8(lo0); | |
} | |
// n in [0, 1000000000) | |
function h$jsstringDecIPadded9(n) { | |
; | |
if(n === 0) return '000000000'; | |
var pad = (n>=100000000)?'': | |
(n>=10000000)?'0': | |
(n>=1000000)?'00': | |
(n>=100000)?'000': | |
(n>=10000)?'0000': | |
(n>=1000)?'00000': | |
(n>=100)?'000000': | |
(n>=10)?'0000000': | |
'00000000'; | |
return pad+n; | |
} | |
// n in [0, 1000000) | |
function h$jsstringDecIPadded6(n) { | |
; | |
if(n === 0) return '000000'; | |
var pad = (n>=100000)?'': | |
(n>=10000)?'0': | |
(n>=1000)?'00': | |
(n>=100)?'000': | |
(n>=10)?'0000': | |
'00000'; | |
return pad+n; | |
} | |
// n in [0, 2147483648) | |
function h$jsstringHexIPadded8(n) { | |
; | |
if(n === 0) return '00000000'; | |
var pad = (n>=0x10000000)?'': | |
(n>=0x1000000)?'0': | |
(n>=0x100000)?'00': | |
(n>=0x10000)?'000': | |
(n>=0x1000)?'0000': | |
(n>=0x100)?'00000': | |
(n>=0x10)?'000000': | |
'0000000'; | |
return pad+n.toString(16); | |
} | |
function h$jsstringZeroes(n) { | |
var r; | |
switch(n&7) { | |
case 0: r = ''; break; | |
case 1: r = '0'; break; | |
case 2: r = '00'; break; | |
case 3: r = '000'; break; | |
case 4: r = '0000'; break; | |
case 5: r = '00000'; break; | |
case 6: r = '000000'; break; | |
case 7: r = '0000000'; | |
} | |
for(var i=n>>3;i>0;i--) r = r + '00000000'; | |
return r; | |
} | |
function h$jsstringDoubleToFixed(decs, d) { | |
if(decs >= 0) { | |
if(Math.abs(d) < 1e21) { | |
var r = d.toFixed(Math.min(20,decs)); | |
if(decs > 20) r = r + h$jsstringZeroes(decs-20); | |
return r; | |
} else { | |
var r = d.toExponential(); | |
var ei = r.indexOf('e'); | |
var di = r.indexOf('.'); | |
var e = parseInt(r.substr(ei+1)); | |
return r.substring(0,di) + r.substring(di,ei) + h$jsstringZeroes(di-ei+e) + | |
((decs > 0) ? ('.' + h$jsstringZeroes(decs)) : ''); | |
} | |
} | |
var r = Math.abs(d).toExponential(); | |
var ei = r.indexOf('e'); | |
var e = parseInt(r.substr(ei+1)); | |
var m = d < 0 ? '-' : ''; | |
r = r.substr(0,1) + r.substring(2,ei); | |
if(e >= 0) { | |
return (e > r.length) ? m + r + h$jsstringZeroes(r.length-e-1) + '.0' | |
: m + r.substr(0,e+1) + '.' + r.substr(e+1); | |
} else { | |
return m + '0.' + h$jsstringZeroes(-e-1) + r; | |
} | |
} | |
function h$jsstringDoubleToExponent(decs, d) { | |
var r; | |
if(decs ===-1) { | |
r = d.toExponential().replace('+',''); | |
} else { | |
r = d.toExponential(Math.max(1, Math.min(20,decs))).replace('+',''); | |
} | |
if(r.indexOf('.') === -1) { | |
r = r.replace('e', '.0e'); | |
} | |
if(decs > 20) r = r.replace('e', h$jsstringZeroes(decs-20)+'e'); | |
return r; | |
} | |
function h$jsstringDoubleGeneric(decs, d) { | |
var r; | |
if(decs === -1) { | |
r = d.toString(10).replace('+',''); | |
} else { | |
r = d.toPrecision(Math.max(decs+1,1)).replace('+',''); | |
} | |
if(decs !== 0 && r.indexOf('.') === -1) { | |
if(r.indexOf('e') !== -1) { | |
r = r.replace('e', '.0e'); | |
} else { | |
r = r + '.0'; | |
} | |
} | |
return r; | |
} | |
function h$jsstringAppend(x, y) { | |
; | |
return x+y; | |
} | |
function h$jsstringCompare(x, y) { | |
; | |
return (x<y)?-1:((x>y)?1:0); | |
} | |
function h$jsstringUnlines(xs) { | |
var r = ''; | |
while(((xs).f === h$ghczmprimZCGHCziTypesziZC_con_e)) { | |
r = r + ((((xs).d1)).d1) + '\n'; | |
xs = ((xs).d2); | |
} | |
return r; | |
} | |
function h$jsstringUnwords(xs) { | |
if(((xs).f === h$ghczmprimZCGHCziTypesziZMZN_con_e)) return ''; | |
var r = ((((xs).d1)).d1); | |
xs = ((xs).d2); | |
while(((xs).f === h$ghczmprimZCGHCziTypesziZC_con_e)) { | |
r = r + ' ' + ((((xs).d1)).d1); | |
xs = ((xs).d2); | |
} | |
return r; | |
} | |
function h$jsstringReplace(pat, rep, src) { | |
; | |
var r = src.replace(pat, rep, 'g'); | |
// the 'g' flag is not supported everywhere, check and fall back if necessary | |
if(r.indexOf(pat) !== -1) { | |
r = src.split(pat).join(rep); | |
} | |
return r; | |
} | |
function h$jsstringReplicateChar(n, ch) { | |
; | |
return h$jsstringReplicate(n, h$jsstringSingleton(ch)); | |
} | |
function h$jsstringIsInteger(str) { | |
return /^-?\d+$/.test(str); | |
} | |
function h$jsstringIsNatural(str) { | |
return /^\d+$/.test(str); | |
} | |
function h$jsstringReadInt(str) { | |
if(!/^-?\d+/.test(str)) return null; | |
var x = parseInt(str, 10); | |
var x0 = x|0; | |
return (x===x0) ? x0 : null; | |
} | |
function h$jsstringLenientReadInt(str) { | |
var x = parseInt(str, 10); | |
var x0 = x|0; | |
return (x===x0) ? x0 : null; | |
} | |
function h$jsstringReadWord(str) { | |
if(!/^\d+/.test(str)) return null; | |
var x = parseInt(str, 10); | |
var x0 = x|0; | |
if(x0<0) return (x===x0+2147483648) ? x0 : null; | |
else return (x===x0) ? x0 : null; | |
} | |
function h$jsstringReadDouble(str) { | |
return parseFloat(str, 10); | |
} | |
function h$jsstringLenientReadDouble(str) { | |
return parseFloat(str, 10); | |
} | |
function h$jsstringReadInteger(str) { | |
; | |
if(!/^(-)?\d+$/.test(str)) { | |
return null; | |
} else if(str.length <= 9) { | |
return (h$c1(h$integerzmgmpZCGHCziIntegerziTypeziSzh_con_e, (parseInt(str, 10))));; | |
} else { | |
return MK_INTEGER_J(new BigInteger(str, 10)); | |
} | |
} | |
function h$jsstringReadInt64(str) { | |
if(!/^(-)?\d+$/.test(str)) { | |
{ h$ret1 = (0); h$ret2 = (0); return (0); }; | |
} | |
if(str.charCodeAt(0) === 45) { // '-' | |
return h$jsstringReadValue64(str, 1, true); | |
} else { | |
return h$jsstringReadValue64(str, 0, false); | |
} | |
} | |
function h$jsstringReadWord64(str) { | |
if(!/^\d+$/.test(str)) { | |
{ h$ret1 = (0); h$ret2 = (0); return (0); }; | |
} | |
return h$jsstringReadValue64(str, 0, false); | |
} | |
var h$jsstringLongs = null; | |
function h$jsstringReadValue64(str, start, negate) { | |
var l = str.length, i = start; | |
while(i < l) { | |
if(str.charCodeAt(i) !== 48) break; | |
i++; | |
} | |
if(i >= l) { h$ret1 = (0); h$ret2 = (0); return (1); }; // only zeroes | |
if(h$jsstringLongs === null) { | |
h$jsstringLongs = []; | |
for(var t=10; t<=1000000000; t*=10) { | |
h$jsstringLongs.push(goog.math.Long.fromInt(t)); | |
} | |
} | |
var li = l-i; | |
if(li < 10 && !negate) { | |
{ h$ret1 = (0); h$ret2 = (parseInt(str.substr(i), 10)); return (1); }; | |
} | |
var r = goog.math.Long.fromInt(parseInt(str.substr(li,9),10)); | |
li += 9; | |
while(li < l) { | |
r = r.multiply(h$jsstringLongs[Math.min(l-li-1,8)]) | |
.add(goog.math.Long.fromInt(parseInt(str.substr(li,9), 10))); | |
li += 9; | |
} | |
if(negate) { | |
r = r.negate(); | |
} | |
{ h$ret1 = (r.getHighBits()); h$ret2 = (r.getLowBits()); return (1); }; | |
} | |
function h$jsstringExecRE(i, str, re) { | |
re.lastIndex = i; | |
var m = re.exec(str); | |
if(m === null) return -1; | |
var a = [], x, j = 1, r = h$ghczmprimZCGHCziTypesziZMZN; | |
while(true) { | |
x = m[j]; | |
if(typeof x === 'undefined') break; | |
a[j-1] = x; | |
j++; | |
} | |
j-=1; | |
while(--j>=0) r = (h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, ((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (a[j])))), (r))); | |
{ h$ret1 = (m[0]); h$ret2 = (r); return (m.index); }; | |
} | |
function h$jsstringReplaceRE(pat, replacement, str) { | |
return str.replace(pat, replacement); | |
} | |
function h$jsstringSplitRE(limit, re, str) { | |
re.lastIndex = i; | |
var s = (limit < 0) ? str.split(re) : str.split(re, limit); | |
var i = s.length, r = h$ghczmprimZCGHCziTypesziZMZN; | |
while(--i>=0) r = (h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, ((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (a[i])))), (r))); | |
return r; | |
} | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
// values defined in Gen2.ClosureInfo | |
// thread status | |
/* | |
* low-level heap object manipulation macros | |
*/ | |
// GHCJS.Prim.JSVal | |
// GHCJS.Prim.JSException | |
// Exception dictionary for JSException | |
// SomeException | |
// GHC.Ptr.Ptr | |
// GHC.Integer.GMP.Internals | |
// Data.Maybe.Maybe | |
// #define HS_NOTHING h$nothing | |
// Data.List | |
// Data.Text | |
// Data.Text.Lazy | |
// black holes | |
// can we skip the indirection for black holes? | |
// resumable thunks | |
// general deconstruction | |
// retrieve a numeric value that's possibly stored as an indirection | |
// generic lazy values | |
// generic data constructors and selectors | |
// unboxed tuple returns | |
// #define RETURN_UBX_TUP1(x) return x; | |
/* | |
* Functions that directly access JavaScript strings, ignoring character | |
* widths and surrogate pairs. | |
*/ | |
function h$jsstringRawChunksOf(k, x) { | |
var l = x.length; | |
if(l === 0) return h$ghczmprimZCGHCziTypesziZMZN; | |
if(l <= k) return (h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, ((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (x)))), (h$ghczmprimZCGHCziTypesziZMZN))); | |
var r=h$ghczmprimZCGHCziTypesziZMZN; | |
for(var i=ls-k;i>=0;i-=k) r = (h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, ((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (x.substr(i,i+k))))), (r))); | |
return r; | |
} | |
function h$jsstringRawSplitAt(k, x) { | |
if(k === 0) return (h$c2(h$ghczmprimZCGHCziTupleziZLz2cUZR_con_e,(h$jsstringEmpty),((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (x)))))); | |
if(k >= x.length) return (h$c2(h$ghczmprimZCGHCziTupleziZLz2cUZR_con_e,((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (x)))),(h$jsstringEmpty))); | |
return (h$c2(h$ghczmprimZCGHCziTupleziZLz2cUZR_con_e,((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (x.substr(0,k))))),((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (x.substr(k))))))); | |
} | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
function h$foreignListProps(o) { | |
var r = HS_NIL; | |
if(typeof o === 'undefined' || o === null) return null; | |
throw "h$foreignListProps"; | |
/* for(var p in o) { | |
} */ | |
} | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
// conversion between JavaScript string and Data.Text | |
// values defined in Gen2.ClosureInfo | |
// thread status | |
/* | |
* low-level heap object manipulation macros | |
*/ | |
// GHCJS.Prim.JSVal | |
// GHCJS.Prim.JSException | |
// Exception dictionary for JSException | |
// SomeException | |
// GHC.Ptr.Ptr | |
// GHC.Integer.GMP.Internals | |
// Data.Maybe.Maybe | |
// #define HS_NOTHING h$nothing | |
// Data.List | |
// Data.Text | |
// Data.Text.Lazy | |
// black holes | |
// can we skip the indirection for black holes? | |
// resumable thunks | |
// general deconstruction | |
// retrieve a numeric value that's possibly stored as an indirection | |
// generic lazy values | |
// generic data constructors and selectors | |
// unboxed tuple returns | |
// #define RETURN_UBX_TUP1(x) return x; | |
/* | |
convert a Data.Text buffer with offset/length to a JavaScript string | |
*/ | |
function h$textToString(arr, off, len) { | |
var a = []; | |
var end = off+len; | |
var k = 0; | |
var u1 = arr.u1; | |
var s = ''; | |
for(var i=off;i<end;i++) { | |
var cc = u1[i]; | |
a[k++] = cc; | |
if(k === 60000) { | |
s += String.fromCharCode.apply(this, a); | |
k = 0; | |
a = []; | |
} | |
} | |
return s + String.fromCharCode.apply(this, a); | |
} | |
/* | |
convert a JavaScript string to a Data.Text buffer, second return | |
value is length | |
*/ | |
function h$textFromString(s) { | |
var l = s.length; | |
var b = h$newByteArray(l * 2); | |
var u1 = b.u1; | |
for(var i=l-1;i>=0;i--) u1[i] = s.charCodeAt(i); | |
{ h$ret1 = (l); return (b); }; | |
} | |
function h$lazyTextToString(txt) { | |
var s = ''; | |
while(((txt).f.a === 2)) { | |
var head = ((txt)); | |
s += h$textToString(((head).d1), ((head).d2.d1), ((head).d2.d2)); | |
txt = ((txt).d2.d3); | |
} | |
return s; | |
} | |
function h$safeTextFromString(x) { | |
if(typeof x !== 'string') { | |
{ h$ret1 = (0); return (null); }; | |
} | |
return h$textFromString(x); | |
} | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
// values defined in Gen2.ClosureInfo | |
// thread status | |
/* | |
* low-level heap object manipulation macros | |
*/ | |
// GHCJS.Prim.JSVal | |
// GHCJS.Prim.JSException | |
// Exception dictionary for JSException | |
// SomeException | |
// GHC.Ptr.Ptr | |
// GHC.Integer.GMP.Internals | |
// Data.Maybe.Maybe | |
// #define HS_NOTHING h$nothing | |
// Data.List | |
// Data.Text | |
// Data.Text.Lazy | |
// black holes | |
// can we skip the indirection for black holes? | |
// resumable thunks | |
// general deconstruction | |
// retrieve a numeric value that's possibly stored as an indirection | |
// generic lazy values | |
// generic data constructors and selectors | |
// unboxed tuple returns | |
// #define RETURN_UBX_TUP1(x) return x; | |
function h$allProps(o) { | |
var a = [], i = 0; | |
for(var p in o) a[i++] = p; | |
return a; | |
} | |
function h$listProps(o) { | |
var r = h$ghczmprimZCGHCziTypesziZMZN; | |
for(var p in o) { r = (h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, ((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (p)))), (r))); } | |
return r; | |
} | |
function h$listAssocs(o) { | |
var r = h$ghczmprimZCGHCziTypesziZMZN; | |
for(var p in o) { r = (h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, ((h$c2(h$ghczmprimZCGHCziTupleziZLz2cUZR_con_e,((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (p)))),((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (o[p]))))))), (r))); } | |
return r; | |
} | |
function h$isNumber(o) { | |
return typeof(o) === 'number'; | |
} | |
// returns true for null, but not for functions and host objects | |
function h$isObject(o) { | |
return typeof(o) === 'object'; | |
} | |
function h$isString(o) { | |
return typeof(o) === 'string'; | |
} | |
function h$isSymbol(o) { | |
return typeof(o) === 'symbol'; | |
} | |
function h$isBoolean(o) { | |
return typeof(o) === 'boolean'; | |
} | |
function h$isFunction(o) { | |
return typeof(o) === 'function'; | |
} | |
function h$jsTypeOf(o) { | |
var t = typeof(o); | |
if(t === 'undefined') return 0; | |
if(t === 'object') return 1; | |
if(t === 'boolean') return 2; | |
if(t === 'number') return 3; | |
if(t === 'string') return 4; | |
if(t === 'symbol') return 5; | |
if(t === 'function') return 6; | |
return 7; // other, host object etc | |
} | |
/* | |
-- 0 - null, 1 - integer, | |
-- 2 - float, 3 - bool, | |
-- 4 - string, 5 - array | |
-- 6 - object | |
*/ | |
function h$jsonTypeOf(o) { | |
if (!(o instanceof Object)) { | |
if (o == null) { | |
return 0; | |
} else if (typeof o == 'number') { | |
if (h$isInteger(o)) { | |
return 1; | |
} else { | |
return 2; | |
} | |
} else if (typeof o == 'boolean') { | |
return 3; | |
} else { | |
return 4; | |
} | |
} else { | |
if (Object.prototype.toString.call(o) == '[object Array]') { | |
// it's an array | |
return 5; | |
} else if (!o) { | |
// null | |
return 0; | |
} else { | |
// it's an object | |
return 6; | |
} | |
} | |
} | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
function h$sendXHR(xhr, d, cont) { | |
xhr.addEventListener('error', function () { | |
cont(2); | |
}); | |
xhr.addEventListener('abort', function() { | |
cont(1); | |
}); | |
xhr.addEventListener('load', function() { | |
cont(0); | |
}); | |
if(d) { | |
xhr.send(d); | |
} else { | |
xhr.send(); | |
} | |
} | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
function h$hsprimitive_memcpy(dst_d, dst_o, doff, src_d, src_o, soff, len) { | |
return h$primitive_memmove(dst_d, dst_o, doff, src_d, src_o, len); | |
} | |
function h$hsprimitive_memmove(dst_d, dst_o, doff, src_d, src_o, soff, len) { | |
if(len === 0) return; | |
var du8 = dst_d.u8, su8 = src_d.u8; | |
for(var i=len-1;i>=0;i--) { | |
du8[dst_o+i] = su8[src_o+i]; | |
} | |
} | |
function h$hsprimitive_memsetba_Word8 (p_d, off, n, x) { if(n > 0) { if(p_d.u8.fill) p_d.u8.fill(x, off, off + n); else for(var i=off; i<off+n; i++) p_d.u8[i] = x; } } | |
function h$hsprimitive_memsetba_Word16 (p_d, off, n, x) { if(n > 0) { if(p_d.u1.fill) p_d.u1.fill(x, off, off + n); else for(var i=off; i<off+n; i++) p_d.u1[i] = x; } } | |
function h$hsprimitive_memsetba_Word32 (p_d, off, n, x) { if(n > 0) { if(p_d.i3.fill) p_d.i3.fill(x, off, off + n); else for(var i=off; i<off+n; i++) p_d.i3[i] = x; } } | |
function h$hsprimitive_memsetba_Word (p_d, off, n, x) { if(n > 0) { if(p_d.i3.fill) p_d.i3.fill(x, off, off + n); else for(var i=off; i<off+n; i++) p_d.i3[i] = x; } } | |
function h$hsprimitive_memsetba_Float (p_d, off, n, x) { if(n > 0) { if(p_d.f3.fill) p_d.f3.fill(x, off, off + n); else for(var i=off; i<off+n; i++) p_d.f3[i] = x; } } | |
function h$hsprimitive_memsetba_Double (p_d, off, n, x) { if(n > 0) { if(p_d.f6.fill) p_d.f6.fill(x, off, off + n); else for(var i=off; i<off+n; i++) p_d.f6[i] = x; } } | |
function h$hsprimitive_memsetba_Char (p_d, off, n, x) { if(n > 0) { if(p_d.i3.fill) p_d.i3.fill(x, off, off + n); else for(var i=off; i<off+n; i++) p_d.i3[i] = x; } } | |
function h$hsprimitive_memset_Word8 (p_d, p_o, off, n, x) { var start = (p_o >> 0) + off; if(n > 0) { if(p_d.u8.fill) p_d.u8.fill(x, start, start + n); else for(var i=start; i<start+n; i++) p_d.u8[i] = x; } } | |
function h$hsprimitive_memset_Word16 (p_d, p_o, off, n, x) { var start = (p_o >> 1) + off; if(n > 0) { if(p_d.u1.fill) p_d.u1.fill(x, start, start + n); else for(var i=start; i<start+n; i++) p_d.u1[i] = x; } } | |
function h$hsprimitive_memset_Word32 (p_d, p_o, off, n, x) { var start = (p_o >> 2) + off; if(n > 0) { if(p_d.i3.fill) p_d.i3.fill(x, start, start + n); else for(var i=start; i<start+n; i++) p_d.i3[i] = x; } } | |
function h$hsprimitive_memset_Word (p_d, p_o, off, n, x) { var start = (p_o >> 2) + off; if(n > 0) { if(p_d.i3.fill) p_d.i3.fill(x, start, start + n); else for(var i=start; i<start+n; i++) p_d.i3[i] = x; } } | |
function h$hsprimitive_memset_Float (p_d, p_o, off, n, x) { var start = (p_o >> 2) + off; if(n > 0) { if(p_d.f3.fill) p_d.f3.fill(x, start, start + n); else for(var i=start; i<start+n; i++) p_d.f3[i] = x; } } | |
function h$hsprimitive_memset_Double (p_d, p_o, off, n, x) { var start = (p_o >> 3) + off; if(n > 0) { if(p_d.f6.fill) p_d.f6.fill(x, start, start + n); else for(var i=start; i<start+n; i++) p_d.f6[i] = x; } } | |
function h$hsprimitive_memset_Char (p_d, p_o, off, n, x) { var start = (p_o >> 2) + off; if(n > 0) { if(p_d.i3.fill) p_d.i3.fill(x, start, start + n); else for(var i=start; i<start+n; i++) p_d.i3[i] = x; } } | |
function h$hsprimitive_memsetba_Word64(p_d, off, n, x_1, x_2) { | |
h$hsprimitive_memset_Word64(p_d, 0, off, n, x_1, x_2); | |
} | |
function h$hsprimitive_memset_Word64(p_d, p_o, off, n, x_1, x_2) { | |
var start = (p_o >> 3) + off; | |
if(n > 0) { | |
var pi3 = p_d.i3; | |
for(var i = 0; i < n; i++) { | |
var o = (start + i) << 1; | |
pi3[o] = x_1; | |
pi3[o+1] = x_2; | |
} | |
} | |
} | |
function h$hsprimitive_memset_Ptr(p_d, p_o, off, n, x_1, x_2) { | |
if(n > 0) { | |
if(!p_d.arr) p_d.arr = []; | |
var a = p_d.arr; | |
for(var i = 0; i < n; i++) { | |
a[p_o + ((off + i) << 2)] = [x_1, x_2]; | |
} | |
} | |
} | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
// Copyright 2011 The Closure Library Authors. All Rights Reserved. | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS-IS" BASIS, | |
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
// See the License for the specific language governing permissions and | |
// limitations under the License. | |
/** | |
* @fileoverview Abstract cryptographic hash interface. | |
* | |
* See goog.crypt.Sha1 and goog.crypt.Md5 for sample implementations. | |
* | |
*/ | |
goog.provide('goog.crypt.Hash'); | |
/** | |
* Create a cryptographic hash instance. | |
* | |
* @constructor | |
* @struct | |
*/ | |
goog.crypt.Hash = function() { | |
/** | |
* The block size for the hasher. | |
* @type {number} | |
*/ | |
this.blockSize = -1; | |
}; | |
/** | |
* Resets the internal accumulator. | |
*/ | |
goog.crypt.Hash.prototype.reset = goog.abstractMethod; | |
/** | |
* Adds a byte array (array with values in [0-255] range) or a string (might | |
* only contain 8-bit, i.e., Latin1 characters) to the internal accumulator. | |
* | |
* Many hash functions operate on blocks of data and implement optimizations | |
* when a full chunk of data is readily available. Hence it is often preferable | |
* to provide large chunks of data (a kilobyte or more) than to repeatedly | |
* call the update method with few tens of bytes. If this is not possible, or | |
* not feasible, it might be good to provide data in multiplies of hash block | |
* size (often 64 bytes). Please see the implementation and performance tests | |
* of your favourite hash. | |
* | |
* @param {Array<number>|Uint8Array|string} bytes Data used for the update. | |
* @param {number=} opt_length Number of bytes to use. | |
*/ | |
goog.crypt.Hash.prototype.update = goog.abstractMethod; | |
/** | |
* @return {!Array<number>} The finalized hash computed | |
* from the internal accumulator. | |
*/ | |
goog.crypt.Hash.prototype.digest = goog.abstractMethod; | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
// Copyright 2011 The Closure Library Authors. All Rights Reserved. | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS-IS" BASIS, | |
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
// See the License for the specific language governing permissions and | |
// limitations under the License. | |
/** | |
* @fileoverview MD5 cryptographic hash. | |
* Implementation of http://tools.ietf.org/html/rfc1321 with common | |
* optimizations and tweaks (see http://en.wikipedia.org/wiki/MD5). | |
* | |
* Usage: | |
* var md5 = new goog.crypt.Md5(); | |
* md5.update(bytes); | |
* var hash = md5.digest(); | |
* | |
* Performance: | |
* Chrome 23 ~680 Mbit/s | |
* Chrome 13 (in a VM) ~250 Mbit/s | |
* Firefox 6.0 (in a VM) ~100 Mbit/s | |
* IE9 (in a VM) ~27 Mbit/s | |
* Firefox 3.6 ~15 Mbit/s | |
* IE8 (in a VM) ~13 Mbit/s | |
* | |
*/ | |
goog.provide('goog.crypt.Md5'); | |
goog.require('goog.crypt.Hash'); | |
/** | |
* MD5 cryptographic hash constructor. | |
* @constructor | |
* @extends {goog.crypt.Hash} | |
* @final | |
* @struct | |
*/ | |
goog.crypt.Md5 = function() { | |
goog.crypt.Md5.base(this, 'constructor'); | |
this.blockSize = 512 / 8; | |
/** | |
* Holds the current values of accumulated A-D variables (MD buffer). | |
* @type {!Array<number>} | |
* @private | |
*/ | |
this.chain_ = new Array(4); | |
/** | |
* A buffer holding the data until the whole block can be processed. | |
* @type {!Array<number>} | |
* @private | |
*/ | |
this.block_ = new Array(this.blockSize); | |
/** | |
* The length of yet-unprocessed data as collected in the block. | |
* @type {number} | |
* @private | |
*/ | |
this.blockLength_ = 0; | |
/** | |
* The total length of the message so far. | |
* @type {number} | |
* @private | |
*/ | |
this.totalLength_ = 0; | |
this.reset(); | |
}; | |
goog.inherits(goog.crypt.Md5, goog.crypt.Hash); | |
/** | |
* Integer rotation constants used by the abbreviated implementation. | |
* They are hardcoded in the unrolled implementation, so it is left | |
* here commented out. | |
* @type {Array<number>} | |
* @private | |
* | |
goog.crypt.Md5.S_ = [ | |
7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, | |
5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, | |
4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, | |
6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21 | |
]; | |
*/ | |
/** | |
* Sine function constants used by the abbreviated implementation. | |
* They are hardcoded in the unrolled implementation, so it is left | |
* here commented out. | |
* @type {Array<number>} | |
* @private | |
* | |
goog.crypt.Md5.T_ = [ | |
0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee, | |
0xf57c0faf, 0x4787c62a, 0xa8304613, 0xfd469501, | |
0x698098d8, 0x8b44f7af, 0xffff5bb1, 0x895cd7be, | |
0x6b901122, 0xfd987193, 0xa679438e, 0x49b40821, | |
0xf61e2562, 0xc040b340, 0x265e5a51, 0xe9b6c7aa, | |
0xd62f105d, 0x02441453, 0xd8a1e681, 0xe7d3fbc8, | |
0x21e1cde6, 0xc33707d6, 0xf4d50d87, 0x455a14ed, | |
0xa9e3e905, 0xfcefa3f8, 0x676f02d9, 0x8d2a4c8a, | |
0xfffa3942, 0x8771f681, 0x6d9d6122, 0xfde5380c, | |
0xa4beea44, 0x4bdecfa9, 0xf6bb4b60, 0xbebfbc70, | |
0x289b7ec6, 0xeaa127fa, 0xd4ef3085, 0x04881d05, | |
0xd9d4d039, 0xe6db99e5, 0x1fa27cf8, 0xc4ac5665, | |
0xf4292244, 0x432aff97, 0xab9423a7, 0xfc93a039, | |
0x655b59c3, 0x8f0ccc92, 0xffeff47d, 0x85845dd1, | |
0x6fa87e4f, 0xfe2ce6e0, 0xa3014314, 0x4e0811a1, | |
0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391 | |
]; | |
*/ | |
/** @override */ | |
goog.crypt.Md5.prototype.reset = function() { | |
this.chain_[0] = 0x67452301; | |
this.chain_[1] = 0xefcdab89; | |
this.chain_[2] = 0x98badcfe; | |
this.chain_[3] = 0x10325476; | |
this.blockLength_ = 0; | |
this.totalLength_ = 0; | |
}; | |
/** | |
* Internal compress helper function. It takes a block of data (64 bytes) | |
* and updates the accumulator. | |
* @param {Array<number>|Uint8Array|string} buf The block to compress. | |
* @param {number=} opt_offset Offset of the block in the buffer. | |
* @private | |
*/ | |
goog.crypt.Md5.prototype.compress_ = function(buf, opt_offset) { | |
if (!opt_offset) { | |
opt_offset = 0; | |
} | |
// We allocate the array every time, but it's cheap in practice. | |
var X = new Array(16); | |
// Get 16 little endian words. It is not worth unrolling this for Chrome 11. | |
if (goog.isString(buf)) { | |
for (var i = 0; i < 16; ++i) { | |
X[i] = (buf.charCodeAt(opt_offset++)) | | |
(buf.charCodeAt(opt_offset++) << 8) | | |
(buf.charCodeAt(opt_offset++) << 16) | | |
(buf.charCodeAt(opt_offset++) << 24); | |
} | |
} else { | |
for (var i = 0; i < 16; ++i) { | |
X[i] = (buf[opt_offset++]) | | |
(buf[opt_offset++] << 8) | | |
(buf[opt_offset++] << 16) | | |
(buf[opt_offset++] << 24); | |
} | |
} | |
var A = this.chain_[0]; | |
var B = this.chain_[1]; | |
var C = this.chain_[2]; | |
var D = this.chain_[3]; | |
var sum = 0; | |
/* | |
* This is an abbreviated implementation, it is left here commented out for | |
* reference purposes. See below for an unrolled version in use. | |
* | |
var f, n, tmp; | |
for (var i = 0; i < 64; ++i) { | |
if (i < 16) { | |
f = (D ^ (B & (C ^ D))); | |
n = i; | |
} else if (i < 32) { | |
f = (C ^ (D & (B ^ C))); | |
n = (5 * i + 1) % 16; | |
} else if (i < 48) { | |
f = (B ^ C ^ D); | |
n = (3 * i + 5) % 16; | |
} else { | |
f = (C ^ (B | (~D))); | |
n = (7 * i) % 16; | |
} | |
tmp = D; | |
D = C; | |
C = B; | |
sum = (A + f + goog.crypt.Md5.T_[i] + X[n]) & 0xffffffff; | |
B += ((sum << goog.crypt.Md5.S_[i]) & 0xffffffff) | | |
(sum >>> (32 - goog.crypt.Md5.S_[i])); | |
A = tmp; | |
} | |
*/ | |
/* | |
* This is an unrolled MD5 implementation, which gives ~30% speedup compared | |
* to the abbreviated implementation above, as measured on Chrome 11. It is | |
* important to keep 32-bit croppings to minimum and inline the integer | |
* rotation. | |
*/ | |
sum = (A + (D ^ (B & (C ^ D))) + X[0] + 0xd76aa478) & 0xffffffff; | |
A = B + (((sum << 7) & 0xffffffff) | (sum >>> 25)); | |
sum = (D + (C ^ (A & (B ^ C))) + X[1] + 0xe8c7b756) & 0xffffffff; | |
D = A + (((sum << 12) & 0xffffffff) | (sum >>> 20)); | |
sum = (C + (B ^ (D & (A ^ B))) + X[2] + 0x242070db) & 0xffffffff; | |
C = D + (((sum << 17) & 0xffffffff) | (sum >>> 15)); | |
sum = (B + (A ^ (C & (D ^ A))) + X[3] + 0xc1bdceee) & 0xffffffff; | |
B = C + (((sum << 22) & 0xffffffff) | (sum >>> 10)); | |
sum = (A + (D ^ (B & (C ^ D))) + X[4] + 0xf57c0faf) & 0xffffffff; | |
A = B + (((sum << 7) & 0xffffffff) | (sum >>> 25)); | |
sum = (D + (C ^ (A & (B ^ C))) + X[5] + 0x4787c62a) & 0xffffffff; | |
D = A + (((sum << 12) & 0xffffffff) | (sum >>> 20)); | |
sum = (C + (B ^ (D & (A ^ B))) + X[6] + 0xa8304613) & 0xffffffff; | |
C = D + (((sum << 17) & 0xffffffff) | (sum >>> 15)); | |
sum = (B + (A ^ (C & (D ^ A))) + X[7] + 0xfd469501) & 0xffffffff; | |
B = C + (((sum << 22) & 0xffffffff) | (sum >>> 10)); | |
sum = (A + (D ^ (B & (C ^ D))) + X[8] + 0x698098d8) & 0xffffffff; | |
A = B + (((sum << 7) & 0xffffffff) | (sum >>> 25)); | |
sum = (D + (C ^ (A & (B ^ C))) + X[9] + 0x8b44f7af) & 0xffffffff; | |
D = A + (((sum << 12) & 0xffffffff) | (sum >>> 20)); | |
sum = (C + (B ^ (D & (A ^ B))) + X[10] + 0xffff5bb1) & 0xffffffff; | |
C = D + (((sum << 17) & 0xffffffff) | (sum >>> 15)); | |
sum = (B + (A ^ (C & (D ^ A))) + X[11] + 0x895cd7be) & 0xffffffff; | |
B = C + (((sum << 22) & 0xffffffff) | (sum >>> 10)); | |
sum = (A + (D ^ (B & (C ^ D))) + X[12] + 0x6b901122) & 0xffffffff; | |
A = B + (((sum << 7) & 0xffffffff) | (sum >>> 25)); | |
sum = (D + (C ^ (A & (B ^ C))) + X[13] + 0xfd987193) & 0xffffffff; | |
D = A + (((sum << 12) & 0xffffffff) | (sum >>> 20)); | |
sum = (C + (B ^ (D & (A ^ B))) + X[14] + 0xa679438e) & 0xffffffff; | |
C = D + (((sum << 17) & 0xffffffff) | (sum >>> 15)); | |
sum = (B + (A ^ (C & (D ^ A))) + X[15] + 0x49b40821) & 0xffffffff; | |
B = C + (((sum << 22) & 0xffffffff) | (sum >>> 10)); | |
sum = (A + (C ^ (D & (B ^ C))) + X[1] + 0xf61e2562) & 0xffffffff; | |
A = B + (((sum << 5) & 0xffffffff) | (sum >>> 27)); | |
sum = (D + (B ^ (C & (A ^ B))) + X[6] + 0xc040b340) & 0xffffffff; | |
D = A + (((sum << 9) & 0xffffffff) | (sum >>> 23)); | |
sum = (C + (A ^ (B & (D ^ A))) + X[11] + 0x265e5a51) & 0xffffffff; | |
C = D + (((sum << 14) & 0xffffffff) | (sum >>> 18)); | |
sum = (B + (D ^ (A & (C ^ D))) + X[0] + 0xe9b6c7aa) & 0xffffffff; | |
B = C + (((sum << 20) & 0xffffffff) | (sum >>> 12)); | |
sum = (A + (C ^ (D & (B ^ C))) + X[5] + 0xd62f105d) & 0xffffffff; | |
A = B + (((sum << 5) & 0xffffffff) | (sum >>> 27)); | |
sum = (D + (B ^ (C & (A ^ B))) + X[10] + 0x02441453) & 0xffffffff; | |
D = A + (((sum << 9) & 0xffffffff) | (sum >>> 23)); | |
sum = (C + (A ^ (B & (D ^ A))) + X[15] + 0xd8a1e681) & 0xffffffff; | |
C = D + (((sum << 14) & 0xffffffff) | (sum >>> 18)); | |
sum = (B + (D ^ (A & (C ^ D))) + X[4] + 0xe7d3fbc8) & 0xffffffff; | |
B = C + (((sum << 20) & 0xffffffff) | (sum >>> 12)); | |
sum = (A + (C ^ (D & (B ^ C))) + X[9] + 0x21e1cde6) & 0xffffffff; | |
A = B + (((sum << 5) & 0xffffffff) | (sum >>> 27)); | |
sum = (D + (B ^ (C & (A ^ B))) + X[14] + 0xc33707d6) & 0xffffffff; | |
D = A + (((sum << 9) & 0xffffffff) | (sum >>> 23)); | |
sum = (C + (A ^ (B & (D ^ A))) + X[3] + 0xf4d50d87) & 0xffffffff; | |
C = D + (((sum << 14) & 0xffffffff) | (sum >>> 18)); | |
sum = (B + (D ^ (A & (C ^ D))) + X[8] + 0x455a14ed) & 0xffffffff; | |
B = C + (((sum << 20) & 0xffffffff) | (sum >>> 12)); | |
sum = (A + (C ^ (D & (B ^ C))) + X[13] + 0xa9e3e905) & 0xffffffff; | |
A = B + (((sum << 5) & 0xffffffff) | (sum >>> 27)); | |
sum = (D + (B ^ (C & (A ^ B))) + X[2] + 0xfcefa3f8) & 0xffffffff; | |
D = A + (((sum << 9) & 0xffffffff) | (sum >>> 23)); | |
sum = (C + (A ^ (B & (D ^ A))) + X[7] + 0x676f02d9) & 0xffffffff; | |
C = D + (((sum << 14) & 0xffffffff) | (sum >>> 18)); | |
sum = (B + (D ^ (A & (C ^ D))) + X[12] + 0x8d2a4c8a) & 0xffffffff; | |
B = C + (((sum << 20) & 0xffffffff) | (sum >>> 12)); | |
sum = (A + (B ^ C ^ D) + X[5] + 0xfffa3942) & 0xffffffff; | |
A = B + (((sum << 4) & 0xffffffff) | (sum >>> 28)); | |
sum = (D + (A ^ B ^ C) + X[8] + 0x8771f681) & 0xffffffff; | |
D = A + (((sum << 11) & 0xffffffff) | (sum >>> 21)); | |
sum = (C + (D ^ A ^ B) + X[11] + 0x6d9d6122) & 0xffffffff; | |
C = D + (((sum << 16) & 0xffffffff) | (sum >>> 16)); | |
sum = (B + (C ^ D ^ A) + X[14] + 0xfde5380c) & 0xffffffff; | |
B = C + (((sum << 23) & 0xffffffff) | (sum >>> 9)); | |
sum = (A + (B ^ C ^ D) + X[1] + 0xa4beea44) & 0xffffffff; | |
A = B + (((sum << 4) & 0xffffffff) | (sum >>> 28)); | |
sum = (D + (A ^ B ^ C) + X[4] + 0x4bdecfa9) & 0xffffffff; | |
D = A + (((sum << 11) & 0xffffffff) | (sum >>> 21)); | |
sum = (C + (D ^ A ^ B) + X[7] + 0xf6bb4b60) & 0xffffffff; | |
C = D + (((sum << 16) & 0xffffffff) | (sum >>> 16)); | |
sum = (B + (C ^ D ^ A) + X[10] + 0xbebfbc70) & 0xffffffff; | |
B = C + (((sum << 23) & 0xffffffff) | (sum >>> 9)); | |
sum = (A + (B ^ C ^ D) + X[13] + 0x289b7ec6) & 0xffffffff; | |
A = B + (((sum << 4) & 0xffffffff) | (sum >>> 28)); | |
sum = (D + (A ^ B ^ C) + X[0] + 0xeaa127fa) & 0xffffffff; | |
D = A + (((sum << 11) & 0xffffffff) | (sum >>> 21)); | |
sum = (C + (D ^ A ^ B) + X[3] + 0xd4ef3085) & 0xffffffff; | |
C = D + (((sum << 16) & 0xffffffff) | (sum >>> 16)); | |
sum = (B + (C ^ D ^ A) + X[6] + 0x04881d05) & 0xffffffff; | |
B = C + (((sum << 23) & 0xffffffff) | (sum >>> 9)); | |
sum = (A + (B ^ C ^ D) + X[9] + 0xd9d4d039) & 0xffffffff; | |
A = B + (((sum << 4) & 0xffffffff) | (sum >>> 28)); | |
sum = (D + (A ^ B ^ C) + X[12] + 0xe6db99e5) & 0xffffffff; | |
D = A + (((sum << 11) & 0xffffffff) | (sum >>> 21)); | |
sum = (C + (D ^ A ^ B) + X[15] + 0x1fa27cf8) & 0xffffffff; | |
C = D + (((sum << 16) & 0xffffffff) | (sum >>> 16)); | |
sum = (B + (C ^ D ^ A) + X[2] + 0xc4ac5665) & 0xffffffff; | |
B = C + (((sum << 23) & 0xffffffff) | (sum >>> 9)); | |
sum = (A + (C ^ (B | (~D))) + X[0] + 0xf4292244) & 0xffffffff; | |
A = B + (((sum << 6) & 0xffffffff) | (sum >>> 26)); | |
sum = (D + (B ^ (A | (~C))) + X[7] + 0x432aff97) & 0xffffffff; | |
D = A + (((sum << 10) & 0xffffffff) | (sum >>> 22)); | |
sum = (C + (A ^ (D | (~B))) + X[14] + 0xab9423a7) & 0xffffffff; | |
C = D + (((sum << 15) & 0xffffffff) | (sum >>> 17)); | |
sum = (B + (D ^ (C | (~A))) + X[5] + 0xfc93a039) & 0xffffffff; | |
B = C + (((sum << 21) & 0xffffffff) | (sum >>> 11)); | |
sum = (A + (C ^ (B | (~D))) + X[12] + 0x655b59c3) & 0xffffffff; | |
A = B + (((sum << 6) & 0xffffffff) | (sum >>> 26)); | |
sum = (D + (B ^ (A | (~C))) + X[3] + 0x8f0ccc92) & 0xffffffff; | |
D = A + (((sum << 10) & 0xffffffff) | (sum >>> 22)); | |
sum = (C + (A ^ (D | (~B))) + X[10] + 0xffeff47d) & 0xffffffff; | |
C = D + (((sum << 15) & 0xffffffff) | (sum >>> 17)); | |
sum = (B + (D ^ (C | (~A))) + X[1] + 0x85845dd1) & 0xffffffff; | |
B = C + (((sum << 21) & 0xffffffff) | (sum >>> 11)); | |
sum = (A + (C ^ (B | (~D))) + X[8] + 0x6fa87e4f) & 0xffffffff; | |
A = B + (((sum << 6) & 0xffffffff) | (sum >>> 26)); | |
sum = (D + (B ^ (A | (~C))) + X[15] + 0xfe2ce6e0) & 0xffffffff; | |
D = A + (((sum << 10) & 0xffffffff) | (sum >>> 22)); | |
sum = (C + (A ^ (D | (~B))) + X[6] + 0xa3014314) & 0xffffffff; | |
C = D + (((sum << 15) & 0xffffffff) | (sum >>> 17)); | |
sum = (B + (D ^ (C | (~A))) + X[13] + 0x4e0811a1) & 0xffffffff; | |
B = C + (((sum << 21) & 0xffffffff) | (sum >>> 11)); | |
sum = (A + (C ^ (B | (~D))) + X[4] + 0xf7537e82) & 0xffffffff; | |
A = B + (((sum << 6) & 0xffffffff) | (sum >>> 26)); | |
sum = (D + (B ^ (A | (~C))) + X[11] + 0xbd3af235) & 0xffffffff; | |
D = A + (((sum << 10) & 0xffffffff) | (sum >>> 22)); | |
sum = (C + (A ^ (D | (~B))) + X[2] + 0x2ad7d2bb) & 0xffffffff; | |
C = D + (((sum << 15) & 0xffffffff) | (sum >>> 17)); | |
sum = (B + (D ^ (C | (~A))) + X[9] + 0xeb86d391) & 0xffffffff; | |
B = C + (((sum << 21) & 0xffffffff) | (sum >>> 11)); | |
this.chain_[0] = (this.chain_[0] + A) & 0xffffffff; | |
this.chain_[1] = (this.chain_[1] + B) & 0xffffffff; | |
this.chain_[2] = (this.chain_[2] + C) & 0xffffffff; | |
this.chain_[3] = (this.chain_[3] + D) & 0xffffffff; | |
}; | |
/** @override */ | |
goog.crypt.Md5.prototype.update = function(bytes, opt_length) { | |
if (!goog.isDef(opt_length)) { | |
opt_length = bytes.length; | |
} | |
var lengthMinusBlock = opt_length - this.blockSize; | |
// Copy some object properties to local variables in order to save on access | |
// time from inside the loop (~10% speedup was observed on Chrome 11). | |
var block = this.block_; | |
var blockLength = this.blockLength_; | |
var i = 0; | |
// The outer while loop should execute at most twice. | |
while (i < opt_length) { | |
// When we have no data in the block to top up, we can directly process the | |
// input buffer (assuming it contains sufficient data). This gives ~30% | |
// speedup on Chrome 14 and ~70% speedup on Firefox 6.0, but requires that | |
// the data is provided in large chunks (or in multiples of 64 bytes). | |
if (blockLength == 0) { | |
while (i <= lengthMinusBlock) { | |
this.compress_(bytes, i); | |
i += this.blockSize; | |
} | |
} | |
if (goog.isString(bytes)) { | |
while (i < opt_length) { | |
block[blockLength++] = bytes.charCodeAt(i++); | |
if (blockLength == this.blockSize) { | |
this.compress_(block); | |
blockLength = 0; | |
// Jump to the outer loop so we use the full-block optimization. | |
break; | |
} | |
} | |
} else { | |
while (i < opt_length) { | |
block[blockLength++] = bytes[i++]; | |
if (blockLength == this.blockSize) { | |
this.compress_(block); | |
blockLength = 0; | |
// Jump to the outer loop so we use the full-block optimization. | |
break; | |
} | |
} | |
} | |
} | |
this.blockLength_ = blockLength; | |
this.totalLength_ += opt_length; | |
}; | |
/** @override */ | |
goog.crypt.Md5.prototype.digest = function() { | |
// This must accommodate at least 1 padding byte (0x80), 8 bytes of | |
// total bitlength, and must end at a 64-byte boundary. | |
var pad = new Array((this.blockLength_ < 56 ? | |
this.blockSize : | |
this.blockSize * 2) - this.blockLength_); | |
// Add padding: 0x80 0x00* | |
pad[0] = 0x80; | |
for (var i = 1; i < pad.length - 8; ++i) { | |
pad[i] = 0; | |
} | |
// Add the total number of bits, little endian 64-bit integer. | |
var totalBits = this.totalLength_ * 8; | |
for (var i = pad.length - 8; i < pad.length; ++i) { | |
pad[i] = totalBits & 0xff; | |
totalBits /= 0x100; // Don't use bit-shifting here! | |
} | |
this.update(pad); | |
var digest = new Array(16); | |
var n = 0; | |
for (var i = 0; i < 4; ++i) { | |
for (var j = 0; j < 32; j += 8) { | |
digest[n++] = (this.chain_[i] >>> j) & 0xff; | |
} | |
} | |
return digest; | |
}; | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
/* include/HsBaseConfig.h. Generated from HsBaseConfig.h.in by configure. */ | |
/* include/HsBaseConfig.h.in. Generated from configure.ac by autoheader. */ | |
/* The value of E2BIG. */ | |
/* The value of EACCES. */ | |
/* The value of EADDRINUSE. */ | |
/* The value of EADDRNOTAVAIL. */ | |
/* The value of EADV. */ | |
/* The value of EAFNOSUPPORT. */ | |
/* The value of EAGAIN. */ | |
/* The value of EALREADY. */ | |
/* The value of EBADF. */ | |
/* The value of EBADMSG. */ | |
/* The value of EBADRPC. */ | |
/* The value of EBUSY. */ | |
/* The value of ECHILD. */ | |
/* The value of ECOMM. */ | |
/* The value of ECONNABORTED. */ | |
/* The value of ECONNREFUSED. */ | |
/* The value of ECONNRESET. */ | |
/* The value of EDEADLK. */ | |
/* The value of EDESTADDRREQ. */ | |
/* The value of EDIRTY. */ | |
/* The value of EDOM. */ | |
/* The value of EDQUOT. */ | |
/* The value of EEXIST. */ | |
/* The value of EFAULT. */ | |
/* The value of EFBIG. */ | |
/* The value of EFTYPE. */ | |
/* The value of EHOSTDOWN. */ | |
/* The value of EHOSTUNREACH. */ | |
/* The value of EIDRM. */ | |
/* The value of EILSEQ. */ | |
/* The value of EINPROGRESS. */ | |
/* The value of EINTR. */ | |
/* The value of EINVAL. */ | |
/* The value of EIO. */ | |
/* The value of EISCONN. */ | |
/* The value of EISDIR. */ | |
/* The value of ELOOP. */ | |
/* The value of EMFILE. */ | |
/* The value of EMLINK. */ | |
/* The value of EMSGSIZE. */ | |
/* The value of EMULTIHOP. */ | |
/* The value of ENAMETOOLONG. */ | |
/* The value of ENETDOWN. */ | |
/* The value of ENETRESET. */ | |
/* The value of ENETUNREACH. */ | |
/* The value of ENFILE. */ | |
/* The value of ENOBUFS. */ | |
/* The value of ENOCIGAR. */ | |
/* The value of ENODATA. */ | |
/* The value of ENODEV. */ | |
/* The value of ENOENT. */ | |
/* The value of ENOEXEC. */ | |
/* The value of ENOLCK. */ | |
/* The value of ENOLINK. */ | |
/* The value of ENOMEM. */ | |
/* The value of ENOMSG. */ | |
/* The value of ENONET. */ | |
/* The value of ENOPROTOOPT. */ | |
/* The value of ENOSPC. */ | |
/* The value of ENOSR. */ | |
/* The value of ENOSTR. */ | |
/* The value of ENOSYS. */ | |
/* The value of ENOTBLK. */ | |
/* The value of ENOTCONN. */ | |
/* The value of ENOTDIR. */ | |
/* The value of ENOTEMPTY. */ | |
/* The value of ENOTSOCK. */ | |
/* The value of ENOTSUP. */ | |
/* The value of ENOTTY. */ | |
/* The value of ENXIO. */ | |
/* The value of EOPNOTSUPP. */ | |
/* The value of EPERM. */ | |
/* The value of EPFNOSUPPORT. */ | |
/* The value of EPIPE. */ | |
/* The value of EPROCLIM. */ | |
/* The value of EPROCUNAVAIL. */ | |
/* The value of EPROGMISMATCH. */ | |
/* The value of EPROGUNAVAIL. */ | |
/* The value of EPROTO. */ | |
/* The value of EPROTONOSUPPORT. */ | |
/* The value of EPROTOTYPE. */ | |
/* The value of ERANGE. */ | |
/* The value of EREMCHG. */ | |
/* The value of EREMOTE. */ | |
/* The value of EROFS. */ | |
/* The value of ERPCMISMATCH. */ | |
/* The value of ERREMOTE. */ | |
/* The value of ESHUTDOWN. */ | |
/* The value of ESOCKTNOSUPPORT. */ | |
/* The value of ESPIPE. */ | |
/* The value of ESRCH. */ | |
/* The value of ESRMNT. */ | |
/* The value of ESTALE. */ | |
/* The value of ETIME. */ | |
/* The value of ETIMEDOUT. */ | |
/* The value of ETOOMANYREFS. */ | |
/* The value of ETXTBSY. */ | |
/* The value of EUSERS. */ | |
/* The value of EWOULDBLOCK. */ | |
/* The value of EXDEV. */ | |
/* The value of O_BINARY. */ | |
/* The value of SIGINT. */ | |
/* Define to 1 if you have the `clock_gettime' function. */ | |
/* #undef HAVE_CLOCK_GETTIME */ | |
/* Define to 1 if you have the <ctype.h> header file. */ | |
/* Define if you have epoll support. */ | |
/* #undef HAVE_EPOLL */ | |
/* Define to 1 if you have the `epoll_ctl' function. */ | |
/* #undef HAVE_EPOLL_CTL */ | |
/* Define to 1 if you have the <errno.h> header file. */ | |
/* Define to 1 if you have the `eventfd' function. */ | |
/* #undef HAVE_EVENTFD */ | |
/* Define to 1 if you have the <fcntl.h> header file. */ | |
/* Define to 1 if you have the `ftruncate' function. */ | |
/* Define to 1 if you have the `getclock' function. */ | |
/* #undef HAVE_GETCLOCK */ | |
/* Define to 1 if you have the `getrusage' function. */ | |
/* Define to 1 if you have the <inttypes.h> header file. */ | |
/* Define to 1 if you have the `iswspace' function. */ | |
/* Define to 1 if you have the `kevent' function. */ | |
/* Define to 1 if you have the `kevent64' function. */ | |
/* Define if you have kqueue support. */ | |
/* Define to 1 if you have the <langinfo.h> header file. */ | |
/* Define to 1 if you have libcharset. */ | |
/* Define to 1 if you have the `rt' library (-lrt). */ | |
/* #undef HAVE_LIBRT */ | |
/* Define to 1 if you have the <limits.h> header file. */ | |
/* Define to 1 if the system has the type `long long'. */ | |
/* Define to 1 if you have the `lstat' function. */ | |
/* Define to 1 if you have the <memory.h> header file. */ | |
/* Define if you have poll support. */ | |
/* Define to 1 if you have the <poll.h> header file. */ | |
/* Define to 1 if you have the <signal.h> header file. */ | |
/* Define to 1 if you have the <stdint.h> header file. */ | |
/* Define to 1 if you have the <stdlib.h> header file. */ | |
/* Define to 1 if you have the <strings.h> header file. */ | |
/* Define to 1 if you have the <string.h> header file. */ | |
/* Define to 1 if you have the <sys/epoll.h> header file. */ | |
/* #undef HAVE_SYS_EPOLL_H */ | |
/* Define to 1 if you have the <sys/eventfd.h> header file. */ | |
/* #undef HAVE_SYS_EVENTFD_H */ | |
/* Define to 1 if you have the <sys/event.h> header file. */ | |
/* Define to 1 if you have the <sys/resource.h> header file. */ | |
/* Define to 1 if you have the <sys/select.h> header file. */ | |
/* Define to 1 if you have the <sys/stat.h> header file. */ | |
/* Define to 1 if you have the <sys/syscall.h> header file. */ | |
/* Define to 1 if you have the <sys/timeb.h> header file. */ | |
/* Define to 1 if you have the <sys/timers.h> header file. */ | |
/* #undef HAVE_SYS_TIMERS_H */ | |
/* Define to 1 if you have the <sys/times.h> header file. */ | |
/* Define to 1 if you have the <sys/time.h> header file. */ | |
/* Define to 1 if you have the <sys/types.h> header file. */ | |
/* Define to 1 if you have the <sys/utsname.h> header file. */ | |
/* Define to 1 if you have the <sys/wait.h> header file. */ | |
/* Define to 1 if you have the <termios.h> header file. */ | |
/* Define to 1 if you have the `times' function. */ | |
/* Define to 1 if you have the <time.h> header file. */ | |
/* Define to 1 if you have the <unistd.h> header file. */ | |
/* Define to 1 if you have the <utime.h> header file. */ | |
/* Define to 1 if you have the <wctype.h> header file. */ | |
/* Define to 1 if you have the <windows.h> header file. */ | |
/* #undef HAVE_WINDOWS_H */ | |
/* Define to 1 if you have the <winsock.h> header file. */ | |
/* #undef HAVE_WINSOCK_H */ | |
/* Define to 1 if you have the `_chsize' function. */ | |
/* #undef HAVE__CHSIZE */ | |
/* Define to Haskell type for cc_t */ | |
/* Define to Haskell type for char */ | |
/* Define to Haskell type for clock_t */ | |
/* Define to Haskell type for dev_t */ | |
/* Define to Haskell type for double */ | |
/* Define to Haskell type for float */ | |
/* Define to Haskell type for gid_t */ | |
/* Define to Haskell type for ino_t */ | |
/* Define to Haskell type for int */ | |
/* Define to Haskell type for intmax_t */ | |
/* Define to Haskell type for intptr_t */ | |
/* Define to Haskell type for long */ | |
/* Define to Haskell type for long long */ | |
/* Define to Haskell type for mode_t */ | |
/* Define to Haskell type for nlink_t */ | |
/* Define to Haskell type for off_t */ | |
/* Define to Haskell type for pid_t */ | |
/* Define to Haskell type for ptrdiff_t */ | |
/* Define to Haskell type for rlim_t */ | |
/* Define to Haskell type for short */ | |
/* Define to Haskell type for signed char */ | |
/* Define to Haskell type for sig_atomic_t */ | |
/* Define to Haskell type for size_t */ | |
/* Define to Haskell type for speed_t */ | |
/* Define to Haskell type for ssize_t */ | |
/* Define to Haskell type for suseconds_t */ | |
/* Define to Haskell type for tcflag_t */ | |
/* Define to Haskell type for time_t */ | |
/* Define to Haskell type for uid_t */ | |
/* Define to Haskell type for uintmax_t */ | |
/* Define to Haskell type for uintptr_t */ | |
/* Define to Haskell type for unsigned char */ | |
/* Define to Haskell type for unsigned int */ | |
/* Define to Haskell type for unsigned long */ | |
/* Define to Haskell type for unsigned long long */ | |
/* Define to Haskell type for unsigned short */ | |
/* Define to Haskell type for useconds_t */ | |
/* Define to Haskell type for wchar_t */ | |
/* Define to the address where bug reports for this package should be sent. */ | |
/* Define to the full name of this package. */ | |
/* Define to the full name and version of this package. */ | |
/* Define to the one symbol short name of this package. */ | |
/* Define to the home page for this package. */ | |
/* Define to the version of this package. */ | |
/* The size of `kev.filter', as computed by sizeof. */ | |
/* The size of `kev.flags', as computed by sizeof. */ | |
/* The size of `struct MD5Context', as computed by sizeof. */ | |
/* Define to 1 if you have the ANSI C header files. */ | |
/* Number of bits in a file offset, on hosts where this is settable. */ | |
/* #undef _FILE_OFFSET_BITS */ | |
/* Define for large files, on AIX-style hosts. */ | |
/* #undef _LARGE_FILES */ | |
// values defined in Gen2.ClosureInfo | |
// thread status | |
/* | |
* low-level heap object manipulation macros | |
*/ | |
// GHCJS.Prim.JSVal | |
// GHCJS.Prim.JSException | |
// Exception dictionary for JSException | |
// SomeException | |
// GHC.Ptr.Ptr | |
// GHC.Integer.GMP.Internals | |
// Data.Maybe.Maybe | |
// #define HS_NOTHING h$nothing | |
// Data.List | |
// Data.Text | |
// Data.Text.Lazy | |
// black holes | |
// can we skip the indirection for black holes? | |
// resumable thunks | |
// general deconstruction | |
// retrieve a numeric value that's possibly stored as an indirection | |
// generic lazy values | |
// generic data constructors and selectors | |
// unboxed tuple returns | |
// #define RETURN_UBX_TUP1(x) return x; | |
// #define GHCJS_TRACE_IO 1 | |
function h$base_access(file, file_off, mode, c) { | |
; | |
if(h$isNode) { | |
h$fs.stat(fd, function(err, fs) { | |
if(err) { | |
h$handleErrnoC(err, -1, 0, c); | |
} else { | |
c(mode & fs.mode); // fixme is this ok? | |
} | |
}); | |
} else | |
h$unsupported(-1, c); | |
} | |
function h$base_chmod(file, file_off, mode, c) { | |
; | |
if(h$isNode) { | |
h$fs.chmod(h$decodeUtf8z(file, file_off), mode, function(err) { | |
h$handleErrnoC(err, -1, 0, c); | |
}); | |
} else | |
h$unsupported(-1, c); | |
} | |
function h$base_close(fd, c) { | |
; | |
var fdo = h$base_fds[fd]; | |
if(fdo && fdo.close) { | |
fdo.close(fd, fdo, c); | |
} else { | |
h$errno = 22; | |
c(-1); | |
} | |
} | |
function h$base_dup(fd, something, c) { | |
throw "h$base_dup"; | |
} | |
function h$base_dup2(fd, c) { | |
throw "h$base_dup2"; | |
} | |
function h$base_fstat(fd, stat, stat_off, c) { | |
; | |
if(h$isNode) { | |
h$fs.fstat(fd, function(err, fs) { | |
if(err) { | |
h$handlErrnoC(err, -1, 0, c); | |
} else { | |
h$base_fillStat(fs, stat, stat_off); | |
c(0); | |
} | |
}); | |
} else | |
h$unsupported(-1, c); | |
} | |
function h$base_isatty(fd) { | |
; | |
if(h$isNode) { | |
if(fd === 0) return process.stdin.isTTY?1:0; | |
if(fd === 1) return process.stdout.isTTY?1:0; | |
if(fd === 2) return process.stderr.isTTY?1:0; | |
} | |
if(fd === 1 || fd === 2) return 1; | |
return 0; | |
} | |
function h$base_lseek(fd, pos_1, pos_2, whence, c) { | |
; | |
if(h$isNode) { | |
var p = goog.math.Long.fromBits(pos_2, pos_1), p1; | |
var o = h$base_fds[fd]; | |
if(!o) { | |
h$errno = CONST_BADF; | |
c(-1,-1); | |
} else { | |
switch(whence) { | |
case 0: /* SET */ | |
o.pos = p.toNumber(); | |
c(p.getHighBits(), p.getLowBits()); | |
break; | |
case 1: /* CUR */ | |
o.pos += p.toNumber(); | |
p1 = goog.math.Long.fromNumber(o.pos); | |
c(p1.getHighBits(), p1.getLowBits()); | |
break; | |
case 2: /* END */ | |
h$fs.fstat(fd, function(err, fs) { | |
if(err) { | |
h$setErrno(err); | |
c(-1,-1); | |
} else { | |
o.pos = fs.size + p.toNumber(); | |
p1 = goog.math.Long.fromNumber(o.pos); | |
c(p1.getHighBits(), p1.getLowBits()); | |
} | |
}); | |
break; | |
default: | |
h$errno = 22; | |
c(-1,-1); | |
} | |
} | |
} else { | |
h$unsupported(); | |
c(-1, -1); | |
} | |
} | |
function h$base_lstat(file, file_off, stat, stat_off, c) { | |
; | |
if(h$isNode) { | |
h$fs.lstat(h$decodeUtf8z(file, file_off), function(err, fs) { | |
if(err) { | |
h$handleErrnoC(err, -1, 0, c); | |
} else { | |
h$base_fillStat(fs, stat, stat_off); | |
c(0); | |
} | |
}); | |
} else | |
h$unsupported(-1, c); | |
} | |
function h$base_open(file, file_off, how, mode, c) { | |
if(h$isNode) { | |
var flags, off; | |
var fp = h$decodeUtf8z(file, file_off); | |
var acc = how & h$base_o_accmode; | |
// passing a number lets node.js use it directly as the flags (undocumented) | |
if(acc === h$base_o_rdonly) { | |
flags = h$processConstants['fs']['O_RDONLY']; | |
} else if(acc === h$base_o_wronly) { | |
flags = h$processConstants['fs']['O_WRONLY']; | |
} else { // r+w | |
flags = h$processConstants['fs']['O_RDWR']; | |
} | |
off = (how & h$base_o_append) ? -1 : 0; | |
flags = flags | ((how & h$base_o_trunc) ? h$processConstants['fs']['O_TRUNC'] : 0) | |
| ((how & h$base_o_creat) ? h$processConstants['fs']['O_CREAT'] : 0) | |
| ((how & h$base_o_excl) ? h$processConstants['fs']['O_EXCL'] : 0) | |
| ((how & h$base_o_append) ? h$processConstants['fs']['O_APPEND'] : 0); | |
h$fs.open(fp, flags, mode, function(err, fd) { | |
if(err) { | |
h$handleErrnoC(err, -1, 0, c); | |
} else { | |
var f = function(p) { | |
h$base_fds[fd] = { read: h$base_readFile | |
, write: h$base_writeFile | |
, close: h$base_closeFile | |
, pos: p | |
}; | |
c(fd); | |
} | |
if(off === -1) { | |
h$fs.stat(fp, function(err, fs) { | |
if(err) h$handleErrnoC(err, -1, 0, c); else f(fs.size); | |
}); | |
} else { | |
f(0); | |
} | |
} | |
}); | |
} else | |
h$unsupported(-1, c); | |
} | |
function h$base_read(fd, buf, buf_off, n, c) { | |
; | |
var fdo = h$base_fds[fd]; | |
if(fdo && fdo.read) { | |
fdo.read(fd, fdo, buf, buf_off, n, c); | |
} else { | |
h$errno = 22; | |
c(-1); | |
} | |
} | |
function h$base_stat(file, file_off, stat, stat_off, c) { | |
; | |
if(h$isNode) { | |
h$fs.stat(h$decodeUtf8z(file, file_off), function(err, fs) { | |
if(err) { | |
h$handlErrnoC(err, -1, 0, c); | |
} else { | |
h$base_fillStat(fs, stat, stat_off); | |
c(0); | |
} | |
}); | |
} else | |
h$unsupported(-1, c); | |
} | |
function h$base_umask(mode) { | |
; | |
if(h$isNode) return process.umask(mode); | |
return 0; | |
} | |
function h$base_write(fd, buf, buf_off, n, c) { | |
; | |
var fdo = h$base_fds[fd]; | |
if(fdo && fdo.write) { | |
fdo.write(fd, fdo, buf, buf_off, n, c); | |
} else { | |
h$errno = 22; | |
c(-1); | |
} | |
} | |
function h$base_ftruncate(fd, pos_1, pos_2, c) { | |
; | |
if(h$isNode) { | |
h$fs.ftruncate(fd, goog.math.Long.fromBits(pos_2, pos_1).toNumber(), function(err) { | |
h$handleErrnoC(err, -1, 0, c); | |
}); | |
} else | |
h$unsupported(-1, c); | |
} | |
function h$base_unlink(file, file_off, c) { | |
; | |
if(h$isNode) { | |
h$fs.unlink(h$decodeUtf8z(file, file_off), function(err) { | |
h$handleErrnoC(err, -1, 0, c); | |
}); | |
} else | |
h$unsupported(-1, c); | |
} | |
function h$base_getpid() { | |
; | |
if(h$isNode) return process.pid; | |
return 0; | |
} | |
function h$base_link(file1, file1_off, file2, file2_off, c) { | |
; | |
if(h$isNode) { | |
h$fs.link(h$decodeUtf8z(file1, file1_off), h$decodeUtf8z(file2, file2_off), function(err) { | |
h$handleErrnoC(err, -1, 0, c); | |
}); | |
} else | |
h$unsupported(-1, c); | |
} | |
function h$base_mkfifo(file, file_off, mode, c) { | |
throw "h$base_mkfifo"; | |
} | |
function h$base_sigemptyset(sigset, sigset_off) { | |
return 0; | |
// throw "h$base_sigemptyset"; | |
} | |
function h$base_sigaddset(sigset, sigset_off, sig) { | |
return 0; | |
// throw "h$base_sigaddset"; | |
} | |
function h$base_sigprocmask(sig, sigset1, sigset1_off, sigset2, sigset2_off) { | |
return 0; | |
// throw "h$base_sigprocmask"; | |
} | |
function h$base_tcgetattr(attr, termios, termios_off) { | |
return 0; | |
} | |
function h$base_tcsetattr(attr, val, termios, termios_off) { | |
return 0; | |
} | |
function h$base_utime(file, file_off, timbuf, timbuf_off, c) { | |
; | |
if(h$isNode) { | |
h$fs.fstat(h$decodeUtf8z(file, file_off), function(err, fs) { | |
if(err) { | |
h$handleErrnoC(err, 0, -1, c); // fixme | |
} else { | |
var atime = goog.math.Long.fromNumber(fs.atime.getTime()); | |
var mtime = goog.math.Long.fromNumber(fs.mtime.getTime()); | |
var ctime = goog.math.Long.fromNumber(fs.ctime.getTime()); | |
timbuf.i3[0] = atime.getHighBits(); | |
timbuf.i3[1] = atime.getLowBits(); | |
timbuf.i3[2] = mtime.getHighBits(); | |
timbuf.i3[3] = mtime.getLowBits(); | |
timbuf.i3[4] = ctime.getHighBits(); | |
timbuf.i3[5] = ctime.getLowBits(); | |
c(0); | |
} | |
}); | |
} else | |
h$unsupported(-1, c); | |
} | |
function h$base_waitpid(pid, stat, stat_off, options, c) { | |
throw "h$base_waitpid"; | |
} | |
/** @const */ var h$base_o_rdonly = 0x00000; | |
/** @const */ var h$base_o_wronly = 0x00001; | |
/** @const */ var h$base_o_rdwr = 0x00002; | |
/** @const */ var h$base_o_accmode = 0x00003; | |
/** @const */ var h$base_o_append = 0x00008; | |
/** @const */ var h$base_o_creat = 0x00200; | |
/** @const */ var h$base_o_trunc = 0x00400; | |
/** @const */ var h$base_o_excl = 0x00800; | |
/** @const */ var h$base_o_noctty = 0x20000; | |
/** @const */ var h$base_o_nonblock = 0x00004; | |
/** @const */ var h$base_o_binary = 0x00000; | |
function h$base_c_s_isreg(mode) { | |
return 1; | |
} | |
function h$base_c_s_ischr(mode) { | |
return 0; | |
} | |
function h$base_c_s_isblk(mode) { | |
return 0; | |
} | |
function h$base_c_s_isdir(mode) { | |
return 0; // fixme | |
} | |
function h$base_c_s_isfifo(mode) { | |
return 0; | |
} | |
function h$base_fillStat(fs, b, off) { | |
if(off%4) throw "h$base_fillStat: not aligned"; | |
var o = off>>2; | |
b.i3[o+0] = fs.mode; | |
var s = goog.math.Long.fromNumber(fs.size); | |
b.i3[o+1] = s.getHighBits(); | |
b.i3[o+2] = s.getLowBits(); | |
b.i3[o+3] = 0; // fixme | |
b.i3[o+4] = 0; // fixme | |
b.i3[o+5] = fs.dev; | |
var i = goog.math.Long.fromNumber(fs.ino); | |
b.i3[o+6] = i.getHighBits(); | |
b.i3[o+7] = i.getLowBits(); | |
b.i3[o+8] = fs.uid; | |
b.i3[o+9] = fs.gid; | |
} | |
// [mode,size1,size2,mtime1,mtime2,dev,ino1,ino2,uid,gid] all 32 bit | |
/** @const */ var h$base_sizeof_stat = 40; | |
function h$base_st_mtime(stat, stat_off) { | |
{ h$ret1 = (stat.i3[(stat_off>>2)+4]); return (stat.i3[(stat_off>>2)+3]); }; | |
} | |
function h$base_st_size(stat, stat_off) { | |
{ h$ret1 = (stat.i3[(stat_off>>2)+2]); return (stat.i3[(stat_off>>2)+1]); }; | |
} | |
function h$base_st_mode(stat, stat_off) { | |
return stat.i3[stat_off>>2]; | |
} | |
function h$base_st_dev(stat, stat_off) { | |
return stat.i3[(stat_off>>2)+5]; | |
} | |
function h$base_st_ino(stat, stat_off) { | |
{ h$ret1 = (stat.i3[(stat_off>>2)+7]); return (stat.i3[(stat_off>>2)+6]); }; | |
} | |
/** @const */ var h$base_echo = 1; | |
/** @const */ var h$base_tcsanow = 2; | |
/** @const */ var h$base_icanon = 4; | |
/** @const */ var h$base_vmin = 8; | |
/** @const */ var h$base_vtime = 16; | |
/** @const */ var h$base_sigttou = 0; | |
/** @const */ var h$base_sig_block = 0; | |
/** @const */ var h$base_sig_setmask = 0; | |
/** @const */ var h$base_f_getfl = 0; | |
/** @const */ var h$base_f_setfl = 0; | |
/** @const */ var h$base_f_setfd = 0; | |
/** @const */ var h$base_fd_cloexec = 0; | |
/** @const */ var h$base_sizeof_termios = 4; | |
/** @const */ var h$base_sizeof_sigset_t = 4; | |
function h$base_lflag(termios, termios_off) { | |
return 0; | |
} | |
function h$base_poke_lflag(termios, termios_off, flag) { | |
return 0; | |
} | |
function h$base_ptr_c_cc(termios, termios_off) { | |
{ h$ret1 = (0); return (h$newByteArray(8)); }; | |
} | |
/** @const */ var h$base_default_buffer_size = 32768; | |
function h$base_c_s_issock(mode) { | |
return 0; // fixme | |
} | |
/** @const */ var h$base_SEEK_SET = 0; | |
/** @const */ var h$base_SEEK_CUR = 1; | |
/** @const */ var h$base_SEEK_END = 2; | |
function h$base_set_saved_termios(a, b, c) { | |
{ h$ret1 = (0); return (null); }; | |
} | |
function h$base_get_saved_termios(r) { | |
{ h$ret1 = (0); return (null); }; | |
} | |
// fixme | |
function h$lockFile(fd, dev, ino, for_writing) { | |
; | |
return 0; | |
} | |
function h$unlockFile(fd) { | |
; | |
return 0; | |
} | |
// engine-dependent setup | |
var h$base_readStdin , h$base_writeStderr, h$base_writeStdout; | |
var h$base_closeStdin = null, h$base_closeStderr = null, h$base_closeStdout = null; | |
var h$base_readFile, h$base_writeFile, h$base_closeFile; | |
var h$base_stdin_waiting = new h$Queue(); | |
var h$base_stdin_chunk = { buf: null | |
, pos: 0 | |
, processing: false | |
}; | |
var h$base_stdin_eof = false; | |
var h$base_process_stdin = function() { | |
var c = h$base_stdin_chunk; | |
var q = h$base_stdin_waiting; | |
if(!q.length() || c.processing) return; | |
c.processing = true; | |
if(!c.buf) { c.pos = 0; c.buf = process.stdin.read(); } | |
while(c.buf && q.length()) { | |
var x = q.dequeue(); | |
var n = Math.min(c.buf.length - c.pos, x.n); | |
for(var i=0;i<n;i++) { | |
x.buf.u8[i+x.off] = c.buf[c.pos+i]; | |
} | |
c.pos += n; | |
x.c(n); | |
if(c.pos >= c.buf.length) c.buf = null; | |
if(!c.buf && q.length()) { c.pos = 0; c.buf = process.stdin.read(); } | |
} | |
while(h$base_stdin_eof && q.length()) q.dequeue().c(0); | |
c.processing = false; | |
} | |
if(h$isNode) { | |
h$base_closeFile = function(fd, fdo, c) { | |
h$fs.close(fd, function(err) { | |
delete h$base_fds[fd]; | |
h$handleErrnoC(err, -1, 0, c); | |
}); | |
} | |
h$base_readFile = function(fd, fdo, buf, buf_offset, n, c) { | |
var pos = typeof fdo.pos === 'number' ? fdo.pos : null; | |
; | |
h$fs.read(fd, new Buffer(n), 0, n, pos, function(err, bytesRead, nbuf) { | |
if(err) { | |
h$setErrno(err); | |
c(-1); | |
} else { | |
for(var i=bytesRead-1;i>=0;i--) buf.u8[buf_offset+i] = nbuf[i]; | |
if(typeof fdo.pos === 'number') fdo.pos += bytesRead; | |
c(bytesRead); | |
} | |
}); | |
} | |
h$base_readStdin = function(fd, fdo, buf, buf_offset, n, c) { | |
; | |
h$base_stdin_waiting.enqueue({buf: buf, off: buf_offset, n: n, c: c}); | |
h$base_process_stdin(); | |
} | |
h$base_closeStdin = function(fd, fdo, c) { | |
; | |
// process.stdin.close(); fixme | |
c(0); | |
} | |
h$base_writeFile = function(fd, fdo, buf, buf_offset, n, c) { | |
var pos = typeof fdo.pos === 'number' ? fdo.pos : null; | |
; | |
var nbuf = new Buffer(n); | |
for(var i=0;i<n;i++) nbuf[i] = buf.u8[i+buf_offset]; | |
if(typeof fdo.pos === 'number') fdo.pos += n; | |
h$fs.write(fd, nbuf, 0, n, pos, function(err, bytesWritten) { | |
; | |
if(err) { | |
h$setErrno(err); | |
if(typeof fdo.pos === 'number') fdo.pos -= n; | |
if(h$errno === 35) | |
setTimeout(function() { h$base_writeFile(fd, fdo, buf, buf_offset, n, c); }, 20); | |
else c(-1); | |
} else { | |
if(typeof fdo.pos === 'number') fdo.pos += bytesWritten - n; | |
c(bytesWritten); | |
} | |
}); | |
} | |
h$base_writeStdout = function(fd, fdo, buf, buf_offset, n, c) { | |
; | |
h$base_writeFile(1, fdo, buf, buf_offset, n, c); | |
} | |
h$base_closeStdout = function(fd, fdo, c) { | |
; | |
// not actually closed, fixme? | |
c(0); | |
} | |
h$base_writeStderr = function(fd, fdo, buf, buf_offset, n, c) { | |
; | |
h$base_writeFile(2, fdo, buf, buf_offset, n, c); | |
} | |
h$base_closeStderr = function(fd, fdo, c) { | |
; | |
// not actually closed, fixme? | |
c(0); | |
} | |
process.stdin.on('readable', h$base_process_stdin); | |
process.stdin.on('end', function() { h$base_stdin_eof = true; h$base_process_stdin(); }); | |
} else if (h$isJsShell) { | |
h$base_readStdin = function(fd, fdo, buf, buf_offset, n, c) { | |
c(0); | |
} | |
h$base_writeStdout = function(fd, fdo, buf, buf_offset, n, c) { | |
putstr(h$decodeUtf8(buf, n, buf_offset)); | |
c(n); | |
} | |
h$base_writeStderr = function(fd, fdo, buf, buf_offset, n, c) { | |
printErr(h$decodeUtf8(buf, n, buf_offset)); | |
c(n); | |
} | |
} else if(h$isJsCore) { | |
h$base_readStdin = function(fd, fdo, buf, buf_offset, n, c) { | |
c(0); | |
} | |
var h$base_stdoutLeftover = { f: print, val: null }; | |
var h$base_stderrLeftover = { f: debug, val: null }; | |
var h$base_writeWithLeftover = function(buf, n, buf_offset, c, lo) { | |
var lines = h$decodeUtf8(buf, n, buf_offset).split(/\r?\n/); | |
if(lines.length === 1) { | |
if(lines[0].length) { | |
if(lo.val !== null) lo.val += lines[0]; | |
else lo.val = lines[0]; | |
} | |
} else { | |
lo.f(((lo.val !== null) ? lo.val : '') + lines[0]); | |
for(var i=1;i<lines.length-1;i++) lo.f(lines[i]); | |
if(lines[lines.length-1].length) lo.val = lines[lines.length-1]; | |
else lo.val = null; | |
} | |
c(n); | |
} | |
h$base_writeStdout = function(fd, fdo, buf, buf_offset, n, c) { | |
h$base_writeWithLeftover(buf, n, buf_offset, c, h$base_stdoutLeftover); | |
} | |
h$base_writeStderr = function(fd, fdo, buf, buf_offset, n, c) { | |
// writing to stderr not supported, write to stdout | |
h$base_writeWithLeftover(buf, n, buf_offset, c, h$base_stderrLeftover); | |
} | |
} else { // browser / fallback | |
h$base_readStdin = function(fd, fdo, buf, buf_offset, n, c) { | |
c(0); | |
} | |
h$base_writeStdout = function(fd, fdo, buf, buf_offset, n, c) { | |
console.log(h$decodeUtf8(buf, n, buf_offset)); | |
c(n); | |
} | |
h$base_writeStderr = function(fd, fdo, buf, buf_offset, n, c) { | |
console.log(h$decodeUtf8(buf, n, buf_offset)); | |
c(n); | |
} | |
} | |
var h$base_stdin_fd = { read: h$base_readStdin, close: h$base_closeStdin }; | |
var h$base_stdout_fd = { write: h$base_writeStdout, close: h$base_closeStdout }; | |
var h$base_stderr_fd = { write: h$base_writeStderr, close: h$base_closeStderr }; | |
var h$base_fdN = -1; // negative file descriptors are 'virtual' | |
var h$base_fds = [h$base_stdin_fd, h$base_stdout_fd, h$base_stderr_fd]; | |
function h$shutdownHaskellAndExit(code, fast) { | |
h$exitProcess(code); | |
} | |
// RAND_MAX = 32767 | |
function h$rand() { | |
return (32768 * Math.random()) & 32767; | |
} | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
function h$get_current_timezone_seconds(t, pdst_v, pdst_o, pname_v, pname_o) { | |
var d = new Date(t * 1000); | |
var now = new Date(); | |
var jan = new Date(now.getFullYear(),0,1); | |
var jul = new Date(now.getFullYear(),6,1); | |
var stdOff = Math.max(jan.getTimezoneOffset(), jul.getTimezoneOffset()); | |
var isDst = d.getTimezoneOffset() < stdOff; | |
var tzo = d.getTimezoneOffset(); | |
pdst_v.dv.setInt32(pdst_o, isDst ? 1 : 0, true); | |
if(!pname_v.arr) pname_v.arr = []; | |
var offstr = tzo < 0 ? ('+' + (tzo/-60)) : ('' + (tzo/-60)); | |
pname_v.arr[pname_o] = [h$encodeUtf8("UTC" + offstr), 0]; | |
return (-60*tzo)|0; | |
} | |
function h$clock_gettime(when, p_d, p_o) { | |
/* h$log("clock_gettime"); | |
h$log(when); | |
h$log(p_d); | |
h$log(p_o); */ | |
var o = p_o >> 2, | |
t = Date.now ? Date.now() : new Date().getTime(), | |
tf = Math.floor(t / 1000), | |
tn = 1000000 * (t - (1000 * tf)); | |
p_d.i3[o] = tf|0; | |
p_d.i3[o+1] = tn|0; | |
return 0; | |
} | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
// values defined in Gen2.ClosureInfo | |
// thread status | |
/* | |
* low-level heap object manipulation macros | |
*/ | |
// GHCJS.Prim.JSVal | |
// GHCJS.Prim.JSException | |
// Exception dictionary for JSException | |
// SomeException | |
// GHC.Ptr.Ptr | |
// GHC.Integer.GMP.Internals | |
// Data.Maybe.Maybe | |
// #define HS_NOTHING h$nothing | |
// Data.List | |
// Data.Text | |
// Data.Text.Lazy | |
// black holes | |
// can we skip the indirection for black holes? | |
// resumable thunks | |
// general deconstruction | |
// retrieve a numeric value that's possibly stored as an indirection | |
// generic lazy values | |
// generic data constructors and selectors | |
// unboxed tuple returns | |
// #define RETURN_UBX_TUP1(x) return x; | |
function h$_hs_text_memcpy(dst_v,dst_o2,src_v,src_o2,n) { | |
return h$memcpy(dst_v,2*dst_o2,src_v,2*src_o2,2*n); | |
} | |
function h$_hs_text_memcmp(a_v,a_o2,b_v,b_o2,n) { | |
return h$memcmp(a_v,2*a_o2,b_v,2*b_o2,2*n); | |
} | |
// decoder below adapted from cbits/cbits.c in the text package | |
var h$_text_utf8d = | |
[ | |
/* | |
* The first part of the table maps bytes to character classes that | |
* to reduce the size of the transition table and create bitmasks. | |
*/ | |
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, | |
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, | |
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, | |
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, | |
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, | |
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, | |
8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, | |
10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3, 11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8, | |
/* | |
* The second part is a transition table that maps a combination of | |
* a state of the automaton and a character class to a state. | |
*/ | |
0,12,24,36,60,96,84,12,12,12,48,72, 12,12,12,12,12,12,12,12,12,12,12,12, | |
12, 0,12,12,12,12,12, 0,12, 0,12,12, 12,24,12,12,12,12,12,24,12,24,12,12, | |
12,12,12,12,12,12,12,24,12,12,12,12, 12,24,12,12,12,12,12,12,12,24,12,12, | |
12,12,12,12,12,12,12,36,12,36,12,12, 12,36,12,12,12,12,12,36,12,36,12,12, | |
12,36,12,12,12,12,12,12,12,12,12,12]; | |
/* | |
* A best-effort decoder. Runs until it hits either end of input or | |
* the start of an invalid byte sequence. | |
* | |
* At exit, updates *destoff with the next offset to write to, and | |
* returns the next source offset to read from. | |
*/ | |
function h$_hs_text_decode_utf8_internal ( dest_v | |
, destoff_v, destoff_o | |
, src_v, src_o | |
, src_end_v, src_end_o | |
, s | |
) { | |
if(src_v === null || src_end_v === null) { | |
{ h$ret1 = (src_end_o); return (null); }; | |
} | |
var dsto = destoff_v.dv.getUint32(destoff_o,true) << 1; | |
var srco = src_o; | |
var state = s.state; | |
var codepoint = s.codepoint; | |
var ddv = dest_v.dv; | |
var sdv = src_v.dv; | |
function decode(b) { | |
var type = h$_text_utf8d[b]; | |
codepoint = (state !== 0) ? | |
(b & 0x3f) | (codepoint << 6) : | |
(0xff >>> type) & b; | |
state = h$_text_utf8d[256 + state + type]; | |
return state; | |
} | |
while (srco < src_end_o) { | |
if(decode(sdv.getUint8(srco++)) !== 0) { | |
if(state !== 12) { | |
continue; | |
} else { | |
break; | |
} | |
} | |
if (codepoint <= 0xffff) { | |
ddv.setUint16(dsto,codepoint,true); | |
dsto += 2; | |
} else { | |
ddv.setUint16(dsto,(0xD7C0 + (codepoint >>> 10)),true); | |
ddv.setUint16(dsto+2,(0xDC00 + (codepoint & 0x3FF)),true); | |
dsto += 4; | |
} | |
s.last = srco; | |
} | |
s.state = state; | |
s.codepoint = codepoint; | |
destoff_v.dv.setUint32(destoff_o,dsto>>1,true); | |
{ h$ret1 = (srco); return (src_v); }; | |
} | |
function h$_hs_text_decode_utf8_state( dest_v | |
, destoff_v, destoff_o | |
, src_v, src_o | |
, srcend_v, srcend_o | |
, codepoint0_v, codepoint0_o | |
, state0_v, state0_o | |
) { | |
var s = { state: state0_v.dv.getUint32(state0_o, true) | |
, codepoint: codepoint0_v.dv.getUint32(codepoint0_o, true) | |
, last: src_o | |
}; | |
var ret, ret1; | |
{ (ret) = (h$_hs_text_decode_utf8_internal ( dest_v , destoff_v, destoff_o , src_v.arr[src_o][0], src_v.arr[src_o][1] , srcend_v, srcend_o , s )); (ret1) = h$ret1; }; | |
src_v.arr[src_o][1] = s.last; | |
state0_v.dv.setUint32(state0_o, s.state, true); | |
codepoint0_v.dv.setUint32(codepoint0_o, s.codepoint, true); | |
if(s.state === 12) ret1--; | |
{ h$ret1 = (ret1); return (ret); }; | |
} | |
function h$_hs_text_decode_utf8( dest_v | |
, destoff_v, destoff_o | |
, src_v, src_o | |
, srcend_v, srcend_o | |
) { | |
/* Back up if we have an incomplete or invalid encoding */ | |
var s = { state: 0 | |
, codepoint: 0 | |
, last: src_o | |
}; | |
var ret, ret1; | |
{ (ret) = (h$_hs_text_decode_utf8_internal ( dest_v , destoff_v, destoff_o , src_v, src_o , srcend_v, srcend_o , s )); (ret1) = h$ret1; }; | |
if (s.state !== 0) ret1--; | |
{ h$ret1 = (ret1); return (ret); }; | |
} | |
/* | |
* The ISO 8859-1 (aka latin-1) code points correspond exactly to the first 256 unicode | |
* code-points, therefore we can trivially convert from a latin-1 encoded bytestring to | |
* an UTF16 array | |
*/ | |
function h$_hs_text_decode_latin1(dest_d, src_d, src_o, srcend_d, srcend_o) { | |
var p = src_o; | |
var d = 0; | |
var su8 = src_d.u8; | |
var su3 = src_d.u3; | |
var du1 = dest_d.u1; | |
// consume unaligned prefix | |
while(p != srcend_o && p & 3) { | |
du1[d++] = su8[p++]; | |
} | |
// iterate over 32-bit aligned loads | |
if(su3) { | |
while (p < srcend_o - 3) { | |
var w = su3[p>>2]; | |
du1[d++] = w & 0xff; | |
du1[d++] = (w >>> 8) & 0xff; | |
du1[d++] = (w >>> 16) & 0xff; | |
du1[d++] = (w >>> 32) & 0xff; | |
p += 4; | |
} | |
} | |
// handle unaligned suffix | |
while (p != srcend_o) | |
du1[d++] = su8[p++]; | |
} | |
function h$_hs_text_encode_utf8(destp_v, destp_o, src_v, srcoff, srclen) { | |
var dest_v = destp_v.arr[destp_o][0]; | |
var dest_o = destp_v.arr[destp_o][1]; | |
var src = srcoff; | |
var dest = dest_o; | |
var srcend = src + srclen; | |
var srcu1 = src_v.u1; | |
if(!srcu1) throw "h$_hs_text_encode_utf8: invalid alignment for source"; | |
var srcu3 = src_v.u3; | |
var destu8 = dest_v.u8; | |
while(src < srcend) { | |
// run of (aligned) ascii characters | |
while(srcu3 && !(src & 1) && srcend - src >= 2) { | |
var w = srcu3[src>>1]; | |
if(w & 0xFF80FF80) break; | |
destu8[dest++] = w & 0xFFFF; | |
destu8[dest++] = w >>> 16; | |
src += 2; | |
} | |
while(src < srcend) { | |
var w = srcu1[src++]; | |
if(w <= 0x7F) { | |
destu8[dest++] = w; | |
break; // go back to a stream of ASCII | |
} else if(w <= 0x7FF) { | |
destu8[dest++] = (w >> 6) | 0xC0; | |
destu8[dest++] = (w & 0x3f) | 0x80; | |
} else if(w < 0xD800 || w > 0xDBFF) { | |
destu8[dest++] = (w >>> 12) | 0xE0; | |
destu8[dest++] = ((w >> 6) & 0x3F) | 0x80; | |
destu8[dest++] = (w & 0x3F) | 0x80; | |
} else { | |
var c = ((w - 0xD800) << 10) + (srcu1[src++] - 0xDC00) + 0x10000; | |
destu8[dest++] = (c >>> 18) | 0xF0; | |
destu8[dest++] = ((c >> 12) & 0x3F) | 0x80; | |
destu8[dest++] = ((c >> 6) & 0x3F) | 0x80; | |
destu8[dest++] = (c & 0x3F) | 0x80; | |
} | |
} | |
} | |
destp_v.arr[destp_o][1] = dest; | |
} | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
/* FNV-1 hash | |
* | |
* The FNV-1 hash description: http://isthe.com/chongo/tech/comp/fnv/ | |
* The FNV-1 hash is public domain: http://isthe.com/chongo/tech/comp/fnv/#public_domain | |
*/ | |
function h$hashable_fnv_hash_offset(str_a, o, len, hash) { | |
return h$hashable_fnv_hash(str_a, o, len, hash); | |
} | |
function h$hashable_fnv_hash(str_d, str_o, len, hash) { | |
if(len > 0) { | |
var d = str_d.u8; | |
for(var i=0;i<len;i++) { | |
hash = h$mulInt32(hash, 16777619) ^ d[str_o+i]; | |
} | |
} | |
return hash; | |
} | |
// int hashable_getRandomBytes(unsigned char *dest, int nbytes) | |
function h$hashable_getRandomBytes(dest_d, dest_o, len) { | |
if(len > 0) { | |
var d = dest_d.u8; | |
for(var i=0;i<len;i++) { | |
d[dest_o+i] = Math.floor(Math.random() * 256); | |
} | |
} | |
return len; | |
} | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
// values defined in Gen2.ClosureInfo | |
// thread status | |
/* | |
* low-level heap object manipulation macros | |
*/ | |
// GHCJS.Prim.JSVal | |
// GHCJS.Prim.JSException | |
// Exception dictionary for JSException | |
// SomeException | |
// GHC.Ptr.Ptr | |
// GHC.Integer.GMP.Internals | |
// Data.Maybe.Maybe | |
// #define HS_NOTHING h$nothing | |
// Data.List | |
// Data.Text | |
// Data.Text.Lazy | |
// black holes | |
// can we skip the indirection for black holes? | |
// resumable thunks | |
// general deconstruction | |
// retrieve a numeric value that's possibly stored as an indirection | |
// generic lazy values | |
// generic data constructors and selectors | |
// unboxed tuple returns | |
// #define RETURN_UBX_TUP1(x) return x; | |
// JS Objects stuff | |
function h$isFloat (n) { | |
return n===+n && n!==(n|0); | |
} | |
function h$isInteger (n) { | |
return n===+n && n===(n|0); | |
} | |
/* | |
-- 0 - null, 1 - integer, | |
-- 2 - float, 3 - bool, | |
-- 4 - string, 5 - array | |
-- 6 - object | |
*/ | |
function h$typeOf(o) { | |
if (!(o instanceof Object)) { | |
if (o == null) { | |
return 0; | |
} else if (typeof o == 'number') { | |
if (h$isInteger(o)) { | |
return 1; | |
} else { | |
return 2; | |
} | |
} else if (typeof o == 'boolean') { | |
return 3; | |
} else { | |
return 4; | |
} | |
} else { | |
if (Object.prototype.toString.call(o) == '[object Array]') { | |
// it's an array | |
return 5; | |
} else if (!o) { | |
// null | |
return 0; | |
} else { | |
// it's an object | |
return 6; | |
} | |
} | |
} | |
function h$listProps(o) { | |
if (!(o instanceof Object)) { | |
return []; | |
} | |
var l = [], i = 0; | |
for (var prop in o) { | |
l[i++] = prop; | |
} | |
return l; | |
} | |
function h$flattenObj(o) { | |
var l = [], i = 0; | |
for (var prop in o) { | |
l[i++] = [prop, o[prop]]; | |
} | |
return l; | |
} | |
/* | |
build an object from key/value pairs: | |
var obj = h$buildObject(key1, val1, key2, val2, ...); | |
note: magic name: | |
invocations of this function are replaced by object literals wherever | |
possible | |
*/ | |
function h$buildObject() { | |
var r = {}, l = arguments.length; | |
for(var i = 0; i < l; i += 2) { | |
var k = arguments[i], v = arguments[i+1]; | |
r[k] = v; | |
} | |
return r; | |
} | |
// same as above, but from a list: [k1,v1,k2,v2,...] | |
function h$buildObjectFromList(xs) { | |
var r = {}, k, v, t; | |
while(((xs).f === h$ghczmprimZCGHCziTypesziZC_con_e)) { | |
xs = ((xs).d2); | |
t = ((xs).d2); | |
if(((t).f === h$ghczmprimZCGHCziTypesziZC_con_e)) { | |
k = ((xs).d1); | |
v = ((t).d1); | |
xs = ((t).d2); | |
r[k] = v; | |
} else { | |
return r; | |
} | |
} | |
return r; | |
} | |
// same as above, but from a list of tuples [(k1,v1),(k2,v2),...] | |
function h$buildObjectFromTupList(xs) { | |
var r = {}; | |
while(((xs).f === h$ghczmprimZCGHCziTypesziZC_con_e)) { | |
var h = ((xs).d1); | |
xs = ((xs).d2); | |
r[((((h).d1)).d1)] = ((((h).d2)).d1); | |
} | |
return r; | |
} | |
/* Copyright (C) 1991-2016 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public | |
License along with the GNU C Library; if not, see | |
<http://www.gnu.org/licenses/>. */ | |
/* This header is separate from features.h so that the compiler can | |
include it implicitly at the start of every compilation. It must | |
not itself include <features.h> or any other header that includes | |
<features.h> because the implicit include comes before any feature | |
test macros that may be defined in a source file before it first | |
explicitly includes a system header. GCC knows the name of this | |
header in order to preinclude it. */ | |
/* glibc's intent is to support the IEC 559 math functionality, real | |
and complex. If the GCC (4.9 and later) predefined macros | |
specifying compiler intent are available, use them to determine | |
whether the overall intent is to support these features; otherwise, | |
presume an older compiler has intent to support these features and | |
define these macros by default. */ | |
/* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is | |
synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published | |
2015-05-15). */ | |
/* We do not support C11 <threads.h>. */ | |
// values defined in Gen2.ClosureInfo | |
// thread status | |
/* | |
* low-level heap object manipulation macros | |
*/ | |
// GHCJS.Prim.JSVal | |
// GHCJS.Prim.JSException | |
// Exception dictionary for JSException | |
// SomeException | |
// GHC.Ptr.Ptr | |
// GHC.Integer.GMP.Internals | |
// Data.Maybe.Maybe | |
// #define HS_NOTHING h$nothing | |
// Data.List | |
// Data.Text | |
// Data.Text.Lazy | |
// black holes | |
// can we skip the indirection for black holes? | |
// resumable thunks | |
// general deconstruction | |
// retrieve a numeric value that's possibly stored as an indirection | |
// generic lazy values | |
// generic data constructors and selectors | |
// unboxed tuple returns | |
// #define RETURN_UBX_TUP1(x) return x; | |
// translated from bytestring cbits/fpstring.c | |
function h$fps_reverse(a_v, a_o, b_v, b_o, n) { | |
if(n > 0) { | |
var au8 = a_v.u8, bu8 = b_v.u8; | |
for(var i=0;i<n;i++) { | |
au8[a_o+n-i-1] = bu8[b_o+i]; | |
} | |
} | |
} | |
function h$fps_intersperse(a_v,a_o,b_v,b_o,n,c) { | |
if(n > 0) { | |
var au8 = a_v.u8, bu8 = b_v.u8, dst_o = a_o; | |
for(var i=0;i<n-1;i++) { | |
au8[dst_o] = bu8[b_o+i]; | |
au8[dst_o+1] = c; | |
dst_o += 2; | |
} | |
au8[dst_o] = bu8[b_o+n-1]; | |
} | |
} | |
function h$fps_maximum(a_v,a_o,n) { | |
if(n > 0) { | |
var au8 = a_v.u8, max = au8[a_o]; | |
for(var i=1;i<n;i++) { | |
var c = au8[a_o+i]; | |
if(c > max) { max = c; } | |
} | |
return max; | |
} | |
return 0; | |
} | |
function h$fps_minimum(a_v,a_o,n) { | |
if(n > 0) { | |
var au8 = a_v.u8, min = a_v.u8[a_o]; | |
for(var i=1;i<n;i++) { | |
var c = au8[a_o+i]; | |
if(c < min) { min = c; } | |
} | |
return min; | |
} | |
return 255; | |
} | |
function h$fps_count(a_v,a_o,n,c) { | |
if(n > 0) { | |
var au8 = a_v.u8, count = 0; | |
for(var i=0;i<n;i++) { | |
if(au8[a_o+i] === c) { count++; } | |
} | |
return count|0; | |
} | |
return 0; | |
} | |
function h$fps_memcpy_offsets(dst_d, dst_o, dst_off | |
, src_d, src_o, src_off, n) { | |
return memcpy(dst_d, dst_o + dst_off, src_d, src_o + src_off, n); | |
} | |
// translated from bytestring cbits/itoa.c | |
var h$_hs_bytestring_digits = [48,49,50,51,52,53,54,55,56,57,97,98,99,100,101,102]; // 0123456789abcdef | |
var h$_hs_bytestring_l10 = goog.math.Long.fromBits(10, 0); | |
// signed integers | |
function h$_hs_bytestring_int_dec(x, buf_d, buf_o) { | |
var c, ptr = buf_o, next_free, x_tmp; | |
var bu8 = buf_d.u8; | |
// we cannot negate directly as 0 - (minBound :: Int) = minBound | |
if(x < 0) { | |
bu8[ptr++] = 45; // '-' | |
buf_o++; | |
x_tmp = x; | |
x = (x / 10) | 0; | |
bu8[ptr++] = h$_hs_bytestring_digits[x * 10 - x_tmp]; | |
if(x === 0) { | |
{ h$ret1 = (ptr); return (buf_d); }; | |
} else { | |
x = -x; | |
} | |
} | |
// encode positive number as little-endian decimal | |
do { | |
x_tmp = x; | |
x = (x / 10) | 0; | |
bu8[ptr++] = h$_hs_bytestring_digits[x_tmp - x * 10]; | |
} while (x); | |
next_free = ptr--; | |
while(buf_o < ptr) { | |
c = bu8[ptr]; | |
bu8[ptr--] = bu8[buf_o]; | |
bu8[buf_o++] = c; | |
} | |
{ h$ret1 = (next_free); return (buf_d); }; | |
} | |
// signed long long ints (64 bit integers) | |
function h$_hs_bytestring_long_long_int_dec(x_a, x_b, buf_d, buf_o) { | |
var l10 = h$_hs_bytestring_l10; | |
var x = goog.math.Long.fromBits(x_b, x_a); | |
var c, ptr = buf_o, next_free; | |
var bu8 = buf_d.u8; | |
// we cannot negate directly as 0 - (minBound :: Int) = minBound | |
if(x.isNegative()) { | |
bu8[ptr++] = 45; // '-'; | |
buf_o++; | |
x_tmp = x; | |
x = x.div(l10); | |
bu8[ptr++] = h$_hs_bytestring_digits[x.multiply(l10).subtract(x_tmp).getLowBits()]; | |
if(x.isZero()) { | |
{ h$ret1 = (ptr); return (buf_d); }; | |
} else { | |
x = x.negate(); | |
} | |
} | |
// encode positive number as little-endian decimal | |
do { | |
x_tmp = x; | |
x = x.div(l10); | |
bu8[ptr++] = h$_hs_bytestring_digits[x_tmp.subtract(x.multiply(l10))]; | |
} while (!x.isZero()); | |
// reverse written digits | |
next_free = ptr--; | |
while(buf_o < ptr) { | |
c = bu8[ptr]; | |
bu8[ptr--] = bu8[buf_o]; | |
bu8[buf_o++] = c; | |
} | |
{ h$ret1 = (next_free); return (buf_d); }; | |
} | |
// unsigned integers | |
function h$_hs_bytestring_uint_dec(x, buf_d, buf_o) { | |
var c, ptr = buf_o, next_free; | |
var bu8 = buf_d.u8; | |
var x_tmp; | |
if(x < 0) x += 4294967296; | |
do { | |
x_tmp = x; | |
x = (x / 10) | 0; | |
bu8[ptr++] = h$_hs_bytestring_digits[x_tmp - x * 10]; | |
} while(x); | |
next_free = ptr--; | |
while(buf_o < ptr) { | |
c = bu8[ptr]; | |
bu8[ptr--] = bu8[buf_o]; | |
bu8[buf_o++] = c; | |
} | |
{ h$ret1 = (next_free); return (buf_d); }; | |
} | |
function h$_hs_bytestring_long_long_uint_dec(x_a, x_b, buf_d, buf_o) { | |
var c, ptr = buf_o, next_free; | |
var bu8 = buf_d.u8; | |
var x = h$ghcjsbn_mkBigNat_ww(x_a, x_b), q = [], r = []; | |
// encode positive number as little-endian decimal | |
do { | |
h$ghcjsbn_quotRem_bw(q, r, x, 10); | |
x = q; | |
bu8[ptr++] = h$_hs_bytestring_digits[h$ghcjsbn_toInt_b(r)]; | |
} while(!h$ghcjsbn_isZero_b(x)); | |
// reverse written digits; | |
next_free = ptr--; | |
while(buf_o < ptr) { | |
c = bu8[ptr]; | |
bu8[ptr--] = bu8[buf_o]; | |
bu8[buf_o++] = c; | |
} | |
{ h$ret1 = (next_free); return (buf_d); }; | |
} | |
// Padded, decimal, positive integers for the decimal output of bignums | |
/////////////////////////////////////////////////////////////////////// | |
// Padded (9 digits), decimal, positive int: | |
// We will use it with numbers that fit in 31 bits; i.e., numbers smaller than | |
// 10^9, as "31 * log 2 / log 10 = 9.33" | |
function h$_hs_bytestring_int_dec_padded9(x, buf_d, buf_o) { | |
var max_width_int32_dec = 9; | |
var ptr = buf_o + max_width_int32_dec; | |
var bu8 = buf_d.u8; | |
var x_tmp; | |
// encode positive number as little-endian decimal | |
do { | |
x_tmp = x; | |
x = (x / 10) | 0; | |
bu8[--ptr] = h$_hs_bytestring_digits[x_tmp - x * 10]; | |
} while(x); | |
// pad beginning | |
while (buf_o < ptr) { bu8[--ptr] = 48; } | |
} | |
// Padded (19 digits), decimal, positive long long int: | |
// We will use it with numbers that fit in 63 bits; i.e., numbers smaller than | |
// 10^18, as "63 * log 2 / log 10 = 18.96" | |
function h$_hs_bytestring_long_long_int_dec_padded18(x_a, x_b, buf_d, buf_o) { | |
var l10 = h$_hs_bytestring_l10; | |
var max_width_int64_dec = 18; | |
var ptr = buf_o + max_width_int64_dec; | |
var bu8 = buf_d.u8; | |
var x = goog.math.Long.fromBits(x_b, x_a); | |
// encode positive number as little-endian decimal | |
do { | |
x_tmp = x; | |
x = x.div(l10); | |
bu8[--ptr] = h$_hs_bytestring_digits[x_tmp.subtract(x.multiply(l10))]; | |
} while (!x.isZero()); | |
// pad beginning | |
while (buf_o < ptr) { bu8[--ptr] = 48; } | |
} | |
/////////////////////// | |
// Hexadecimal encoding | |
/////////////////////// | |
// unsigned ints (32 bit words) | |
function h$_hs_bytestring_uint_hex(x, buf_d, buf_o) { | |
var c, ptr = buf_o, next_free; | |
var bu8 = buf_d.u8; | |
// write hex representation in reverse order | |
do { | |
bu8[ptr++] = h$_hs_bytestring_digits[x & 0xf]; | |
x >>>= 4; | |
} while(x); | |
// invert written digits | |
next_free = ptr--; | |
while(buf_o < ptr) { | |
c = bu8[ptr]; | |
bu8[ptr--] = bu8[buf_o]; | |
bu8[buf_o++] = c; | |
} | |
{ h$ret1 = (next_free); return (buf_d); }; | |
} | |
// unsigned long ints (64 bit words) | |
function h$_hs_bytestring_long_long_uint_hex(x_a, x_b, buf_d, buf_o) { | |
// write hex representation in reverse order | |
var c, ptr = buf_o, next_free; | |
var bu8 = buf_d.u8; | |
if(x_a === 0 && x_b === 0) { | |
bu8[ptr++] = 48; // '0' | |
} else { | |
while(x_b !== 0) { | |
bu8[ptr++] = h$_hs_bytestring_digits[x_b & 0xf]; | |
x_b >>>= 4; | |
} | |
while(x_a !== 0) { | |
bu8[ptr++] = h$_hs_bytestring_digits[x_a & 0xf]; | |
x_a >>>= 4; | |
} | |
} | |
// invert written digits | |
next_free = ptr--; | |
while(buf_o < ptr) { | |
c = bu8[ptr]; | |
bu8[ptr--] = bu8[buf_o]; | |
bu8[buf_o++] = c; | |
} | |
{ h$ret1 = (next_free); return (buf_d); }; | |
} | |
function h$ghczmprimZCGHCziTypesziTyCon_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziTypesziTyCon_e() | |
{ | |
h$r1 = h$c6(h$ghczmprimZCGHCziTypesziTyCon_con_e, h$r2, h$r3, h$r4, h$r5, h$r6, h$r7); | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziTypesziModule_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziTypesziModule_e() | |
{ | |
h$r1 = h$c2(h$ghczmprimZCGHCziTypesziModule_con_e, h$r2, h$r3); | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziTypesziTrNameS_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziTypesziTrNameS_e() | |
{ | |
h$r1 = h$c2(h$ghczmprimZCGHCziTypesziTrNameS_con_e, h$r2, h$r3); | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziTypesziTrue_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziTypesziZMZN_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziTypesziIzh_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziTypesziIzh_e() | |
{ | |
h$r1 = h$r2; | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziTypesziFalse_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziTypesziZC_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziTypesziZC_e() | |
{ | |
h$r1 = h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, h$r2, h$r3); | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziTypesziCzh_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziTypesziCzh_e() | |
{ | |
h$r1 = h$r2; | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziTupleziZLz2cUz2cUz2cUz2cUz2cUz2cUz2cUz2cUz2cUZR_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziTupleziZLz2cUz2cUz2cUz2cUz2cUz2cUz2cUz2cUz2cUZR_e() | |
{ | |
h$r1 = h$c10(h$ghczmprimZCGHCziTupleziZLz2cUz2cUz2cUz2cUz2cUz2cUz2cUz2cUz2cUZR_con_e, h$r2, h$r3, h$r4, h$r5, h$r6, | |
h$r7, h$r8, h$r9, h$r10, h$r11); | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziTupleziZLz2cUz2cUz2cUz2cUz2cUz2cUz2cUz2cUZR_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziTupleziZLz2cUz2cUz2cUz2cUz2cUz2cUz2cUz2cUZR_e() | |
{ | |
h$r1 = h$c9(h$ghczmprimZCGHCziTupleziZLz2cUz2cUz2cUz2cUz2cUz2cUz2cUz2cUZR_con_e, h$r2, h$r3, h$r4, h$r5, h$r6, h$r7, | |
h$r8, h$r9, h$r10); | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziTupleziZLz2cUz2cUz2cUz2cUz2cUz2cUz2cUZR_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziTupleziZLz2cUz2cUz2cUz2cUz2cUz2cUz2cUZR_e() | |
{ | |
h$r1 = h$c8(h$ghczmprimZCGHCziTupleziZLz2cUz2cUz2cUz2cUz2cUz2cUz2cUZR_con_e, h$r2, h$r3, h$r4, h$r5, h$r6, h$r7, h$r8, | |
h$r9); | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziTupleziZLz2cUz2cUz2cUz2cUz2cUz2cUZR_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziTupleziZLz2cUz2cUz2cUz2cUz2cUz2cUZR_e() | |
{ | |
h$r1 = h$c7(h$ghczmprimZCGHCziTupleziZLz2cUz2cUz2cUz2cUz2cUz2cUZR_con_e, h$r2, h$r3, h$r4, h$r5, h$r6, h$r7, h$r8); | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziTupleziZLz2cUz2cUz2cUz2cUz2cUZR_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziTupleziZLz2cUz2cUz2cUz2cUz2cUZR_e() | |
{ | |
h$r1 = h$c6(h$ghczmprimZCGHCziTupleziZLz2cUz2cUz2cUz2cUz2cUZR_con_e, h$r2, h$r3, h$r4, h$r5, h$r6, h$r7); | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziTupleziZLz2cUz2cUz2cUz2cUZR_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziTupleziZLz2cUz2cUz2cUz2cUZR_e() | |
{ | |
h$r1 = h$c5(h$ghczmprimZCGHCziTupleziZLz2cUz2cUz2cUz2cUZR_con_e, h$r2, h$r3, h$r4, h$r5, h$r6); | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziTupleziZLz2cUz2cUz2cUZR_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziTupleziZLz2cUz2cUz2cUZR_e() | |
{ | |
h$r1 = h$c4(h$ghczmprimZCGHCziTupleziZLz2cUz2cUz2cUZR_con_e, h$r2, h$r3, h$r4, h$r5); | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziTupleziZLz2cUz2cUZR_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziTupleziZLz2cUz2cUZR_e() | |
{ | |
h$r1 = h$c3(h$ghczmprimZCGHCziTupleziZLz2cUz2cUZR_con_e, h$r2, h$r3, h$r4); | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziTupleziZLz2cUZR_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziTupleziZLz2cUZR_e() | |
{ | |
h$r1 = h$c2(h$ghczmprimZCGHCziTupleziZLz2cUZR_con_e, h$r2, h$r3); | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziTupleziZLZR_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziIntWord64zinegateInt64zh_e() | |
{ | |
var a = h$hs_negateInt64(h$r2, h$r3); | |
h$r1 = a; | |
h$r2 = h$ret1; | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziIntWord64ziword64ToInt64zh_e() | |
{ | |
var a = h$hs_word64ToInt64(h$r2, h$r3); | |
h$r1 = a; | |
h$r2 = h$ret1; | |
return h$rs(); | |
}; | |
function h$$b() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$l2(((b + 1) | 0), a); | |
return h$ap_1_1_fast(); | |
}; | |
function h$$a() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = b.d1; | |
var d = b.d2; | |
var e = b.d3; | |
var f = h$r2; | |
var g = a.u8[(c + f)]; | |
if((g === 0)) | |
{ | |
return h$e(d); | |
} | |
else | |
{ | |
h$r1 = h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, g, h$c2(h$$b, e, f)); | |
}; | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziCStringziunpackAppendCStringzh_e() | |
{ | |
var a = h$r3; | |
var b = h$r4; | |
var c = h$c(h$$a); | |
c.d1 = h$r2; | |
c.d2 = h$d3(a, b, c); | |
h$l2(0, c); | |
return h$ap_1_1_fast(); | |
}; | |
function h$$d() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$l2(((b + 1) | 0), a); | |
return h$ap_1_1_fast(); | |
}; | |
function h$$c() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = b.d1; | |
var d = b.d2; | |
var e = h$r2; | |
var f = a.u8[(c + e)]; | |
if((f === 0)) | |
{ | |
h$r1 = h$ghczmprimZCGHCziTypesziZMZN; | |
} | |
else | |
{ | |
h$r1 = h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, f, h$c2(h$$d, d, e)); | |
}; | |
return h$rs(); | |
}; | |
function h$ghczmprimZCGHCziCStringziunpackCStringzh_e() | |
{ | |
var a = h$r3; | |
var b = h$c(h$$c); | |
b.d1 = h$r2; | |
b.d2 = h$d2(a, b); | |
h$l2(0, b); | |
return h$ap_1_1_fast(); | |
}; | |
function h$$f() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$l2(((b + 1) | 0), a); | |
return h$ap_1_1_fast(); | |
}; | |
function h$$e() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = b.d1; | |
var d = b.d2; | |
var e = b.d3; | |
var f = b.d4; | |
var g = h$r2; | |
var h = a.u8[(c + g)]; | |
if((h === 0)) | |
{ | |
h$r1 = e; | |
return h$ap_0_0_fast(); | |
} | |
else | |
{ | |
h$l3(h$c2(h$$f, f, g), h, d); | |
return h$ap_2_2_fast(); | |
}; | |
}; | |
function h$ghczmprimZCGHCziCStringziunpackFoldrCStringzh_e() | |
{ | |
var a = h$r3; | |
var b = h$r4; | |
var c = h$r5; | |
var d = h$c(h$$e); | |
d.d1 = h$r2; | |
d.d2 = h$d4(a, b, c, d); | |
h$l2(0, d); | |
return h$ap_1_1_fast(); | |
}; | |
function h$$h() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$setCurrentThreadResultValue(a.d1); | |
h$r1 = h$ghczmprimZCGHCziTupleziZLZR; | |
return h$rs(); | |
}; | |
function h$$g() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$p1(h$$h); | |
return h$e(a); | |
}; | |
function h$ghcjszmprimZCGHCJSziPrimziInternalzisetCurrentThreadResultValue1_e() | |
{ | |
h$p1(h$$g); | |
h$r1 = h$r2; | |
return h$ap_1_0_fast(); | |
}; | |
function h$$t() | |
{ | |
var a = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
var b = h$fromHsString(a); | |
h$setCurrentThreadResultHaskellException(b); | |
h$r1 = h$ghczmprimZCGHCziTupleziZLZR; | |
return h$rs(); | |
}; | |
function h$$s() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$p2(a, h$$t); | |
h$l2(a, h$ghcjszmprimZCGHCJSziPrimzigetProp1); | |
return h$ap_1_1_fast(); | |
}; | |
function h$$r() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$p1(h$$s); | |
h$l5(h$ghczmprimZCGHCziTypesziZMZN, b, h$baseZCGHCziShowzishows21, a, h$baseZCGHCziShowzishowsPrec); | |
return h$ap_4_4_fast(); | |
}; | |
function h$$q() | |
{ | |
var a = h$stack[(h$sp - 2)]; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
h$p2(b, h$$r); | |
h$l2(a, h$baseZCGHCziExceptionzizdp2Exception); | |
return h$ap_1_1_fast(); | |
}; | |
function h$$p() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$setCurrentThreadResultJSException(a.d1); | |
h$r1 = h$ghczmprimZCGHCziTupleziZLZR; | |
return h$rs(); | |
}; | |
function h$$o() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$p1(h$$p); | |
return h$e(a.d1); | |
}; | |
function h$$n() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 5)]; | |
var c = h$stack[(h$sp - 4)]; | |
var d = h$stack[(h$sp - 3)]; | |
var e = h$stack[(h$sp - 2)]; | |
var f = h$stack[(h$sp - 1)]; | |
h$sp -= 7; | |
var g = a.d1; | |
var h = a.d2; | |
var i = h.d1; | |
var j = h.d2; | |
if(h$hs_eqWord64(c, d, g, i)) | |
{ | |
if(h$hs_eqWord64(e, f, j, h.d3)) | |
{ | |
h$p1(h$$o); | |
h$r1 = b; | |
return h$ap_0_0_fast(); | |
} | |
else | |
{ | |
h$sp += 2; | |
++h$sp; | |
return h$$q; | |
}; | |
} | |
else | |
{ | |
h$sp += 2; | |
++h$sp; | |
return h$$q; | |
}; | |
}; | |
function h$$m() | |
{ | |
h$sp -= 7; | |
h$pp64(h$$n); | |
return h$e(h$ghcjszmprimZCGHCJSziPrimzizdfExceptionJSException3); | |
}; | |
function h$$l() | |
{ | |
--h$sp; | |
h$setCurrentThreadResultWouldBlock(); | |
h$r1 = h$ghczmprimZCGHCziTupleziZLZR; | |
return h$rs(); | |
}; | |
function h$$k() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 5)]; | |
var c = h$stack[(h$sp - 4)]; | |
var d = h$stack[(h$sp - 3)]; | |
var e = h$stack[(h$sp - 2)]; | |
var f = h$stack[(h$sp - 1)]; | |
h$sp -= 7; | |
var g = a.d1; | |
var h = a.d2; | |
var i = h.d1; | |
var j = h.d2; | |
if(h$hs_eqWord64(c, d, g, i)) | |
{ | |
if(h$hs_eqWord64(e, f, j, h.d3)) | |
{ | |
h$p1(h$$l); | |
h$r1 = b; | |
return h$ap_0_0_fast(); | |
} | |
else | |
{ | |
h$sp += 6; | |
++h$sp; | |
return h$$m; | |
}; | |
} | |
else | |
{ | |
h$sp += 6; | |
++h$sp; | |
return h$$m; | |
}; | |
}; | |
function h$$j() | |
{ | |
var a = h$r1; | |
h$sp -= 3; | |
var b = a.d1; | |
var c = a.d2; | |
var d = c.d1; | |
var e = c.d2; | |
h$pp124(b, d, e, c.d3, h$$k); | |
return h$e(h$ghcjszmprimZCGHCJSziPrimzizdfExceptionWouldBlockException3); | |
}; | |
function h$$i() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a.d1; | |
h$p3(b, a.d2, h$$j); | |
h$l2(b, h$baseZCGHCziExceptionzizdp1Exception); | |
return h$ap_2_1_fast(); | |
}; | |
function h$ghcjszmprimZCGHCJSziPrimziInternalzisetCurrentThreadResultException1_e() | |
{ | |
h$p1(h$$i); | |
return h$e(h$r2); | |
}; | |
function h$ghcjszmprimZCGHCJSziPrimziInternalziignoreException2_e() | |
{ | |
h$r1 = h$r1.d1; | |
return h$rs(); | |
}; | |
function h$ghcjszmprimZCGHCJSziPrimziInternalziignoreException1_e() | |
{ | |
h$r1 = h$r1.d1; | |
return h$ap_1_0_fast(); | |
}; | |
function h$ghcjszmprimZCGHCJSziPrimziInternalzisetCurrentThreadResultValue_e() | |
{ | |
h$r1 = h$r1.d1; | |
return h$ap_2_1_fast(); | |
}; | |
function h$ghcjszmprimZCGHCJSziPrimziInternalzisetCurrentThreadResultException_e() | |
{ | |
h$r1 = h$r1.d1; | |
return h$ap_2_1_fast(); | |
}; | |
function h$ghcjszmprimZCGHCJSziPrimziInternalziignoreException_e() | |
{ | |
h$r1 = h$r1.d1; | |
return h$ap_2_1_fast(); | |
}; | |
function h$ghcjszmprimZCGHCJSziPrimziInternalziblockedIndefinitelyOnSTM_e() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$l2(a, b); | |
return h$ap_1_1_fast(); | |
}; | |
function h$ghcjszmprimZCGHCJSziPrimziInternalziblockedIndefinitelyOnMVar_e() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$l2(a, b); | |
return h$ap_1_1_fast(); | |
}; | |
function h$ghcjszmprimZCGHCJSziPrimziInternalziwouldBlock_e() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$l2(a, b); | |
return h$ap_1_1_fast(); | |
}; | |
function h$ghcjszmprimZCGHCJSziPrimzizdfExceptionJSExceptionzuzdctoException_e() | |
{ | |
h$r1 = h$c2(h$baseZCGHCziExceptionziSomeException_con_e, h$r1.d1, h$r2); | |
return h$rs(); | |
}; | |
function h$ghcjszmprimZCGHCJSziPrimzizdfExceptionWouldBlockExceptionzuzdctoException_e() | |
{ | |
h$r1 = h$c2(h$baseZCGHCziExceptionziSomeException_con_e, h$r1.d1, h$r2); | |
return h$rs(); | |
}; | |
function h$$v() | |
{ | |
var a = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$l2(a, h$ghcjszmprimZCGHCJSziPrimzigetProp1); | |
return h$ap_1_1_fast(); | |
}; | |
function h$$u() | |
{ | |
var a = h$r1; | |
--h$sp; | |
if((a.f.a === 1)) | |
{ | |
h$r1 = h$ghczmprimZCGHCziTupleziZLZR; | |
} | |
else | |
{ | |
var b = a.d1; | |
h$p2(a.d2, h$$v); | |
h$r1 = b; | |
return h$ap_0_0_fast(); | |
}; | |
return h$rs(); | |
}; | |
function h$ghcjszmprimZCGHCJSziPrimzigetProp1_e() | |
{ | |
h$p1(h$$u); | |
return h$e(h$r2); | |
}; | |
function h$ghcjszmprimZCGHCJSziPrimzizdszddmshowList2_e() | |
{ | |
h$l2(h$r1.d1, h$r1.d2); | |
return h$ap_2_2_fast(); | |
}; | |
function h$ghcjszmprimZCGHCJSziPrimzizdfShowWouldBlockExceptionzuzdcshowsPrec_e() | |
{ | |
h$l3(h$r4, h$r1.d1, h$r1.d2); | |
return h$ap_2_2_fast(); | |
}; | |
function h$ghcjszmprimZCGHCJSziPrimzizdfShowWouldBlockExceptionzuzdcshowList_e() | |
{ | |
h$l4(h$r3, h$r2, h$r1.d1, h$r1.d2); | |
return h$ap_3_3_fast(); | |
}; | |
function h$$x() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a.d1; | |
var c = a.d2; | |
var d = c.d1; | |
var e = c.d2; | |
h$r1 = h$c7(h$baseZCDataziTypeableziInternalziTypeRep_con_e, b, d, e, c.d3, | |
h$ghcjszmprimZCGHCJSziPrimzizdtcWouldBlockException, h$ghczmprimZCGHCziTypesziZMZN, h$ghczmprimZCGHCziTypesziZMZN); | |
return h$rs(); | |
}; | |
function h$$w() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$p1(h$$x); | |
h$l2(h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, h$ghcjszmprimZCGHCJSziPrimzizdfExceptionWouldBlockException4, a), | |
h$baseZCGHCziFingerprintzifingerprintFingerprints); | |
return h$ap_1_1_fast(); | |
}; | |
function h$ghcjszmprimZCGHCJSziPrimzizdfExceptionWouldBlockException3_e() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$p1(h$$w); | |
h$l3(b, b, a); | |
return h$ap_2_2_fast(); | |
}; | |
function h$ghcjszmprimZCGHCJSziPrimzizdfExceptionWouldBlockException2_e() | |
{ | |
return h$e(h$r1.d1); | |
}; | |
function h$$z() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$l4(b, h$ghcjszmprimZCGHCJSziPrimzizdfExceptionWouldBlockException2, a, h$baseZCDataziTypeablezicast); | |
return h$ap_3_3_fast(); | |
}; | |
function h$$y() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a.d1; | |
h$p2(a.d2, h$$z); | |
h$l2(b, h$baseZCGHCziExceptionzizdp1Exception); | |
return h$ap_1_1_fast(); | |
}; | |
function h$ghcjszmprimZCGHCJSziPrimzizdfExceptionWouldBlockExceptionzuzdcfromException_e() | |
{ | |
h$p1(h$$y); | |
return h$e(h$r2); | |
}; | |
var h$ghcjszmprimZCGHCJSziPrimzizdfExceptionWouldBlockException1 = h$strta("thread would block"); | |
function h$ghcjszmprimZCGHCJSziPrimzizdfExceptionWouldBlockExceptionzuzdcshow_e() | |
{ | |
return h$e(h$r1.d1); | |
}; | |
function h$$B() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$l3(a, b, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
}; | |
function h$$A() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$l3(h$c2(h$$B, b, a.d2), h$ghczmprimZCGHCziTypesziZC, h$ghcjszmprimZCGHCJSziPrimzizdfExceptionJSException1); | |
return h$ap_2_2_fast(); | |
}; | |
function h$ghcjszmprimZCGHCJSziPrimzizdfShowJSExceptionzuzdcshowsPrec_e() | |
{ | |
h$p2(h$r4, h$$A); | |
return h$e(h$r3); | |
}; | |
function h$$D() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$l3(a, b, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
}; | |
function h$$C() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$l3(h$c2(h$$D, b, a.d2), h$ghczmprimZCGHCziTypesziZC, h$ghcjszmprimZCGHCJSziPrimzizdfExceptionJSException1); | |
return h$ap_2_2_fast(); | |
}; | |
function h$ghcjszmprimZCGHCJSziPrimzizdfShowJSException1_e() | |
{ | |
h$p2(h$r3, h$$C); | |
return h$e(h$r2); | |
}; | |
function h$ghcjszmprimZCGHCJSziPrimzizdfShowJSExceptionzuzdcshowList_e() | |
{ | |
h$l4(h$r3, h$r2, h$r1.d1, h$r1.d2); | |
return h$ap_3_3_fast(); | |
}; | |
function h$$F() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a.d1; | |
var c = a.d2; | |
var d = c.d1; | |
var e = c.d2; | |
h$r1 = h$c7(h$baseZCDataziTypeableziInternalziTypeRep_con_e, b, d, e, c.d3, h$ghcjszmprimZCGHCJSziPrimzizdtcJSException, | |
h$ghczmprimZCGHCziTypesziZMZN, h$ghczmprimZCGHCziTypesziZMZN); | |
return h$rs(); | |
}; | |
function h$$E() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$p1(h$$F); | |
h$l2(h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, h$ghcjszmprimZCGHCJSziPrimzizdfExceptionJSException4, a), | |
h$baseZCGHCziFingerprintzifingerprintFingerprints); | |
return h$ap_1_1_fast(); | |
}; | |
function h$ghcjszmprimZCGHCJSziPrimzizdfExceptionJSException3_e() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$p1(h$$E); | |
h$l3(b, b, a); | |
return h$ap_2_2_fast(); | |
}; | |
function h$ghcjszmprimZCGHCJSziPrimzizdfExceptionJSException2_e() | |
{ | |
return h$e(h$r1.d1); | |
}; | |
function h$$H() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$l4(b, h$ghcjszmprimZCGHCJSziPrimzizdfExceptionJSException2, a, h$baseZCDataziTypeablezicast); | |
return h$ap_3_3_fast(); | |
}; | |
function h$$G() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a.d1; | |
h$p2(a.d2, h$$H); | |
h$l2(b, h$baseZCGHCziExceptionzizdp1Exception); | |
return h$ap_1_1_fast(); | |
}; | |
function h$ghcjszmprimZCGHCJSziPrimzizdfExceptionJSExceptionzuzdcfromException_e() | |
{ | |
h$p1(h$$G); | |
return h$e(h$r2); | |
}; | |
var h$$ghcjszmprimzm0zi1zi0zi0zmIFhsWclGfLr1HfhUvIVylAZCGHCJSziPrim_K = h$str("JavaScript exception: "); | |
function h$ghcjszmprimZCGHCJSziPrimzizdfExceptionJSException1_e() | |
{ | |
var a = h$r1.d1; | |
h$r5 = h$r3; | |
h$r4 = h$r2; | |
h$r3 = 0; | |
h$r2 = h$$ghcjszmprimzm0zi1zi0zi0zmIFhsWclGfLr1HfhUvIVylAZCGHCJSziPrim_K(); | |
h$r1 = a; | |
return h$ap_3_4_fast(); | |
}; | |
function h$$I() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$l3(a.d2, h$ghczmprimZCGHCziTypesziZC, h$ghcjszmprimZCGHCJSziPrimzizdfExceptionJSException1); | |
return h$ap_2_2_fast(); | |
}; | |
function h$ghcjszmprimZCGHCJSziPrimzizdfExceptionJSExceptionzuzdcshow_e() | |
{ | |
h$p1(h$$I); | |
return h$e(h$r2); | |
}; | |
function h$ghcjszmprimZCGHCJSziPrimziWouldBlockException_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$ghcjszmprimZCGHCJSziPrimziJSException_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$ghcjszmprimZCGHCJSziPrimziJSException_e() | |
{ | |
h$r1 = h$c2(h$ghcjszmprimZCGHCJSziPrimziJSException_con_e, h$r2, h$r3); | |
return h$rs(); | |
}; | |
function h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$ghcjszmprimZCGHCJSziPrimziJSVal_e() | |
{ | |
h$r1 = h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, h$r2); | |
return h$rs(); | |
}; | |
var h$$aC = h$strta("sigprocmask"); | |
var h$$aD = h$strta("sigaddset"); | |
var h$$aE = h$strta("sigemptyset"); | |
var h$$aF = h$strta("tcSetAttr"); | |
function h$baseZCSystemziPosixziInternalszisetEcho2_e() | |
{ | |
h$bh(); | |
var a = h$base_echo; | |
h$r1 = (a ^ (-1)); | |
return h$rs(); | |
}; | |
function h$$N() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 3)]; | |
var c = h$stack[(h$sp - 2)]; | |
var d = h$stack[(h$sp - 1)]; | |
h$sp -= 4; | |
var e = a; | |
h$base_poke_lflag(b, c, (d & e)); | |
h$r1 = h$ghczmprimZCGHCziTupleziZLZR; | |
return h$rs(); | |
}; | |
function h$$M() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 3)]; | |
var c = h$stack[(h$sp - 2)]; | |
var d = h$stack[(h$sp - 1)]; | |
h$sp -= 4; | |
var e = a; | |
h$base_poke_lflag(b, c, (d | e)); | |
h$r1 = h$ghczmprimZCGHCziTupleziZLZR; | |
return h$rs(); | |
}; | |
function h$$L() | |
{ | |
var a = h$r1; | |
h$sp -= 4; | |
if(a) | |
{ | |
h$pp8(h$$M); | |
return h$e(h$baseZCSystemziPosixziInternalszigetEcho3); | |
} | |
else | |
{ | |
h$pp8(h$$N); | |
return h$e(h$baseZCSystemziPosixziInternalszisetEcho2); | |
}; | |
}; | |
function h$$K() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
var c = a.d1; | |
var d = a.d2; | |
var e = h$base_lflag(c, d); | |
h$p4(c, d, e, h$$L); | |
return h$e(b); | |
}; | |
function h$$J() | |
{ | |
h$p2(h$r1.d1, h$$K); | |
return h$e(h$r2); | |
}; | |
function h$baseZCSystemziPosixziInternalszisetEcho1_e() | |
{ | |
h$r3 = h$c1(h$$J, h$r3); | |
h$r1 = h$r1.d1; | |
return h$ap_3_2_fast(); | |
}; | |
function h$baseZCSystemziPosixziInternalszisetCooked5_e() | |
{ | |
h$bh(); | |
var a = h$base_icanon; | |
h$r1 = (a ^ (-1)); | |
return h$rs(); | |
}; | |
function h$baseZCSystemziPosixziInternalszisetCooked4_e() | |
{ | |
h$bh(); | |
h$r1 = h$base_vmin; | |
return h$rs(); | |
}; | |
function h$baseZCSystemziPosixziInternalszisetCooked3_e() | |
{ | |
h$bh(); | |
h$r1 = h$base_vtime; | |
return h$rs(); | |
}; | |
function h$baseZCSystemziPosixziInternalszisetCooked2_e() | |
{ | |
h$bh(); | |
h$r1 = h$base_icanon; | |
return h$rs(); | |
}; | |
function h$$U() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 2)]; | |
var c = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
var d = a; | |
var e; | |
var f; | |
e = b; | |
f = (c + d); | |
e.u8[(f + 0)] = 0; | |
h$r1 = h$ghczmprimZCGHCziTupleziZLZR; | |
return h$rs(); | |
}; | |
function h$$T() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 2)]; | |
var c = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
var d = a; | |
var e; | |
var f; | |
e = b; | |
f = (c + d); | |
e.u8[(f + 0)] = 1; | |
h$pp4(h$$U); | |
return h$e(h$baseZCSystemziPosixziInternalszisetCooked3); | |
}; | |
function h$$S() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 3)]; | |
var c = h$stack[(h$sp - 2)]; | |
var d = h$stack[(h$sp - 1)]; | |
h$sp -= 4; | |
var e = a; | |
h$base_poke_lflag(b, c, (d & e)); | |
var f = h$base_ptr_c_cc(b, c); | |
h$p3(f, h$ret_1, h$$T); | |
return h$e(h$baseZCSystemziPosixziInternalszisetCooked4); | |
}; | |
function h$$R() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 3)]; | |
var c = h$stack[(h$sp - 2)]; | |
var d = h$stack[(h$sp - 1)]; | |
h$sp -= 4; | |
var e = a; | |
h$base_poke_lflag(b, c, (d | e)); | |
h$r1 = h$ghczmprimZCGHCziTupleziZLZR; | |
return h$rs(); | |
}; | |
function h$$Q() | |
{ | |
var a = h$r1; | |
h$sp -= 4; | |
if(a) | |
{ | |
h$pp8(h$$R); | |
return h$e(h$baseZCSystemziPosixziInternalszisetCooked2); | |
} | |
else | |
{ | |
h$pp8(h$$S); | |
return h$e(h$baseZCSystemziPosixziInternalszisetCooked5); | |
}; | |
}; | |
function h$$P() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
var c = a.d1; | |
var d = a.d2; | |
var e = h$base_lflag(c, d); | |
h$p4(c, d, e, h$$Q); | |
return h$e(b); | |
}; | |
function h$$O() | |
{ | |
h$p2(h$r1.d1, h$$P); | |
return h$e(h$r2); | |
}; | |
function h$baseZCSystemziPosixziInternalszisetCooked1_e() | |
{ | |
h$r3 = h$c1(h$$O, h$r3); | |
h$r1 = h$r1.d1; | |
return h$ap_3_2_fast(); | |
}; | |
function h$$ao() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 2)]; | |
var c = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
var d = h$base_tcgetattr(a, b, c); | |
h$r1 = d; | |
return h$rs(); | |
}; | |
function h$$an() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = b.d1; | |
h$p3(c, b.d2, h$$ao); | |
return h$e(a); | |
}; | |
function h$$am() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = b.d1; | |
var d = h$base_tcsetattr(b.d2, h$base_tcsanow, a, c); | |
h$r1 = d; | |
return h$rs(); | |
}; | |
function h$$al() | |
{ | |
var a = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$r1 = a; | |
return h$rs(); | |
}; | |
function h$$ak() | |
{ | |
var a = h$stack[(h$sp - 3)]; | |
var b = h$stack[(h$sp - 2)]; | |
var c = h$stack[(h$sp - 1)]; | |
h$sp -= 4; | |
var d = h$base_sigprocmask(h$base_sig_setmask, a, b, null, 0); | |
var e = d; | |
if((e === (-1))) | |
{ | |
h$p2(c, h$$al); | |
h$l2(h$$aC, h$baseZCForeignziCziErrorzithrowErrno1); | |
return h$ap_2_1_fast(); | |
} | |
else | |
{ | |
h$r1 = c; | |
}; | |
return h$rs(); | |
}; | |
function h$$aj() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 4)]; | |
var c = h$stack[(h$sp - 3)]; | |
var d = h$stack[(h$sp - 2)]; | |
var e = h$stack[(h$sp - 1)]; | |
h$sp -= 6; | |
h$pp14(e, a, h$$ak); | |
h$l4(h$c3(h$$am, b, c, d), h$$aF, h$baseZCSystemziPosixziInternalszifdFileSizzezupred, | |
h$baseZCForeignziCziErrorzithrowErrnoIfMinus1Retry2); | |
return h$ap_4_3_fast(); | |
}; | |
function h$$ai() | |
{ | |
var a = h$stack[(h$sp - 9)]; | |
var b = h$stack[(h$sp - 8)]; | |
var c = h$stack[(h$sp - 7)]; | |
var d = h$stack[(h$sp - 2)]; | |
var e = h$stack[(h$sp - 1)]; | |
h$sp -= 10; | |
h$pp49(d, e, h$$aj); | |
h$l2(h$c2(h$baseZCGHCziPtrziPtr_con_e, b, c), a); | |
return h$ap_2_1_fast(); | |
}; | |
function h$$ah() | |
{ | |
--h$sp; | |
h$sp -= 9; | |
h$sp += 9; | |
++h$sp; | |
return h$$ai; | |
}; | |
function h$$ag() | |
{ | |
var a = h$stack[(h$sp - 3)]; | |
var b = h$stack[(h$sp - 2)]; | |
var c = h$stack[(h$sp - 1)]; | |
h$sp -= 8; | |
var d; | |
var e; | |
d = a; | |
e = 0; | |
var f = h$base_sigprocmask(h$base_sig_block, b, c, a, 0); | |
var g = f; | |
if((g === (-1))) | |
{ | |
h$sp += 9; | |
h$stack[(h$sp - 1)] = d; | |
h$stack[h$sp] = e; | |
h$p1(h$$ah); | |
h$l2(h$$aC, h$baseZCForeignziCziErrorzithrowErrno1); | |
return h$ap_2_1_fast(); | |
} | |
else | |
{ | |
h$sp += 9; | |
h$stack[(h$sp - 1)] = d; | |
h$stack[h$sp] = e; | |
++h$sp; | |
return h$$ai; | |
}; | |
}; | |
function h$$af() | |
{ | |
--h$sp; | |
h$sp -= 7; | |
h$sp += 7; | |
++h$sp; | |
return h$$ag; | |
}; | |
function h$$ae() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = b.d1; | |
var d = b.d2; | |
var e = b.d3; | |
var f = b.d4; | |
var g = b.d5; | |
var h = b.d6; | |
var i = h$base_sigaddset(g, h, h$base_sigttou); | |
var j = i; | |
if((j === (-1))) | |
{ | |
h$p7(a, c, d, e, f, g, h); | |
h$p1(h$$af); | |
h$l2(h$$aD, h$baseZCForeignziCziErrorzithrowErrno1); | |
return h$ap_2_1_fast(); | |
} | |
else | |
{ | |
h$p7(a, c, d, e, f, g, h); | |
++h$sp; | |
return h$$ag; | |
}; | |
}; | |
function h$$ad() | |
{ | |
var a = h$r1; | |
h$sp -= 3; | |
h$r1 = a; | |
return h$rs(); | |
}; | |
function h$$ac() | |
{ | |
var a = h$r1; | |
h$sp -= 3; | |
h$r1 = a; | |
return h$rs(); | |
}; | |
function h$$ab() | |
{ | |
var a = h$stack[(h$sp - 1)]; | |
h$sp -= 4; | |
h$pp4(h$$ac); | |
h$r1 = a; | |
return h$ap_1_0_fast(); | |
}; | |
function h$$aa() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = b.d1; | |
var d = b.d2; | |
var e = b.d3; | |
var f = h$newByteArray(h$base_sizeof_sigset_t); | |
var g = h$newByteArray(h$base_sizeof_sigset_t); | |
var h; | |
var i; | |
h = f; | |
i = 0; | |
var j = h$base_sigemptyset(f, 0); | |
var k = h$c7(h$$ae, a, c, d, e, g, h, i); | |
var l = j; | |
if((l === (-1))) | |
{ | |
h$p4(f, g, k, h$$ab); | |
h$l2(h$$aE, h$baseZCForeignziCziErrorzithrowErrno1); | |
return h$ap_2_1_fast(); | |
} | |
else | |
{ | |
h$p3(f, g, h$$ad); | |
h$r1 = k; | |
return h$ap_1_0_fast(); | |
}; | |
}; | |
function h$$Z() | |
{ | |
var a = h$r1; | |
h$sp -= 2; | |
h$r1 = a; | |
return h$rs(); | |
}; | |
function h$$Y() | |
{ | |
var a = h$r1; | |
h$sp -= 2; | |
h$r1 = a; | |
return h$rs(); | |
}; | |
function h$$X() | |
{ | |
var a = h$r1; | |
h$sp -= 2; | |
h$r1 = a; | |
return h$rs(); | |
}; | |
function h$$W() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 5)]; | |
var c = h$stack[(h$sp - 4)]; | |
var d = h$stack[(h$sp - 3)]; | |
var e = h$stack[(h$sp - 2)]; | |
var f = h$stack[(h$sp - 1)]; | |
h$sp -= 6; | |
var g = a; | |
var h = h$c4(h$$aa, c, f, b, a); | |
if((g <= 2)) | |
{ | |
var i = h$__hscore_get_saved_termios(g); | |
var j = i; | |
var k = h$ret1; | |
if(((j === null) && (k === 0))) | |
{ | |
var l = h$malloc(d); | |
var m = l; | |
var n = h$ret1; | |
if(((m === null) && (n === 0))) | |
{ | |
return h$throw(h$baseZCForeignziMarshalziAlloczimallocBytes2, false); | |
} | |
else | |
{ | |
var o = h$memcpy(m, n, f, b, d); | |
h$__hscore_set_saved_termios(g, m, n); | |
h$p2(e, h$$X); | |
h$r1 = h; | |
return h$ap_1_0_fast(); | |
}; | |
} | |
else | |
{ | |
h$p2(e, h$$Y); | |
h$r1 = h; | |
return h$ap_1_0_fast(); | |
}; | |
} | |
else | |
{ | |
h$p2(e, h$$Z); | |
h$r1 = h; | |
return h$ap_1_0_fast(); | |
}; | |
}; | |
function h$$V() | |
{ | |
var a = h$stack[(h$sp - 6)]; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 7; | |
h$pp33(b, h$$W); | |
return h$e(a); | |
}; | |
function h$baseZCSystemziPosixziInternalszigetEcho4_e() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = h$newByteArray(h$base_sizeof_termios); | |
h$p7(h$r2, h$r3, h$base_sizeof_termios, c, c, 0, h$$V); | |
h$l4(h$c3(h$$an, h$r2, c, 0), a, b.d1, b.d2); | |
return h$ap_4_3_fast(); | |
}; | |
function h$baseZCSystemziPosixziInternalszigetEcho3_e() | |
{ | |
h$bh(); | |
h$r1 = h$base_echo; | |
return h$rs(); | |
}; | |
function h$$ar() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
var c = a; | |
var d = (b & c); | |
if((d === 0)) | |
{ | |
h$r1 = false; | |
} | |
else | |
{ | |
h$r1 = true; | |
}; | |
return h$rs(); | |
}; | |
function h$$aq() | |
{ | |
var a = h$r1.d1; | |
h$bh(); | |
h$p2(a, h$$ar); | |
return h$e(h$baseZCSystemziPosixziInternalszigetEcho3); | |
}; | |
function h$$ap() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a.d1; | |
var c = h$base_lflag(b, a.d2); | |
h$r1 = h$c1(h$$aq, c); | |
return h$rs(); | |
}; | |
function h$baseZCSystemziPosixziInternalszigetEcho2_e() | |
{ | |
h$p1(h$$ap); | |
return h$e(h$r2); | |
}; | |
var h$baseZCSystemziPosixziInternalsziioezuunknownfiletype2 = h$strta("fdType"); | |
var h$baseZCSystemziPosixziInternalsziioezuunknownfiletype1 = h$strta("unknown file type"); | |
function h$baseZCSystemziPosixziInternalszifileType2_e() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$l2(a, b); | |
return h$ap_1_1_fast(); | |
}; | |
function h$$av() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$r1 = a; | |
return h$rs(); | |
}; | |
function h$$au() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 2)]; | |
var c = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
var d = a; | |
h$p1(h$$av); | |
try | |
{ | |
var e; | |
var f = { mv: null | |
}; | |
e = h$mkForeignCallback(f); | |
h$base_fstat(d, b, c, e); | |
if((f.mv === null)) | |
{ | |
f.mv = new h$MVar(); | |
++h$sp; | |
h$stack[h$sp] = h$unboxFFIResult; | |
return h$takeMVar(f.mv); | |
} | |
else | |
{ | |
var g = f.mv; | |
h$r1 = g[0]; | |
}; | |
} | |
catch(h$SystemziPosixziInternals_id_109_0) | |
{ | |
return h$throwJSException(h$SystemziPosixziInternals_id_109_0); | |
}; | |
return h$rs(); | |
}; | |
function h$$at() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = b.d1; | |
h$p3(c, b.d2, h$$au); | |
return h$e(a); | |
}; | |
function h$$as() | |
{ | |
var a = h$stack[(h$sp - 2)]; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 4; | |
var c = h$base_st_mode(a, b); | |
var d = c; | |
var e = (d & 65535); | |
var f = h$base_c_s_isdir(e); | |
var g = f; | |
if((g === 0)) | |
{ | |
var h = h$base_c_s_isfifo(e); | |
var i = h; | |
if((i === 0)) | |
{ | |
var j = h$base_c_s_issock(e); | |
var k = j; | |
if((k === 0)) | |
{ | |
var l = h$base_c_s_ischr(e); | |
var m = l; | |
if((m === 0)) | |
{ | |
var n = h$base_c_s_isreg(e); | |
var o = n; | |
if((o === 0)) | |
{ | |
var p = h$base_c_s_isblk(e); | |
var q = p; | |
if((q === 0)) | |
{ | |
return h$throw(h$baseZCSystemziPosixziInternalszifileType2, false); | |
} | |
else | |
{ | |
var r = h$base_st_dev(a, b); | |
var s = r; | |
var t = h$base_st_ino(a, b); | |
h$r1 = h$c3(h$ghczmprimZCGHCziTupleziZLz2cUz2cUZR_con_e, h$baseZCGHCziIOziDeviceziRawDevice, s, | |
h$c2(h$baseZCGHCziWordziW64zh_con_e, t, h$ret1)); | |
}; | |
} | |
else | |
{ | |
var u = h$base_st_dev(a, b); | |
var v = u; | |
var w = h$base_st_ino(a, b); | |
h$r1 = h$c3(h$ghczmprimZCGHCziTupleziZLz2cUz2cUZR_con_e, h$baseZCGHCziIOziDeviceziRegularFile, v, | |
h$c2(h$baseZCGHCziWordziW64zh_con_e, w, h$ret1)); | |
}; | |
} | |
else | |
{ | |
var x = h$base_st_dev(a, b); | |
var y = x; | |
var z = h$base_st_ino(a, b); | |
h$r1 = h$c3(h$ghczmprimZCGHCziTupleziZLz2cUz2cUZR_con_e, h$baseZCGHCziIOziDeviceziStream, y, | |
h$c2(h$baseZCGHCziWordziW64zh_con_e, z, h$ret1)); | |
}; | |
} | |
else | |
{ | |
var A = h$base_st_dev(a, b); | |
var B = A; | |
var C = h$base_st_ino(a, b); | |
h$r1 = h$c3(h$ghczmprimZCGHCziTupleziZLz2cUz2cUZR_con_e, h$baseZCGHCziIOziDeviceziStream, B, | |
h$c2(h$baseZCGHCziWordziW64zh_con_e, C, h$ret1)); | |
}; | |
} | |
else | |
{ | |
var D = h$base_st_dev(a, b); | |
var E = D; | |
var F = h$base_st_ino(a, b); | |
h$r1 = h$c3(h$ghczmprimZCGHCziTupleziZLz2cUz2cUZR_con_e, h$baseZCGHCziIOziDeviceziStream, E, | |
h$c2(h$baseZCGHCziWordziW64zh_con_e, F, h$ret1)); | |
}; | |
} | |
else | |
{ | |
var G = h$base_st_dev(a, b); | |
var H = G; | |
var I = h$base_st_ino(a, b); | |
h$r1 = h$c3(h$ghczmprimZCGHCziTupleziZLz2cUz2cUZR_con_e, h$baseZCGHCziIOziDeviceziDirectory, H, | |
h$c2(h$baseZCGHCziWordziW64zh_con_e, I, h$ret1)); | |
}; | |
return h$rs(); | |
}; | |
function h$baseZCSystemziPosixziInternalszifdStat1_e() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = h$newByteArray(h$base_sizeof_stat); | |
h$p4(c, c, 0, h$$as); | |
h$l4(h$c3(h$$at, h$r2, c, 0), a, b.d1, b.d2); | |
return h$ap_4_3_fast(); | |
}; | |
function h$$aw() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a; | |
if((b === (-1))) | |
{ | |
h$r1 = true; | |
} | |
else | |
{ | |
h$r1 = false; | |
}; | |
return h$rs(); | |
}; | |
function h$baseZCSystemziPosixziInternalszifdFileSizzezupred_e() | |
{ | |
h$p1(h$$aw); | |
return h$e(h$r2); | |
}; | |
var h$baseZCSystemziPosixziInternalszifdFileSizzezuloc = h$strta("fileSize"); | |
function h$$aB() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$r1 = a; | |
return h$rs(); | |
}; | |
function h$$aA() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 2)]; | |
var c = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
var d = a; | |
h$p1(h$$aB); | |
try | |
{ | |
var e; | |
var f = { mv: null | |
}; | |
e = h$mkForeignCallback(f); | |
h$base_fstat(d, b, c, e); | |
if((f.mv === null)) | |
{ | |
f.mv = new h$MVar(); | |
++h$sp; | |
h$stack[h$sp] = h$unboxFFIResult; | |
return h$takeMVar(f.mv); | |
} | |
else | |
{ | |
var g = f.mv; | |
h$r1 = g[0]; | |
}; | |
} | |
catch(h$SystemziPosixziInternals_id_116_0) | |
{ | |
return h$throwJSException(h$SystemziPosixziInternals_id_116_0); | |
}; | |
return h$rs(); | |
}; | |
function h$$az() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = b.d1; | |
h$p3(c, b.d2, h$$aA); | |
return h$e(a); | |
}; | |
function h$$ay() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$l3(b, a, h$integerzmgmpZCGHCziIntegerziTypeziint64ToInteger); | |
return h$ap_1_2_fast(); | |
}; | |
function h$$ax() | |
{ | |
var a = h$stack[(h$sp - 2)]; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 4; | |
var c = h$base_st_mode(a, b); | |
var d = c; | |
var e = h$base_c_s_isreg((d & 65535)); | |
var f = e; | |
if((f === 0)) | |
{ | |
h$r1 = h$baseZCSystemziPosixziInternalszifdFileSizze2; | |
} | |
else | |
{ | |
var g = h$base_st_size(a, b); | |
h$r1 = h$c2(h$$ay, g, h$ret1); | |
}; | |
return h$rs(); | |
}; | |
function h$baseZCSystemziPosixziInternalszifdFileSizze1_e() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = h$newByteArray(h$base_sizeof_stat); | |
h$p4(c, c, 0, h$$ax); | |
h$l4(h$c3(h$$az, h$r2, c, 0), a, b.d1, b.d2); | |
return h$ap_4_3_fast(); | |
}; | |
function h$baseZCGHCziWordzizdwzdcshiftL_e() | |
{ | |
var a = h$r2; | |
var b = h$r3; | |
var c = h$r4; | |
if((c >= 64)) | |
{ | |
var d = h$hs_wordToWord64(0); | |
h$r1 = d; | |
h$r2 = h$ret1; | |
} | |
else | |
{ | |
var e = h$hs_uncheckedShiftL64(a, b, c); | |
h$r1 = e; | |
h$r2 = h$ret1; | |
}; | |
return h$rs(); | |
}; | |
function h$baseZCGHCziWordzizdwzdcshiftR_e() | |
{ | |
var a = h$r2; | |
var b = h$r3; | |
var c = h$r4; | |
if((c >= 64)) | |
{ | |
var d = h$hs_wordToWord64(0); | |
h$r1 = d; | |
h$r2 = h$ret1; | |
} | |
else | |
{ | |
var e = h$hs_uncheckedShiftRL64(a, b, c); | |
h$r1 = e; | |
h$r2 = h$ret1; | |
}; | |
return h$rs(); | |
}; | |
function h$baseZCGHCziWordziW64zh_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$baseZCGHCziWordziW64zh_e() | |
{ | |
h$r1 = h$c2(h$baseZCGHCziWordziW64zh_con_e, h$r2, h$r3); | |
return h$rs(); | |
}; | |
function h$baseZCGHCziWordziW32zh_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$baseZCGHCziWordziW32zh_e() | |
{ | |
h$r1 = h$r2; | |
return h$rs(); | |
}; | |
function h$$aG() | |
{ | |
h$l3(h$r1.d1, h$$bP, h$$bJ); | |
return h$ap_3_2_fast(); | |
}; | |
function h$baseZCGHCziTopHandlerzirunIO2_e() | |
{ | |
var a = h$r2; | |
return h$catch(h$c1(h$$aG, a), h$r1.d1); | |
}; | |
function h$$bz() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 3)]; | |
var c = h$stack[(h$sp - 2)]; | |
var d = h$stack[(h$sp - 1)]; | |
h$sp -= 4; | |
var e = a.d1; | |
h$errorBelch2(c, d, e, a.d2); | |
h$l2(h$$bO, b); | |
return h$ap_2_1_fast(); | |
}; | |
function h$$by() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
var c = a.d1; | |
h$pp14(c, a.d2, h$$bz); | |
return h$e(b); | |
}; | |
function h$$bx() | |
{ | |
h$p3(h$r1.d1, h$r2, h$$by); | |
return h$e(h$r1.d2); | |
}; | |
function h$$bw() | |
{ | |
h$l3(h$c2(h$$bx, h$r1.d1, h$r2), h$$bM, h$baseZCForeignziCziStringziwithCAString1); | |
return h$ap_3_2_fast(); | |
}; | |
function h$$bv() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 6)]; | |
var c = h$stack[(h$sp - 5)]; | |
var d = h$stack[(h$sp - 4)]; | |
var e = h$stack[(h$sp - 3)]; | |
var f = h$stack[(h$sp - 2)]; | |
var g = h$stack[(h$sp - 1)]; | |
h$sp -= 7; | |
var h = a.d1; | |
var i = a.d2; | |
var j = i.d1; | |
var k = i.d2; | |
if(h$hs_eqWord64(d, e, h, j)) | |
{ | |
if(h$hs_eqWord64(f, g, k, i.d3)) | |
{ | |
h$l3(h$c1(h$$bw, b), h$$bL, h$baseZCForeignziCziStringziwithCAString1); | |
return h$ap_3_2_fast(); | |
} | |
else | |
{ | |
return h$throw(c, false); | |
}; | |
} | |
else | |
{ | |
return h$throw(c, false); | |
}; | |
}; | |
function h$$bu() | |
{ | |
var a = h$r1; | |
h$sp -= 3; | |
var b = a.d1; | |
var c = a.d2; | |
var d = c.d1; | |
var e = c.d2; | |
h$pp124(b, d, e, c.d3, h$$bv); | |
return h$e(h$baseZCGHCziIOziExceptionzizdfExceptionIOException4); | |
}; | |
function h$$bt() | |
{ | |
var a = h$r1; | |
h$sp -= 2; | |
h$pp6(a, h$$bu); | |
h$l2(a.d1, h$baseZCGHCziExceptionzizdp1Exception); | |
return h$ap_2_1_fast(); | |
}; | |
function h$$bs() | |
{ | |
h$p2(h$r1.d1, h$$bt); | |
return h$e(h$r2); | |
}; | |
function h$$br() | |
{ | |
var a = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$l2(h$$bO, a); | |
return h$ap_2_1_fast(); | |
}; | |
function h$$bq() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
var c = a.d1; | |
h$pp2(h$$br); | |
h$l2(b, c.val); | |
return h$ap_2_1_fast(); | |
}; | |
function h$$bp() | |
{ | |
var a = h$r1.d1; | |
h$p3(a, h$r1.d2, h$$bq); | |
return h$e(h$baseZCGHCziConcziSyncziuncaughtExceptionHandler); | |
}; | |
function h$$bo() | |
{ | |
var a = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$l2(h$$bO, a); | |
return h$ap_2_1_fast(); | |
}; | |
function h$$bn() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
var c = a.d1; | |
h$pp2(h$$bo); | |
h$l2(b, c.val); | |
return h$ap_2_1_fast(); | |
}; | |
function h$$bm() | |
{ | |
var a = h$r1.d1; | |
h$p3(a, h$r1.d2, h$$bn); | |
return h$e(h$baseZCGHCziConcziSyncziuncaughtExceptionHandler); | |
}; | |
function h$$bl() | |
{ | |
var a = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$l2(h$$bO, a); | |
return h$ap_2_1_fast(); | |
}; | |
function h$$bk() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
var c = a.d1; | |
h$pp2(h$$bl); | |
h$l2(b, c.val); | |
return h$ap_2_1_fast(); | |
}; | |
function h$$bj() | |
{ | |
var a = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$l2(h$$bO, a); | |
return h$ap_2_1_fast(); | |
}; | |
function h$$bi() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
var c = a.d1; | |
h$pp2(h$$bj); | |
h$l2(b, c.val); | |
return h$ap_2_1_fast(); | |
}; | |
function h$$bh() | |
{ | |
var a = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$l2(h$$bO, a); | |
return h$ap_2_1_fast(); | |
}; | |
function h$$bg() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
var c = a.d1; | |
h$pp2(h$$bh); | |
h$l2(b, c.val); | |
return h$ap_2_1_fast(); | |
}; | |
function h$$bf() | |
{ | |
var a = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$l2(h$$bO, a); | |
return h$ap_2_1_fast(); | |
}; | |
function h$$be() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
var c = a.d1; | |
h$pp2(h$$bf); | |
h$l2(b, c.val); | |
return h$ap_2_1_fast(); | |
}; | |
function h$$bd() | |
{ | |
var a = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$l2(h$$bO, a); | |
return h$ap_2_1_fast(); | |
}; | |
function h$$bc() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
var c = a.d1; | |
h$pp2(h$$bd); | |
h$l2(b, c.val); | |
return h$ap_2_1_fast(); | |
}; | |
function h$$bb() | |
{ | |
var a = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$l2(h$$bO, a); | |
return h$ap_2_1_fast(); | |
}; | |
function h$$ba() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
var c = a.d1; | |
h$pp2(h$$bb); | |
h$l2(b, c.val); | |
return h$ap_2_1_fast(); | |
}; | |
function h$$a9() | |
{ | |
var a = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$l2(h$$bO, a); | |
return h$ap_2_1_fast(); | |
}; | |
function h$$a8() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
var c = a.d1; | |
h$pp2(h$$a9); | |
h$l2(b, c.val); | |
return h$ap_2_1_fast(); | |
}; | |
function h$$a7() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 3)]; | |
var c = h$stack[(h$sp - 1)]; | |
h$sp -= 4; | |
if((a.f.a === 1)) | |
{ | |
var d = a.d2; | |
if((c === d)) | |
{ | |
h$l2(h$$bN, b); | |
return h$ap_2_1_fast(); | |
} | |
else | |
{ | |
h$pp4(h$$ba); | |
return h$e(h$baseZCGHCziConcziSyncziuncaughtExceptionHandler); | |
}; | |
} | |
else | |
{ | |
h$pp4(h$$a8); | |
return h$e(h$baseZCGHCziConcziSyncziuncaughtExceptionHandler); | |
}; | |
}; | |
function h$$a6() | |
{ | |
var a = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$l2(h$$bO, a); | |
return h$ap_2_1_fast(); | |
}; | |
function h$$a5() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
var c = a.d1; | |
h$pp2(h$$a6); | |
h$l2(b, c.val); | |
return h$ap_2_1_fast(); | |
}; | |
function h$$a4() | |
{ | |
var a = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$l2(h$$bO, a); | |
return h$ap_2_1_fast(); | |
}; | |
function h$$a3() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
var c = a.d1; | |
h$pp2(h$$a4); | |
h$l2(b, c.val); | |
return h$ap_2_1_fast(); | |
}; | |
function h$$a2() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 3)]; | |
var c = h$stack[(h$sp - 1)]; | |
h$sp -= 4; | |
if((a.f.a === 1)) | |
{ | |
h$pp4(h$$a5); | |
return h$e(h$baseZCGHCziConcziSyncziuncaughtExceptionHandler); | |
} | |
else | |
{ | |
var d = a.d2; | |
var e = d.d1; | |
if((c === e)) | |
{ | |
h$l2(h$$bN, b); | |
return h$ap_2_1_fast(); | |
} | |
else | |
{ | |
h$pp4(h$$a3); | |
return h$e(h$baseZCGHCziConcziSyncziuncaughtExceptionHandler); | |
}; | |
}; | |
}; | |
function h$$a1() | |
{ | |
var a = h$r1; | |
h$sp -= 3; | |
if((a.f.a === 1)) | |
{ | |
h$pp12(a.d2, h$$a7); | |
return h$e(h$baseZCGHCziIOziHandleziFDzistdout); | |
} | |
else | |
{ | |
var b = a.d2; | |
h$pp12(b.d1, h$$a2); | |
return h$e(h$baseZCGHCziIOziHandleziFDzistdout); | |
}; | |
}; | |
function h$$a0() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 4; | |
switch (a) | |
{ | |
case ((-1)): | |
h$pp4(h$$bc); | |
return h$e(h$baseZCGHCziConcziSyncziuncaughtExceptionHandler); | |
case (32): | |
h$pp4(h$$a1); | |
return h$e(b); | |
default: | |
h$pp4(h$$be); | |
return h$e(h$baseZCGHCziConcziSyncziuncaughtExceptionHandler); | |
}; | |
}; | |
function h$$aZ() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 4; | |
if((a.f.a === 1)) | |
{ | |
h$pp4(h$$bg); | |
return h$e(h$baseZCGHCziConcziSyncziuncaughtExceptionHandler); | |
} | |
else | |
{ | |
h$pp12(a.d1, h$$a0); | |
return h$e(b); | |
}; | |
}; | |
function h$$aY() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 4; | |
if((a.f.a === 1)) | |
{ | |
h$pp4(h$$bi); | |
return h$e(h$baseZCGHCziConcziSyncziuncaughtExceptionHandler); | |
} | |
else | |
{ | |
h$pp12(a.d1, h$$aZ); | |
return h$e(b); | |
}; | |
}; | |
function h$$aX() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 5; | |
if((a.f.a === 18)) | |
{ | |
h$pp8(h$$aY); | |
return h$e(b); | |
} | |
else | |
{ | |
h$pp4(h$$bk); | |
return h$e(h$baseZCGHCziConcziSyncziuncaughtExceptionHandler); | |
}; | |
}; | |
function h$$aW() | |
{ | |
var a = h$r1; | |
h$sp -= 3; | |
var b = a.d1; | |
var c = a.d2; | |
var d = c.d1; | |
h$pp28(b, c.d4, h$$aX); | |
return h$e(d); | |
}; | |
function h$$aV() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$p3(a, b.d1, h$$aW); | |
h$r1 = b.d2; | |
return h$ap_0_0_fast(); | |
}; | |
function h$$aU() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 7)]; | |
var c = h$stack[(h$sp - 6)]; | |
var d = h$stack[(h$sp - 5)]; | |
var e = h$stack[(h$sp - 4)]; | |
var f = h$stack[(h$sp - 3)]; | |
var g = h$stack[(h$sp - 2)]; | |
var h = h$stack[(h$sp - 1)]; | |
h$sp -= 8; | |
var i = a.d1; | |
var j = a.d2; | |
var k = j.d1; | |
var l = j.d2; | |
if(h$hs_eqWord64(e, f, i, k)) | |
{ | |
if(h$hs_eqWord64(g, h, l, j.d3)) | |
{ | |
h$r1 = h$c3(h$$aV, b, c, d); | |
} | |
else | |
{ | |
h$r1 = h$c2(h$$bm, b, c); | |
}; | |
} | |
else | |
{ | |
h$r1 = h$c2(h$$bp, b, c); | |
}; | |
return h$rs(); | |
}; | |
function h$$aT() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = b.d1; | |
var d = b.d2; | |
var e = b.d3; | |
var f = b.d4; | |
var g = b.d5; | |
h$bh(); | |
h$p8(a, c, d, e, f, g, b.d6, h$$aU); | |
return h$e(h$baseZCGHCziIOziExceptionzizdfExceptionIOException4); | |
}; | |
function h$$aS() | |
{ | |
var a = h$stack[(h$sp - 7)]; | |
var b = h$stack[(h$sp - 6)]; | |
var c = h$stack[(h$sp - 5)]; | |
var d = h$stack[(h$sp - 4)]; | |
var e = h$stack[(h$sp - 3)]; | |
var f = h$stack[(h$sp - 2)]; | |
var g = h$stack[(h$sp - 1)]; | |
h$sp -= 8; | |
return h$catch(h$c7(h$$aT, a, b, c, d, e, f, g), h$c1(h$$bs, a)); | |
}; | |
function h$$aR() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
if((a.f.a === 1)) | |
{ | |
h$l2(h$$bN, b); | |
return h$ap_2_1_fast(); | |
} | |
else | |
{ | |
h$l2(a.d1, b); | |
return h$ap_2_1_fast(); | |
}; | |
}; | |
function h$$aQ() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 5)]; | |
var c = h$stack[(h$sp - 4)]; | |
var d = h$stack[(h$sp - 3)]; | |
var e = h$stack[(h$sp - 2)]; | |
var f = h$stack[(h$sp - 1)]; | |
h$sp -= 8; | |
var g = a.d1; | |
var h = a.d2; | |
var i = h.d1; | |
var j = h.d2; | |
if(h$hs_eqWord64(c, d, g, i)) | |
{ | |
if(h$hs_eqWord64(e, f, j, h.d3)) | |
{ | |
h$pp2(h$$aR); | |
h$r1 = b; | |
return h$ap_0_0_fast(); | |
} | |
else | |
{ | |
h$sp += 7; | |
++h$sp; | |
return h$$aS; | |
}; | |
} | |
else | |
{ | |
h$sp += 7; | |
++h$sp; | |
return h$$aS; | |
}; | |
}; | |
function h$$aP() | |
{ | |
var a = h$r1; | |
h$sp -= 4; | |
var b = a.d1; | |
var c = a.d2; | |
var d = c.d1; | |
var e = c.d2; | |
h$pp248(b, d, e, c.d3, h$$aQ); | |
return h$e(h$baseZCGHCziIOziExceptionzizdfExceptionExitCode4); | |
}; | |
function h$$aO() | |
{ | |
var a = h$r1; | |
h$sp -= 2; | |
var b = a.d1; | |
h$pp14(a, a.d2, h$$aP); | |
h$l2(b, h$baseZCGHCziExceptionzizdp1Exception); | |
return h$ap_2_1_fast(); | |
}; | |
function h$$aN() | |
{ | |
var a = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
h$pp2(h$$aO); | |
return h$e(a); | |
}; | |
function h$$aM() | |
{ | |
--h$sp; | |
h$r1 = h$$bR; | |
return h$ap_1_0_fast(); | |
}; | |
function h$$aL() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
switch (a.f.a) | |
{ | |
case (1): | |
h$stackOverflow(h$currentThread); | |
h$l2(h$$bK, b); | |
return h$ap_2_1_fast(); | |
case (4): | |
h$p1(h$$aM); | |
h$shutdownHaskellAndExit(252, 0); | |
break; | |
default: | |
h$sp += 2; | |
++h$sp; | |
return h$$aN; | |
}; | |
return h$rs(); | |
}; | |
function h$$aK() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$sp -= 2; | |
if((a.f.a === 1)) | |
{ | |
h$sp += 2; | |
++h$sp; | |
return h$$aN; | |
} | |
else | |
{ | |
var b = a.d1; | |
h$sp += 2; | |
h$p1(h$$aL); | |
return h$e(b); | |
}; | |
}; | |
function h$$aJ() | |
{ | |
var a = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
h$sp += 2; | |
h$p1(h$$aK); | |
h$l2(a, h$baseZCGHCziIOziExceptionzizdfExceptionAsyncExceptionzuzdcfromException); | |
return h$ap_1_1_fast(); | |
}; | |
function h$$aI() | |
{ | |
h$sp -= 3; | |
h$pp4(h$$aJ); | |
return h$catch(h$baseZCGHCziTopHandlerziflushStdHandles2, h$$bQ); | |
}; | |
function h$$aH() | |
{ | |
var a = h$r1.d1; | |
h$p3(h$r2, h$r3, h$$aI); | |
return h$catch(a, h$r1.d2); | |
}; | |
var h$$bL = h$strta("%s"); | |
var h$$bM = h$strta("encountered an exception while trying to report an exception.One possible reason for this is that we failed while trying to encode an error message. Check that your locale is configured properly."); | |
function h$$bC() | |
{ | |
--h$sp; | |
h$r1 = h$$bR; | |
return h$ap_1_0_fast(); | |
}; | |
function h$$bB() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$p1(h$$bC); | |
h$shutdownHaskellAndExit(a, 0); | |
return h$rs(); | |
}; | |
function h$$bA() | |
{ | |
h$p1(h$$bB); | |
return h$e(h$r2); | |
}; | |
function h$$bE() | |
{ | |
--h$sp; | |
h$r1 = h$ghczmprimZCGHCziTupleziZLZR; | |
return h$rs(); | |
}; | |
function h$$bD() | |
{ | |
h$p1(h$$bE); | |
return h$e(h$r2); | |
}; | |
function h$$bF() | |
{ | |
return h$throw(h$r1.d1, false); | |
}; | |
function h$$bG() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$l3(a, b.d1, b.d2); | |
return h$ap_2_2_fast(); | |
}; | |
function h$$bH() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$l2(a, b); | |
return h$ap_1_1_fast(); | |
}; | |
var h$$bU = h$strta("If you can read this, shutdownHaskellAndExit did not exit."); | |
function h$$bI() | |
{ | |
var a = h$r1.d1; | |
var b = h$makeWeakNoFinalizer(h$currentThread, h$c1(h$baseZCGHCziConcziSyncziThreadId_con_e, h$currentThread)); | |
h$r1 = a; | |
return h$ap_1_0_fast(); | |
}; | |
function h$baseZCGHCziTopHandlerzirunMainIO1_e() | |
{ | |
var a = h$r2; | |
return h$catch(h$c1(h$$bI, a), h$r1.d1); | |
}; | |
function h$baseZCGHCziTopHandlerziflushStdHandles3_e() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$l4(a, b.d1, b.d2, b.d3); | |
return h$ap_4_3_fast(); | |
}; | |
function h$baseZCGHCziTopHandlerziflushStdHandles2_e() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$l4(a, b.d1, b.d2, b.d3); | |
return h$ap_4_3_fast(); | |
}; | |
function h$baseZCGHCziTopHandlerzitopHandler_e() | |
{ | |
h$r1 = h$r1.d1; | |
return h$ap_2_1_fast(); | |
}; | |
function h$baseZCGHCziTopHandlerzirunMainIO_e() | |
{ | |
h$r1 = h$r1.d1; | |
return h$ap_2_1_fast(); | |
}; | |
function h$$bX() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 3)]; | |
var c = h$stack[(h$sp - 2)]; | |
var d = h$stack[(h$sp - 1)]; | |
h$sp -= 4; | |
var e = a; | |
b.dv.setUint32((d + (c << 2)), e, true); | |
h$r1 = h$ghczmprimZCGHCziTupleziZLZR; | |
return h$rs(); | |
}; | |
function h$$bW() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 2)]; | |
h$sp -= 4; | |
h$pp10(a, h$$bX); | |
return h$e(b); | |
}; | |
function h$$bV() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 2)]; | |
h$sp -= 3; | |
var c = a.d1; | |
h$pp13(c, a.d2, h$$bW); | |
return h$e(b); | |
}; | |
function h$baseZCGHCziStorableziwriteWideCharOffPtr1_e() | |
{ | |
h$p3(h$r3, h$r4, h$$bV); | |
return h$e(h$r2); | |
}; | |
function h$$bZ() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 2)]; | |
var c = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
var d = a; | |
var e = b.dv.getUint32((c + (d << 2)), true); | |
h$r1 = e; | |
return h$rs(); | |
}; | |
function h$$bY() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
var c = a.d1; | |
h$p3(c, a.d2, h$$bZ); | |
return h$e(b); | |
}; | |
function h$baseZCGHCziStorablezireadWideCharOffPtr1_e() | |
{ | |
h$p2(h$r3, h$$bY); | |
return h$e(h$r2); | |
}; | |
function h$$b1() | |
{ | |
var a = h$r1.d1; | |
h$bh(); | |
h$l2(a, h$baseZCGHCziStackziTypeszigetCallStack); | |
return h$ap_1_1_fast(); | |
}; | |
function h$$b0() | |
{ | |
var a = h$r1; | |
--h$sp; | |
switch (a.f.a) | |
{ | |
case (1): | |
h$r1 = h$ghczmprimZCGHCziTypesziZMZN; | |
break; | |
case (2): | |
var b = a.d1; | |
var c = a.d2; | |
var d = c.d1; | |
h$r1 = h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, h$c2(h$ghczmprimZCGHCziTupleziZLz2cUZR_con_e, b, d), h$c1(h$$b1, c.d2)); | |
break; | |
default: | |
h$l2(a.d1, h$baseZCGHCziStackziTypeszigetCallStack); | |
return h$ap_1_1_fast(); | |
}; | |
return h$rs(); | |
}; | |
function h$baseZCGHCziStackziTypeszigetCallStack_e() | |
{ | |
h$p1(h$$b0); | |
return h$e(h$r2); | |
}; | |
function h$baseZCGHCziStackziTypesziFreezzeCallStack_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$baseZCGHCziStackziTypesziFreezzeCallStack_e() | |
{ | |
h$r1 = h$c1(h$baseZCGHCziStackziTypesziFreezzeCallStack_con_e, h$r2); | |
return h$rs(); | |
}; | |
function h$baseZCGHCziStackziTypesziEmptyCallStack_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$$ca() | |
{ | |
var a = h$r1.d1; | |
h$bh(); | |
h$l3(h$$cb, a, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
}; | |
function h$$b9() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$l3(h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, h$$cd, h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, h$$ce, h$c1(h$$ca, b))), a, | |
h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
}; | |
function h$$b8() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = b.d1; | |
h$bh(); | |
h$l3(h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, h$$cc, h$c2(h$$b9, a, b.d2)), c, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
}; | |
function h$$b7() | |
{ | |
var a = h$stack[(h$sp - 6)]; | |
var b = h$stack[(h$sp - 5)]; | |
var c = h$stack[(h$sp - 4)]; | |
var d = h$stack[(h$sp - 3)]; | |
var e = h$stack[(h$sp - 2)]; | |
var f = h$stack[(h$sp - 1)]; | |
h$sp -= 7; | |
h$l4(h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, h$c3(h$$b8, d, e, a), c), f, b, h$baseZCGHCziStackziCCSzizdwgo); | |
return h$ap_3_3_fast(); | |
}; | |
function h$$b6() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = h$stack[(h$sp - 3)]; | |
h$sp -= 6; | |
if(a) | |
{ | |
h$r1 = b; | |
} | |
else | |
{ | |
h$sp += 6; | |
++h$sp; | |
return h$$b7; | |
}; | |
return h$rs(); | |
}; | |
function h$$b5() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = h$stack[(h$sp - 2)]; | |
h$sp -= 6; | |
if(a) | |
{ | |
h$sp += 6; | |
h$p1(h$$b6); | |
h$l3(h$$cf, b, h$baseZCGHCziBasezieqString); | |
return h$ap_2_2_fast(); | |
} | |
else | |
{ | |
h$sp += 6; | |
++h$sp; | |
return h$$b7; | |
}; | |
}; | |
function h$$b4() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 5)]; | |
var c = h$stack[(h$sp - 4)]; | |
var d = h$stack[(h$sp - 1)]; | |
h$sp -= 6; | |
var e = a; | |
var f; | |
var g; | |
f = b; | |
g = (c + 8); | |
var h; | |
var i; | |
var j = 0; | |
if((f.arr && f.arr[(g + j)])) | |
{ | |
h = f.arr[(g + j)][0]; | |
i = f.arr[(g + j)][1]; | |
} | |
else | |
{ | |
h = null; | |
i = 0; | |
}; | |
h$pp35(e, h, i); | |
h$p1(h$$b5); | |
h$l3(h$$cf, d, h$baseZCGHCziBasezieqString); | |
return h$ap_2_2_fast(); | |
}; | |
function h$$b3() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 3)]; | |
var c = h$stack[(h$sp - 2)]; | |
var d = h$stack[(h$sp - 1)]; | |
h$sp -= 7; | |
var e = a; | |
var f; | |
var g; | |
f = b; | |
g = (c + 12); | |
var h; | |
var i; | |
var j = 0; | |
if((f.arr && f.arr[(g + j)])) | |
{ | |
h = f.arr[(g + j)][0]; | |
i = f.arr[(g + j)][1]; | |
} | |
else | |
{ | |
h = null; | |
i = 0; | |
}; | |
h$pp56(d, e, h$$b4); | |
h$l4(i, h, h$baseZCGHCziIOziEncodingziUTF8ziutf8, h$baseZCGHCziForeignzizdwpeekCString); | |
return h$ap_3_3_fast(); | |
}; | |
function h$$b2() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 2)]; | |
var c = h$stack[(h$sp - 1)]; | |
h$sp -= 6; | |
var d = a; | |
var e; | |
var f; | |
e = b; | |
f = (c + 8); | |
var g; | |
var h; | |
var i = 0; | |
if((e.arr && e.arr[(f + i)])) | |
{ | |
g = e.arr[(f + i)][0]; | |
h = e.arr[(f + i)][1]; | |
} | |
else | |
{ | |
g = null; | |
h = 0; | |
}; | |
h$pp96(d, h$$b3); | |
h$l4(h, g, h$baseZCGHCziIOziEncodingziUTF8ziutf8, h$baseZCGHCziForeignzizdwpeekCString); | |
return h$ap_3_3_fast(); | |
}; | |
function h$baseZCGHCziStackziCCSzizdwgo_e() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = h$r2; | |
var d = h$r3; | |
var e = h$r4; | |
if(((c === null) && (d === 0))) | |
{ | |
h$r1 = e; | |
} | |
else | |
{ | |
var f; | |
var g; | |
f = c; | |
g = (d + 4); | |
var h; | |
var i; | |
var j = 0; | |
if((f.arr && f.arr[(g + j)])) | |
{ | |
h = f.arr[(g + j)][0]; | |
i = f.arr[(g + j)][1]; | |
} | |
else | |
{ | |
h = null; | |
i = 0; | |
}; | |
var k = h; | |
var l = i; | |
var m; | |
var n; | |
m = h; | |
n = (l + 4); | |
var o; | |
var p; | |
var q = 0; | |
if((m.arr && m.arr[(n + q)])) | |
{ | |
o = m.arr[(n + q)][0]; | |
p = m.arr[(n + q)][1]; | |
} | |
else | |
{ | |
o = null; | |
p = 0; | |
}; | |
h$p6(c, d, e, k, l, h$$b2); | |
h$l4(p, o, a, b); | |
return h$ap_3_3_fast(); | |
}; | |
return h$rs(); | |
}; | |
var h$$cb = h$strta(")"); | |
var h$$cf = h$strta("MAIN"); | |
function h$baseZCGHCziStackziCCSzicurrentCallStack1_e() | |
{ | |
h$l4(h$r1.d1, 0, null, h$r1.d2); | |
return h$ap_3_3_fast(); | |
}; | |
function h$baseZCGHCziStackziCCSzicurrentCallStack_e() | |
{ | |
h$r1 = h$r1.d1; | |
return h$ap_1_0_fast(); | |
}; | |
function h$baseZCGHCziShowzizdwitoszq_e() | |
{ | |
var a = h$r1.d1; | |
var b = h$r2; | |
var c = h$r3; | |
if((b < 10)) | |
{ | |
h$r1 = ((48 + b) | 0); | |
h$r2 = c; | |
} | |
else | |
{ | |
var d = ((b / 10) | 0); | |
var e = d; | |
var f = (b - (10 * d)); | |
h$l3(h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, ((48 + f) | 0), c), e, a); | |
return h$ap_2_2_fast(); | |
}; | |
return h$rs(); | |
}; | |
function h$$cl() | |
{ | |
var a; | |
var b; | |
a = h$r1; | |
b = h$r2; | |
--h$sp; | |
h$r1 = h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, a, b); | |
return h$rs(); | |
}; | |
function h$$ck() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$p1(h$$cl); | |
h$l3(a, (-b | 0), h$baseZCGHCziShowzizdwitoszq); | |
return h$ap_2_2_fast(); | |
}; | |
function h$$cj() | |
{ | |
var a; | |
var b; | |
a = h$r1; | |
b = h$r2; | |
--h$sp; | |
h$r1 = h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, a, b); | |
return h$rs(); | |
}; | |
function h$$ci() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$p1(h$$cj); | |
h$l3(a, (-b | 0), h$baseZCGHCziShowzizdwitoszq); | |
return h$ap_2_2_fast(); | |
}; | |
function h$$ch() | |
{ | |
var a; | |
var b; | |
a = h$r1; | |
b = h$r2; | |
--h$sp; | |
h$r1 = h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, a, b); | |
return h$rs(); | |
}; | |
function h$$cg() | |
{ | |
var a = h$r1.d1; | |
h$bh(); | |
var b = (((-2147483648) / 10) | 0); | |
var c = b; | |
h$p1(h$$ch); | |
h$l3(h$c2(h$$ci, a, ((-2147483648) - (10 * b))), (-c | 0), h$baseZCGHCziShowzizdwitoszq); | |
return h$ap_2_2_fast(); | |
}; | |
function h$baseZCGHCziShowzizdwitos_e() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = h$r2; | |
var d = h$r3; | |
if((c < 0)) | |
{ | |
var e = c; | |
if((e === (-2147483648))) | |
{ | |
h$r1 = b; | |
h$r2 = h$c1(h$$cg, d); | |
} | |
else | |
{ | |
h$r1 = b; | |
h$r2 = h$c2(h$$ck, d, e); | |
}; | |
} | |
else | |
{ | |
h$l3(d, c, a); | |
return h$ap_2_2_fast(); | |
}; | |
return h$rs(); | |
}; | |
function h$$cn() | |
{ | |
var a; | |
var b; | |
a = h$r1; | |
b = h$r2; | |
--h$sp; | |
h$r1 = h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, a, b); | |
return h$rs(); | |
}; | |
function h$$cm() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$p1(h$$cn); | |
h$l3(h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, h$baseZCGHCziShowzishows6, b), a, h$baseZCGHCziShowzizdwitos); | |
return h$ap_2_2_fast(); | |
}; | |
function h$baseZCGHCziShowzizdwshowSignedInt_e() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = h$r2; | |
var d = h$r3; | |
var e = h$r4; | |
if((d < 0)) | |
{ | |
if((c > 6)) | |
{ | |
h$r1 = a; | |
h$r2 = h$c2(h$$cm, d, e); | |
} | |
else | |
{ | |
h$l3(e, d, b); | |
return h$ap_2_2_fast(); | |
}; | |
} | |
else | |
{ | |
h$l3(e, d, b); | |
return h$ap_2_2_fast(); | |
}; | |
return h$rs(); | |
}; | |
function h$baseZCGHCziShowziCZCShow_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$baseZCGHCziShowziCZCShow_e() | |
{ | |
h$r1 = h$c3(h$baseZCGHCziShowziCZCShow_con_e, h$r2, h$r3, h$r4); | |
return h$rs(); | |
}; | |
var h$$baseZCGHCziShow_hc = h$str("[]"); | |
function h$$cu() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$l2(b, a); | |
return h$ap_1_1_fast(); | |
}; | |
function h$$ct() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = b.d1; | |
var d = b.d2; | |
h$bh(); | |
h$l3(h$c2(h$$cu, c, b.d3), d, a); | |
return h$ap_2_2_fast(); | |
}; | |
function h$$cs() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 3)]; | |
var c = h$stack[(h$sp - 2)]; | |
var d = h$stack[(h$sp - 1)]; | |
h$sp -= 4; | |
if((a.f.a === 1)) | |
{ | |
h$r1 = c; | |
} | |
else | |
{ | |
var e = a.d1; | |
h$r1 = h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, h$baseZCGHCziShowzishowListzuzu1, h$c4(h$$ct, b, d, e, a.d2)); | |
}; | |
return h$rs(); | |
}; | |
function h$$cr() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = b.d1; | |
h$p4(a, c, b.d2, h$$cs); | |
return h$e(h$r2); | |
}; | |
function h$$cq() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = b.d1; | |
var d = b.d2; | |
h$bh(); | |
var e = h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, h$baseZCGHCziShowzishowListzuzu2, c); | |
var f = h$c(h$$cr); | |
f.d1 = a; | |
f.d2 = h$d2(e, f); | |
h$l2(d, f); | |
return h$ap_1_1_fast(); | |
}; | |
function h$$cp() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = b.d1; | |
var d = b.d2; | |
h$bh(); | |
h$l3(h$c3(h$$cq, a, c, b.d3), d, a); | |
return h$ap_2_2_fast(); | |
}; | |
function h$$co() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 2)]; | |
var c = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
if((a.f.a === 1)) | |
{ | |
h$r4 = c; | |
h$r3 = 0; | |
h$r2 = h$$baseZCGHCziShow_hc(); | |
h$r1 = h$ghczmprimZCGHCziCStringziunpackAppendCStringzh; | |
return h$ap_2_3_fast(); | |
} | |
else | |
{ | |
var d = a.d1; | |
h$r1 = h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, h$baseZCGHCziShowzishowListzuzu3, h$c4(h$$cp, b, c, d, a.d2)); | |
}; | |
return h$rs(); | |
}; | |
function h$baseZCGHCziShowzishowListzuzu_e() | |
{ | |
h$p3(h$r2, h$r4, h$$co); | |
return h$e(h$r3); | |
}; | |
function h$$cv() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$r1 = a.d1; | |
return h$ap_0_0_fast(); | |
}; | |
function h$baseZCGHCziShowzishowsPrec_e() | |
{ | |
h$p1(h$$cv); | |
return h$e(h$r2); | |
}; | |
function h$baseZCGHCziSTRefziSTRef_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$baseZCGHCziSTRefziSTRef_e() | |
{ | |
h$r1 = h$c1(h$baseZCGHCziSTRefziSTRef_con_e, h$r2); | |
return h$rs(); | |
}; | |
function h$baseZCGHCziPtrziPtr_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$baseZCGHCziPtrziPtr_e() | |
{ | |
h$r1 = h$c2(h$baseZCGHCziPtrziPtr_con_e, h$r2, h$r3); | |
return h$rs(); | |
}; | |
function h$$cx() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 2)]; | |
var c = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
var d = a; | |
var e = b; | |
h$r1 = h$c2(h$baseZCGHCziPtrziPtr_con_e, e, (c + d)); | |
return h$rs(); | |
}; | |
function h$$cw() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
var c = a.d1; | |
h$p3(c, a.d2, h$$cx); | |
return h$e(b); | |
}; | |
function h$baseZCGHCziPtrziplusPtr_e() | |
{ | |
h$p2(h$r3, h$$cw); | |
return h$e(h$r2); | |
}; | |
function h$baseZCGHCziMVarziMVar_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$baseZCGHCziMVarziMVar_e() | |
{ | |
h$r1 = h$c1(h$baseZCGHCziMVarziMVar_con_e, h$r2); | |
return h$rs(); | |
}; | |
function h$$cy() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
if((a.f.a === 1)) | |
{ | |
h$r1 = b; | |
} | |
else | |
{ | |
var c = a.d2; | |
h$l3(((b + 1) | 0), c, h$baseZCGHCziListzizdwlenAcc); | |
return h$ap_2_2_fast(); | |
}; | |
return h$rs(); | |
}; | |
function h$baseZCGHCziListzizdwlenAcc_e() | |
{ | |
h$p2(h$r3, h$$cy); | |
return h$e(h$r2); | |
}; | |
function h$$cz() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
if((a.f.a === 1)) | |
{ | |
return h$e(b); | |
} | |
else | |
{ | |
h$l3(h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, a.d1, b), a.d2, h$baseZCGHCziListzireverse1); | |
return h$ap_2_2_fast(); | |
}; | |
}; | |
function h$baseZCGHCziListzireverse1_e() | |
{ | |
h$p2(h$r3, h$$cz); | |
return h$e(h$r2); | |
}; | |
function h$baseZCGHCziIntziI64zh_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIntziI64zh_e() | |
{ | |
h$r1 = h$c2(h$baseZCGHCziIntziI64zh_con_e, h$r2, h$r3); | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIntziI32zh_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIntziI32zh_e() | |
{ | |
h$r1 = h$r2; | |
return h$rs(); | |
}; | |
function h$$cB() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 2)]; | |
var c = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
var d = a.d1; | |
var e = h$hs_eqInt64(b, c, d, a.d2); | |
h$r1 = (e ? true : false); | |
return h$rs(); | |
}; | |
function h$$cA() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
var c = a.d1; | |
h$p3(c, a.d2, h$$cB); | |
return h$e(b); | |
}; | |
function h$baseZCGHCziIntzieqInt64_e() | |
{ | |
h$p2(h$r3, h$$cA); | |
return h$e(h$r2); | |
}; | |
var h$baseZCGHCziIOziHandleziTypeszishowHandle2 = h$strta("{handle: "); | |
var h$baseZCGHCziIOziHandleziTypeszishowHandle1 = h$strta("}"); | |
function h$baseZCGHCziIOziHandleziTypesziNewlineMode_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziHandleziTypesziNewlineMode_e() | |
{ | |
h$r1 = h$c2(h$baseZCGHCziIOziHandleziTypesziNewlineMode_con_e, h$r2, h$r3); | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziHandleziTypesziFileHandle_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziHandleziTypesziFileHandle_e() | |
{ | |
h$r1 = h$c2(h$baseZCGHCziIOziHandleziTypesziFileHandle_con_e, h$r2, h$r3); | |
return h$rs(); | |
}; | |
function h$$cC() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$r1 = h$c2(h$baseZCGHCziIOziHandleziTypesziFileHandle_con_e, b, a.d1); | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziHandleziTypeszizdWFileHandle_e() | |
{ | |
h$p2(h$r2, h$$cC); | |
return h$e(h$r3); | |
}; | |
function h$baseZCGHCziIOziHandleziTypesziHandlezuzu_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziHandleziTypesziHandlezuzu_e() | |
{ | |
h$r1 = h$c16(h$baseZCGHCziIOziHandleziTypesziHandlezuzu_con_e, h$r2, h$r3, h$r4, h$r5, h$r6, h$r7, h$r8, h$r9, h$r10, | |
h$r11, h$r12, h$r13, h$r14, h$r15, h$r16, h$r17); | |
return h$rs(); | |
}; | |
function h$$cH() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 15)]; | |
var c = h$stack[(h$sp - 14)]; | |
var d = h$stack[(h$sp - 13)]; | |
var e = h$stack[(h$sp - 12)]; | |
var f = h$stack[(h$sp - 11)]; | |
var g = h$stack[(h$sp - 10)]; | |
var h = h$stack[(h$sp - 9)]; | |
var i = h$stack[(h$sp - 8)]; | |
var j = h$stack[(h$sp - 7)]; | |
var k = h$stack[(h$sp - 6)]; | |
var l = h$stack[(h$sp - 5)]; | |
var m = h$stack[(h$sp - 4)]; | |
var n = h$stack[(h$sp - 3)]; | |
var o = h$stack[(h$sp - 2)]; | |
var p = h$stack[(h$sp - 1)]; | |
h$sp -= 16; | |
h$r1 = h$c16(h$baseZCGHCziIOziHandleziTypesziHandlezuzu_con_e, b, c, d, f, e, h, g, i, j, a.d1, k, l, m, n, o, p); | |
return h$rs(); | |
}; | |
function h$$cG() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 7)]; | |
h$sp -= 16; | |
var c = a.d1; | |
h$sp += 16; | |
h$stack[(h$sp - 7)] = c; | |
h$stack[h$sp] = h$$cH; | |
return h$e(b); | |
}; | |
function h$$cF() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 8)]; | |
h$sp -= 16; | |
var c = a.d1; | |
h$sp += 16; | |
h$stack[(h$sp - 8)] = c; | |
h$stack[h$sp] = h$$cG; | |
return h$e(b); | |
}; | |
function h$$cE() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 9)]; | |
h$sp -= 16; | |
var c = a.d1; | |
h$sp += 16; | |
h$stack[(h$sp - 9)] = c; | |
h$stack[h$sp] = h$$cF; | |
return h$e(b); | |
}; | |
function h$$cD() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 11)]; | |
h$sp -= 16; | |
h$sp += 16; | |
h$stack[(h$sp - 11)] = a; | |
h$stack[h$sp] = h$$cE; | |
return h$e(b); | |
}; | |
function h$baseZCGHCziIOziHandleziTypeszizdWHandlezuzu_e() | |
{ | |
h$p16(h$r2, h$r3, h$r4, h$r6, h$r7, h$r8, h$r9, h$r10, h$r11, h$r12, h$r13, h$r14, h$r15, h$r16, h$r17, h$$cD); | |
h$r1 = h$r5; | |
return h$ap_0_0_fast(); | |
}; | |
function h$baseZCGHCziIOziHandleziTypesziLF_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziHandleziTypesziBlockBuffering_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziHandleziTypesziBlockBuffering_e() | |
{ | |
h$r1 = h$c1(h$baseZCGHCziIOziHandleziTypesziBlockBuffering_con_e, h$r2); | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziHandleziTypesziLineBuffering_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziHandleziTypesziNoBuffering_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziHandleziTypesziWriteHandle_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziHandleziTypesziBufferListNil_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$$cT() | |
{ | |
var a = h$stack[(h$sp - 4)]; | |
var b = h$stack[(h$sp - 3)]; | |
var c = h$stack[(h$sp - 2)]; | |
var d = h$stack[(h$sp - 1)]; | |
h$sp -= 5; | |
h$l5(d, c, b, a, h$baseZCGHCziIOziHandleziInternalszizdwdozuoperation); | |
return h$ap_gen_fast(1029); | |
}; | |
function h$$cS() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 5)]; | |
var c = h$stack[(h$sp - 4)]; | |
var d = h$stack[(h$sp - 3)]; | |
var e = h$stack[(h$sp - 2)]; | |
var f = h$stack[(h$sp - 1)]; | |
h$sp -= 10; | |
var g = a.d1; | |
var h = a.d2; | |
var i = h.d1; | |
var j = h.d2; | |
if(h$hs_eqWord64(d, e, g, i)) | |
{ | |
if(h$hs_eqWord64(f, c, j, h.d3)) | |
{ | |
h$pp16(h$$cT); | |
return h$killThread(h$currentThread, b); | |
} | |
else | |
{ | |
return h$throw(b, false); | |
}; | |
} | |
else | |
{ | |
return h$throw(b, false); | |
}; | |
}; | |
function h$$cR() | |
{ | |
h$sp -= 10; | |
h$sp += 10; | |
h$stack[h$sp] = h$$cS; | |
return h$e(h$baseZCGHCziIOziExceptionzizdfExceptionAllocationLimitExceeded5); | |
}; | |
function h$$cQ() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$l4(b.d1, a, b.d2, h$baseZCGHCziIOziHandleziInternalsziaugmentIOError); | |
return h$ap_3_3_fast(); | |
}; | |
function h$$cP() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = b.d1; | |
h$bh(); | |
h$l2(h$c3(h$$cQ, a, c, b.d2), h$baseZCGHCziIOziExceptionzizdfExceptionIOExceptionzuzdctoException); | |
return h$ap_1_1_fast(); | |
}; | |
function h$$cO() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 10)]; | |
var c = h$stack[(h$sp - 9)]; | |
var d = h$stack[(h$sp - 5)]; | |
var e = h$stack[(h$sp - 4)]; | |
var f = h$stack[(h$sp - 3)]; | |
var g = h$stack[(h$sp - 2)]; | |
var h = h$stack[(h$sp - 1)]; | |
h$sp -= 11; | |
var i = a.d1; | |
var j = a.d2; | |
var k = j.d1; | |
var l = j.d2; | |
if(h$hs_eqWord64(e, f, i, k)) | |
{ | |
if(h$hs_eqWord64(g, h, l, j.d3)) | |
{ | |
return h$throw(h$c3(h$$cP, b, c, d), false); | |
} | |
else | |
{ | |
h$sp += 9; | |
h$stack[(h$sp - 3)] = h; | |
++h$sp; | |
return h$$cR; | |
}; | |
} | |
else | |
{ | |
h$sp += 9; | |
h$stack[(h$sp - 3)] = h; | |
++h$sp; | |
return h$$cR; | |
}; | |
}; | |
function h$$cN() | |
{ | |
var a = h$r1; | |
h$sp -= 7; | |
var b = a.d1; | |
var c = a.d2; | |
var d = c.d1; | |
var e = c.d2; | |
var f = c.d3; | |
h$sp += 11; | |
h$stack[(h$sp - 4)] = b; | |
h$stack[(h$sp - 3)] = d; | |
h$stack[(h$sp - 2)] = e; | |
h$stack[(h$sp - 1)] = f; | |
h$stack[h$sp] = h$$cO; | |
return h$e(h$baseZCGHCziIOziExceptionzizdfExceptionIOException4); | |
}; | |
function h$$cM() | |
{ | |
var a = h$r1; | |
h$sp -= 5; | |
var b = a.d1; | |
h$pp112(a, a.d2, h$$cN); | |
h$l2(b, h$baseZCGHCziExceptionzizdp1Exception); | |
return h$ap_2_1_fast(); | |
}; | |
function h$$cL() | |
{ | |
var a = h$stack[(h$sp - 1)]; | |
h$sp -= 6; | |
h$pp16(h$$cM); | |
return h$e(a); | |
}; | |
function h$$cK() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = b.d1; | |
var d = b.d2; | |
var e = b.d3; | |
h$p6(a, c, d, e, h$r2, h$$cL); | |
return h$putMVar(e, b.d4); | |
}; | |
function h$$cJ() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
return h$catch(a, b); | |
}; | |
function h$$cI() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 4)]; | |
var c = h$stack[(h$sp - 3)]; | |
var d = h$stack[(h$sp - 2)]; | |
var e = h$stack[(h$sp - 1)]; | |
h$sp -= 5; | |
h$p2(h$c5(h$$cK, b, c, d, e, a), h$$cJ); | |
h$l2(a, d); | |
return h$ap_1_1_fast(); | |
}; | |
function h$baseZCGHCziIOziHandleziInternalszizdwdozuoperation_e() | |
{ | |
h$p5(h$r2, h$r3, h$r4, h$r5, h$$cI); | |
return h$takeMVar(h$r5); | |
}; | |
var h$$em = h$strta("codec_state"); | |
var h$$en = h$strta("handle is finalized"); | |
function h$$cU() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$l2(a, b); | |
return h$ap_1_1_fast(); | |
}; | |
var h$$ep = h$strta("handle is not open for writing"); | |
function h$$cV() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$l2(a, b); | |
return h$ap_1_1_fast(); | |
}; | |
var h$$es = h$strta("handle is semi-closed"); | |
function h$$cW() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$l2(a, b); | |
return h$ap_1_1_fast(); | |
}; | |
var h$$ev = h$strta("handle is closed"); | |
function h$$c0() | |
{ | |
var a = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$r1 = a; | |
return h$rs(); | |
}; | |
function h$$cZ() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
var c = a.d1; | |
h$p2(a.d2, h$$c0); | |
return h$putMVar(b, c); | |
}; | |
function h$$cY() | |
{ | |
var a = h$r1; | |
h$sp -= 2; | |
h$pp2(h$$cZ); | |
return h$e(a); | |
}; | |
function h$$cX() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = b.d1; | |
var d = b.d2; | |
h$p2(d, h$$cY); | |
h$l5(d, b.d3, c, a, h$baseZCGHCziIOziHandleziInternalszizdwdozuoperation); | |
return h$ap_gen_fast(1029); | |
}; | |
function h$baseZCGHCziIOziHandleziInternalszizdwwithHandlezq_e() | |
{ | |
var a = h$r2; | |
var b = h$r3; | |
var c = h$r4; | |
var d = h$r5; | |
var e = h$maskStatus(); | |
var f = h$c4(h$$cX, a, b, c, d); | |
var g = e; | |
if((g === 0)) | |
{ | |
return h$maskAsync(f); | |
} | |
else | |
{ | |
h$r1 = f; | |
return h$ap_1_0_fast(); | |
}; | |
}; | |
function h$$dw() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$r1 = h$c2(h$ghczmprimZCGHCziTupleziZLz2cUZR_con_e, b, a); | |
return h$rs(); | |
}; | |
function h$$dv() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a.d1; | |
var c = a.d2; | |
var d = c.d1; | |
var e = c.d2; | |
var f = c.d4; | |
var g = c.d5; | |
h$r1 = h$c7(h$baseZCGHCziIOziBufferziBuffer_con_e, b, d, e, h$baseZCGHCziIOziBufferziWriteBuffer, f, g, c.d6); | |
return h$rs(); | |
}; | |
function h$$du() | |
{ | |
var a = h$r1.d1; | |
h$bh(); | |
h$p1(h$$dv); | |
return h$e(a); | |
}; | |
function h$$dt() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$r1 = h$c2(h$ghczmprimZCGHCziTupleziZLz2cUZR_con_e, b, a); | |
return h$rs(); | |
}; | |
function h$$ds() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 3)]; | |
var c = h$stack[(h$sp - 2)]; | |
var d = h$stack[(h$sp - 1)]; | |
h$sp -= 4; | |
d.val = a; | |
h$p2(c, h$$dt); | |
h$l2(c, b); | |
return h$ap_2_1_fast(); | |
}; | |
function h$$dr() | |
{ | |
var a = h$stack[(h$sp - 4)]; | |
var b = h$stack[(h$sp - 3)]; | |
var c = h$stack[(h$sp - 2)]; | |
var d = h$stack[(h$sp - 1)]; | |
h$sp -= 7; | |
a.val = h$c1(h$$du, a.val); | |
h$pp12(d, h$$ds); | |
h$l4(d.val, c, b, h$baseZCGHCziIOziBufferedIOziemptyWriteBuffer); | |
return h$ap_4_3_fast(); | |
}; | |
function h$$dq() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
var c = ((b - a) | 0); | |
h$l2((-c | 0), h$integerzmgmpZCGHCziIntegerziTypezismallInteger); | |
return h$ap_1_1_fast(); | |
}; | |
function h$$dp() | |
{ | |
var a = h$stack[(h$sp - 5)]; | |
var b = h$stack[(h$sp - 4)]; | |
var c = h$stack[(h$sp - 3)]; | |
var d = h$stack[(h$sp - 2)]; | |
var e = h$stack[(h$sp - 1)]; | |
h$sp -= 6; | |
var f = h$stack[h$sp]; | |
h$sp -= 6; | |
f.val = h$c7(h$baseZCGHCziIOziBufferziBuffer_con_e, b, c, d, e, a, 0, 0); | |
h$r1 = h$ghczmprimZCGHCziTupleziZLZR; | |
h$sp += 6; | |
++h$sp; | |
return h$$dr; | |
}; | |
function h$$dn() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 8)]; | |
var c = h$stack[(h$sp - 3)]; | |
var d = h$stack[(h$sp - 2)]; | |
var e = h$stack[(h$sp - 1)]; | |
h$sp -= 9; | |
var f = h$stack[(h$sp - 1)]; | |
h$sp -= 6; | |
if(a) | |
{ | |
var g = h$c2(h$$dq, d, e); | |
h$sp += 6; | |
h$pp33(c, h$$dp); | |
h$l5(g, h$baseZCGHCziIOziDeviceziRelativeSeek, f, b, h$baseZCGHCziIOziDeviceziseek); | |
return h$ap_gen_fast(1029); | |
} | |
else | |
{ | |
return h$throw(h$baseZCGHCziIOziHandleziInternalsziflushBuffer3, false); | |
}; | |
}; | |
function h$$dm() | |
{ | |
var a = h$r1; | |
h$sp -= 9; | |
h$sp -= 6; | |
var b = a; | |
h$sp += 6; | |
h$sp += 9; | |
h$stack[h$sp] = h$$dn; | |
return h$e(b); | |
}; | |
function h$$dl() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 5)]; | |
var c = h$stack[(h$sp - 3)]; | |
var d = h$stack[(h$sp - 1)]; | |
h$sp -= 8; | |
var e = a.d1; | |
var f = a.d2; | |
var g = f.d1; | |
var h = f.d2; | |
var i = f.d3; | |
var j = f.d4; | |
var k = f.d5; | |
var l = f.d6; | |
if((k === l)) | |
{ | |
h$r1 = h$ghczmprimZCGHCziTupleziZLZR; | |
h$sp += 6; | |
h$stack[(h$sp - 3)] = d; | |
++h$sp; | |
return h$$dr; | |
} | |
else | |
{ | |
h$sp += 6; | |
h$stack[(h$sp - 3)] = d; | |
h$p9(b, e, g, h, i, j, k, l, h$$dm); | |
h$l3(c, b, h$baseZCGHCziIOziDeviceziisSeekable); | |
return h$ap_3_2_fast(); | |
}; | |
}; | |
function h$$dk() | |
{ | |
var a = h$stack[(h$sp - 2)]; | |
h$sp -= 8; | |
h$pp128(h$$dl); | |
return h$e(a.val); | |
}; | |
function h$$dj() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a.d1; | |
var c = a.d2; | |
var d = c.d1; | |
var e = c.d2; | |
var f = c.d3; | |
h$r1 = h$c7(h$baseZCGHCziIOziBufferziBuffer_con_e, b, d, e, f, c.d4, 0, 0); | |
return h$rs(); | |
}; | |
function h$$di() | |
{ | |
var a = h$r1.d1; | |
h$bh(); | |
h$p1(h$$dj); | |
return h$e(a); | |
}; | |
function h$$dh() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
var c = a.d1; | |
var d = a.d2; | |
var e = d.d1; | |
var f = d.d2; | |
var g = d.d3; | |
var h = d.d4; | |
var i = d.d5; | |
var j = d.d6; | |
h$r1 = h$c7(h$baseZCGHCziIOziBufferziBuffer_con_e, c, e, f, g, h, ((i + b) | 0), j); | |
return h$rs(); | |
}; | |
function h$$dg() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$p2(b, h$$dh); | |
return h$e(a); | |
}; | |
function h$$df() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 7; | |
b.val = a.d1; | |
h$sp += 7; | |
++h$sp; | |
return h$$dk; | |
}; | |
function h$$de() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$sp -= 7; | |
var b = a; | |
h$sp += 7; | |
h$p1(h$$df); | |
return h$e(b); | |
}; | |
function h$$dd() | |
{ | |
var a = h$stack[(h$sp - 8)]; | |
var b = h$stack[(h$sp - 7)]; | |
var c = h$stack[(h$sp - 6)]; | |
var d = h$stack[(h$sp - 5)]; | |
var e = h$stack[(h$sp - 4)]; | |
var f = h$stack[(h$sp - 3)]; | |
var g = h$stack[(h$sp - 2)]; | |
var h = h$stack[(h$sp - 1)]; | |
h$sp -= 9; | |
h$sp -= 7; | |
var i = h$c7(h$baseZCGHCziIOziBufferziBuffer_con_e, a, d, e, f, g, 0, 0); | |
h$sp += 7; | |
h$p1(h$$de); | |
h$l5(i, c, h, b, h$baseZCGHCziIOziHandleziInternalszizdwstreamEncode); | |
return h$ap_gen_fast(1029); | |
}; | |
function h$$dc() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 6)]; | |
h$sp -= 8; | |
h$sp -= 7; | |
var c = a.d1; | |
var d = a.d2; | |
var e = d.d1; | |
var f = d.d4; | |
h$sp += 7; | |
h$sp += 9; | |
h$stack[(h$sp - 7)] = c; | |
h$stack[(h$sp - 1)] = e; | |
h$stack[h$sp] = h$$dd; | |
h$l2(b, f); | |
return h$ap_2_1_fast(); | |
}; | |
function h$$db() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 5)]; | |
var c = h$stack[(h$sp - 1)]; | |
h$sp -= 8; | |
var d = h$stack[(h$sp - 1)]; | |
h$sp -= 7; | |
if((a.f.a === 1)) | |
{ | |
d.val = h$c2(h$$dg, b, c); | |
h$sp += 7; | |
++h$sp; | |
return h$$dk; | |
} | |
else | |
{ | |
var e = a.d1; | |
h$sp += 7; | |
h$pp128(h$$dc); | |
return h$e(e); | |
}; | |
}; | |
function h$$da() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 3)]; | |
var c = h$stack[(h$sp - 1)]; | |
h$sp -= 4; | |
var d = h$stack[(h$sp - 1)]; | |
h$sp -= 7; | |
var e = a.d1; | |
var f = a.d2; | |
var g = f.d1; | |
var h = f.d2; | |
var i = f.d3; | |
var j = f.d5; | |
if((j === 0)) | |
{ | |
d.val = c; | |
h$sp += 7; | |
++h$sp; | |
return h$$dk; | |
} | |
else | |
{ | |
h$sp += 7; | |
h$pp249(e, g, h, i, j, h$$db); | |
return h$e(b); | |
}; | |
}; | |
function h$$c9() | |
{ | |
var a = h$r1; | |
h$sp -= 2; | |
var b = h$stack[h$sp]; | |
h$sp -= 7; | |
var c = a.d1; | |
var d = a.d2; | |
var e = b.val; | |
b.val = h$c1(h$$di, e); | |
h$sp += 7; | |
h$pp14(c, d, h$$da); | |
return h$e(e); | |
}; | |
function h$$c8() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 4)]; | |
var c = h$stack[(h$sp - 3)]; | |
var d = h$stack[(h$sp - 2)]; | |
var e = h$stack[(h$sp - 1)]; | |
h$sp -= 5; | |
h$sp -= 7; | |
if((a.f.a === 1)) | |
{ | |
if((d === e)) | |
{ | |
h$sp += 7; | |
++h$sp; | |
return h$$dk; | |
} | |
else | |
{ | |
var f = b.val; | |
h$sp += 7; | |
h$p2(c, h$$c9); | |
return h$e(f); | |
}; | |
} | |
else | |
{ | |
h$sp += 7; | |
++h$sp; | |
return h$$dk; | |
}; | |
}; | |
function h$$c7() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 3)]; | |
var c = h$stack[(h$sp - 2)]; | |
h$sp -= 10; | |
var d = a.d2; | |
var e = d.d3; | |
var f = d.d5; | |
h$pp64(c); | |
h$pp29(b, f, d.d6, h$$c8); | |
return h$e(e); | |
}; | |
function h$$c6() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$r1 = h$c2(h$ghczmprimZCGHCziTupleziZLz2cUZR_con_e, b, a); | |
return h$rs(); | |
}; | |
function h$$c5() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 9)]; | |
var c = h$stack[(h$sp - 8)]; | |
var d = h$stack[(h$sp - 2)]; | |
h$sp -= 10; | |
if((a.f.a === 1)) | |
{ | |
var e = d.val; | |
h$sp += 10; | |
h$stack[h$sp] = h$$c7; | |
return h$e(e); | |
} | |
else | |
{ | |
h$p2(c, h$$c6); | |
h$l2(c, b); | |
return h$ap_2_1_fast(); | |
}; | |
}; | |
function h$$c4() | |
{ | |
var a = h$r1; | |
h$sp -= 10; | |
var b = a.d2; | |
var c = b.d3; | |
h$sp += 10; | |
h$stack[h$sp] = h$$c5; | |
return h$e(c); | |
}; | |
function h$$c3() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 9)]; | |
var c = h$stack[(h$sp - 8)]; | |
var d = h$stack[(h$sp - 2)]; | |
h$sp -= 10; | |
switch (a.f.a) | |
{ | |
case (1): | |
h$r1 = h$baseZCGHCziIOziHandleziInternalsziioezuclosedHandle1; | |
return h$ap_1_0_fast(); | |
case (2): | |
h$r1 = h$baseZCGHCziIOziHandleziInternalsziioezusemiclosedHandle1; | |
return h$ap_1_0_fast(); | |
case (3): | |
h$r1 = h$baseZCGHCziIOziHandleziInternalsziioezunotWritable1; | |
return h$ap_1_0_fast(); | |
case (6): | |
var e = d.val; | |
h$sp += 10; | |
h$stack[h$sp] = h$$c4; | |
return h$e(e); | |
default: | |
h$p2(c, h$$dw); | |
h$l2(c, b); | |
return h$ap_2_1_fast(); | |
}; | |
}; | |
function h$$c2() | |
{ | |
var a = h$r1; | |
h$sp -= 2; | |
var b = a.d1; | |
var c = a.d2; | |
var d = c.d1; | |
var e = c.d3; | |
var f = c.d4; | |
var g = c.d5; | |
var h = c.d7; | |
var i = c.d8; | |
var j = c.d11; | |
h$sp += 10; | |
h$stack[(h$sp - 8)] = a; | |
h$stack[(h$sp - 7)] = b; | |
h$stack[(h$sp - 6)] = d; | |
h$stack[(h$sp - 5)] = e; | |
h$stack[(h$sp - 4)] = g; | |
h$stack[(h$sp - 3)] = h; | |
h$stack[(h$sp - 2)] = i; | |
h$stack[(h$sp - 1)] = j; | |
h$stack[h$sp] = h$$c3; | |
return h$e(f); | |
}; | |
function h$$c1() | |
{ | |
h$p2(h$r1.d1, h$$c2); | |
return h$e(h$r2); | |
}; | |
function h$baseZCGHCziIOziHandleziInternalszizdwwantWritableHandlezq_e() | |
{ | |
h$r5 = h$c1(h$$c1, h$r5); | |
h$r1 = h$r1.d1; | |
return h$ap_gen_fast(1029); | |
}; | |
function h$$dx() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 2)]; | |
var c = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
if((a.f.a === 1)) | |
{ | |
h$l5(c, a.d2, a, b, h$baseZCGHCziIOziHandleziInternalszizdwwantWritableHandlezq); | |
return h$ap_gen_fast(1029); | |
} | |
else | |
{ | |
var d = a.d2; | |
h$l5(c, d.d2, a, b, h$baseZCGHCziIOziHandleziInternalszizdwwantWritableHandlezq); | |
return h$ap_gen_fast(1029); | |
}; | |
}; | |
function h$baseZCGHCziIOziHandleziInternalsziwantWritableHandle1_e() | |
{ | |
h$p3(h$r2, h$r4, h$$dx); | |
return h$e(h$r3); | |
}; | |
function h$$d0() | |
{ | |
var a = h$r1; | |
--h$sp; | |
if((a.f.a === 3)) | |
{ | |
h$r1 = h$baseZCGHCziIOziBufferziReadBuffer; | |
} | |
else | |
{ | |
h$r1 = h$baseZCGHCziIOziBufferziWriteBuffer; | |
}; | |
return h$rs(); | |
}; | |
function h$$dZ() | |
{ | |
var a = h$r1.d1; | |
h$bh(); | |
h$p1(h$$d0); | |
return h$e(a); | |
}; | |
function h$$dY() | |
{ | |
var a = h$r1; | |
--h$sp; | |
return h$e(a.d2); | |
}; | |
function h$$dX() | |
{ | |
var a = h$r1.d1; | |
h$bh(); | |
h$p1(h$$dY); | |
return h$e(a); | |
}; | |
function h$$dW() | |
{ | |
var a = h$r1; | |
--h$sp; | |
return h$e(a.d1); | |
}; | |
function h$$dV() | |
{ | |
var a = h$r1.d1; | |
h$bh(); | |
h$p1(h$$dW); | |
return h$e(a); | |
}; | |
function h$$dU() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 14)]; | |
var c = h$stack[(h$sp - 13)]; | |
var d = h$stack[(h$sp - 12)]; | |
var e = h$stack[(h$sp - 11)]; | |
var f = h$stack[(h$sp - 10)]; | |
var g = h$stack[(h$sp - 9)]; | |
var h = h$stack[(h$sp - 8)]; | |
var i = h$stack[(h$sp - 7)]; | |
var j = h$stack[(h$sp - 6)]; | |
var k = h$stack[(h$sp - 5)]; | |
var l = h$stack[(h$sp - 4)]; | |
var m = h$stack[(h$sp - 3)]; | |
var n = h$stack[(h$sp - 2)]; | |
var o = h$stack[(h$sp - 1)]; | |
h$sp -= 15; | |
h$r1 = h$c16(h$baseZCGHCziIOziHandleziTypesziHandlezuzu_con_e, b, c, d, m, e, k, n, l, a.d1, o, i, j, f, h$c1(h$$dV, g), | |
h$c1(h$$dX, g), h); | |
return h$rs(); | |
}; | |
function h$$dT() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 3)]; | |
h$sp -= 15; | |
h$sp += 15; | |
h$stack[(h$sp - 3)] = a; | |
h$stack[h$sp] = h$$dU; | |
return h$e(b); | |
}; | |
function h$$dS() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = b.d1; | |
var d = b.d2; | |
var e = b.d3; | |
var f = b.d4; | |
var g = b.d5; | |
var h = b.d6; | |
var i = b.d7; | |
var j = b.d8; | |
var k = b.d9; | |
var l = b.d10; | |
var m = b.d11; | |
var n = b.d12; | |
var o = b.d13; | |
h$bh(); | |
h$p15(a, c, d, f, g, h, i, j, k, l, m, n, o, b.d14, h$$dT); | |
h$r1 = e; | |
return h$ap_0_0_fast(); | |
}; | |
function h$$dR() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$l3(h$c1(h$baseZCGHCziMVarziMVar_con_e, b.d1), a, b.d2); | |
return h$ap_2_2_fast(); | |
}; | |
function h$$dQ() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 2)]; | |
var c = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
if((a.f.a === 1)) | |
{ | |
h$r1 = h$c2(h$baseZCGHCziIOziHandleziTypesziFileHandle_con_e, b, c); | |
} | |
else | |
{ | |
var d = h$makeWeak(c, h$ghczmprimZCGHCziTupleziZLZR, h$c3(h$$dR, b, c, a.d1)); | |
h$r1 = h$c2(h$baseZCGHCziIOziHandleziTypesziFileHandle_con_e, b, c); | |
}; | |
return h$rs(); | |
}; | |
function h$$dP() | |
{ | |
var a = h$stack[(h$sp - 2)]; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 4; | |
h$pp6(b, h$$dQ); | |
return h$e(a); | |
}; | |
function h$$dO() | |
{ | |
var a = h$stack[(h$sp - 14)]; | |
var b = h$stack[(h$sp - 13)]; | |
var c = h$stack[(h$sp - 12)]; | |
var d = h$stack[(h$sp - 11)]; | |
var e = h$stack[(h$sp - 10)]; | |
var f = h$stack[(h$sp - 9)]; | |
var g = h$stack[(h$sp - 8)]; | |
var h = h$stack[(h$sp - 7)]; | |
var i = h$stack[(h$sp - 6)]; | |
var j = h$stack[(h$sp - 5)]; | |
var k = h$stack[(h$sp - 4)]; | |
var l = h$stack[(h$sp - 3)]; | |
var m = h$stack[(h$sp - 2)]; | |
var n = h$stack[(h$sp - 1)]; | |
h$sp -= 15; | |
var o = h$r1; | |
var p = h$r2; | |
var q = new h$MutVar(h$baseZCGHCziIOziHandleziTypesziBufferListNil); | |
var r = q; | |
var s = new h$MVar(); | |
h$p4(e, j, s, h$$dP); | |
return h$putMVar(s, h$c15(h$$dS, a, b, c, d, f, h, i, k, l, m, g, n, o, p, r)); | |
}; | |
function h$$dN() | |
{ | |
var a = h$r1; | |
--h$sp; | |
if(a) | |
{ | |
h$r1 = h$baseZCGHCziIOziHandleziTypesziLineBuffering; | |
} | |
else | |
{ | |
return h$e(h$$el); | |
}; | |
return h$rs(); | |
}; | |
function h$$dM() | |
{ | |
var a = h$r1.d1; | |
h$bh(); | |
h$p1(h$$dN); | |
return h$e(a); | |
}; | |
function h$$dL() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$sp -= 14; | |
h$l2(h$c1(h$$dM, a), h$c1(h$baseZCGHCziSTRefziSTRef_con_e, b)); | |
h$sp += 14; | |
++h$sp; | |
return h$$dO; | |
}; | |
function h$$dK() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
var c = h$stack[(h$sp - 13)]; | |
var d = h$stack[(h$sp - 10)]; | |
h$sp -= 14; | |
if(a) | |
{ | |
var e = new h$MutVar(h$baseZCGHCziForeignPtrziNoFinalizzers); | |
var f = h$newByteArray(8192); | |
var g = h$c7(h$baseZCGHCziIOziBufferziBuffer_con_e, f, 0, h$c2(h$baseZCGHCziForeignPtrziMallocPtr_con_e, f, e), b, 2048, | |
0, 0); | |
var h = new h$MutVar(g); | |
var i = h; | |
h$sp += 14; | |
h$p2(i, h$$dL); | |
h$l3(d, c, h$baseZCGHCziIOziDeviceziisTerminal); | |
return h$ap_3_2_fast(); | |
} | |
else | |
{ | |
var j = new h$MutVar(h$baseZCGHCziForeignPtrziNoFinalizzers); | |
var k = h$newByteArray(8192); | |
var l = h$c7(h$baseZCGHCziIOziBufferziBuffer_con_e, k, 0, h$c2(h$baseZCGHCziForeignPtrziMallocPtr_con_e, k, j), b, 2048, | |
0, 0); | |
var m = new h$MutVar(l); | |
h$l2(h$baseZCGHCziIOziHandleziTypesziNoBuffering, h$c1(h$baseZCGHCziSTRefziSTRef_con_e, m)); | |
h$sp += 14; | |
++h$sp; | |
return h$$dO; | |
}; | |
}; | |
function h$$dJ() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 8)]; | |
var c = h$stack[(h$sp - 1)]; | |
h$sp -= 15; | |
var d = a; | |
var e = new h$MutVar(d); | |
var f = e; | |
var g = h$c2(h$ghczmprimZCGHCziTupleziZLz2cUZR_con_e, h$baseZCGHCziIOziHandleziInternalszidecodeByteBuf2, d); | |
var h = new h$MutVar(g); | |
var i = h; | |
h$sp += 14; | |
h$stack[(h$sp - 7)] = f; | |
h$stack[h$sp] = i; | |
h$p2(c, h$$dK); | |
return h$e(b); | |
}; | |
function h$$dI() | |
{ | |
var a = h$stack[(h$sp - 10)]; | |
var b = h$stack[(h$sp - 8)]; | |
var c = h$stack[(h$sp - 6)]; | |
h$sp -= 12; | |
var d = h$r1; | |
var e = h$r2; | |
var f = h$c1(h$$dZ, c); | |
h$sp += 15; | |
h$stack[(h$sp - 3)] = d; | |
h$stack[(h$sp - 2)] = e; | |
h$stack[(h$sp - 1)] = f; | |
h$stack[h$sp] = h$$dJ; | |
h$l4(f, b, a, h$baseZCGHCziIOziBufferedIOzinewBuffer); | |
return h$ap_4_3_fast(); | |
}; | |
function h$$dH() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$sp -= 11; | |
h$l2(b, h$c1(h$baseZCGHCziBaseziJust_con_e, a)); | |
h$sp += 11; | |
++h$sp; | |
return h$$dI; | |
}; | |
function h$$dG() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$sp -= 11; | |
h$l2(b, h$c1(h$baseZCGHCziBaseziJust_con_e, a)); | |
h$sp += 11; | |
++h$sp; | |
return h$$dI; | |
}; | |
function h$$dF() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$sp -= 11; | |
h$l2(b, h$c1(h$baseZCGHCziBaseziJust_con_e, a)); | |
h$sp += 11; | |
++h$sp; | |
return h$$dI; | |
}; | |
function h$$dE() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 2)]; | |
var c = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
h$sp -= 11; | |
switch (a.f.a) | |
{ | |
case (4): | |
h$sp += 11; | |
h$p2(c, h$$dH); | |
h$r1 = b; | |
return h$ap_1_0_fast(); | |
case (5): | |
h$sp += 11; | |
h$p2(c, h$$dG); | |
h$r1 = b; | |
return h$ap_1_0_fast(); | |
case (6): | |
h$sp += 11; | |
h$p2(c, h$$dF); | |
h$r1 = b; | |
return h$ap_1_0_fast(); | |
default: | |
h$l2(c, h$baseZCGHCziBaseziNothing); | |
h$sp += 11; | |
++h$sp; | |
return h$$dI; | |
}; | |
}; | |
function h$$dD() | |
{ | |
var a = h$stack[(h$sp - 7)]; | |
h$sp -= 13; | |
var b = h$r1; | |
h$sp += 11; | |
h$pp6(b, h$$dE); | |
return h$e(a); | |
}; | |
function h$$dC() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$sp -= 12; | |
h$r1 = h$c1(h$baseZCGHCziBaseziJust_con_e, a); | |
h$sp += 12; | |
++h$sp; | |
return h$$dD; | |
}; | |
function h$$dB() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$sp -= 12; | |
h$r1 = h$c1(h$baseZCGHCziBaseziJust_con_e, a); | |
h$sp += 12; | |
++h$sp; | |
return h$$dD; | |
}; | |
function h$$dA() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$sp -= 12; | |
switch (a.f.a) | |
{ | |
case (3): | |
h$sp += 12; | |
h$p1(h$$dC); | |
h$r1 = b; | |
return h$ap_1_0_fast(); | |
case (6): | |
h$sp += 12; | |
h$p1(h$$dB); | |
h$r1 = b; | |
return h$ap_1_0_fast(); | |
default: | |
h$r1 = h$baseZCGHCziBaseziNothing; | |
h$sp += 12; | |
++h$sp; | |
return h$$dD; | |
}; | |
}; | |
function h$$dz() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = h$stack[(h$sp - 5)]; | |
h$sp -= 11; | |
var c = a.d2; | |
var d = c.d1; | |
var e = c.d2; | |
h$sp += 12; | |
h$stack[h$sp] = e; | |
h$p2(d, h$$dA); | |
return h$e(b); | |
}; | |
function h$$dy() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$sp -= 11; | |
if((a.f.a === 1)) | |
{ | |
h$l2(h$baseZCGHCziBaseziNothing, h$baseZCGHCziBaseziNothing); | |
h$sp += 11; | |
++h$sp; | |
return h$$dI; | |
} | |
else | |
{ | |
var b = a.d1; | |
h$sp += 11; | |
h$p1(h$$dz); | |
return h$e(b); | |
}; | |
}; | |
function h$baseZCGHCziIOziHandleziInternalszimkDuplexHandle7_e() | |
{ | |
h$p11(h$r2, h$r3, h$r4, h$r5, h$r6, h$r7, h$r8, h$r9, h$r10, h$r11, h$r12); | |
h$p1(h$$dy); | |
return h$e(h$r9); | |
}; | |
function h$baseZCGHCziIOziHandleziInternalsziioezusemiclosedHandle1_e() | |
{ | |
return h$throw(h$r1.d1, false); | |
}; | |
function h$baseZCGHCziIOziHandleziInternalsziioezunotWritable1_e() | |
{ | |
return h$throw(h$r1.d1, false); | |
}; | |
function h$baseZCGHCziIOziHandleziInternalsziioezuclosedHandle1_e() | |
{ | |
return h$throw(h$r1.d1, false); | |
}; | |
function h$$d5() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
b.val = a; | |
h$r1 = h$ghczmprimZCGHCziTupleziZLZR; | |
return h$rs(); | |
}; | |
function h$$d4() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 3)]; | |
var c = h$stack[(h$sp - 2)]; | |
var d = h$stack[(h$sp - 1)]; | |
h$sp -= 4; | |
var e = a.d2; | |
var f = e.d5; | |
var g = e.d6; | |
if((f === g)) | |
{ | |
h$r1 = h$ghczmprimZCGHCziTupleziZLZR; | |
} | |
else | |
{ | |
h$p2(d, h$$d5); | |
h$l4(a, c, b, h$baseZCGHCziIOziBufferedIOziflushWriteBuffer); | |
return h$ap_4_3_fast(); | |
}; | |
return h$rs(); | |
}; | |
function h$$d3() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 4; | |
if((a.f.a === 1)) | |
{ | |
h$r1 = h$ghczmprimZCGHCziTupleziZLZR; | |
} | |
else | |
{ | |
h$pp8(h$$d4); | |
return h$e(b.val); | |
}; | |
return h$rs(); | |
}; | |
function h$$d2() | |
{ | |
var a = h$r1; | |
h$sp -= 4; | |
var b = a.d2; | |
h$pp8(h$$d3); | |
return h$e(b.d3); | |
}; | |
function h$$d1() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a.d2; | |
var c = b.d1; | |
var d = b.d3; | |
var e = b.d5; | |
h$p4(c, d, e, h$$d2); | |
return h$e(e.val); | |
}; | |
function h$baseZCGHCziIOziHandleziInternalsziflushWriteBuffer1_e() | |
{ | |
h$p1(h$$d1); | |
return h$e(h$r2); | |
}; | |
var h$baseZCGHCziIOziHandleziInternalsziflushBuffer5 = h$strta("cannot flush the read buffer: underlying device is not seekable"); | |
function h$baseZCGHCziIOziHandleziInternalsziflushBuffer3_e() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$l2(a, b); | |
return h$ap_1_1_fast(); | |
}; | |
function h$baseZCGHCziIOziHandleziInternalszidecodeByteBuf2_e() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$l3(a, b.d1, b.d2); | |
return h$ap_2_2_fast(); | |
}; | |
function h$$eg() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
var c = a.d1; | |
h$l3(a.d2, c, b); | |
return h$ap_3_2_fast(); | |
}; | |
function h$$ef() | |
{ | |
var a = h$r1; | |
h$sp -= 2; | |
h$pp2(h$$eg); | |
return h$e(a); | |
}; | |
function h$$ee() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 4)]; | |
var c = h$stack[(h$sp - 3)]; | |
var d = h$stack[(h$sp - 2)]; | |
var e = h$stack[(h$sp - 1)]; | |
h$sp -= 5; | |
var f = a.d2; | |
var g = f.d5; | |
if((d === g)) | |
{ | |
h$p2(c, h$$ef); | |
h$l3(e, a, b); | |
return h$ap_3_2_fast(); | |
} | |
else | |
{ | |
h$r1 = h$c3(h$ghczmprimZCGHCziTupleziZLz2cUz2cUZR_con_e, h$baseZCGHCziIOziEncodingziTypesziInvalidSequence, a, e); | |
}; | |
return h$rs(); | |
}; | |
function h$$ed() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 2)]; | |
h$sp -= 5; | |
var c = a.d2; | |
h$pp20(c.d5, h$$ee); | |
return h$e(b); | |
}; | |
function h$$ec() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 4)]; | |
var c = h$stack[(h$sp - 3)]; | |
var d = h$stack[(h$sp - 2)]; | |
var e = h$stack[(h$sp - 1)]; | |
h$sp -= 7; | |
if((a.f.a === 3)) | |
{ | |
h$pp28(d, e, h$$ed); | |
return h$e(b); | |
} | |
else | |
{ | |
h$r1 = c; | |
}; | |
return h$rs(); | |
}; | |
function h$$eb() | |
{ | |
var a = h$r1; | |
h$sp -= 5; | |
var b = a.d1; | |
var c = a.d2; | |
var d = c.d1; | |
h$pp112(d, c.d2, h$$ec); | |
return h$e(b); | |
}; | |
function h$$ea() | |
{ | |
var a = h$r1; | |
h$sp -= 4; | |
h$pp24(a, h$$eb); | |
return h$e(a); | |
}; | |
function h$$d9() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = b.d1; | |
h$p4(c, b.d2, h$r2, h$$ea); | |
h$r1 = a; | |
return h$ap_3_2_fast(); | |
}; | |
function h$$d8() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a.d2; | |
var c = b.d1; | |
h$r1 = h$c2(h$ghczmprimZCGHCziTupleziZLz2cUZR_con_e, c, b.d2); | |
return h$rs(); | |
}; | |
function h$$d7() | |
{ | |
var a = h$r1.d1; | |
h$bh(); | |
h$p1(h$$d8); | |
return h$e(a); | |
}; | |
function h$$d6() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$r1 = h$c1(h$$d7, a); | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziHandleziInternalszizdwstreamEncode_e() | |
{ | |
var a = h$r3; | |
var b = h$r4; | |
var c = h$r5; | |
var d = h$c(h$$d9); | |
d.d1 = h$r2; | |
d.d2 = h$d2(a, d); | |
h$p1(h$$d6); | |
h$l3(c, b, d); | |
return h$ap_3_2_fast(); | |
}; | |
function h$baseZCGHCziIOziHandleziInternalsziioezufinalizzedHandle_e() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = b.d1; | |
var d = b.d2; | |
var e = b.d3; | |
var f = b.d4; | |
var g = b.d5; | |
h$l3(h$c6(h$baseZCGHCziIOziExceptionziIOError_con_e, g, a, c, d, g, h$c1(h$baseZCGHCziBaseziJust_con_e, h$r2)), e, f); | |
return h$ap_2_2_fast(); | |
}; | |
function h$$ek() | |
{ | |
var a = h$r1; | |
--h$sp; | |
if((a.f.a === 1)) | |
{ | |
h$r1 = h$c1(h$baseZCGHCziBaseziJust_con_e, a.d1); | |
} | |
else | |
{ | |
h$r1 = h$c1(h$baseZCGHCziBaseziJust_con_e, a.d1); | |
}; | |
return h$rs(); | |
}; | |
function h$$ej() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
if((a.f.a === 1)) | |
{ | |
h$p1(h$$ek); | |
return h$e(b); | |
} | |
else | |
{ | |
h$r1 = a; | |
}; | |
return h$rs(); | |
}; | |
function h$$ei() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$p2(a, h$$ej); | |
return h$e(b); | |
}; | |
function h$$eh() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 2)]; | |
var c = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
var d = a.d2; | |
var e = d.d1; | |
var f = d.d3; | |
var g = d.d4; | |
h$r1 = h$c6(h$baseZCGHCziIOziExceptionziIOError_con_e, h$c1(h$baseZCGHCziBaseziJust_con_e, c), e, b, f, g, h$c2(h$$ei, | |
c, d.d5)); | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziHandleziInternalsziaugmentIOError_e() | |
{ | |
h$p3(h$r3, h$r4, h$$eh); | |
return h$e(h$r2); | |
}; | |
function h$$ez() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$l12(h$baseZCGHCziBaseziNothing, h$$fg, h$baseZCGHCziIOziHandleziTypeszinativeNewlineMode, | |
h$c1(h$baseZCGHCziBaseziJust_con_e, a), true, h$baseZCGHCziIOziHandleziTypesziWriteHandle, h$$fc, | |
h$baseZCGHCziIOziFDzistdout, h$baseZCGHCziIOziHandleziFDzifdToHandle8, h$baseZCGHCziIOziFDzizdfBufferedIOFD, | |
h$baseZCGHCziIOziFDzizdfIODeviceFD, h$baseZCGHCziIOziHandleziInternalszimkDuplexHandle7); | |
return h$ap_gen_fast(2828); | |
}; | |
function h$$ey() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$p1(h$$ez); | |
h$r1 = a.d1; | |
return h$ap_1_0_fast(); | |
}; | |
function h$$ex() | |
{ | |
h$p1(h$$ey); | |
return h$e(h$r1.d1); | |
}; | |
var h$$fc = h$strta("<stdout>"); | |
function h$$eC() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$l12(h$baseZCGHCziBaseziNothing, h$$fg, h$baseZCGHCziIOziHandleziTypeszinativeNewlineMode, | |
h$c1(h$baseZCGHCziBaseziJust_con_e, a), false, h$baseZCGHCziIOziHandleziTypesziWriteHandle, h$$fe, | |
h$baseZCGHCziIOziFDzistderr, h$baseZCGHCziIOziHandleziFDzifdToHandle8, h$baseZCGHCziIOziFDzizdfBufferedIOFD, | |
h$baseZCGHCziIOziFDzizdfIODeviceFD, h$baseZCGHCziIOziHandleziInternalszimkDuplexHandle7); | |
return h$ap_gen_fast(2828); | |
}; | |
function h$$eB() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$p1(h$$eC); | |
h$r1 = a.d1; | |
return h$ap_1_0_fast(); | |
}; | |
function h$$eA() | |
{ | |
h$p1(h$$eB); | |
return h$e(h$r1.d1); | |
}; | |
var h$$fe = h$strta("<stderr>"); | |
function h$$eE() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$l3(a.d1, b, h$$fh); | |
return h$ap_3_2_fast(); | |
}; | |
function h$$eD() | |
{ | |
h$p2(h$r2, h$$eE); | |
return h$e(h$r3); | |
}; | |
function h$$e6() | |
{ | |
var a = h$r1.d1; | |
h$bh(); | |
h$l2(a, h$baseZCGHCziIOziHandleziInternalsziioezufinalizzedHandle); | |
return h$ap_1_1_fast(); | |
}; | |
function h$$e5() | |
{ | |
--h$sp; | |
h$r1 = h$ghczmprimZCGHCziTupleziZLZR; | |
return h$rs(); | |
}; | |
function h$$e4() | |
{ | |
var a = h$r1.d1; | |
h$bh(); | |
h$l2(a, h$baseZCGHCziIOziHandleziInternalsziioezufinalizzedHandle); | |
return h$ap_1_1_fast(); | |
}; | |
function h$$e3() | |
{ | |
--h$sp; | |
h$r1 = h$ghczmprimZCGHCziTupleziZLZR; | |
return h$rs(); | |
}; | |
function h$$e2() | |
{ | |
var a = h$stack[(h$sp - 2)]; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
h$p1(h$$e3); | |
return h$putMVar(b, h$c1(h$$e4, a)); | |
}; | |
function h$$e1() | |
{ | |
var a = h$r1; | |
h$sp -= 3; | |
var b = a.d2; | |
h$pp4(h$$e2); | |
h$r1 = b.d2; | |
return h$ap_1_0_fast(); | |
}; | |
function h$$e0() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 2)]; | |
var c = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
if((a.f.a === 1)) | |
{ | |
h$p1(h$$e5); | |
return h$putMVar(c, h$c1(h$$e6, b)); | |
} | |
else | |
{ | |
h$pp4(h$$e1); | |
return h$e(a.d1); | |
}; | |
}; | |
function h$$eZ() | |
{ | |
var a = h$r1.d1; | |
h$bh(); | |
h$l2(a, h$baseZCGHCziIOziHandleziInternalsziioezufinalizzedHandle); | |
return h$ap_1_1_fast(); | |
}; | |
function h$$eY() | |
{ | |
--h$sp; | |
h$r1 = h$ghczmprimZCGHCziTupleziZLZR; | |
return h$rs(); | |
}; | |
function h$$eX() | |
{ | |
var a = h$r1.d1; | |
h$bh(); | |
h$l2(a, h$baseZCGHCziIOziHandleziInternalsziioezufinalizzedHandle); | |
return h$ap_1_1_fast(); | |
}; | |
function h$$eW() | |
{ | |
--h$sp; | |
h$r1 = h$ghczmprimZCGHCziTupleziZLZR; | |
return h$rs(); | |
}; | |
function h$$eV() | |
{ | |
var a = h$stack[(h$sp - 2)]; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
h$p1(h$$eW); | |
return h$putMVar(b, h$c1(h$$eX, a)); | |
}; | |
function h$$eU() | |
{ | |
var a = h$r1; | |
h$sp -= 3; | |
var b = a.d2; | |
h$pp4(h$$eV); | |
h$r1 = b.d2; | |
return h$ap_1_0_fast(); | |
}; | |
function h$$eT() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 2)]; | |
var c = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
if((a.f.a === 1)) | |
{ | |
h$p1(h$$eY); | |
return h$putMVar(c, h$c1(h$$eZ, b)); | |
} | |
else | |
{ | |
h$pp4(h$$eU); | |
return h$e(a.d1); | |
}; | |
}; | |
function h$$eS() | |
{ | |
var a = h$stack[(h$sp - 1)]; | |
h$sp -= 4; | |
h$pp4(h$$eT); | |
return h$e(a); | |
}; | |
function h$$eR() | |
{ | |
var a = h$r1; | |
h$sp -= 4; | |
var b = a.d2; | |
h$pp8(h$$eS); | |
h$r1 = b.d2; | |
return h$ap_1_0_fast(); | |
}; | |
function h$$eQ() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 4; | |
if((a.f.a === 1)) | |
{ | |
h$pp4(h$$e0); | |
return h$e(b); | |
} | |
else | |
{ | |
h$pp8(h$$eR); | |
return h$e(a.d1); | |
}; | |
}; | |
function h$$eP() | |
{ | |
var a = h$r1.d1; | |
h$bh(); | |
h$l2(a, h$baseZCGHCziIOziHandleziInternalsziioezufinalizzedHandle); | |
return h$ap_1_1_fast(); | |
}; | |
function h$$eO() | |
{ | |
--h$sp; | |
h$r1 = h$ghczmprimZCGHCziTupleziZLZR; | |
return h$rs(); | |
}; | |
function h$$eN() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 4)]; | |
var c = h$stack[(h$sp - 3)]; | |
var d = h$stack[(h$sp - 1)]; | |
h$sp -= 5; | |
if((a.f.a === 1)) | |
{ | |
h$p1(h$$eO); | |
return h$putMVar(c, h$c1(h$$eP, b)); | |
} | |
else | |
{ | |
h$pp8(h$$eQ); | |
return h$e(d); | |
}; | |
}; | |
function h$$eM() | |
{ | |
var a = h$stack[(h$sp - 1)]; | |
h$sp -= 6; | |
h$pp16(h$$eN); | |
return h$e(a); | |
}; | |
function h$$eL() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$sp -= 5; | |
b.val = a; | |
h$sp += 5; | |
++h$sp; | |
return h$$eM; | |
}; | |
function h$$eK() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 2)]; | |
var c = h$stack[(h$sp - 1)]; | |
h$sp -= 4; | |
h$sp -= 5; | |
var d = a.d2; | |
var e = d.d5; | |
var f = d.d6; | |
if((e === f)) | |
{ | |
h$sp += 5; | |
++h$sp; | |
return h$$eM; | |
} | |
else | |
{ | |
h$sp += 5; | |
h$pp2(h$$eL); | |
h$l4(a, c, b, h$baseZCGHCziIOziBufferedIOziflushWriteBuffer); | |
return h$ap_4_3_fast(); | |
}; | |
}; | |
function h$$eJ() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 3)]; | |
h$sp -= 4; | |
h$sp -= 5; | |
if((a.f.a === 1)) | |
{ | |
h$sp += 5; | |
++h$sp; | |
return h$$eM; | |
} | |
else | |
{ | |
var c = b.val; | |
h$sp += 5; | |
h$pp8(h$$eK); | |
return h$e(c); | |
}; | |
}; | |
function h$$eI() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 6)]; | |
var c = h$stack[(h$sp - 5)]; | |
var d = h$stack[(h$sp - 2)]; | |
var e = h$stack[(h$sp - 1)]; | |
h$sp -= 9; | |
var f = a.d2; | |
var g = f.d3; | |
h$sp += 5; | |
h$stack[(h$sp - 2)] = d; | |
h$stack[(h$sp - 1)] = e; | |
h$pp14(b, c, h$$eJ); | |
return h$e(g); | |
}; | |
function h$$eH() | |
{ | |
var a = h$r1; | |
h$sp -= 3; | |
var b = a.d2; | |
var c = b.d1; | |
var d = b.d3; | |
var e = b.d4; | |
var f = b.d5; | |
var g = b.d10; | |
var h = b.d11; | |
var i = f.val; | |
h$sp += 9; | |
h$stack[(h$sp - 6)] = c; | |
h$stack[(h$sp - 5)] = d; | |
h$stack[(h$sp - 4)] = e; | |
h$stack[(h$sp - 3)] = f; | |
h$stack[(h$sp - 2)] = g; | |
h$stack[(h$sp - 1)] = h; | |
h$stack[h$sp] = h$$eI; | |
return h$e(i); | |
}; | |
function h$$eG() | |
{ | |
var a = h$r1; | |
h$sp -= 3; | |
h$pp4(h$$eH); | |
return h$e(a); | |
}; | |
function h$$eF() | |
{ | |
h$p3(h$r2, h$r3, h$$eG); | |
return h$takeMVar(h$r3); | |
}; | |
function h$$e8() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a.d1; | |
var c = a.d2; | |
var d = c.d1; | |
var e = c.d2; | |
h$r1 = h$c7(h$baseZCDataziTypeableziInternalziTypeRep_con_e, b, d, e, c.d3, h$baseZCGHCziIOziFDzizdtcFD, | |
h$ghczmprimZCGHCziTypesziZMZN, h$ghczmprimZCGHCziTypesziZMZN); | |
return h$rs(); | |
}; | |
function h$$e7() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$p1(h$$e8); | |
h$l2(h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, h$baseZCGHCziIOziHandleziFDzifdToHandle10, a), | |
h$baseZCGHCziFingerprintzifingerprintFingerprints); | |
return h$ap_1_1_fast(); | |
}; | |
function h$baseZCGHCziIOziHandleziFDzifdToHandle9_e() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$p1(h$$e7); | |
h$l3(b, b, a); | |
return h$ap_2_2_fast(); | |
}; | |
function h$baseZCGHCziIOziHandleziFDzifdToHandle8_e() | |
{ | |
return h$e(h$r1.d1); | |
}; | |
function h$$e9() | |
{ | |
var a = h$r1; | |
--h$sp; | |
return h$e(a); | |
}; | |
function h$baseZCGHCziIOziHandleziFDzistderr_e() | |
{ | |
var a = h$r1.d1; | |
h$bh(); | |
h$p1(h$$e9); | |
h$r1 = a; | |
return h$ap_1_0_fast(); | |
}; | |
function h$$fa() | |
{ | |
var a = h$r1; | |
--h$sp; | |
return h$e(a); | |
}; | |
function h$baseZCGHCziIOziHandleziFDzistdout_e() | |
{ | |
var a = h$r1.d1; | |
h$bh(); | |
h$p1(h$$fa); | |
h$r1 = a; | |
return h$ap_1_0_fast(); | |
}; | |
var h$baseZCGHCziIOziHandlezihFlush2 = h$strta("hFlush"); | |
function h$baseZCGHCziIOziHandlezihFlush1_e() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$l4(a, h$r2, b.d1, b.d2); | |
return h$ap_4_3_fast(); | |
}; | |
function h$baseZCGHCziIOziHandlezihFlush_e() | |
{ | |
h$r1 = h$r1.d1; | |
return h$ap_2_1_fast(); | |
}; | |
function h$$fo() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a; | |
if((b === (-1))) | |
{ | |
h$l2(h$$g8, h$baseZCForeignziCziErrorzithrowErrno1); | |
return h$ap_2_1_fast(); | |
} | |
else | |
{ | |
h$r1 = b; | |
}; | |
return h$rs(); | |
}; | |
function h$$fn() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = b.d1; | |
var d = b.d2; | |
var e = b.d3; | |
h$p1(h$$fo); | |
try | |
{ | |
var f; | |
var g = { mv: null | |
}; | |
f = h$mkForeignCallback(g); | |
h$base_write(a, c, d, e, f); | |
if((g.mv === null)) | |
{ | |
g.mv = new h$MVar(); | |
++h$sp; | |
h$stack[h$sp] = h$unboxFFIResult; | |
return h$takeMVar(g.mv); | |
} | |
else | |
{ | |
var h = g.mv; | |
h$r1 = h[0]; | |
}; | |
} | |
catch(h$GHCziIOziFD_id_2_0) | |
{ | |
return h$throwJSException(h$GHCziIOziFD_id_2_0); | |
}; | |
return h$rs(); | |
}; | |
function h$$fm() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 4)]; | |
var c = h$stack[(h$sp - 3)]; | |
var d = h$stack[(h$sp - 2)]; | |
var e = h$stack[(h$sp - 1)]; | |
h$sp -= 5; | |
var f = a; | |
if((f < e)) | |
{ | |
var g = c; | |
h$l5(((e - f) | 0), (d + f), g, b, h$baseZCGHCziIOziFDzizdwfdWrite); | |
return h$ap_4_4_fast(); | |
} | |
else | |
{ | |
h$r1 = h$ghczmprimZCGHCziTupleziZLZR; | |
}; | |
return h$rs(); | |
}; | |
function h$$fl() | |
{ | |
var a = h$r1; | |
h$sp -= 5; | |
h$pp16(h$$fm); | |
return h$e(a); | |
}; | |
function h$$fk() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 4)]; | |
var c = h$stack[(h$sp - 3)]; | |
var d = h$stack[(h$sp - 2)]; | |
var e = h$stack[(h$sp - 1)]; | |
h$sp -= 5; | |
var f = a; | |
if((f < e)) | |
{ | |
var g = c; | |
h$l5(((e - f) | 0), (d + f), g, b, h$baseZCGHCziIOziFDzizdwfdWrite); | |
return h$ap_4_4_fast(); | |
} | |
else | |
{ | |
h$r1 = h$ghczmprimZCGHCziTupleziZLZR; | |
}; | |
return h$rs(); | |
}; | |
function h$$fj() | |
{ | |
var a = h$r1; | |
h$sp -= 5; | |
h$pp16(h$$fk); | |
return h$e(a); | |
}; | |
function h$$fi() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 4)]; | |
var c = h$stack[(h$sp - 3)]; | |
var d = h$stack[(h$sp - 2)]; | |
var e = h$stack[(h$sp - 1)]; | |
h$sp -= 5; | |
var f = a; | |
if((f === (-1))) | |
{ | |
h$pp16(h$$fj); | |
h$l2(h$$g8, h$baseZCForeignziCziErrorzithrowErrno1); | |
return h$ap_2_1_fast(); | |
} | |
else | |
{ | |
if((f < e)) | |
{ | |
var g = c; | |
h$l5(((e - f) | 0), (d + f), g, b, h$baseZCGHCziIOziFDzizdwfdWrite); | |
return h$ap_4_4_fast(); | |
} | |
else | |
{ | |
h$r1 = h$ghczmprimZCGHCziTupleziZLZR; | |
}; | |
}; | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziFDzizdwfdWrite_e() | |
{ | |
var a = h$r2; | |
var b = h$r3; | |
var c = h$r4; | |
var d = h$r5; | |
var e = h$maskStatus(); | |
var f = e; | |
if((f === 1)) | |
{ | |
var g = d; | |
h$p5(a, b, c, d, h$$fi); | |
try | |
{ | |
var h; | |
var i = { mv: null | |
}; | |
h = h$mkForeignCallback(i); | |
h$base_write(a, b, c, g, h); | |
if((i.mv === null)) | |
{ | |
i.mv = new h$MVar(); | |
++h$sp; | |
h$stack[h$sp] = h$unboxFFIResult; | |
return h$takeMVar(i.mv); | |
} | |
else | |
{ | |
var j = i.mv; | |
h$r1 = j[0]; | |
}; | |
} | |
catch(h$GHCziIOziFD_id_2_3) | |
{ | |
return h$throwJSException(h$GHCziIOziFD_id_2_3); | |
}; | |
} | |
else | |
{ | |
h$p5(a, b, c, d, h$$fl); | |
return h$maskUnintAsync(h$c4(h$$fn, a, b, c, d)); | |
}; | |
return h$rs(); | |
}; | |
var h$$g8 = h$strta("GHC.IO.FD.fdWrite"); | |
var h$baseZCGHCziIOziFDzizdfIODeviceFD19 = h$strta("GHC.IO.FD.ready"); | |
function h$$fv() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$r1 = a; | |
return h$rs(); | |
}; | |
function h$$fu() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$r1 = a; | |
return h$rs(); | |
}; | |
function h$$ft() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 2)]; | |
var c = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
if(a) | |
{ | |
h$p1(h$$fu); | |
h$r1 = h$fdReady(b, 1, c, 0); | |
} | |
else | |
{ | |
h$p1(h$$fv); | |
h$r1 = h$fdReady(b, 0, c, 0); | |
}; | |
return h$rs(); | |
}; | |
function h$$fs() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = b.d1; | |
h$p3(a, b.d2, h$$ft); | |
return h$e(c); | |
}; | |
function h$$fr() | |
{ | |
var a = h$r1; | |
--h$sp; | |
switch (a) | |
{ | |
case (0): | |
h$r1 = false; | |
break; | |
case (1): | |
h$r1 = true; | |
break; | |
default: | |
return h$e(h$baseZCGHCziEnumzizdfEnumBool1); | |
}; | |
return h$rs(); | |
}; | |
function h$$fq() | |
{ | |
var a = h$r1.d1; | |
h$bh(); | |
h$p1(h$$fr); | |
return h$e(a); | |
}; | |
function h$$fp() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$r1 = h$c1(h$$fq, a); | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziFDzizdwzdcready_e() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$p1(h$$fp); | |
h$l4(h$c3(h$$fs, h$r2, h$r3, h$r4), a, b.d1, b.d2); | |
return h$ap_4_3_fast(); | |
}; | |
function h$$fx() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 2)]; | |
var c = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
h$l4(a, b, c, h$baseZCGHCziIOziFDzizdwzdcready); | |
return h$ap_4_3_fast(); | |
}; | |
function h$$fw() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
h$pp6(a.d1, h$$fx); | |
return h$e(b); | |
}; | |
function h$baseZCGHCziIOziFDzizdfIODeviceFD18_e() | |
{ | |
h$p3(h$r3, h$r4, h$$fw); | |
return h$e(h$r2); | |
}; | |
function h$$fy() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a; | |
if((b === (-1))) | |
{ | |
h$r1 = true; | |
} | |
else | |
{ | |
h$r1 = false; | |
}; | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziFDzizdfIODeviceFD17_e() | |
{ | |
h$p1(h$$fy); | |
return h$e(h$r2); | |
}; | |
var h$baseZCGHCziIOziFDzizdfIODeviceFD16 = h$strta("GHC.IO.FD.close"); | |
function h$$fB() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$r1 = a; | |
return h$rs(); | |
}; | |
function h$$fA() | |
{ | |
var a = h$r1.d1; | |
h$p1(h$$fB); | |
try | |
{ | |
var b; | |
var c = { mv: null | |
}; | |
b = h$mkForeignCallback(c); | |
h$base_close(a, b); | |
if((c.mv === null)) | |
{ | |
c.mv = new h$MVar(); | |
++h$sp; | |
h$stack[h$sp] = h$unboxFFIResult; | |
return h$takeMVar(c.mv); | |
} | |
else | |
{ | |
var d = c.mv; | |
h$r1 = d[0]; | |
}; | |
} | |
catch(h$GHCziIOziFD_id_43_0) | |
{ | |
return h$throwJSException(h$GHCziIOziFD_id_43_0); | |
}; | |
return h$rs(); | |
}; | |
function h$$fz() | |
{ | |
--h$sp; | |
h$r1 = h$ghczmprimZCGHCziTupleziZLZR; | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziFDzizdwzdcclose_e() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = b.d1; | |
var d = b.d2; | |
var e = h$r2; | |
var f = h$unlockFile(h$r2); | |
h$p1(h$$fz); | |
h$l4(h$c1(h$$fA, e), a, c, d); | |
return h$ap_4_3_fast(); | |
}; | |
function h$$fC() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$l2(a.d1, h$baseZCGHCziIOziFDzizdwzdcclose); | |
return h$ap_2_1_fast(); | |
}; | |
function h$baseZCGHCziIOziFDzizdfIODeviceFD15_e() | |
{ | |
h$p1(h$$fC); | |
return h$e(h$r2); | |
}; | |
function h$$fD() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = h$base_isatty(a.d1); | |
var c; | |
var d = b; | |
if((d === 0)) | |
{ | |
c = false; | |
} | |
else | |
{ | |
c = true; | |
}; | |
h$r1 = c; | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziFDzizdfIODeviceFD14_e() | |
{ | |
h$p1(h$$fD); | |
return h$e(h$r2); | |
}; | |
function h$$fJ() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$r1 = a.d1; | |
return h$rs(); | |
}; | |
function h$$fI() | |
{ | |
var a = h$r1.d1; | |
h$bh(); | |
h$p1(h$$fJ); | |
return h$e(a); | |
}; | |
function h$$fH() | |
{ | |
var a = h$r1; | |
--h$sp; | |
switch (a.f.a) | |
{ | |
case (3): | |
h$r1 = true; | |
break; | |
case (4): | |
h$r1 = true; | |
break; | |
default: | |
h$r1 = false; | |
}; | |
return h$rs(); | |
}; | |
function h$$fG() | |
{ | |
var a = h$r1.d1; | |
h$bh(); | |
h$p1(h$$fH); | |
return h$e(a); | |
}; | |
function h$$fF() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$r1 = h$c1(h$$fG, a.d1); | |
return h$rs(); | |
}; | |
function h$$fE() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$p1(h$$fF); | |
return h$e(a); | |
}; | |
function h$baseZCGHCziIOziFDzizdfIODeviceFD13_e() | |
{ | |
h$p1(h$$fE); | |
h$l2(h$c1(h$$fI, h$r2), h$r1.d1); | |
return h$ap_2_1_fast(); | |
}; | |
var h$baseZCGHCziIOziFDzizdfIODeviceFDzuloc2 = h$strta("seek"); | |
function h$$fQ() | |
{ | |
var a; | |
var b; | |
a = h$r1; | |
b = h$r2; | |
--h$sp; | |
h$r1 = h$c2(h$baseZCGHCziIntziI64zh_con_e, a, b); | |
return h$rs(); | |
}; | |
function h$$fP() | |
{ | |
var a; | |
var b; | |
a = h$r1; | |
b = h$r2; | |
--h$sp; | |
h$r1 = h$c2(h$baseZCGHCziIntziI64zh_con_e, a, b); | |
return h$rs(); | |
}; | |
function h$$fO() | |
{ | |
var a; | |
var b; | |
a = h$r1; | |
b = h$r2; | |
--h$sp; | |
h$r1 = h$c2(h$baseZCGHCziIntziI64zh_con_e, a, b); | |
return h$rs(); | |
}; | |
function h$$fN() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 3)]; | |
var c = h$stack[(h$sp - 2)]; | |
var d = h$stack[(h$sp - 1)]; | |
h$sp -= 4; | |
switch (a.f.a) | |
{ | |
case (1): | |
var e = h$base_SEEK_SET; | |
h$p1(h$$fQ); | |
try | |
{ | |
var f; | |
var g = { mv: null | |
}; | |
f = h$mkForeignCallback(g); | |
h$base_lseek(b, c, d, e, f); | |
if((g.mv === null)) | |
{ | |
g.mv = new h$MVar(); | |
++h$sp; | |
h$stack[h$sp] = h$unboxFFIResult; | |
return h$takeMVar(g.mv); | |
} | |
else | |
{ | |
var h = g.mv; | |
h$r1 = h[0]; | |
h$r2 = h[1]; | |
}; | |
} | |
catch(h$GHCziIOziFD_id_51_0) | |
{ | |
return h$throwJSException(h$GHCziIOziFD_id_51_0); | |
}; | |
break; | |
case (2): | |
var i = h$base_SEEK_CUR; | |
h$p1(h$$fP); | |
try | |
{ | |
var j; | |
var k = { mv: null | |
}; | |
j = h$mkForeignCallback(k); | |
h$base_lseek(b, c, d, i, j); | |
if((k.mv === null)) | |
{ | |
k.mv = new h$MVar(); | |
++h$sp; | |
h$stack[h$sp] = h$unboxFFIResult; | |
return h$takeMVar(k.mv); | |
} | |
else | |
{ | |
var l = k.mv; | |
h$r1 = l[0]; | |
h$r2 = l[1]; | |
}; | |
} | |
catch(h$GHCziIOziFD_id_51_3) | |
{ | |
return h$throwJSException(h$GHCziIOziFD_id_51_3); | |
}; | |
break; | |
default: | |
var m = h$base_SEEK_END; | |
h$p1(h$$fO); | |
try | |
{ | |
var n; | |
var o = { mv: null | |
}; | |
n = h$mkForeignCallback(o); | |
h$base_lseek(b, c, d, m, n); | |
if((o.mv === null)) | |
{ | |
o.mv = new h$MVar(); | |
++h$sp; | |
h$stack[h$sp] = h$unboxFFIResult; | |
return h$takeMVar(o.mv); | |
} | |
else | |
{ | |
var p = o.mv; | |
h$r1 = p[0]; | |
h$r2 = p[1]; | |
}; | |
} | |
catch(h$GHCziIOziFD_id_51_6) | |
{ | |
return h$throwJSException(h$GHCziIOziFD_id_51_6); | |
}; | |
}; | |
return h$rs(); | |
}; | |
function h$$fM() | |
{ | |
var a; | |
var b; | |
a = h$r1; | |
b = h$r2; | |
var c = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
h$pp14(a, b, h$$fN); | |
return h$e(c); | |
}; | |
function h$$fL() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$p3(a, b.d1, h$$fM); | |
h$l2(b.d2, h$integerzmgmpZCGHCziIntegerziTypeziintegerToInt64); | |
return h$ap_1_1_fast(); | |
}; | |
function h$$fK() | |
{ | |
--h$sp; | |
h$r1 = h$ghczmprimZCGHCziTupleziZLZR; | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziFDzizdwzdcseek_e() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$p1(h$$fK); | |
h$l4(h$c3(h$$fL, h$r2, h$r3, h$r4), a, b.d1, b.d2); | |
return h$ap_4_3_fast(); | |
}; | |
function h$$fR() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 2)]; | |
var c = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
h$l4(c, b, a.d1, h$baseZCGHCziIOziFDzizdwzdcseek); | |
return h$ap_4_3_fast(); | |
}; | |
function h$baseZCGHCziIOziFDzizdfIODeviceFD12_e() | |
{ | |
h$p3(h$r3, h$r4, h$$fR); | |
return h$e(h$r2); | |
}; | |
function h$baseZCGHCziIOziFDzizdfIODeviceFDzuds_e() | |
{ | |
h$bh(); | |
var a = h$hs_negateInt64(0, 1); | |
h$r1 = h$c2(h$baseZCGHCziIntziI64zh_con_e, a, h$ret1); | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziFDzizdfIODeviceFDzupred_e() | |
{ | |
h$r3 = h$r1.d1; | |
h$r1 = h$r1.d2; | |
return h$ap_2_2_fast(); | |
}; | |
var h$baseZCGHCziIOziFDzizdfIODeviceFD11 = h$strta("hGetPosn"); | |
function h$$fW() | |
{ | |
var a; | |
var b; | |
a = h$r1; | |
b = h$r2; | |
--h$sp; | |
h$r1 = h$c2(h$baseZCGHCziIntziI64zh_con_e, a, b); | |
return h$rs(); | |
}; | |
function h$$fV() | |
{ | |
var a = h$r1.d1; | |
var b = h$base_SEEK_CUR; | |
h$p1(h$$fW); | |
try | |
{ | |
var c; | |
var d = { mv: null | |
}; | |
c = h$mkForeignCallback(d); | |
h$base_lseek(a, 0, 0, b, c); | |
if((d.mv === null)) | |
{ | |
d.mv = new h$MVar(); | |
++h$sp; | |
h$stack[h$sp] = h$unboxFFIResult; | |
return h$takeMVar(d.mv); | |
} | |
else | |
{ | |
var e = d.mv; | |
h$r1 = e[0]; | |
h$r2 = e[1]; | |
}; | |
} | |
catch(h$GHCziIOziFD_id_57_0) | |
{ | |
return h$throwJSException(h$GHCziIOziFD_id_57_0); | |
}; | |
return h$rs(); | |
}; | |
function h$$fU() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a.d1; | |
h$l3(a.d2, b, h$integerzmgmpZCGHCziIntegerziTypeziint64ToInteger); | |
return h$ap_1_2_fast(); | |
}; | |
function h$$fT() | |
{ | |
var a = h$r1.d1; | |
h$bh(); | |
h$p1(h$$fU); | |
return h$e(a); | |
}; | |
function h$$fS() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$r1 = h$c1(h$$fT, a); | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziFDzizdwzdctell_e() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$p1(h$$fS); | |
h$l4(h$c1(h$$fV, h$r2), a, b.d1, b.d2); | |
return h$ap_4_3_fast(); | |
}; | |
function h$$fX() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$l2(a.d1, h$baseZCGHCziIOziFDzizdwzdctell); | |
return h$ap_2_1_fast(); | |
}; | |
function h$baseZCGHCziIOziFDzizdfIODeviceFD10_e() | |
{ | |
h$p1(h$$fX); | |
return h$e(h$r2); | |
}; | |
function h$$fZ() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$r1 = a.d1; | |
return h$rs(); | |
}; | |
function h$$fY() | |
{ | |
var a = h$r1.d1; | |
h$bh(); | |
h$p1(h$$fZ); | |
return h$e(a); | |
}; | |
function h$baseZCGHCziIOziFDzizdfIODeviceFD9_e() | |
{ | |
h$l2(h$c1(h$$fY, h$r2), h$r1.d1); | |
return h$ap_2_1_fast(); | |
}; | |
var h$baseZCGHCziIOziFDzizdfIODeviceFD8 = h$strta("GHC.IO.FD.setSize"); | |
function h$$f2() | |
{ | |
--h$sp; | |
h$r1 = h$ghczmprimZCGHCziTupleziZLZR; | |
return h$rs(); | |
}; | |
function h$$f1() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a; | |
if((b === 0)) | |
{ | |
h$r1 = h$ghczmprimZCGHCziTupleziZLZR; | |
} | |
else | |
{ | |
h$p1(h$$f2); | |
h$l2(h$baseZCGHCziIOziFDzizdfIODeviceFD8, h$baseZCForeignziCziErrorzithrowErrno1); | |
return h$ap_2_1_fast(); | |
}; | |
return h$rs(); | |
}; | |
function h$$f0() | |
{ | |
var a; | |
var b; | |
a = h$r1; | |
b = h$r2; | |
var c = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$p1(h$$f1); | |
try | |
{ | |
var d; | |
var e = { mv: null | |
}; | |
d = h$mkForeignCallback(e); | |
h$base_ftruncate(c, a, b, d); | |
if((e.mv === null)) | |
{ | |
e.mv = new h$MVar(); | |
++h$sp; | |
h$stack[h$sp] = h$unboxFFIResult; | |
return h$takeMVar(e.mv); | |
} | |
else | |
{ | |
var f = e.mv; | |
h$r1 = f[0]; | |
}; | |
} | |
catch(h$GHCziIOziFD_id_63_0) | |
{ | |
return h$throwJSException(h$GHCziIOziFD_id_63_0); | |
}; | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziFDzizdwsetSizze_e() | |
{ | |
h$p2(h$r2, h$$f0); | |
h$l2(h$r3, h$r1.d1); | |
return h$ap_1_1_fast(); | |
}; | |
function h$$f3() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$l3(b, a.d1, h$baseZCGHCziIOziFDzizdwsetSizze); | |
return h$ap_3_2_fast(); | |
}; | |
function h$baseZCGHCziIOziFDzizdfIODeviceFD7_e() | |
{ | |
h$p2(h$r3, h$$f3); | |
return h$e(h$r2); | |
}; | |
function h$$f5() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$r1 = a.d1; | |
return h$rs(); | |
}; | |
function h$$f4() | |
{ | |
var a = h$r1.d1; | |
h$bh(); | |
h$p1(h$$f5); | |
return h$e(a); | |
}; | |
function h$baseZCGHCziIOziFDzizdfIODeviceFD6_e() | |
{ | |
h$l2(h$c1(h$$f4, h$r2), h$r1.d1); | |
return h$ap_3_2_fast(); | |
}; | |
function h$$f7() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$r1 = a.d1; | |
return h$rs(); | |
}; | |
function h$$f6() | |
{ | |
var a = h$r1.d1; | |
h$bh(); | |
h$p1(h$$f7); | |
return h$e(a); | |
}; | |
function h$baseZCGHCziIOziFDzizdfIODeviceFD5_e() | |
{ | |
h$l3(h$r1.d1, h$c1(h$$f6, h$r2), h$r1.d2); | |
return h$ap_3_2_fast(); | |
}; | |
function h$$gb() | |
{ | |
var a = h$r1; | |
--h$sp; | |
if(a) | |
{ | |
h$r1 = false; | |
} | |
else | |
{ | |
h$r1 = true; | |
}; | |
return h$rs(); | |
}; | |
function h$$ga() | |
{ | |
h$p1(h$$gb); | |
return h$e(h$r1.d1); | |
}; | |
function h$$f9() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$r1 = a.d1; | |
return h$rs(); | |
}; | |
function h$$f8() | |
{ | |
var a = h$r1.d1; | |
h$bh(); | |
h$p1(h$$f9); | |
return h$e(a); | |
}; | |
function h$baseZCGHCziIOziFDzizdfIODeviceFD4_e() | |
{ | |
h$l3(h$c1(h$$ga, h$r3), h$c1(h$$f8, h$r2), h$r1.d1); | |
return h$ap_3_2_fast(); | |
}; | |
function h$$gf() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$r1 = a.d1; | |
return h$rs(); | |
}; | |
function h$$ge() | |
{ | |
var a = h$r1.d1; | |
h$bh(); | |
h$p1(h$$gf); | |
return h$e(a); | |
}; | |
function h$$gd() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$r1 = a.d1; | |
return h$rs(); | |
}; | |
function h$$gc() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$p1(h$$gd); | |
return h$e(a); | |
}; | |
function h$baseZCGHCziIOziFDzizdfIODeviceFD3_e() | |
{ | |
h$p1(h$$gc); | |
h$l2(h$c1(h$$ge, h$r2), h$r1.d1); | |
return h$ap_2_1_fast(); | |
}; | |
var h$baseZCGHCziIOziFDzizdfIODeviceFDzuloc1 = h$strta("GHC.IO.FD.dup"); | |
function h$$gj() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$r1 = h$c2(h$baseZCGHCziIOziFDziFD_con_e, a, b); | |
return h$rs(); | |
}; | |
function h$$gi() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$p2(a, h$$gj); | |
return h$e(b); | |
}; | |
function h$$gh() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$r1 = h$c2(h$$gi, b, a); | |
return h$rs(); | |
}; | |
function h$$gg() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
var c = a; | |
if((c === (-1))) | |
{ | |
h$pp2(h$$gh); | |
h$l2(h$baseZCGHCziIOziFDzizdfIODeviceFDzuloc1, h$baseZCForeignziCziErrorzithrowErrno1); | |
return h$ap_2_1_fast(); | |
} | |
else | |
{ | |
h$r1 = h$c2(h$baseZCGHCziIOziFDziFD_con_e, c, b); | |
}; | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziFDzizdwzdcdup_e() | |
{ | |
var a = h$r2; | |
h$p2(h$r3, h$$gg); | |
try | |
{ | |
var b; | |
var c = { mv: null | |
}; | |
b = h$mkForeignCallback(c); | |
h$base_dup(a, b); | |
if((c.mv === null)) | |
{ | |
c.mv = new h$MVar(); | |
++h$sp; | |
h$stack[h$sp] = h$unboxFFIResult; | |
return h$takeMVar(c.mv); | |
} | |
else | |
{ | |
var d = c.mv; | |
h$r1 = d[0]; | |
}; | |
} | |
catch(h$GHCziIOziFD_id_73_0) | |
{ | |
return h$throwJSException(h$GHCziIOziFD_id_73_0); | |
}; | |
return h$rs(); | |
}; | |
function h$$gk() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a.d1; | |
h$l3(a.d2, b, h$baseZCGHCziIOziFDzizdwzdcdup); | |
return h$ap_3_2_fast(); | |
}; | |
function h$baseZCGHCziIOziFDzizdfIODeviceFD2_e() | |
{ | |
h$p1(h$$gk); | |
return h$e(h$r2); | |
}; | |
var h$baseZCGHCziIOziFDzizdfIODeviceFDzuloc = h$strta("GHC.IO.FD.dup2"); | |
function h$$gm() | |
{ | |
var a = h$stack[(h$sp - 2)]; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
h$r1 = h$c2(h$baseZCGHCziIOziFDziFD_con_e, b, a); | |
return h$rs(); | |
}; | |
function h$$gl() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 2)]; | |
var c = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
var d = a; | |
if((d === (-1))) | |
{ | |
h$pp4(h$$gm); | |
h$l2(h$baseZCGHCziIOziFDzizdfIODeviceFDzuloc, h$baseZCForeignziCziErrorzithrowErrno1); | |
return h$ap_2_1_fast(); | |
} | |
else | |
{ | |
h$r1 = h$c2(h$baseZCGHCziIOziFDziFD_con_e, c, b); | |
}; | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziFDzizdwzdcdup2_e() | |
{ | |
var a = h$r2; | |
var b = h$r4; | |
h$p3(h$r3, h$r4, h$$gl); | |
try | |
{ | |
var c; | |
var d = { mv: null | |
}; | |
c = h$mkForeignCallback(d); | |
h$base_dup2(a, b, c); | |
if((d.mv === null)) | |
{ | |
d.mv = new h$MVar(); | |
++h$sp; | |
h$stack[h$sp] = h$unboxFFIResult; | |
return h$takeMVar(d.mv); | |
} | |
else | |
{ | |
var e = d.mv; | |
h$r1 = e[0]; | |
}; | |
} | |
catch(h$GHCziIOziFD_id_77_0) | |
{ | |
return h$throwJSException(h$GHCziIOziFD_id_77_0); | |
}; | |
return h$rs(); | |
}; | |
function h$$go() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 2)]; | |
var c = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
h$l4(a.d1, c, b, h$baseZCGHCziIOziFDzizdwzdcdup2); | |
return h$ap_4_3_fast(); | |
}; | |
function h$$gn() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
var c = a.d1; | |
h$p3(c, a.d2, h$$go); | |
return h$e(b); | |
}; | |
function h$baseZCGHCziIOziFDzizdfIODeviceFD1_e() | |
{ | |
h$p2(h$r3, h$$gn); | |
return h$e(h$r2); | |
}; | |
function h$baseZCGHCziIOziFDzizdfBufferedIOFD13_e() | |
{ | |
var a = h$r1.d1; | |
var b = h$r3; | |
var c = new h$MutVar(a); | |
var d = h$newByteArray(8096); | |
h$r1 = h$c7(h$baseZCGHCziIOziBufferziBuffer_con_e, d, 0, h$c2(h$baseZCGHCziForeignPtrziMallocPtr_con_e, d, c), b, 8096, | |
0, 0); | |
return h$rs(); | |
}; | |
var h$baseZCGHCziIOziFDzizdfBufferedIOFD12 = h$strta("GHC.IO.FD.fdRead"); | |
function h$$gB() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a; | |
if((b === (-1))) | |
{ | |
h$l2(h$baseZCGHCziIOziFDzizdfBufferedIOFD12, h$baseZCForeignziCziErrorzithrowErrno1); | |
return h$ap_2_1_fast(); | |
} | |
else | |
{ | |
h$r1 = b; | |
}; | |
return h$rs(); | |
}; | |
function h$$gA() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = b.d1; | |
var d = b.d2; | |
var e = b.d3; | |
var f = b.d4; | |
var g = ((e - f) | 0); | |
var h; | |
var i; | |
h = c; | |
i = (d + f); | |
h$p1(h$$gB); | |
try | |
{ | |
var j; | |
var k = { mv: null | |
}; | |
j = h$mkForeignCallback(k); | |
h$base_read(a, h, i, g, j); | |
if((k.mv === null)) | |
{ | |
k.mv = new h$MVar(); | |
++h$sp; | |
h$stack[h$sp] = h$unboxFFIResult; | |
return h$takeMVar(k.mv); | |
} | |
else | |
{ | |
var l = k.mv; | |
h$r1 = l[0]; | |
}; | |
} | |
catch(h$GHCziIOziFD_id_83_0) | |
{ | |
return h$throwJSException(h$GHCziIOziFD_id_83_0); | |
}; | |
return h$rs(); | |
}; | |
function h$$gz() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$r1 = a; | |
return h$rs(); | |
}; | |
function h$$gy() | |
{ | |
var a = h$r1.d1; | |
h$bh(); | |
h$p1(h$$gz); | |
return h$e(a); | |
}; | |
function h$$gx() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 7)]; | |
var c = h$stack[(h$sp - 6)]; | |
var d = h$stack[(h$sp - 5)]; | |
var e = h$stack[(h$sp - 4)]; | |
var f = h$stack[(h$sp - 3)]; | |
var g = h$stack[(h$sp - 2)]; | |
var h = h$stack[(h$sp - 1)]; | |
h$sp -= 8; | |
var i = a; | |
h$r1 = h$c7(h$baseZCGHCziIOziBufferziBuffer_con_e, b, c, d, e, f, g, ((h + i) | 0)); | |
return h$rs(); | |
}; | |
function h$$gw() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = b.d1; | |
var d = b.d2; | |
var e = b.d3; | |
var f = b.d4; | |
var g = b.d5; | |
h$bh(); | |
h$p8(a, c, d, e, f, g, b.d6, h$$gx); | |
return h$e(b.d7); | |
}; | |
function h$$gv() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 7)]; | |
var c = h$stack[(h$sp - 6)]; | |
var d = h$stack[(h$sp - 5)]; | |
var e = h$stack[(h$sp - 4)]; | |
var f = h$stack[(h$sp - 3)]; | |
var g = h$stack[(h$sp - 2)]; | |
var h = h$stack[(h$sp - 1)]; | |
h$sp -= 8; | |
var i = h$c1(h$$gy, a); | |
h$r1 = h$c2(h$ghczmprimZCGHCziTupleziZLz2cUZR_con_e, i, h$c8(h$$gw, b, c, d, e, f, g, h, i)); | |
return h$rs(); | |
}; | |
function h$$gu() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$r1 = a; | |
return h$rs(); | |
}; | |
function h$$gt() | |
{ | |
var a = h$r1.d1; | |
h$bh(); | |
h$p1(h$$gu); | |
return h$e(a); | |
}; | |
function h$$gs() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 7)]; | |
var c = h$stack[(h$sp - 6)]; | |
var d = h$stack[(h$sp - 5)]; | |
var e = h$stack[(h$sp - 4)]; | |
var f = h$stack[(h$sp - 3)]; | |
var g = h$stack[(h$sp - 2)]; | |
var h = h$stack[(h$sp - 1)]; | |
h$sp -= 8; | |
var i = a; | |
h$r1 = h$c7(h$baseZCGHCziIOziBufferziBuffer_con_e, b, c, d, e, f, g, ((h + i) | 0)); | |
return h$rs(); | |
}; | |
function h$$gr() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = b.d1; | |
var d = b.d2; | |
var e = b.d3; | |
var f = b.d4; | |
var g = b.d5; | |
h$bh(); | |
h$p8(a, c, d, e, f, g, b.d6, h$$gs); | |
return h$e(b.d7); | |
}; | |
function h$$gq() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 7)]; | |
var c = h$stack[(h$sp - 6)]; | |
var d = h$stack[(h$sp - 5)]; | |
var e = h$stack[(h$sp - 4)]; | |
var f = h$stack[(h$sp - 3)]; | |
var g = h$stack[(h$sp - 2)]; | |
var h = h$stack[(h$sp - 1)]; | |
h$sp -= 8; | |
var i = h$c1(h$$gt, a); | |
h$r1 = h$c2(h$ghczmprimZCGHCziTupleziZLz2cUZR_con_e, i, h$c8(h$$gr, b, c, d, e, f, g, h, i)); | |
return h$rs(); | |
}; | |
function h$$gp() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 7)]; | |
var c = h$stack[(h$sp - 6)]; | |
var d = h$stack[(h$sp - 5)]; | |
var e = h$stack[(h$sp - 4)]; | |
var f = h$stack[(h$sp - 3)]; | |
var g = h$stack[(h$sp - 2)]; | |
var h = h$stack[(h$sp - 1)]; | |
h$sp -= 8; | |
var i = a; | |
if((i === (-1))) | |
{ | |
h$pp128(h$$gq); | |
h$l2(h$baseZCGHCziIOziFDzizdfBufferedIOFD12, h$baseZCForeignziCziErrorzithrowErrno1); | |
return h$ap_2_1_fast(); | |
} | |
else | |
{ | |
h$r1 = h$c2(h$ghczmprimZCGHCziTupleziZLz2cUZR_con_e, i, h$c7(h$baseZCGHCziIOziBufferziBuffer_con_e, b, c, d, e, f, g, | |
((h + i) | 0))); | |
}; | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziFDzizdwzdcfillReadBuffer_e() | |
{ | |
var a = h$r2; | |
var b = h$r3; | |
var c = h$r4; | |
var d = h$r5; | |
var e = h$r6; | |
var f = h$r7; | |
var g = h$r8; | |
var h = h$r9; | |
var i = h$maskStatus(); | |
var j = i; | |
if((j === 1)) | |
{ | |
var k = ((f - h) | 0); | |
var l; | |
var m; | |
l = b; | |
m = (c + h); | |
h$p8(b, c, d, e, f, g, h, h$$gp); | |
try | |
{ | |
var n; | |
var o = { mv: null | |
}; | |
n = h$mkForeignCallback(o); | |
h$base_read(a, l, m, k, n); | |
if((o.mv === null)) | |
{ | |
o.mv = new h$MVar(); | |
++h$sp; | |
h$stack[h$sp] = h$unboxFFIResult; | |
return h$takeMVar(o.mv); | |
} | |
else | |
{ | |
var p = o.mv; | |
h$r1 = p[0]; | |
}; | |
} | |
catch(h$GHCziIOziFD_id_83_3) | |
{ | |
return h$throwJSException(h$GHCziIOziFD_id_83_3); | |
}; | |
} | |
else | |
{ | |
h$p8(b, c, d, e, f, g, h, h$$gv); | |
return h$maskUnintAsync(h$c5(h$$gA, a, b, c, f, h)); | |
}; | |
return h$rs(); | |
}; | |
function h$$gD() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
var c = a.d1; | |
var d = a.d2; | |
var e = d.d1; | |
var f = d.d2; | |
var g = d.d3; | |
var h = d.d4; | |
var i = d.d5; | |
h$l9(d.d6, i, h, g, f, e, c, b, h$baseZCGHCziIOziFDzizdwzdcfillReadBuffer); | |
return h$ap_gen_fast(2056); | |
}; | |
function h$$gC() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$p2(a.d1, h$$gD); | |
return h$e(b); | |
}; | |
function h$baseZCGHCziIOziFDzizdfBufferedIOFD11_e() | |
{ | |
h$p2(h$r3, h$$gC); | |
return h$e(h$r2); | |
}; | |
function h$$gH() | |
{ | |
var a = h$r1; | |
--h$sp; | |
switch (a) | |
{ | |
case ((-1)): | |
h$r1 = h$baseZCGHCziIOziFDzizdfBufferedIOFD2; | |
break; | |
case (0): | |
h$r1 = h$baseZCGHCziIOziFDzizdfBufferedIOFD10; | |
break; | |
default: | |
h$r1 = a; | |
}; | |
return h$rs(); | |
}; | |
function h$$gG() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$p1(h$$gH); | |
return h$e(a); | |
}; | |
function h$$gF() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
switch (a) | |
{ | |
case ((-1)): | |
h$p1(h$$gG); | |
h$l2(b, h$baseZCForeignziCziErrorzithrowErrno1); | |
return h$ap_2_1_fast(); | |
case (0): | |
h$r1 = h$baseZCGHCziIOziFDzizdfBufferedIOFD10; | |
break; | |
default: | |
h$r1 = a; | |
}; | |
return h$rs(); | |
}; | |
function h$$gE() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = b.d1; | |
var d = b.d2; | |
var e = b.d3; | |
var f = b.d4; | |
var g = b.d5; | |
var h; | |
var i; | |
h = d; | |
i = (e + f); | |
h$p2(a, h$$gF); | |
try | |
{ | |
var j; | |
var k = { mv: null | |
}; | |
j = h$mkForeignCallback(k); | |
h$base_read(c, h, i, g, j); | |
if((k.mv === null)) | |
{ | |
k.mv = new h$MVar(); | |
++h$sp; | |
h$stack[h$sp] = h$unboxFFIResult; | |
return h$takeMVar(k.mv); | |
} | |
else | |
{ | |
var l = k.mv; | |
h$r1 = l[0]; | |
}; | |
} | |
catch(h$GHCziIOziFD_id_87_0) | |
{ | |
return h$throwJSException(h$GHCziIOziFD_id_87_0); | |
}; | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziFDzizdwreadRawBufferPtrNoBlock_e() | |
{ | |
var a = h$r2; | |
var b = h$r3; | |
var c = h$r4; | |
var d = h$r5; | |
var e = h$r6; | |
var f = h$r7; | |
var g = h$maskStatus(); | |
var h = h$c6(h$$gE, a, b, c, d, e, f); | |
var i = g; | |
if((i === 1)) | |
{ | |
h$r1 = h; | |
return h$ap_1_0_fast(); | |
} | |
else | |
{ | |
return h$maskUnintAsync(h); | |
}; | |
}; | |
var h$baseZCGHCziIOziFDzizdfBufferedIOFD9 = h$strta("GHC.IO.FD.fdReadNonBlocking"); | |
function h$$gJ() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 7)]; | |
var c = h$stack[(h$sp - 6)]; | |
var d = h$stack[(h$sp - 5)]; | |
var e = h$stack[(h$sp - 4)]; | |
var f = h$stack[(h$sp - 3)]; | |
var g = h$stack[(h$sp - 2)]; | |
var h = h$stack[(h$sp - 1)]; | |
h$sp -= 8; | |
var i = a; | |
if((i === (-1))) | |
{ | |
h$r1 = h$c2(h$ghczmprimZCGHCziTupleziZLz2cUZR_con_e, h$baseZCGHCziBaseziNothing, | |
h$c7(h$baseZCGHCziIOziBufferziBuffer_con_e, b, c, d, e, f, g, h)); | |
} | |
else | |
{ | |
h$r1 = h$c2(h$ghczmprimZCGHCziTupleziZLz2cUZR_con_e, h$c1(h$baseZCGHCziBaseziJust_con_e, a), | |
h$c7(h$baseZCGHCziIOziBufferziBuffer_con_e, b, c, d, e, f, g, ((h + i) | 0))); | |
}; | |
return h$rs(); | |
}; | |
function h$$gI() | |
{ | |
var a = h$r1; | |
h$sp -= 8; | |
h$pp128(h$$gJ); | |
return h$e(a); | |
}; | |
function h$baseZCGHCziIOziFDzizdwzdcfillReadBuffer0_e() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = h$r2; | |
var d = h$r4; | |
var e = h$r7; | |
var f = h$r9; | |
var g = h$r3; | |
h$p8(h$r3, h$r4, h$r5, h$r6, h$r7, h$r8, h$r9, h$$gI); | |
h$l7(((e - f) | 0), 0, (d + f), g, c, a, b); | |
return h$ap_gen_fast(1542); | |
}; | |
function h$$gL() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
var c = a.d1; | |
var d = a.d2; | |
var e = d.d1; | |
var f = d.d2; | |
var g = d.d3; | |
var h = d.d4; | |
var i = d.d5; | |
h$l9(d.d6, i, h, g, f, e, c, b, h$baseZCGHCziIOziFDzizdwzdcfillReadBuffer0); | |
return h$ap_gen_fast(2056); | |
}; | |
function h$$gK() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$p2(a.d1, h$$gL); | |
return h$e(b); | |
}; | |
function h$baseZCGHCziIOziFDzizdfBufferedIOFD8_e() | |
{ | |
h$p2(h$r3, h$$gK); | |
return h$e(h$r2); | |
}; | |
function h$$gN() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a.d1; | |
var c = a.d2; | |
var d = c.d1; | |
var e = c.d2; | |
h$r1 = h$c7(h$baseZCGHCziIOziBufferziBuffer_con_e, b, d, e, h$baseZCGHCziIOziBufferziWriteBuffer, c.d4, 0, 0); | |
return h$rs(); | |
}; | |
function h$$gM() | |
{ | |
var a = h$r1.d1; | |
h$bh(); | |
h$p1(h$$gN); | |
return h$e(a); | |
}; | |
function h$baseZCGHCziIOziFDzizdfBufferedIOFD7_e() | |
{ | |
h$r1 = h$c1(h$$gM, h$r3); | |
return h$rs(); | |
}; | |
function h$$gQ() | |
{ | |
var a = h$stack[(h$sp - 5)]; | |
var b = h$stack[(h$sp - 4)]; | |
var c = h$stack[(h$sp - 3)]; | |
var d = h$stack[(h$sp - 2)]; | |
var e = h$stack[(h$sp - 1)]; | |
h$sp -= 6; | |
h$r1 = h$c7(h$baseZCGHCziIOziBufferziBuffer_con_e, a, b, c, d, e, 0, 0); | |
return h$rs(); | |
}; | |
function h$$gP() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 7)]; | |
var c = h$stack[(h$sp - 6)]; | |
var d = h$stack[(h$sp - 2)]; | |
var e = h$stack[(h$sp - 1)]; | |
h$sp -= 8; | |
var f = a.d1; | |
var g = b; | |
h$pp32(h$$gQ); | |
h$l5(((e - d) | 0), (c + d), g, f, h$baseZCGHCziIOziFDzizdwfdWrite); | |
return h$ap_4_4_fast(); | |
}; | |
function h$$gO() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
var c = a.d1; | |
var d = a.d2; | |
var e = d.d1; | |
var f = d.d2; | |
var g = d.d3; | |
var h = d.d4; | |
var i = d.d5; | |
h$p8(c, e, f, g, h, i, d.d6, h$$gP); | |
return h$e(b); | |
}; | |
function h$baseZCGHCziIOziFDzizdfBufferedIOFD5_e() | |
{ | |
h$p2(h$r2, h$$gO); | |
return h$e(h$r3); | |
}; | |
var h$baseZCGHCziIOziFDzizdfBufferedIOFD4 = h$strta("GHC.IO.FD.fdWriteNonBlocking"); | |
function h$$g0() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a; | |
if((b === (-1))) | |
{ | |
h$r1 = h$baseZCGHCziIOziFDzizdfBufferedIOFD3; | |
} | |
else | |
{ | |
h$r1 = b; | |
}; | |
return h$rs(); | |
}; | |
function h$$gZ() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$p1(h$$g0); | |
return h$e(a); | |
}; | |
function h$$gY() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a; | |
if((b === (-1))) | |
{ | |
h$p1(h$$gZ); | |
h$l2(h$baseZCGHCziIOziFDzizdfBufferedIOFD4, h$baseZCForeignziCziErrorzithrowErrno1); | |
return h$ap_2_1_fast(); | |
} | |
else | |
{ | |
h$r1 = b; | |
}; | |
return h$rs(); | |
}; | |
function h$$gX() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = b.d1; | |
var d = b.d2; | |
var e = b.d3; | |
h$p1(h$$gY); | |
try | |
{ | |
var f; | |
var g = { mv: null | |
}; | |
f = h$mkForeignCallback(g); | |
h$base_write(a, c, d, e, f); | |
if((g.mv === null)) | |
{ | |
g.mv = new h$MVar(); | |
++h$sp; | |
h$stack[h$sp] = h$unboxFFIResult; | |
return h$takeMVar(g.mv); | |
} | |
else | |
{ | |
var h = g.mv; | |
h$r1 = h[0]; | |
}; | |
} | |
catch(h$GHCziIOziFD_id_100_0) | |
{ | |
return h$throwJSException(h$GHCziIOziFD_id_100_0); | |
}; | |
return h$rs(); | |
}; | |
function h$$gW() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$r1 = a; | |
return h$rs(); | |
}; | |
function h$$gV() | |
{ | |
var a = h$r1.d1; | |
h$bh(); | |
h$p1(h$$gW); | |
return h$e(a); | |
}; | |
function h$$gU() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$r1 = h$c1(h$$gV, a); | |
return h$rs(); | |
}; | |
function h$$gT() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a; | |
if((b === (-1))) | |
{ | |
h$r1 = h$baseZCGHCziIOziFDzizdfBufferedIOFD2; | |
} | |
else | |
{ | |
h$r1 = b; | |
}; | |
return h$rs(); | |
}; | |
function h$$gS() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$p1(h$$gT); | |
return h$e(a); | |
}; | |
function h$$gR() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a; | |
if((b === (-1))) | |
{ | |
h$p1(h$$gS); | |
h$l2(h$baseZCGHCziIOziFDzizdfBufferedIOFD4, h$baseZCForeignziCziErrorzithrowErrno1); | |
return h$ap_2_1_fast(); | |
} | |
else | |
{ | |
h$r1 = b; | |
}; | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziFDzizdwzdcwriteNonBlocking_e() | |
{ | |
var a = h$r2; | |
var b = h$r3; | |
var c = h$r4; | |
var d = h$r5; | |
var e = h$maskStatus(); | |
var f = e; | |
if((f === 1)) | |
{ | |
var g = d; | |
h$p1(h$$gR); | |
try | |
{ | |
var h; | |
var i = { mv: null | |
}; | |
h = h$mkForeignCallback(i); | |
h$base_write(a, b, c, g, h); | |
if((i.mv === null)) | |
{ | |
i.mv = new h$MVar(); | |
++h$sp; | |
h$stack[h$sp] = h$unboxFFIResult; | |
return h$takeMVar(i.mv); | |
} | |
else | |
{ | |
var j = i.mv; | |
h$r1 = j[0]; | |
}; | |
} | |
catch(h$GHCziIOziFD_id_100_3) | |
{ | |
return h$throwJSException(h$GHCziIOziFD_id_100_3); | |
}; | |
} | |
else | |
{ | |
h$p1(h$$gU); | |
return h$maskUnintAsync(h$c4(h$$gX, a, b, c, d)); | |
}; | |
return h$rs(); | |
}; | |
function h$$g3() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 7)]; | |
var c = h$stack[(h$sp - 6)]; | |
var d = h$stack[(h$sp - 5)]; | |
var e = h$stack[(h$sp - 4)]; | |
var f = h$stack[(h$sp - 3)]; | |
var g = h$stack[(h$sp - 2)]; | |
var h = h$stack[(h$sp - 1)]; | |
h$sp -= 8; | |
var i = a; | |
var j = ((g + i) | 0); | |
if((j === h)) | |
{ | |
h$r1 = h$c7(h$baseZCGHCziIOziBufferziBuffer_con_e, b, c, d, e, f, 0, 0); | |
} | |
else | |
{ | |
h$r1 = h$c7(h$baseZCGHCziIOziBufferziBuffer_con_e, b, c, d, e, f, j, h); | |
}; | |
return h$rs(); | |
}; | |
function h$$g2() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = b.d1; | |
var d = b.d2; | |
var e = b.d3; | |
var f = b.d4; | |
var g = b.d5; | |
h$bh(); | |
h$p8(a, c, d, e, f, g, b.d6, h$$g3); | |
return h$e(b.d7); | |
}; | |
function h$$g1() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 7)]; | |
var c = h$stack[(h$sp - 6)]; | |
var d = h$stack[(h$sp - 5)]; | |
var e = h$stack[(h$sp - 4)]; | |
var f = h$stack[(h$sp - 3)]; | |
var g = h$stack[(h$sp - 2)]; | |
var h = h$stack[(h$sp - 1)]; | |
h$sp -= 8; | |
h$r1 = h$c2(h$ghczmprimZCGHCziTupleziZLz2cUZR_con_e, a, h$c8(h$$g2, b, c, d, e, f, g, h, a)); | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziFDzizdwzdcflushWriteBuffer0_e() | |
{ | |
var a = h$r1.d1; | |
var b = h$r2; | |
var c = h$r4; | |
var d = h$r8; | |
var e = h$r9; | |
var f = h$r3; | |
h$p8(h$r3, h$r4, h$r5, h$r6, h$r7, h$r8, h$r9, h$$g1); | |
h$l5(((e - d) | 0), (c + d), f, b, a); | |
return h$ap_4_4_fast(); | |
}; | |
function h$$g5() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
var c = a.d1; | |
var d = a.d2; | |
var e = d.d1; | |
var f = d.d2; | |
var g = d.d3; | |
var h = d.d4; | |
var i = d.d5; | |
h$l9(d.d6, i, h, g, f, e, c, b, h$baseZCGHCziIOziFDzizdwzdcflushWriteBuffer0); | |
return h$ap_gen_fast(2056); | |
}; | |
function h$$g4() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$p2(a.d1, h$$g5); | |
return h$e(b); | |
}; | |
function h$baseZCGHCziIOziFDzizdfBufferedIOFD1_e() | |
{ | |
h$p2(h$r3, h$$g4); | |
return h$e(h$r2); | |
}; | |
function h$baseZCGHCziIOziFDziFD_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziFDziFD_e() | |
{ | |
h$r1 = h$c2(h$baseZCGHCziIOziFDziFD_con_e, h$r2, h$r3); | |
return h$rs(); | |
}; | |
function h$$g7() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$r1 = h$c2(h$baseZCGHCziIOziFDziFD_con_e, b, a); | |
return h$rs(); | |
}; | |
function h$$g6() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$p2(a, h$$g7); | |
return h$e(b); | |
}; | |
function h$baseZCGHCziIOziFDzizdWFD_e() | |
{ | |
h$p2(h$r3, h$$g6); | |
return h$e(h$r2); | |
}; | |
function h$baseZCGHCziIOziExceptionzizdfExceptionBlockedIndefinitelyOnMVarzuzdctoException_e() | |
{ | |
h$r1 = h$c2(h$baseZCGHCziExceptionziSomeException_con_e, h$r1.d1, h$r2); | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziExceptionzizdfExceptionBlockedIndefinitelyOnSTMzuzdctoException_e() | |
{ | |
h$r1 = h$c2(h$baseZCGHCziExceptionziSomeException_con_e, h$r1.d1, h$r2); | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziExceptionzizdfExceptionIOExceptionzuzdctoException_e() | |
{ | |
h$r1 = h$c2(h$baseZCGHCziExceptionziSomeException_con_e, h$r1.d1, h$r2); | |
return h$rs(); | |
}; | |
var h$$hY = h$strta("already exists"); | |
var h$$hZ = h$strta("does not exist"); | |
var h$$h0 = h$strta("resource busy"); | |
var h$$h1 = h$strta("resource exhausted"); | |
var h$$h2 = h$strta("end of file"); | |
var h$$h3 = h$strta("illegal operation"); | |
var h$$h4 = h$strta("permission denied"); | |
var h$$h5 = h$strta("user error"); | |
var h$$h6 = h$strta("unsatisfied constraints"); | |
var h$$h7 = h$strta("system error"); | |
var h$$h8 = h$strta("protocol error"); | |
var h$$h9 = h$strta("failed"); | |
var h$$ia = h$strta("invalid argument"); | |
var h$$ib = h$strta("inappropriate type"); | |
var h$$ic = h$strta("hardware fault"); | |
var h$$id = h$strta("unsupported operation"); | |
var h$$ie = h$strta("timeout"); | |
var h$$ig = h$strta("resource vanished"); | |
var h$$ih = h$strta("interrupted"); | |
function h$$g9() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
var c = a.d1; | |
var d = a.d2; | |
var e = d.d1; | |
var f = d.d2; | |
var g = d.d3; | |
h$l7(b, d.d5, g, f, e, c, h$baseZCGHCziIOziExceptionzizdwzdcshowsPrec2); | |
return h$ap_gen_fast(1542); | |
}; | |
function h$baseZCGHCziIOziExceptionzizdszddmshow9_e() | |
{ | |
h$p2(h$r3, h$$g9); | |
return h$e(h$r2); | |
}; | |
function h$baseZCGHCziIOziExceptionzizdfShowIOExceptionzuzdcshowList_e() | |
{ | |
h$l4(h$r3, h$r2, h$r1.d1, h$r1.d2); | |
return h$ap_3_3_fast(); | |
}; | |
function h$$hb() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a.d1; | |
var c = a.d2; | |
var d = c.d1; | |
var e = c.d2; | |
h$r1 = h$c7(h$baseZCDataziTypeableziInternalziTypeRep_con_e, b, d, e, c.d3, h$baseZCGHCziIOziExceptionzizdtcIOException, | |
h$ghczmprimZCGHCziTypesziZMZN, h$ghczmprimZCGHCziTypesziZMZN); | |
return h$rs(); | |
}; | |
function h$$ha() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$p1(h$$hb); | |
h$l2(h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, h$baseZCGHCziIOziExceptionzizdfExceptionIOException5, a), | |
h$baseZCGHCziFingerprintzifingerprintFingerprints); | |
return h$ap_1_1_fast(); | |
}; | |
function h$baseZCGHCziIOziExceptionzizdfExceptionIOException4_e() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$p1(h$$ha); | |
h$l3(b, b, a); | |
return h$ap_2_2_fast(); | |
}; | |
function h$baseZCGHCziIOziExceptionzizdfExceptionIOException3_e() | |
{ | |
return h$e(h$r1.d1); | |
}; | |
function h$$hd() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$l4(b, h$baseZCGHCziIOziExceptionzizdfExceptionIOException3, a, h$baseZCDataziTypeablezicast); | |
return h$ap_3_3_fast(); | |
}; | |
function h$$hc() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a.d1; | |
h$p2(a.d2, h$$hd); | |
h$l2(b, h$baseZCGHCziExceptionzizdp1Exception); | |
return h$ap_1_1_fast(); | |
}; | |
function h$baseZCGHCziIOziExceptionzizdfExceptionIOExceptionzuzdcfromException_e() | |
{ | |
h$p1(h$$hc); | |
return h$e(h$r2); | |
}; | |
function h$$he() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
switch (a.f.a) | |
{ | |
case (1): | |
h$l3(b, h$$hY, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
case (2): | |
h$l3(b, h$$hZ, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
case (3): | |
h$l3(b, h$$h0, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
case (4): | |
h$l3(b, h$$h1, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
case (5): | |
h$l3(b, h$$h2, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
case (6): | |
h$l3(b, h$$h3, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
case (7): | |
h$l3(b, h$$h4, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
case (8): | |
h$l3(b, h$$h5, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
case (9): | |
h$l3(b, h$$h6, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
case (10): | |
h$l3(b, h$$h7, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
case (11): | |
h$l3(b, h$$h8, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
case (12): | |
h$l3(b, h$$h9, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
case (13): | |
h$l3(b, h$$ia, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
case (14): | |
h$l3(b, h$$ib, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
case (15): | |
h$l3(b, h$$ic, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
case (16): | |
h$l3(b, h$$id, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
case (17): | |
h$l3(b, h$$ie, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
case (18): | |
h$l3(b, h$$ig, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
default: | |
h$l3(b, h$$ih, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
}; | |
}; | |
function h$baseZCGHCziIOziExceptionzizdwzdcshowsPrec3_e() | |
{ | |
h$p2(h$r3, h$$he); | |
return h$e(h$r2); | |
}; | |
var h$baseZCGHCziIOziExceptionzizdfExceptionIOException2 = h$strta(" ("); | |
var h$baseZCGHCziIOziExceptionzizdfExceptionIOException1 = h$strta(")"); | |
function h$$hw() | |
{ | |
h$l3(h$r1.d1, h$baseZCGHCziIOziExceptionzizdfExceptionIOException1, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
}; | |
function h$$hv() | |
{ | |
h$l3(h$c1(h$$hw, h$r1.d1), h$r1.d2, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
}; | |
function h$$hu() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
if((a.f.a === 1)) | |
{ | |
return h$e(b); | |
} | |
else | |
{ | |
h$l3(h$c2(h$$hv, b, a), h$baseZCGHCziIOziExceptionzizdfExceptionIOException2, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
}; | |
}; | |
function h$$ht() | |
{ | |
var a = h$r1.d1; | |
h$p2(h$r1.d2, h$$hu); | |
return h$e(a); | |
}; | |
function h$$hs() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = b.d1; | |
h$bh(); | |
h$l3(h$c2(h$$ht, c, b.d2), a, h$baseZCGHCziIOziExceptionzizdwzdcshowsPrec3); | |
return h$ap_2_2_fast(); | |
}; | |
function h$$hr() | |
{ | |
h$l3(h$r1.d1, h$baseZCGHCziIOziExceptionzizdfExceptionArrayException2, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
}; | |
function h$$hq() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
if((a.f.a === 1)) | |
{ | |
return h$e(b); | |
} | |
else | |
{ | |
h$l3(h$c1(h$$hr, b), a, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
}; | |
}; | |
function h$$hp() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
var c = b.d1; | |
var d = b.d2; | |
h$bh(); | |
h$p2(h$c3(h$$hs, a, d, b.d3), h$$hq); | |
return h$e(c); | |
}; | |
function h$$ho() | |
{ | |
h$l3(h$r1.d1, h$baseZCGHCziIOziExceptionzizdfExceptionArrayException2, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
}; | |
function h$$hn() | |
{ | |
h$l3(h$c1(h$$ho, h$r1.d1), h$baseZCGHCziIOziHandleziTypeszishowHandle1, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
}; | |
function h$$hm() | |
{ | |
h$l3(h$c1(h$$hn, h$r1.d1), h$r1.d2, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
}; | |
function h$$hl() | |
{ | |
h$l3(h$r1.d1, h$baseZCGHCziIOziExceptionzizdfExceptionArrayException2, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
}; | |
function h$$hk() | |
{ | |
h$l3(h$c1(h$$hl, h$r1.d1), h$baseZCGHCziIOziHandleziTypeszishowHandle1, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
}; | |
function h$$hj() | |
{ | |
h$l3(h$c1(h$$hk, h$r1.d1), h$r1.d2, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
}; | |
function h$$hi() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
if((a.f.a === 1)) | |
{ | |
h$l3(h$c2(h$$hm, b, a.d1), h$baseZCGHCziIOziHandleziTypeszishowHandle2, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
} | |
else | |
{ | |
h$l3(h$c2(h$$hj, b, a.d1), h$baseZCGHCziIOziHandleziTypeszishowHandle2, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
}; | |
}; | |
function h$$hh() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
if((a.f.a === 1)) | |
{ | |
return h$e(b); | |
} | |
else | |
{ | |
h$pp2(h$$hi); | |
return h$e(a.d1); | |
}; | |
}; | |
function h$$hg() | |
{ | |
h$l3(h$r1.d1, h$baseZCGHCziIOziExceptionzizdfExceptionArrayException2, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
}; | |
function h$$hf() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 2)]; | |
var c = h$stack[(h$sp - 1)]; | |
h$sp -= 3; | |
if((a.f.a === 1)) | |
{ | |
h$p2(c, h$$hh); | |
return h$e(b); | |
} | |
else | |
{ | |
h$l3(h$c1(h$$hg, c), a.d1, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
}; | |
}; | |
function h$baseZCGHCziIOziExceptionzizdwzdcshowsPrec2_e() | |
{ | |
h$p3(h$r2, h$c4(h$$hp, h$r3, h$r4, h$r5, h$r7), h$$hf); | |
return h$e(h$r6); | |
}; | |
function h$$hx() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
var c = a.d1; | |
var d = a.d2; | |
var e = d.d1; | |
var f = d.d2; | |
var g = d.d3; | |
h$l7(b, d.d5, g, f, e, c, h$baseZCGHCziIOziExceptionzizdwzdcshowsPrec2); | |
return h$ap_gen_fast(1542); | |
}; | |
function h$baseZCGHCziIOziExceptionzizdfExceptionIOExceptionzuzdcshowsPrec_e() | |
{ | |
h$p2(h$r4, h$$hx); | |
return h$e(h$r3); | |
}; | |
function h$$hy() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a.d1; | |
var c = a.d2; | |
var d = c.d1; | |
var e = c.d2; | |
var f = c.d3; | |
h$l7(h$ghczmprimZCGHCziTypesziZMZN, c.d5, f, e, d, b, h$baseZCGHCziIOziExceptionzizdwzdcshowsPrec2); | |
return h$ap_gen_fast(1542); | |
}; | |
function h$baseZCGHCziIOziExceptionzizdfExceptionIOExceptionzuzdcshow_e() | |
{ | |
h$p1(h$$hy); | |
return h$e(h$r2); | |
}; | |
function h$$hA() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a.d1; | |
var c = a.d2; | |
var d = c.d1; | |
var e = c.d2; | |
h$r1 = h$c7(h$baseZCDataziTypeableziInternalziTypeRep_con_e, b, d, e, c.d3, h$baseZCGHCziIOziExceptionzizdtcExitCode, | |
h$ghczmprimZCGHCziTypesziZMZN, h$ghczmprimZCGHCziTypesziZMZN); | |
return h$rs(); | |
}; | |
function h$$hz() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$p1(h$$hA); | |
h$l2(h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, h$baseZCGHCziIOziExceptionzizdfExceptionExitCode5, a), | |
h$baseZCGHCziFingerprintzifingerprintFingerprints); | |
return h$ap_1_1_fast(); | |
}; | |
function h$baseZCGHCziIOziExceptionzizdfExceptionExitCode4_e() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$p1(h$$hz); | |
h$l3(b, b, a); | |
return h$ap_2_2_fast(); | |
}; | |
function h$$hB() | |
{ | |
var a = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$l3(a, h$baseZCGHCziIOziExceptionzizdfExceptionBlockedIndefinitelyOnSTM1, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
}; | |
function h$baseZCGHCziIOziExceptionzizdfShowBlockedIndefinitelyOnSTMzuzdcshowsPrec_e() | |
{ | |
h$p2(h$r4, h$$hB); | |
return h$e(h$r3); | |
}; | |
function h$$hC() | |
{ | |
var a = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$l3(a, h$baseZCGHCziIOziExceptionzizdfExceptionBlockedIndefinitelyOnSTM1, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
}; | |
function h$baseZCGHCziIOziExceptionzizdfShowBlockedIndefinitelyOnSTM1_e() | |
{ | |
h$p2(h$r3, h$$hC); | |
return h$e(h$r2); | |
}; | |
function h$baseZCGHCziIOziExceptionzizdfShowBlockedIndefinitelyOnSTMzuzdcshowList_e() | |
{ | |
h$l4(h$r3, h$r2, h$r1.d1, h$r1.d2); | |
return h$ap_3_3_fast(); | |
}; | |
function h$$hE() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a.d1; | |
var c = a.d2; | |
var d = c.d1; | |
var e = c.d2; | |
h$r1 = h$c7(h$baseZCDataziTypeableziInternalziTypeRep_con_e, b, d, e, c.d3, | |
h$baseZCGHCziIOziExceptionzizdtcBlockedIndefinitelyOnSTM, h$ghczmprimZCGHCziTypesziZMZN, h$ghczmprimZCGHCziTypesziZMZN); | |
return h$rs(); | |
}; | |
function h$$hD() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$p1(h$$hE); | |
h$l2(h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, h$baseZCGHCziIOziExceptionzizdfExceptionBlockedIndefinitelyOnSTM4, a), | |
h$baseZCGHCziFingerprintzifingerprintFingerprints); | |
return h$ap_1_1_fast(); | |
}; | |
function h$baseZCGHCziIOziExceptionzizdfExceptionBlockedIndefinitelyOnSTM3_e() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$p1(h$$hD); | |
h$l3(b, b, a); | |
return h$ap_2_2_fast(); | |
}; | |
function h$baseZCGHCziIOziExceptionzizdfExceptionBlockedIndefinitelyOnSTM2_e() | |
{ | |
return h$e(h$r1.d1); | |
}; | |
function h$$hG() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$l4(b, h$baseZCGHCziIOziExceptionzizdfExceptionBlockedIndefinitelyOnSTM2, a, h$baseZCDataziTypeablezicast); | |
return h$ap_3_3_fast(); | |
}; | |
function h$$hF() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a.d1; | |
h$p2(a.d2, h$$hG); | |
h$l2(b, h$baseZCGHCziExceptionzizdp1Exception); | |
return h$ap_1_1_fast(); | |
}; | |
function h$baseZCGHCziIOziExceptionzizdfExceptionBlockedIndefinitelyOnSTMzuzdcfromException_e() | |
{ | |
h$p1(h$$hF); | |
return h$e(h$r2); | |
}; | |
var h$baseZCGHCziIOziExceptionzizdfExceptionBlockedIndefinitelyOnSTM1 = h$strta("thread blocked indefinitely in an STM transaction"); | |
function h$$hH() | |
{ | |
--h$sp; | |
return h$e(h$baseZCGHCziIOziExceptionzizdfExceptionBlockedIndefinitelyOnSTM1); | |
}; | |
function h$baseZCGHCziIOziExceptionzizdfExceptionBlockedIndefinitelyOnSTMzuzdcshow_e() | |
{ | |
h$p1(h$$hH); | |
return h$e(h$r2); | |
}; | |
function h$$hI() | |
{ | |
var a = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$l3(a, h$baseZCGHCziIOziExceptionzizdfExceptionBlockedIndefinitelyOnMVar1, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
}; | |
function h$baseZCGHCziIOziExceptionzizdfShowBlockedIndefinitelyOnMVarzuzdcshowsPrec_e() | |
{ | |
h$p2(h$r4, h$$hI); | |
return h$e(h$r3); | |
}; | |
function h$$hJ() | |
{ | |
var a = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$l3(a, h$baseZCGHCziIOziExceptionzizdfExceptionBlockedIndefinitelyOnMVar1, h$baseZCGHCziBasezizpzp); | |
return h$ap_2_2_fast(); | |
}; | |
function h$baseZCGHCziIOziExceptionzizdfShowBlockedIndefinitelyOnMVar1_e() | |
{ | |
h$p2(h$r3, h$$hJ); | |
return h$e(h$r2); | |
}; | |
function h$baseZCGHCziIOziExceptionzizdfShowBlockedIndefinitelyOnMVarzuzdcshowList_e() | |
{ | |
h$l4(h$r3, h$r2, h$r1.d1, h$r1.d2); | |
return h$ap_3_3_fast(); | |
}; | |
function h$$hL() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a.d1; | |
var c = a.d2; | |
var d = c.d1; | |
var e = c.d2; | |
h$r1 = h$c7(h$baseZCDataziTypeableziInternalziTypeRep_con_e, b, d, e, c.d3, | |
h$baseZCGHCziIOziExceptionzizdtcBlockedIndefinitelyOnMVar, h$ghczmprimZCGHCziTypesziZMZN, | |
h$ghczmprimZCGHCziTypesziZMZN); | |
return h$rs(); | |
}; | |
function h$$hK() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$p1(h$$hL); | |
h$l2(h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, h$baseZCGHCziIOziExceptionzizdfExceptionBlockedIndefinitelyOnMVar4, a), | |
h$baseZCGHCziFingerprintzifingerprintFingerprints); | |
return h$ap_1_1_fast(); | |
}; | |
function h$baseZCGHCziIOziExceptionzizdfExceptionBlockedIndefinitelyOnMVar3_e() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$p1(h$$hK); | |
h$l3(b, b, a); | |
return h$ap_2_2_fast(); | |
}; | |
function h$baseZCGHCziIOziExceptionzizdfExceptionBlockedIndefinitelyOnMVar2_e() | |
{ | |
return h$e(h$r1.d1); | |
}; | |
function h$$hN() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$l4(b, h$baseZCGHCziIOziExceptionzizdfExceptionBlockedIndefinitelyOnMVar2, a, h$baseZCDataziTypeablezicast); | |
return h$ap_3_3_fast(); | |
}; | |
function h$$hM() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a.d1; | |
h$p2(a.d2, h$$hN); | |
h$l2(b, h$baseZCGHCziExceptionzizdp1Exception); | |
return h$ap_1_1_fast(); | |
}; | |
function h$baseZCGHCziIOziExceptionzizdfExceptionBlockedIndefinitelyOnMVarzuzdcfromException_e() | |
{ | |
h$p1(h$$hM); | |
return h$e(h$r2); | |
}; | |
var h$baseZCGHCziIOziExceptionzizdfExceptionBlockedIndefinitelyOnMVar1 = h$strta("thread blocked indefinitely in an MVar operation"); | |
function h$$hO() | |
{ | |
--h$sp; | |
return h$e(h$baseZCGHCziIOziExceptionzizdfExceptionBlockedIndefinitelyOnMVar1); | |
}; | |
function h$baseZCGHCziIOziExceptionzizdfExceptionBlockedIndefinitelyOnMVarzuzdcshow_e() | |
{ | |
h$p1(h$$hO); | |
return h$e(h$r2); | |
}; | |
function h$$hQ() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a.d1; | |
var c = a.d2; | |
var d = c.d1; | |
var e = c.d2; | |
h$r1 = h$c7(h$baseZCDataziTypeableziInternalziTypeRep_con_e, b, d, e, c.d3, | |
h$baseZCGHCziIOziExceptionzizdtcAsyncException, h$ghczmprimZCGHCziTypesziZMZN, h$ghczmprimZCGHCziTypesziZMZN); | |
return h$rs(); | |
}; | |
function h$$hP() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$p1(h$$hQ); | |
h$l2(h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, h$baseZCGHCziIOziExceptionzizdfExceptionAsyncException7, a), | |
h$baseZCGHCziFingerprintzifingerprintFingerprints); | |
return h$ap_1_1_fast(); | |
}; | |
function h$baseZCGHCziIOziExceptionzizdfExceptionAsyncException6_e() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$p1(h$$hP); | |
h$l3(b, b, a); | |
return h$ap_2_2_fast(); | |
}; | |
function h$baseZCGHCziIOziExceptionzizdfExceptionAsyncException5_e() | |
{ | |
return h$e(h$r1.d1); | |
}; | |
function h$$hV() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 1)]; | |
h$sp -= 2; | |
h$l4(b, h$baseZCGHCziIOziExceptionzizdfExceptionAsyncException5, a, h$baseZCDataziTypeablezicast); | |
return h$ap_3_3_fast(); | |
}; | |
function h$$hU() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a.d1; | |
h$p2(a.d2, h$$hV); | |
h$l2(b, h$baseZCGHCziExceptionzizdp1Exception); | |
return h$ap_1_1_fast(); | |
}; | |
function h$$hT() | |
{ | |
var a = h$r1; | |
var b = h$stack[(h$sp - 5)]; | |
var c = h$stack[(h$sp - 4)]; | |
var d = h$stack[(h$sp - 3)]; | |
var e = h$stack[(h$sp - 2)]; | |
var f = h$stack[(h$sp - 1)]; | |
h$sp -= 6; | |
var g = a.d1; | |
var h = a.d2; | |
var i = h.d1; | |
var j = h.d2; | |
if(h$hs_eqWord64(c, d, g, i)) | |
{ | |
if(h$hs_eqWord64(e, f, j, h.d3)) | |
{ | |
h$p1(h$$hU); | |
h$r1 = b; | |
return h$ap_0_0_fast(); | |
} | |
else | |
{ | |
h$r1 = h$baseZCGHCziBaseziNothing; | |
}; | |
} | |
else | |
{ | |
h$r1 = h$baseZCGHCziBaseziNothing; | |
}; | |
return h$rs(); | |
}; | |
function h$$hS() | |
{ | |
var a = h$r1; | |
h$sp -= 2; | |
var b = a.d1; | |
var c = a.d2; | |
var d = c.d1; | |
var e = c.d2; | |
h$pp62(b, d, e, c.d3, h$$hT); | |
return h$e(h$baseZCGHCziIOziExceptionzizdfExceptionAllocationLimitExceeded5); | |
}; | |
function h$$hR() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a.d1; | |
h$p2(a.d2, h$$hS); | |
h$l2(b, h$baseZCGHCziExceptionzizdp1Exception); | |
return h$ap_2_1_fast(); | |
}; | |
function h$baseZCGHCziIOziExceptionzizdfExceptionAsyncExceptionzuzdcfromException_e() | |
{ | |
h$p1(h$$hR); | |
return h$e(h$r2); | |
}; | |
var h$baseZCGHCziIOziExceptionzizdfExceptionArrayException2 = h$strta(": "); | |
function h$$hX() | |
{ | |
var a = h$r1; | |
--h$sp; | |
var b = a.d1; | |
var c = a.d2; | |
var d = c.d1; | |
var e = c.d2; | |
h$r1 = h$c7(h$baseZCDataziTypeableziInternalziTypeRep_con_e, b, d, e, c.d3, | |
h$baseZCGHCziIOziExceptionzizdtcSomeAsyncException, h$ghczmprimZCGHCziTypesziZMZN, h$ghczmprimZCGHCziTypesziZMZN); | |
return h$rs(); | |
}; | |
function h$$hW() | |
{ | |
var a = h$r1; | |
--h$sp; | |
h$p1(h$$hX); | |
h$l2(h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, h$baseZCGHCziIOziExceptionzizdfExceptionAllocationLimitExceeded6, a), | |
h$baseZCGHCziFingerprintzifingerprintFingerprints); | |
return h$ap_1_1_fast(); | |
}; | |
function h$baseZCGHCziIOziExceptionzizdfExceptionAllocationLimitExceeded5_e() | |
{ | |
var a = h$r1.d1; | |
var b = h$r1.d2; | |
h$bh(); | |
h$p1(h$$hW); | |
h$l3(b, b, a); | |
return h$ap_2_2_fast(); | |
}; | |
function h$baseZCGHCziIOziExceptionziIOError_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziExceptionziIOError_e() | |
{ | |
h$r1 = h$c6(h$baseZCGHCziIOziExceptionziIOError_con_e, h$r2, h$r3, h$r4, h$r5, h$r6, h$r7); | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziExceptionziInterrupted_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziExceptionziResourceVanished_con_e() | |
{ | |
return h$rs(); | |
}; | |
function h$baseZCGHCziIOziExceptionziTimeExpi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment