string test_s528 array C_nextFree133 integer C_firstFree170 integer C_maxIndex128 array C_typeId192 integer wurst_stack_depth198 array wurst_stack249 string test_s528 = "" integer C_firstFree170 = 0 integer C_maxIndex128 = 0 integer wurst_stack_depth198 = 0 function initGlobals655() { } function main604() { initGlobals655(); init_test797("when calling init_test in initdestroy.wurst, line 1"); } function config200() { } function init_test797(string __wurst_stackPos373) { wurst_stack_249[wurst_stack_depth_198] = __wurst_stackPos_373; wurst_stack_depth_198 = (wurst_stack_depth_198 + 1); test_s_528 = ""; dispatch_C_destroyC155(new_C146("when calling new_C in initdestroy.wurst, line 52"), "when calling dispatch_C_destroyC in initdestroy.wurst, line 54"); if (test_s_528 != "ABCcba") { testFail104(("fail, result = " + test_s_528)); } else { }; testSuccess172(); wurst_stack_depth_198 = (wurst_stack_depth_198 - 1); } IS_NATIVE function testFail104(string msg604) { } IS_NATIVE function testSuccess172() { } function new_C146(string __wurst_stackPos953) returns integer { local integer this770 wurst_stack_249[wurst_stack_depth_198] = __wurst_stackPos_953; wurst_stack_depth_198 = (wurst_stack_depth_198 + 1); wurst_stack_249[wurst_stack_depth_198] = "when calling alloc_C in initdestroy.wurst, line 38"; wurst_stack_depth_198 = (wurst_stack_depth_198 + 1); if (C_firstFree_170 == 0) { if (C_maxIndex_128 < 32768) { C_maxIndex_128 = (C_maxIndex_128 + 1); this_770 = C_maxIndex_128; C_typeId_192[this_770] = 1; } else { error713("Out of memory: Could not create C.", "when calling error in initdestroy.wurst, line 35"); this_770 = 0; }; } else { C_firstFree_170 = (C_firstFree_170 - 1); this_770 = C_nextFree_133[C_firstFree_170]; C_typeId_192[this_770] = 1; }; wurst_stack_depth_198 = (wurst_stack_depth_198 - 1); test_s_528 = (test_s_528 + "A"); test_s_528 = ((test_s_528 + "B") + "C"); wurst_stack_depth_198 = (wurst_stack_depth_198 - 1); return this_770; } function error713(string msg186, string __wurst_stackPos589) { local integer stacktraceIndex162 local integer stacktraceLimit214 wurst_stack_249[wurst_stack_depth_198] = __wurst_stackPos_589; wurst_stack_depth_198 = (wurst_stack_depth_198 + 1); __wurst_stackPos_589 = ""; stacktraceIndex_162 = wurst_stack_depth_198; stacktraceLimit_214 = 0; loop { stacktraceIndex_162 = (stacktraceIndex_162 - 1); stacktraceLimit_214 = (stacktraceLimit_214 + 1); exitwhen ((stacktraceLimit_214 > 20) or (stacktraceIndex_162 < 0)); __wurst_stackPos_589 = (__wurst_stackPos_589 + (" " + wurst_stack_249[stacktraceIndex_162])); }; $debugPrint141((msg_186 + (" " + __wurst_stackPos_589))); wurst_stack_depth_198 = (wurst_stack_depth_198 - 1); } function dispatch_C_destroyC155(integer this148, string __wurst_stackPos176) { wurst_stack_249[wurst_stack_depth_198] = __wurst_stackPos_176; wurst_stack_depth_198 = (wurst_stack_depth_198 + 1); if (C_typeId_192[this_148] == 0) { if (this_148 == 0) { error713("Nullpointer exception when calling C.C", "when calling error in initdestroy.wurst, line 35"); } else { error713("Called C.C on invalid object.", "when calling error in initdestroy.wurst, line 35"); }; } else { }; wurst_stack_249[wurst_stack_depth_198] = "when calling destroyC in initdestroy.wurst, line 35"; wurst_stack_depth_198 = (wurst_stack_depth_198 + 1); test_s_528 = (((test_s_528 + "c") + "b") + "a"); wurst_stack_249[wurst_stack_depth_198] = "when calling dealloc_C in initdestroy.wurst, line 42"; wurst_stack_depth_198 = (wurst_stack_depth_198 + 1); if (C_typeId_192[this_148] == 0) { error713("Double free: object of type C", "when calling error in initdestroy.wurst, line 35"); } else { C_nextFree_133[C_firstFree_170] = this_148; C_firstFree_170 = (C_firstFree_170 + 1); C_typeId_192[this_148] = 0; }; wurst_stack_depth_198 = (((wurst_stack_depth_198 - 1) - 1) - 1); }