Skip to content

Use depth and index to lookup type metadata artificial variables #16937

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
merged 1 commit into from
Jun 13, 2018

Conversation

adrian-prantl
Copy link
Contributor

Use depth and index to lookup type metadata artificial variables …
instead of using name and decl context.

The advantages of this approach are three-fold:

  • This is necessary to support inlined generic functions.
  • We can retire the debugger-specific type name manfgling mode for archetypes.
  • This saves 270kb of debug information in the x86_64 libSwiftCore.dylib alone.

rdar://problem/38306256

@adrian-prantl adrian-prantl changed the title [don't merge!Use depth and index to lookup type metadata artificial variables [don't merge!] Use depth and index to lookup type metadata artificial variables Jun 1, 2018
@adrian-prantl adrian-prantl requested review from slavapestov and dcci June 1, 2018 00:49
@adrian-prantl adrian-prantl changed the title [don't merge!] Use depth and index to lookup type metadata artificial variables Use depth and index to lookup type metadata artificial variables Jun 1, 2018
@adrian-prantl
Copy link
Contributor Author

test with apple/swift-lldb#671
@swift-ci test

@swift-ci
Copy link
Contributor

swift-ci commented Jun 4, 2018

Build failed
Swift Test Linux Platform
Git Sha - df548d0577af099786fd7d5e79419bc988e06cf1

@swift-ci
Copy link
Contributor

swift-ci commented Jun 4, 2018

Build failed
Swift Test OS X Platform
Git Sha - df548d0577af099786fd7d5e79419bc988e06cf1

@adrian-prantl
Copy link
Contributor Author

test with apple/swift-lldb#671
@swift-ci test

@swift-ci
Copy link
Contributor

swift-ci commented Jun 4, 2018

Build failed
Swift Test OS X Platform
Git Sha - df548d0577af099786fd7d5e79419bc988e06cf1

@adrian-prantl
Copy link
Contributor Author

test with apple/swift-lldb#671
@swift-ci test

@swift-ci
Copy link
Contributor

swift-ci commented Jun 4, 2018

Build failed
Swift Test OS X Platform
Git Sha - 66f7298f4beec6518d416c775ec6dd09df3d2795

@adrian-prantl
Copy link
Contributor Author

test with apple/swift-lldb#671
@swift-ci test

1 similar comment
@adrian-prantl
Copy link
Contributor Author

test with apple/swift-lldb#671
@swift-ci test

Copy link
Member

@dcci dcci left a comment

Choose a reason for hiding this comment

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

Some comments inline. I'll try to review more carefully in the next hours.

@@ -1005,6 +1005,28 @@ static void VisitNodeDestructor(
}
}

static void VisitNodeDependentMember(ASTContext *ast,
Copy link
Member

Choose a reason for hiding this comment

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

We should really add a lldb-moduleimport-test test for this.

@@ -56,6 +56,7 @@ DebugTypeInfo DebugTypeInfo::getFromTypeInfo(DeclContext *DC,
// encounter one.
size = Size(0);
}

Copy link
Member

Choose a reason for hiding this comment

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

Spurious newline I assume?

instead of using name and decl context.

The advantages of this approach are three-fold:
- This is necessary to support inlined generic functions.
- We can retire the debugger-specific type name manfgling mode for archetypes.
- This saves 270kb of debug information in the x86_64 libSwiftCore.dylib alone.

<rdar://problem/38306256>
@adrian-prantl
Copy link
Contributor Author

@dcci: Can you take another look?

@adrian-prantl
Copy link
Contributor Author

test with apple/swift-lldb#671
@swift-ci test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - bab3000

Copy link
Member

@dcci dcci left a comment

Choose a reason for hiding this comment

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

LGTM

@adrian-prantl
Copy link
Contributor Author

test with apple/swift-lldb#671
@swift-ci test platform Linux

@adrian-prantl
Copy link
Contributor Author

test with apple/swift-lldb#671
@swift-ci test

@adrian-prantl adrian-prantl merged commit b52ef8b into swiftlang:master Jun 13, 2018
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