<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=""><div><blockquote type="cite" class=""><div class="">On Sep 27, 2017, at 1:24 PM, Jiho Choi &lt;<a href="mailto:jray319@gmail.com" class="">jray319@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Thanks for the explanation.&nbsp; I modified those two locations you mentioned but the build failed during tests.&nbsp; I've been browsing the source code to figure out other dependences but didn't succeed yet.&nbsp; Could you please give me some pointers on where to look at?</div></div></blockquote><div><br class=""></div><div>You'll have to look at the test failures individually. &nbsp;If they're just IRGen tests failing because the IR no longer matches the current output, then you need to either fix the tests or just ignore them for the purposes of your experiment. &nbsp;If they're IRGen tests failing because the compiler is crashing, or execution tests failing because the running code is crashing, it's likely that I just forgot something that depends on the output. &nbsp;We're not going to be able to debug this problem for you in the abstract, though.</div><div><br class=""></div><div>John.</div><div><br class=""></div><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div><div class="">Regards,</div><div class="">Jiho</div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Tue, Sep 26, 2017 at 12:22 AM John McCall &lt;<a href="mailto:rjmccall@apple.com" class="">rjmccall@apple.com</a>&gt; wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">&gt; On Sep 26, 2017, at 12:56 AM, Jiho Choi via swift-dev &lt;<a href="mailto:swift-dev@swift.org" target="_blank" class="">swift-dev@swift.org</a>&gt; wrote:<br class="">
&gt; I want to add a field to StrongRefCount class for some experiment, but the build fails while building self-hosted 'swift-build'.&nbsp; I am using the version 3.1.1.<br class="">
&gt;<br class="">
&gt; Does the shape of StrongRefCount class have any implicit dependence on other parts of the runtime?<br class="">
<br class="">
The size of the heap header is hard-coded in the compiler.&nbsp; There's a function getHeapHeaderSize in StructLayout.cpp, but you'll also need to update the definition of RefCountedStructTy in IRGenModule.cpp, and almost certainly some other places.&nbsp; It's not something that's been carefully abstracted because it's something we don't really expect to change.<br class="">
<br class="">
John.<br class="">
<br class="">
&gt; What is the correct way to add a field to this class?<br class="">
&gt;<br class="">
&gt; Thanks,<br class="">
&gt; Jiho<br class="">
&gt; _______________________________________________<br class="">
&gt; swift-dev mailing list<br class="">
&gt; <a href="mailto:swift-dev@swift.org" target="_blank" class="">swift-dev@swift.org</a><br class="">
&gt; <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>
</div></blockquote></div><br class=""></body></html>