> On Sep 27, 2017, at 10:39 AM, John McCall via swift-dev <swift-dev@swift.org> 
> wrote:
> 
>> On Sep 27, 2017, at 1:24 PM, Jiho Choi <jray...@gmail.com 
>> <mailto:jray...@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.

You should look at pull requests #7837 and #9214:
https://github.com/apple/swift/pull/7837
https://github.com/apple/swift/pull/9214

#7837 the object header size on 32-bit architectures. The PR is not currently 
up-to-date, but should give you an idea of the scope of changes that would be 
necessary for your experiment. #9214 is an addition after #7837 that would also 
be affected by a header size change.


Another approach for experimental purposes is to modify StrongRefCount without 
changing its size. That struct is designed to store some data inline, and if 
necessary can transform into an out-of-line form that stores data of any size. 

You could change the arrangement of bits in the StrongRefCount inline form if 
you only need a few bits for your storage. 

Or you could force StrongRefCount to always use the out-of-line form and store 
whatever data you want there. This would be slower but probably fine for 
experimentation.


-- 
Greg Parker     gpar...@apple.com <mailto:gpar...@apple.com>     Runtime 
Wrangler


_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

Reply via email to