array D_nextFree207 integer D_firstFree417 integer D_maxIndex169 array D_typeId345 array D_B_A_x648 array D_C_A_x300 integer wurst_stack_depth191 array wurst_stack190 integer D_firstFree417 = 0 integer D_maxIndex169 = 0 integer wurst_stack_depth191 = 0 function initGlobals868() { } function main284() { initGlobals868(); init_test465("when calling init_test in diamond.wurst, line 1"); } function config140() { } function init_test465(string __wurst_stackPos327) { local integer d527 local integer temp207 wurst_stack_190[wurst_stack_depth_191] = __wurst_stackPos_327; wurst_stack_depth_191 = (wurst_stack_depth_191 + 1); d_527 = new_D472("when calling new_D in diamond.wurst, line 50"); wurst_stack_190[wurst_stack_depth_191] = "when calling setX in diamond.wurst, line 52"; wurst_stack_depth_191 = (wurst_stack_depth_191 + 1); if (D_typeId_345[d_527] == 0) { if (d_527 == 0) { error929("Nullpointer exception when calling D.setX", "when calling error in diamond.wurst, line 35"); } else { error929("Called D.setX on invalid object.", "when calling error in diamond.wurst, line 35"); }; } else { }; D_setX198(d_527, 5); wurst_stack_depth_191 = (wurst_stack_depth_191 - 1); wurst_stack_190[wurst_stack_depth_191] = "when calling getX in diamond.wurst, line 54"; wurst_stack_depth_191 = (wurst_stack_depth_191 + 1); if (D_typeId_345[d_527] == 0) { if (d_527 == 0) { error929("Nullpointer exception when calling D.getX", "when calling error in diamond.wurst, line 41"); } else { error929("Called D.getX on invalid object.", "when calling error in diamond.wurst, line 41"); }; } else { }; println285(("get x " + I2S132(D_B_A_x_648[d_527]))); temp_207 = D_B_A_x_648[d_527]; println285(("get x " + I2S132(D_C_A_x_300[d_527]))); temp_207 = (temp_207 + D_C_A_x_300[d_527]); wurst_stack_depth_191 = (wurst_stack_depth_191 - 1); if (temp_207 != 5) { wurst_stack_190[wurst_stack_depth_191] = "when calling getX in diamond.wurst, line 55"; wurst_stack_depth_191 = (wurst_stack_depth_191 + 1); if (D_typeId_345[d_527] == 0) { if (d_527 == 0) { error929("Nullpointer exception when calling D.getX", "when calling error in diamond.wurst, line 41"); } else { error929("Called D.getX on invalid object.", "when calling error in diamond.wurst, line 41"); }; } else { }; println285(("get x " + I2S132(D_B_A_x_648[d_527]))); temp_207 = D_B_A_x_648[d_527]; println285(("get x " + I2S132(D_C_A_x_300[d_527]))); d_527 = (temp_207 + D_C_A_x_300[d_527]); wurst_stack_depth_191 = (wurst_stack_depth_191 - 1); testFail172(("foo fail" + I2S132(d_527))); } else { }; testSuccess449(); wurst_stack_depth_191 = (wurst_stack_depth_191 - 1); } IS_NATIVE IS_EXTERN @extern function I2S132(integer x900) returns string { } IS_NATIVE function println285(string s171) { } IS_NATIVE function testFail172(string msg201) { } IS_NATIVE function testSuccess449() { } function D_setX198(integer this206, integer x135) { local integer x186 x_186 = (x_135 div 2); println285(("set x " + I2S132(x_186))); D_B_A_x_648[this_206] = x_186; println285(("get x " + I2S132(D_B_A_x_648[this_206]))); x_135 = (x_135 - D_B_A_x_648[this_206]); println285(("set x " + I2S132(x_135))); D_C_A_x_300[this_206] = x_135; } function new_D472(string __wurst_stackPos770) returns integer { local integer this138 wurst_stack_190[wurst_stack_depth_191] = __wurst_stackPos_770; wurst_stack_depth_191 = (wurst_stack_depth_191 + 1); wurst_stack_190[wurst_stack_depth_191] = "when calling alloc_D in diamond.wurst, line 31"; wurst_stack_depth_191 = (wurst_stack_depth_191 + 1); if (D_firstFree_417 == 0) { if (D_maxIndex_169 < 32768) { D_maxIndex_169 = (D_maxIndex_169 + 1); this_138 = D_maxIndex_169; D_typeId_345[this_138] = 1; } else { error929("Out of memory: Could not create D.", "when calling error in diamond.wurst, line 31"); this_138 = 0; }; } else { D_firstFree_417 = (D_firstFree_417 - 1); this_138 = D_nextFree_207[D_firstFree_417]; D_typeId_345[this_138] = 1; }; wurst_stack_depth_191 = ((wurst_stack_depth_191 - 1) - 1); return this_138; } function error929(string msg112, string __wurst_stackPos151) { local integer stacktraceIndex169 local integer stacktraceLimit132 wurst_stack_190[wurst_stack_depth_191] = __wurst_stackPos_151; wurst_stack_depth_191 = (wurst_stack_depth_191 + 1); __wurst_stackPos_151 = ""; stacktraceIndex_169 = wurst_stack_depth_191; stacktraceLimit_132 = 0; loop { stacktraceIndex_169 = (stacktraceIndex_169 - 1); stacktraceLimit_132 = (stacktraceLimit_132 + 1); exitwhen ((stacktraceLimit_132 > 20) or (stacktraceIndex_169 < 0)); __wurst_stackPos_151 = (__wurst_stackPos_151 + (" " + wurst_stack_190[stacktraceIndex_169])); }; $debugPrint984((msg_112 + (" " + __wurst_stackPos_151))); wurst_stack_depth_191 = (wurst_stack_depth_191 - 1); }