static Block parse( const Instructions& instructions , const Labels& labels , Address entrypoint ){ Address begin,end; begin = instructions.begin; end = instructions.end; Block block; block.begin = entrypoint; Address address; for( address = entrypoint ; address.word32 <= end.word32 ; address = address.next() ){ Address nextAddress; nextAddress = address.next(); if(labels.contains(nextAddress)){ block.end = address; block.overflows = true; return block; } Instruction instruction; instruction = instructions[address]; switch(Identity::endOf(instruction)){ case Identity::SimpleEnd: block.end = address; block.overflows = false; return block; case Identity::EndWithSlot: block.end = address.next(); block.overflows = false; return block; } } /* It's very, very strange to reach this point in the code. */ block.end = address.previous(); block.overflows = true; return block; }