Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gsroa: allow anything that fits in a slice to be a slice #9281

Merged
merged 1 commit into from
Feb 7, 2019

Conversation

WalterBright
Copy link
Member

Previously, only if the type fit exactly in a slice would the slice happen. Now, it just has to fit in the slice.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @WalterBright!

Bugzilla references

Your 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 locally

If 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 + dmd#9281"

@WalterBright WalterBright force-pushed the gsroa.d branch 6 times, most recently from c2600c6 to fc53736 Compare January 21, 2019 09:12
Copy link
Contributor

@thewilsonator thewilsonator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restore tests.

@WalterBright WalterBright force-pushed the gsroa.d branch 13 times, most recently from 262a6ca to 1b89325 Compare January 22, 2019 01:49
@WalterBright
Copy link
Member Author

Looks like the culprit is slicing:

struct S { float x,y,z,w; }

on 64 bit machines (making 2 slices out of it).

@WalterBright WalterBright force-pushed the gsroa.d branch 5 times, most recently from 0860870 to 6b41f7e Compare January 22, 2019 09:23
@WalterBright WalterBright added the Review:WIP Work In Progress - not ready for review or pulling label Jan 22, 2019
@jacob-carlborg
Copy link
Contributor

No idea. The auto-tester is like a blackbox for me.

@thewilsonator
Copy link
Contributor

Heh, I can tell that from the notifications I get from #8528

@jacob-carlborg
Copy link
Contributor

jacob-carlborg commented Jan 24, 2019

Yeah, that's a complete mess. I can't get it to work on all platforms/CI systems.

@WalterBright
Copy link
Member Author

It still mysteriously fails on OSX64. Unfortunately, I cannot debug it because D no longer works on the older OSX, and Apple's OSX upgrade system is unimaginably awful. The install page says Sierra is installed, but the about box says Lion is running! Rebooting, it is still running Lion, but Sierra cannot be installed because it is already installed. Trying to install High Sierra leads to a [Next] button, which when I click on it it asks for the password. Entering the password, it goes back to the same [Next] button, which asks for the password again, in an infinite loop.

@jacob-carlborg
Copy link
Contributor

It still mysteriously fails on OSX64. Unfortunately, I cannot debug it because D no longer works on the older OSX.

It doesn't? How old version are we talking about? It should work on 10.7 (Lion).

@thewilsonator
Copy link
Contributor

It fails on the autotester, although I swear I've seen that date time test fail at least a dozen times (at least I think its the same one).

@jacob-carlborg
Copy link
Contributor

jacob-carlborg commented Feb 4, 2019

@WalterBright I built a debug build of DMD (7d4a008) that should work on 10.7 (Lion). I've attached it to this post.

dmd.zip

@UplinkCoder
Copy link
Member

sroa, despite being a horrible acronym, is simply not a good idea, if there is no solid data-flow-analysis.
I've ran into bugs with it before and I am sure there are more in hiding.

@WalterBright
Copy link
Member Author

Update: I got past where I was stuck. When it asked for a password, sometimes it wants your apple pw, sometimes your admin pw. The dialog box doesn't say, and I was confused. The maddening thing is whenever I get stuck, there is no help from the software. Googling it does no good, either, as it only turns up Apple "instructions" that just say click on "install".
The instructions say to not touch the computer when it has a black screen, but be patient, or it'd brick. I waited overnight, still black. Bravely I power cycled it, and it came back up. Unlike what Apple claims, it is unable to do a restart by itself.
Now I'm doing update after update, each time going through the black screen maneuver. Weirdly, the Apple ID pw it asks for works when installing OS updates, but app store updates, it says it's invalid. Oh well, I don't give a fig about iphoto or garageband anyway.
When I move the mouse over a link in Windows, I get an indication when I'm over a clickable something. With OSX, nope. There's no clue.
I don't know how Apple gets a reputation for usability. I don't know how it gets past QA to say it's "Installed" when it's only downloaded. I have no idea where it downloaded it to. Googling produces nothing useful. I wish it would give instructions on what to do next instead of just sitting there.

grrrr, grrrr, grrrrr

This is why I never update the OS until forced to. Days of downtime, wondering if I'd bricked the machine.

Note that I have a bone stock MacMini. The only non-Apple software on it is D.

Anyhow, I seem to have gotten Sierra, 10.9, installed sans those apps it won't let me update but nags me constantly about updating them. Good thing I don't use the gui interface. I needed 10.9 because the DMD download says 10.9 is the minimum version.

Now I'm going to figure out how to download DMD for OSX 10.9.
https://dlang.org/dmd-osx.html
Note how the OSX install page says:
~/dmd/linux/bin64/dmd
Sigh. And talks about a zip file, when the download packages are a dmg file and a tar.gx file. Sigh again.

@WalterBright
Copy link
Member Author

@jacob-carlborg I was running the version before Lion. I had to buy the Lion upgrade before being able to install any later ones. The Lion upgrade went better, after spending hours futzing with their 2FA. Sadly, the app store is unable to recognize any updates but Mojave, and naturally my macmini can't work with Mojave. Why does it offer updates that are incompatible with my machine? grrrr, grrr, grrr Thanks for the debug build.

@UplinkCoder I agree that SROA is a horrible acronym, beaten only by SFINAE, the world's worst acronym. The Slice-O-Matic (my brilliant name for SROA!) doesn't apply to most real world code, but when it does, it produces dramatic improvements. Besides, it's kind of fun.

@WalterBright
Copy link
Member Author

Following my own advice: https://issues.dlang.org/show_bug.cgi?id=19648

@WalterBright
Copy link
Member Author

Ok, I'm up & running on OSX now! Yay!

@WalterBright
Copy link
Member Author

I can repro the failure. Glad it's not one of those autotester-only ones!

@jacob-carlborg
Copy link
Contributor

Weirdly, the Apple ID pw it asks for works when installing OS updates

It's possible to connect the Apple ID to the computer, I never do that.

but app store updates, it says it's invalid

That's weird, it should be the Apple ID.

Oh well, I don't give a fig about iphoto or garageband anyway.

Really? Isn't that way you got a Mac 😃.

When I move the mouse over a link in Windows, I get an indication when I'm over a clickable something. With OSX, nope. There's no clue.

That's weird as well. I've never seen that problem. The cursor should turn into a hand.

I have no idea where it downloaded it to.

When you download a new OS from the App Store it will download an installer to the application directory (/Applications). Then you run the installer from there.

This is why I never update the OS until forced to. Days of downtime, wondering if I'd bricked the machine.

You know, that might be a problem. It's usually best to keep the machine up to date and install the latest OS. Otherwise, if you wait long enough, you'll run into these problems. For example, when a new release of macOS is available Apple will remove the previous version from App Store. If you're computer is too old that you cannot use the latest version, but you can use the previous version, then you cannot download that anymore.

To be really safe, I recommend creating a second partition. Every time there's a new major release, clone the main partition to the second partition and upgrade on one of the partitions and verify everything works correctly. If something break, you can always fallback to the other partition. You can clone a partition on macOS using the bundle Disk Utility (/Applications/Utilities/Disk Utility) (GUI application).

Sadly, the app store is unable to recognize any updates but Mojave, and naturally my macmini can't work with Mojave. Why does it offer updates that are incompatible with my machine? grrrr, grrr, grrr

Yeah, that's a good question. They want you to always run the latest release.

Ok, I'm up & running on OSX now! Yay!

Which version are you now finally running? I can download later versions if you cannot upgrade to Mojave. If one has downloaded them before they're still available on the Purchased tab in App Store.

@jacob-carlborg
Copy link
Contributor

@WalterBright BTW, if you have any Mac specific issues, please ping me and I'll try to help.

@WalterBright
Copy link
Member Author

@jacob-carlborg Thanks for all your help! I'm running Sierra right now.

As to why I bought a mac mini, it was to port dmd to it.

@UplinkCoder
Copy link
Member

changes in #9327 are still part of this pr

@WalterBright
Copy link
Member Author

@UplinkCoder I know. Once #9327 is merged I'll rebase this and those changes will vanish from this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants