array D_nextFree978 integer D_firstFree134 integer D_maxIndex652 array D_typeId103 array D_B_A_x698 integer wurst_stack_depth112 array wurst_stack125 integer D_firstFree134 = 0 integer D_maxIndex652 = 0 integer wurst_stack_depth112 = 0 function initGlobals776() { } function main180() { initGlobals776(); init_test172("when calling init_test in diamond2.wurst, line 1"); } function config143() { } function init_test172(string __wurst_stackPos148) { local integer d804 wurst_stack_125[wurst_stack_depth_112] = __wurst_stackPos_148; wurst_stack_depth_112 = (wurst_stack_depth_112 + 1); d_804 = new_D293("when calling new_D in diamond2.wurst, line 44"); wurst_stack_125[wurst_stack_depth_112] = "when calling setX in diamond2.wurst, line 46"; wurst_stack_depth_112 = (wurst_stack_depth_112 + 1); if (D_typeId_103[d_804] == 0) { if (d_804 == 0) { error793("Nullpointer exception when calling D.setX", "when calling error in diamond2.wurst, line 32"); } else { error793("Called D.setX on invalid object.", "when calling error in diamond2.wurst, line 32"); }; } else { }; D_B_A_x_698[d_804] = 4; wurst_stack_depth_112 = (wurst_stack_depth_112 - 1); wurst_stack_125[wurst_stack_depth_112] = "when calling getX in diamond2.wurst, line 48"; wurst_stack_depth_112 = (wurst_stack_depth_112 + 1); if (D_typeId_103[d_804] == 0) { if (d_804 == 0) { error793("Nullpointer exception when calling D.getX", "when calling error in diamond2.wurst, line 35"); } else { error793("Called D.getX on invalid object.", "when calling error in diamond2.wurst, line 35"); }; } else { }; d_804 = D_B_A_x_698[d_804]; wurst_stack_depth_112 = (wurst_stack_depth_112 - 1); if (d_804 != 4) { testFail998("foo fail"); } else { }; testSuccess382(); wurst_stack_depth_112 = (wurst_stack_depth_112 - 1); } IS_NATIVE function testFail998(string msg323) { } IS_NATIVE function testSuccess382() { } function new_D293(string __wurst_stackPos106) returns integer { local integer this392 wurst_stack_125[wurst_stack_depth_112] = __wurst_stackPos_106; wurst_stack_depth_112 = (wurst_stack_depth_112 + 1); wurst_stack_125[wurst_stack_depth_112] = "when calling alloc_D in diamond2.wurst, line 28"; wurst_stack_depth_112 = (wurst_stack_depth_112 + 1); if (D_firstFree_134 == 0) { if (D_maxIndex_652 < 32768) { D_maxIndex_652 = (D_maxIndex_652 + 1); this_392 = D_maxIndex_652; D_typeId_103[this_392] = 1; } else { error793("Out of memory: Could not create D.", "when calling error in diamond2.wurst, line 28"); this_392 = 0; }; } else { D_firstFree_134 = (D_firstFree_134 - 1); this_392 = D_nextFree_978[D_firstFree_134]; D_typeId_103[this_392] = 1; }; wurst_stack_depth_112 = ((wurst_stack_depth_112 - 1) - 1); return this_392; } function error793(string msg184, string __wurst_stackPos360) { local integer stacktraceIndex400 local integer stacktraceLimit136 wurst_stack_125[wurst_stack_depth_112] = __wurst_stackPos_360; wurst_stack_depth_112 = (wurst_stack_depth_112 + 1); __wurst_stackPos_360 = ""; stacktraceIndex_400 = wurst_stack_depth_112; stacktraceLimit_136 = 0; loop { stacktraceIndex_400 = (stacktraceIndex_400 - 1); stacktraceLimit_136 = (stacktraceLimit_136 + 1); exitwhen ((stacktraceLimit_136 > 20) or (stacktraceIndex_400 < 0)); __wurst_stackPos_360 = (__wurst_stackPos_360 + (" " + wurst_stack_125[stacktraceIndex_400])); }; $debugPrint161((msg_184 + (" " + __wurst_stackPos_360))); wurst_stack_depth_112 = (wurst_stack_depth_112 - 1); }