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

[runtime] Simplify code to use existing local variable #15441

Merged
merged 2 commits into from
Jul 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ObjCRuntime/Class.cs
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ unsafe static bool CompareTokenReference (string? asm_name, int mod_token, int t
if ((token_reference & 0x1) == 0x1) {
// full token reference
var idx = (int) (token_reference >> 1);
var entry = Runtime.options->RegistrationMap->full_token_references + (IntPtr.Size + 8) * idx;
var entry = map->full_token_references + (IntPtr.Size + 8) * idx;
// first compare what's most likely to fail (the type's metadata token)
var token = (uint) Marshal.ReadInt32 (entry + IntPtr.Size + 4);
type_token |= 0x02000000 /* TypeDef - the token type is explicit in the full token reference, but not present in the type_token argument, so we have to add it before comparing */;
Expand Down