<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Feb 23, 2014, at 11:02 PM, Igor Veresov <<a href="mailto:igor.veresov@oracle.com">igor.veresov@oracle.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; display: inline !important; float: none; ">May I please have a second review of this?</span><br style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; display: inline !important; float: none; ">Webrev:<span class="Apple-converted-space"> </span></span><a href="http://cr.openjdk.java.net/~iveresov/8035283/webrev.01/" style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">http://cr.openjdk.java.net/~iveresov/8035283/webrev.01/</a><br style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "></blockquote><br></div><div>I don't understand the force of the assert; it seems to be true mostly by accident.</div><div><br></div><div>Maybe you want an assert that 'last_may_be_short_branch_adr' does not fall between (br_offs - prev_block_loop_pad)+1 and br_offs, inclusive?</div><br><div>It took me a long time to convince myself that moving the goalpost for the comparison to 'last_may_be_short_branch_adr' was safe. Really, the argument hinges on the fact that all layout info. is relative to a pessimistic assumption that the maximum possible padding (block->code_alignment() - relocInfo::addr_unit()) is always inserted.</div><div><br></div><div>I suggest making the linkage to that assumption clearer, by hoisting the crucial expression 'block->code_alignment() - relocInfo::addr_unit()' as follows:</div><div><br></div><div><div> uint* worst_case_pad = NEW_RESOURCE_ARRAY(uint,nblocks);</div></div><div>...</div><div><br></div><div> worst_case_pad[i] = block->code_alignment() - relocInfo::addr_unit();</div><div><br></div><div>Then use the array reference directly instead of the now-linked uses of code_alignment etc.</div><div><br></div><div>This is delicate code!</div><div><br></div><div>— John</div></body></html>