array A_nextFree152 integer A_firstFree177 integer A_maxIndex133 array A_typeId199 array Cell_nextFree605 integer Cell_firstFree171 integer Cell_maxIndex203 array Cell_o944 integer A_firstFree177 = 0 integer A_maxIndex133 = 0 integer Cell_firstFree171 = 0 integer Cell_maxIndex203 = 0 function initGlobals121() { A_firstFree_177 = 0; A_maxIndex_133 = 0; Cell_firstFree_171 = 0; Cell_maxIndex_203 = 0; } function main130() { initGlobals121(); init_Test551(); } function config284() { } function init_Test551() { local integer c192 c_192 = new_Cell214(); Cell_o_944[c_192] = new_B597(); if (dispatch_A_Test_A_foo117(Cell_o_944[c_192]) == 6) { testSuccess118(); } else { }; } IS_NATIVE function testSuccess118() { } function A_foo155(integer this180) returns integer { return 5; } function A_init147(integer this405) { } function construct_A130(integer this115) { A_init147(this_115); } function B_foo111(integer this161) returns integer { return 6; } function B_init919(integer this120) { } function new_B597() returns integer { local integer this196 this_196 = alloc_B100(); construct_B367(this_196); return this_196; } function construct_B367(integer this161) { construct_A130(this_161); B_init919(this_161); } function Cell_init476(integer this157) { } function new_Cell214() returns integer { local integer this182 this_182 = alloc_Cell829(); construct_Cell151(this_182); return this_182; } function construct_Cell151(integer this273) { Cell_init476(this_273); } function error201(string msg499) { $debugPrint952((msg_499 + (" " + #getStackTrace()))); } function alloc_B100() returns integer { local integer this159 if (A_firstFree_177 == 0) { if (A_maxIndex_133 < 32768) { A_maxIndex_133 = (A_maxIndex_133 + 1); this_159 = A_maxIndex_133; A_typeId_199[this_159] = 2; } else { error201("Out of memory: Could not create B."); this_159 = 0; }; } else { A_firstFree_177 = (A_firstFree_177 - 1); this_159 = A_nextFree_152[A_firstFree_177]; A_typeId_199[this_159] = 2; }; return this_159; } function alloc_Cell829() returns integer { local integer this175 if (Cell_firstFree_171 == 0) { if (Cell_maxIndex_203 < 32768) { Cell_maxIndex_203 = (Cell_maxIndex_203 + 1); this_175 = Cell_maxIndex_203; } else { error201("Out of memory: Could not create Cell."); this_175 = 0; }; } else { Cell_firstFree_171 = (Cell_firstFree_171 - 1); this_175 = Cell_nextFree_605[Cell_firstFree_171]; }; return this_175; } function dispatch_A_Test_A_foo117(integer this166) returns integer { local integer Test_A_foo_result733 if (A_typeId_199[this_166] == 0) { if (this_166 == 0) { error201("Nullpointer exception when calling A.foo"); } else { error201("Called A.foo on invalid object."); }; } else { }; if (A_typeId_199[this_166] <= 1) { Test_A_foo_result_733 = A_foo155(this_166); } else { Test_A_foo_result_733 = B_foo111(this_166); }; return Test_A_foo_result_733; }