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

[dotnet] Added one more test to ensure that multiple types in a file work. #18073

Merged
merged 2 commits into from
Apr 14, 2023

Conversation

stephen-hawley
Copy link
Contributor

I wanted to make sure that multiple classes work correctly.
In all the previous tests, I was looking at either 1 class or the first class. Great, that works, but keep in mind that the code initializes the class handles looks like this:

ClassHandles.SomeObjCName = map [const].handle

I'm not really writing this code, since I'm writing directly in IL. The code that I generate looks like this:

ldarg map
ldc.i4 const
sizeof ObjCRuntime.Runtime/MTClassMap
mul
add
ldfld ObjCRuntime.Runtime/MTClassMap::handle

So what does that do?
1 - puts the address of the start of the map on the stack
2 - puts a constant (the index of the item we care about) on the stack
3 - puts the size of the MTClassMap on the stack
4 - multiply 2 & 3, leaving the result on the stack (this is the offset in bytes to the struct we want)
5 - add 1 and 4, leaving the address of the struct we want to access on the stack

Up to now, all the tests were operating with const being 0. You can understand that multiplying by zero in all the tests is not properly exercising this code.

@stephen-hawley stephen-hawley added not-notes-worthy Ignore for release notes dotnet An issue or pull request related to .NET (6) labels Apr 14, 2023
@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ API diff for current PR / commit

Legacy Xamarin (No breaking changes)
  • iOS (no change detected)
  • tvOS (no change detected)
  • watchOS (no change detected)
  • macOS (no change detected)
NET (empty diffs)
  • iOS: (empty diff detected)
  • tvOS: (empty diff detected)
  • MacCatalyst: (empty diff detected)
  • macOS: (empty diff detected)

✅ API diff vs stable

Legacy Xamarin (No breaking changes)
.NET (No breaking changes)
Legacy Xamarin (stable) vs .NET

✅ Generator diff

Generator diff is empty

Pipeline on Agent
Hash: 6271ff514902c1c41e0c137b232afecfa83e9244 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build] Windows Integration Tests passed 💻

All Windows Integration Tests passed.

Pipeline on Agent
Hash: 6271ff514902c1c41e0c137b232afecfa83e9244 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [PR Build] Tests on macOS M1 - Mac Big Sur (11.5) passed 💻

All tests on macOS M1 - Mac Big Sur (11.5) passed.

Pipeline on Agent
Hash: 6271ff514902c1c41e0c137b232afecfa83e9244 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [PR Build] Tests on macOS M1 - Mac Ventura (13.0) passed 💻

All tests on macOS M1 - Mac Ventura (13.0) passed.

Pipeline on Agent
Hash: 6271ff514902c1c41e0c137b232afecfa83e9244 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

📚 [PR Build] Artifacts 📚

Packages generated

View packages

Pipeline on Agent XAMBOT-1030.Ventura
Hash: 6271ff514902c1c41e0c137b232afecfa83e9244 [PR build]

@stephen-hawley stephen-hawley merged commit ae1f03e into xamarin:main Apr 14, 2023
@stephen-hawley stephen-hawley deleted the just-one-moar-test branch April 14, 2023 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dotnet An issue or pull request related to .NET (6) not-notes-worthy Ignore for release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants