<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 17, 2015, at 3:37 AM, Emanuel Zephir via swift-dev &lt;<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Okay, that works.<div class=""><br class=""></div><div class="">I have a few questions about SR-210:<div class=""><br class=""></div><div class="">1) The attached patch adds support for undefined integer value-cases in the switch_value instruction. What is the runtime meaning of this construct?</div></div></div></div></blockquote><div><br class=""></div><div>SIL 'undef' has the same meaning as LLVM's 'undef'. It means that the exact value isn't important and can be substituted with an arbitrary bit pattern. It's UB if the behavior of the program depends on the value of an undef, but safe if the undef can be eliminated, such as if it's dead, or eliminated by an operation like 'x &amp; 0' or 'x - x' that's invariant of 'x'.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class=""><div class="">2) Are there any other SIL instructions in the select/switch family that need modifications? If yes, which? At least some of them (e.g. select_value) don't support this either.</div></div></div></div></blockquote><div><br class=""></div><div>'undef' ought to be parsed as part of the SIL value grammar. It'd be worth doing a pass to make sure we consistently use the same parsing rule everywhere we accept a value.</div><div><br class=""></div><div>-Joe</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class=""><div class="">3) Are there any areas that need special attention when writing tests and otherwise validating this change?</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">--Emanuel</div></div></div><div class="gmail_extra" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""><div class="gmail_quote">On Wed, Dec 16, 2015 at 10:15 AM, Michael Gottesman<span class="Apple-converted-space">&nbsp;</span><span dir="ltr" class="">&lt;<a href="mailto:mgottesman@apple.com" target="_blank" class="">mgottesman@apple.com</a>&gt;</span><span class="Apple-converted-space">&nbsp;</span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div style="word-wrap: break-word;" class="">SGTM. If you want as you finish these, I have a list of them = ).<div class=""><br class=""></div><div class="">I just filed another one:</div><div class=""><br class=""></div><div class=""><a href="https://bugs.swift.org/browse/SR-247" target="_blank" class="">https://bugs.swift.org/browse/SR-247</a></div><span class="HOEnZb"><font color="#888888" class=""><div class=""><br class=""></div><div class="">Michael</div></font></span><div class=""><div class="h5"><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Dec 16, 2015, at 5:30 AM, Emanuel Zephir &lt;<a href="mailto:emanuelzephir@gmail.com" target="_blank" class="">emanuelzephir@gmail.com</a>&gt; wrote:</div><br class=""><div class=""><div dir="ltr" class="">Unless anyone objects, I'd like to claim this. I've assigned issue SR-210 to myself.<div class=""><br class=""></div><div class="">--Emanuel</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Sun, Dec 13, 2015 at 1:29 PM, Michael Gottesman via swift-dev<span class="Apple-converted-space">&nbsp;</span><span dir="ltr" class="">&lt;<a href="mailto:swift-dev@swift.org" target="_blank" class="">swift-dev@swift.org</a>&gt;</span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div style="word-wrap: break-word;" class="">This is a small starter project for those who are interested in working with SIL.<div class=""><br class=""></div><div class="">The SIL Parser currently is unable to parse switch_enum of undef. I wrote a patch that does the work some time ago, but I never have had time to finish it (i.e. make sure everything works ok/write tests). I posted the patch in this issue:</div><div class=""><br class=""></div><div class=""><a href="https://bugs.swift.org/browse/SR-210" target="_blank" class="">https://bugs.swift.org/browse/SR-210</a></div><div class=""><br class=""></div><div class="">My hope is that even though a lot of the work is already done this may serve as good starting point for someone who wants to poke at the SIL Parser (a part of the code base that has not gotten as much attention as others).</div><div class=""><br class=""></div><div class="">Michael</div><img alt="" width="1" height="1" border="0" style="min-height: 1px !important; width: 1px !important; border-width: 0px !important; margin: 0px !important; padding: 0px !important;" class=""></div><br class="">_______________________________________________<br class="">swift-dev mailing list<br class=""><a href="mailto:swift-dev@swift.org" target="_blank" class="">swift-dev@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-dev" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-dev</a><br class=""><br class=""></blockquote></div><br class=""></div></div></blockquote></div><br class=""></div></div></div></div></blockquote></div><br class=""></div><img src="https://u2002410.ct.sendgrid.net/wf/open?upn=RoDF4MveSEMYBIqIJA6ub1g8cOZ-2BVYvqV-2FqygPhjPn90XdJeO36Ku60jH-2FYKy73fammEoll02WYhOCZ-2BL724lTpeI0gpctn8nLyCbyWs0fkwTQgNvctxA3TSGnEs3fi93ywfP-2B2M5TyX4UbZee3KH3U77Idu0XPVvTDZZcVyhfTBVV-2FdvS-2FFbAKBS3ulfGasaEBwq9zDLDcwAIKkAcH1Pldg-2BypPRcEmgf-2B4BPZwXxs-3D" alt="" width="1" height="1" border="0" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; height: 1px !important; width: 1px !important; border-width: 0px !important; margin: 0px !important; padding: 0px !important;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class=""><span class="Apple-converted-space">&nbsp;</span>_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">swift-dev mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="mailto:swift-dev@swift.org" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">swift-dev@swift.org</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="https://lists.swift.org/mailman/listinfo/swift-dev" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">https://lists.swift.org/mailman/listinfo/swift-dev</a></div></blockquote></div><br class=""></body></html>