-
-
Notifications
You must be signed in to change notification settings - Fork 421
Conversation
|
Thanks for your pull request and interest in making D better, @jacob-carlborg! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + druntime#2952" |
|
Isn't it a bit weird to have those two values which are kind-of the same but not quite ? My intuition would be to just have |
I just didn't think of that 😊. |
|
@Geod24 the point was actually to be able to use the page size in a static context, i.e. If an immutable variable doesn't have a value and I try to use it in a static context I get this error: Also, a function with |
But then isn't it a problematic assumption ? 4kb is the smallest page size on most arches / OSes (wiki link) but as seen in that link it can be configured to be higher, and as memory becomes cheaper it would make sense that this become more and more frequent. Can you give me some link to those usages ?
Which makes sense, because that function could be called again later, manually.
Yeah there's no way to make it work. |
Yes, but that's how the code looks like. With this change it's not going to get any worse but it's a slight improvement. There are currently 165 occurrences of the value I can keep
These three are the ones that caused some of the tests on iOS to fail. There are more uses of the value |
|
All of those links are in unittests though. But if you look at the AscendingPageAllocator it actually does the right thing.
Yeah I don't think we should be putting that on you. Looking at this link, it seems that 16k was not always the default. Wikipedia says A7 appeared in 2013 with iPhone5S, and software updates for this chip has been discontinued this year, so I suppose you have no intention to support it and 16k is a good minimum (BTW is the minimum supported version for your iOS port documented anywhere?). So, revised suggestion:
How does that sound ? |
Yes, but if you look further down you'll see that it uses the hard coded value
No. The answer is a bit complicated. When it comes to the hardware, the intention it to only support 64bit. That means that the oldest possible version would be iPhone 5S. I have tested on iPhone 6, which was the model after iPhone 5S. When it comes to the software, the oldest version to possible support is iOS 9 (this is when native TLS support was adde,d according to Dan Olson). For any new code added, I have used the iOS 13.2 SDK as the base. When testing, I have compiled the code to target iOS 12.0. I have run the code on iPhone 6 running iOS 12.4.5. When it comes to deciding the exact version we want to officially support I would say that highly depends on what the CI environment is going to provide.
Ok.
Is that not clear enough know in the documentation?
Do we know that this value cannot change at runtime? We could use |
A shared static constructor can be called again manually as well: import std;
__gshared immutable int foo;
shared static this() @safe
{
foo += 3;
writeln("shared static this");
}
void main() @safe
{
writefln!"foo=%s"(foo);
_sharedStaticCtor_L4_C1();
writefln!"foo=%s"(foo);
}The above will print: |
|
🤦♂ |
These will give the size of a system page in bytes.
38d0772 to
cbc2258
Compare
|
@Geod24 renamed to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The trick (having two functions with the same name) makes me a bit nervous, but it seems to work.
Good point, and thanks for the pointer, the fix is trivial: dlang/dmd#10834 |
It’s mostly to get the D mangling without hard coding it. It’s been possible forever, required for .di files. A couple of years ago Manu asked to get that supported in the same file as well and that was implemented. |
These will give the size of a system page in bytes.