[swift-dev] Adding a field to StrongRefCount class
John McCall
rjmccall at apple.com
Wed Sep 27 12:39:32 CDT 2017
> On Sep 27, 2017, at 1:24 PM, Jiho Choi <jray319 at gmail.com> wrote:
>
> Thanks for the explanation. I modified those two locations you mentioned but the build failed during tests. I've been browsing the source code to figure out other dependences but didn't succeed yet. Could you please give me some pointers on where to look at?
You'll have to look at the test failures individually. 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. 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. We're not going to be able to debug this problem for you in the abstract, though.
John.
>
> Regards,
> Jiho
>
> On Tue, Sep 26, 2017 at 12:22 AM John McCall <rjmccall at apple.com <mailto:rjmccall at apple.com>> wrote:
> > On Sep 26, 2017, at 12:56 AM, Jiho Choi via swift-dev <swift-dev at swift.org <mailto:swift-dev at swift.org>> wrote:
> > I want to add a field to StrongRefCount class for some experiment, but the build fails while building self-hosted 'swift-build'. I am using the version 3.1.1.
> >
> > Does the shape of StrongRefCount class have any implicit dependence on other parts of the runtime?
>
> The size of the heap header is hard-coded in the compiler. 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. It's not something that's been carefully abstracted because it's something we don't really expect to change.
>
> John.
>
> > What is the correct way to add a field to this class?
> >
> > Thanks,
> > Jiho
> > _______________________________________________
> > swift-dev mailing list
> > swift-dev at swift.org <mailto:swift-dev at swift.org>
> > https://lists.swift.org/mailman/listinfo/swift-dev <https://lists.swift.org/mailman/listinfo/swift-dev>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20170927/8370e520/attachment.html>
More information about the swift-dev
mailing list