Skip to content

Conversation

@DougGregor
Copy link
Member

@DougGregor DougGregor commented Jul 12, 2019

Lazy synthesis for a few simple cases that likely don't matter for performance, but are nonetheless nice to get away from ad hoc mutation of function bodies:

  • Bodies of implicitly-defined class deinitializers
  • Bodies of default initializers

…lass.

This is more a matter of principle than an optimization, eliminating
unnecessary calls to `AbstractFunctionDecl::setBody()`.
@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

When the parser wires up the body of a function, it's a legitimate use of
setting a parsed body. Separate these out from the other uses of
setBody() that we want to eliminate over time.
@DougGregor
Copy link
Member Author

Whoops, that second commit is bogus. Working on a fix.

@DougGregor DougGregor force-pushed the yet-more-lazy-function-bodies branch from e8a3af7 to 753322c Compare July 12, 2019 21:21
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

Obsoleted by #26131

@DougGregor DougGregor closed this Jul 15, 2019
@DougGregor DougGregor deleted the yet-more-lazy-function-bodies branch July 15, 2019 21:25
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.

1 participant