Skip to content

Revert public fragile hack #2857

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

Merged

Conversation

slavapestov
Copy link
Contributor

No description provided.

@slavapestov
Copy link
Contributor Author

@swift-ci Please test

1 similar comment
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@slavapestov
Copy link
Contributor Author

@eeckstein This is the revert that should fix the stdlib size regression in 3.0

@eeckstein
Copy link
Contributor

Thanks!

…nitializers

If the base class is in a different module and defines an internal
initializer, or it is in a different file and defines a private
initializer, the subclass cannot access this initializer.

Fix this by insisting on synthesizing initializers even if they
override an internal or private initializer in the base class.
In this case, synthesize them as a stub instead of a chaining
initializer. They cannot be called, and they cannot reference
the superclass initializer, so a stub is appropriate here.

Also in SILGen, emit vtable entries for stub initializers unless
they are overriding an Objective-C initializer.
…ity"

This reverts commit 8e43990.

See the discussion here for details:

<swiftlang@6723560>
…ialize-all is on"

This reverts commit 9a7a517.

See the discussion here for details:

<swiftlang@6723560>
@slavapestov slavapestov force-pushed the revert-public-fragile-hack branch from e42e287 to 6b92d95 Compare June 6, 2016 23:29
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@slavapestov
Copy link
Contributor Author

@jrose-apple Do you mind looking this over whenever you have a spare minute? (It's not for 3.0)

@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@jrose-apple
Copy link
Contributor

Hm. I really don't like the existence of the stub constructors. Can't we just take non-required constructors out of the vtable?

@slavapestov
Copy link
Contributor Author

Well, we have to emit something in place of the vtable entry.

@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@slavapestov slavapestov merged commit c4191de into swiftlang:master Jun 7, 2016
@jrose-apple
Copy link
Contributor

jrose-apple commented Jun 7, 2016

I don't understand why there's a vtable entry at all. If it's not a required initializer, you can't dynamically dispatch to it.

@slavapestov
Copy link
Contributor Author

Ah, good point. I need to see what IRGen does here (SIL's sil_vtable is actually a superset of what actually gets emitted in IRGen, which does its own walk of decls/methods). I have another patch that adds better tests in this area, I'll dig into the vtable code then too.

@slavapestov slavapestov deleted the revert-public-fragile-hack branch June 9, 2016 00:37
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.

3 participants